summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.fossil-settings/crnl-glob6
-rw-r--r--.fossil-settings/encoding-glob6
-rw-r--r--.project2
-rw-r--r--README6
-rw-r--r--changes99
-rw-r--r--compat/limits.h22
-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.34
-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.32
-rw-r--r--doc/CrtPhImgFmt.32
-rw-r--r--doc/CrtSelHdlr.34
-rw-r--r--doc/CrtWindow.34
-rw-r--r--doc/DeleteImg.32
-rw-r--r--doc/DrawFocHlt.32
-rw-r--r--doc/EventHndlr.32
-rw-r--r--doc/FindPhoto.316
-rw-r--r--doc/FontId.312
-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/GetColor.34
-rw-r--r--doc/GetCursor.34
-rw-r--r--doc/GetDash.32
-rw-r--r--doc/GetFont.314
-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.32
-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/MapWindow.38
-rw-r--r--doc/MeasureChar.318
-rw-r--r--doc/MoveToplev.32
-rw-r--r--doc/Name.32
-rw-r--r--doc/NameOfImg.32
-rw-r--r--doc/OwnSelect.32
-rw-r--r--doc/ParseArgv.32
-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.32
-rw-r--r--doc/SetGrid.32
-rw-r--r--doc/SetOptions.352
-rw-r--r--doc/SetVisual.32
-rw-r--r--doc/StrictMotif.32
-rw-r--r--doc/TextLayout.324
-rw-r--r--doc/TkInitStubs.32
-rw-r--r--doc/Tk_Init.32
-rw-r--r--doc/Tk_Main.34
-rw-r--r--doc/WindowId.34
-rw-r--r--doc/bell.n2
-rw-r--r--doc/bind.n4
-rw-r--r--doc/bindtags.n2
-rw-r--r--doc/bitmap.n2
-rw-r--r--doc/button.n6
-rw-r--r--doc/canvas.n6
-rw-r--r--doc/checkbutton.n4
-rw-r--r--doc/chooseColor.n2
-rw-r--r--doc/chooseDirectory.n4
-rw-r--r--doc/clipboard.n6
-rw-r--r--doc/colors.n46
-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.n2
-rw-r--r--doc/event.n28
-rw-r--r--doc/focus.n2
-rw-r--r--doc/focusNext.n2
-rw-r--r--doc/font.n6
-rw-r--r--doc/fontchooser.n2
-rw-r--r--doc/frame.n2
-rw-r--r--doc/getOpenFile.n8
-rw-r--r--doc/grab.n2
-rw-r--r--doc/grid.n2
-rw-r--r--doc/image.n2
-rw-r--r--doc/label.n2
-rw-r--r--doc/listbox.n24
-rw-r--r--doc/loadTk.n4
-rw-r--r--doc/lower.n2
-rw-r--r--doc/menu.n35
-rw-r--r--doc/menubar.n2
-rw-r--r--doc/menubutton.n2
-rw-r--r--doc/message.n2
-rw-r--r--doc/messageBox.n12
-rw-r--r--doc/option.n8
-rw-r--r--doc/optionMenu.n2
-rw-r--r--doc/options.n6
-rw-r--r--doc/pack-old.n2
-rw-r--r--doc/pack.n2
-rw-r--r--doc/palette.n2
-rw-r--r--doc/panedwindow.n27
-rw-r--r--doc/photo.n2
-rw-r--r--doc/place.n2
-rw-r--r--doc/popup.n2
-rw-r--r--doc/radiobutton.n6
-rw-r--r--doc/raise.n2
-rw-r--r--doc/scale.n4
-rw-r--r--doc/scrollbar.n2
-rw-r--r--doc/selection.n6
-rw-r--r--doc/send.n2
-rw-r--r--doc/spinbox.n24
-rw-r--r--doc/text.n294
-rw-r--r--doc/tk.n2
-rw-r--r--doc/tk4.0.ps550
-rw-r--r--doc/tk_mac.n2
-rw-r--r--doc/tkerror.n8
-rw-r--r--doc/tkvars.n2
-rw-r--r--doc/tkwait.n2
-rw-r--r--doc/toplevel.n2
-rw-r--r--doc/ttk_Geometry.330
-rw-r--r--doc/ttk_Theme.32
-rw-r--r--doc/ttk_button.n12
-rw-r--r--doc/ttk_checkbutton.n20
-rw-r--r--doc/ttk_combobox.n12
-rw-r--r--doc/ttk_entry.n46
-rw-r--r--doc/ttk_frame.n6
-rw-r--r--doc/ttk_image.n10
-rw-r--r--doc/ttk_intro.n22
-rw-r--r--doc/ttk_label.n14
-rw-r--r--doc/ttk_labelframe.n12
-rw-r--r--doc/ttk_menubutton.n12
-rw-r--r--doc/ttk_notebook.n30
-rw-r--r--doc/ttk_progressbar.n14
-rw-r--r--doc/ttk_radiobutton.n18
-rw-r--r--doc/ttk_scrollbar.n10
-rw-r--r--doc/ttk_separator.n6
-rw-r--r--doc/ttk_sizegrip.n2
-rw-r--r--doc/ttk_spinbox.n6
-rw-r--r--doc/ttk_style.n28
-rw-r--r--doc/ttk_treeview.n66
-rw-r--r--doc/ttk_vsapi.n4
-rw-r--r--doc/winfo.n2
-rw-r--r--doc/wish.14
-rw-r--r--doc/wm.n4
-rw-r--r--generic/tk.h18
-rw-r--r--generic/tkBind.c22
-rw-r--r--generic/tkBusy.c4
-rw-r--r--generic/tkCanvas.c13
-rw-r--r--generic/tkDecls.h3
-rw-r--r--generic/tkEntry.c193
-rw-r--r--generic/tkEvent.c6
-rw-r--r--generic/tkFont.c28
-rw-r--r--generic/tkFrame.c23
-rw-r--r--generic/tkGC.c7
-rw-r--r--generic/tkImgGIF.c22
-rw-r--r--generic/tkImgPNG.c19
-rw-r--r--generic/tkImgPhInstance.c25
-rw-r--r--generic/tkImgPhoto.c75
-rw-r--r--generic/tkInt.decls3
-rw-r--r--generic/tkInt.h15
-rw-r--r--generic/tkIntPlatDecls.h8
-rw-r--r--generic/tkListbox.c147
-rw-r--r--generic/tkMain.c15
-rw-r--r--generic/tkMenu.c9
-rw-r--r--generic/tkOldConfig.c6
-rw-r--r--generic/tkOption.c31
-rw-r--r--generic/tkPanedWindow.c111
-rw-r--r--generic/tkScale.c15
-rw-r--r--generic/tkScrollbar.c2
-rw-r--r--generic/tkSelect.c2
-rw-r--r--generic/tkStubInit.c11
-rw-r--r--generic/tkTest.c4
-rw-r--r--generic/tkText.c542
-rw-r--r--generic/tkText.h20
-rw-r--r--generic/tkTextBTree.c2
-rw-r--r--generic/tkTextDisp.c389
-rw-r--r--generic/tkTextIndex.c49
-rw-r--r--generic/tkTextTag.c50
-rw-r--r--generic/tkTextWind.c16
-rw-r--r--generic/tkUndo.c52
-rw-r--r--generic/tkUndo.h4
-rw-r--r--generic/tkUtil.c89
-rw-r--r--generic/tkWindow.c310
-rw-r--r--generic/ttk/ttkButton.c17
-rw-r--r--generic/ttk/ttkClamTheme.c20
-rw-r--r--generic/ttk/ttkClassicTheme.c32
-rw-r--r--generic/ttk/ttkEntry.c17
-rw-r--r--generic/ttk/ttkGenStubs.tcl2
-rw-r--r--generic/ttk/ttkImage.c34
-rw-r--r--generic/ttk/ttkLabel.c14
-rw-r--r--generic/ttk/ttkManager.c2
-rw-r--r--generic/ttk/ttkManager.h2
-rw-r--r--generic/ttk/ttkNotebook.c2
-rw-r--r--generic/ttk/ttkProgress.c6
-rw-r--r--generic/ttk/ttkScale.c14
-rw-r--r--generic/ttk/ttkScrollbar.c6
-rw-r--r--generic/ttk/ttkSquare.c28
-rw-r--r--generic/ttk/ttkStubLib.c2
-rw-r--r--generic/ttk/ttkTagSet.c2
-rw-r--r--generic/ttk/ttkTheme.h2
-rw-r--r--generic/ttk/ttkTrace.c2
-rw-r--r--generic/ttk/ttkWidget.h4
-rw-r--r--library/bgerror.tcl2
-rw-r--r--library/button.tcl19
-rw-r--r--library/console.tcl34
-rw-r--r--library/demos/aniwave.tcl2
-rw-r--r--library/demos/bind.tcl2
-rw-r--r--library/demos/entry2.tcl6
-rw-r--r--library/demos/floor.tcl4
-rw-r--r--library/demos/fontchoose.tcl2
-rw-r--r--library/demos/image2.tcl2
-rw-r--r--library/demos/items.tcl4
-rw-r--r--library/demos/ixset5
-rw-r--r--library/demos/knightstour.tcl4
-rw-r--r--library/demos/menu.tcl2
-rw-r--r--library/demos/menubu.tcl2
-rw-r--r--library/demos/msgbox.tcl4
-rw-r--r--library/demos/paned2.tcl6
-rw-r--r--library/demos/puzzle.tcl2
-rw-r--r--library/demos/rmt1
-rw-r--r--library/demos/sayings.tcl4
-rw-r--r--library/demos/search.tcl2
-rw-r--r--library/demos/square2
-rw-r--r--library/demos/states.tcl13
-rw-r--r--library/demos/style.tcl2
-rw-r--r--library/demos/text.tcl2
-rw-r--r--library/demos/textpeer.tcl2
-rw-r--r--library/demos/timer1
-rw-r--r--library/demos/twind.tcl12
-rw-r--r--library/demos/widget9
-rw-r--r--library/dialog.tcl1
-rw-r--r--library/entry.tcl11
-rw-r--r--library/images/lamp.pngbin8203 -> 0 bytes
-rw-r--r--library/images/lamp.svg114
-rw-r--r--library/images/logo.eps10
-rw-r--r--library/images/pwrdLogo.eps10
-rw-r--r--library/listbox.tcl36
-rw-r--r--library/megawidget.tcl169
-rw-r--r--library/menu.tcl23
-rw-r--r--library/msgbox.tcl2
-rw-r--r--library/msgs/es.msg4
-rw-r--r--library/msgs/ru.msg4
-rw-r--r--library/scrlbar.tcl17
-rw-r--r--library/spinbox.tcl55
-rw-r--r--library/text.tcl138
-rw-r--r--library/tk.tcl6
-rw-r--r--library/tkfbox.tcl5
-rw-r--r--library/ttk/button.tcl2
-rw-r--r--library/ttk/clamTheme.tcl2
-rw-r--r--library/ttk/defaults.tcl2
-rw-r--r--library/ttk/entry.tcl4
-rw-r--r--library/ttk/menubutton.tcl16
-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/vistaTheme.tcl12
-rw-r--r--macosx/GNUmakefile4
-rw-r--r--macosx/README61
-rw-r--r--macosx/Tk-Common.xcconfig2
-rw-r--r--macosx/Tk-Info.plist.in4
-rw-r--r--macosx/Tk.xcode/project.pbxproj36
-rw-r--r--macosx/Tk.xcodeproj/project.pbxproj36
-rw-r--r--macosx/Wish-Info.plist.in12
-rw-r--r--macosx/configure.ac2
-rw-r--r--macosx/tkMacOSXButton.c34
-rw-r--r--macosx/tkMacOSXCursor.c5
-rw-r--r--macosx/tkMacOSXDefault.h2
-rw-r--r--macosx/tkMacOSXDialog.c214
-rw-r--r--macosx/tkMacOSXDraw.c188
-rw-r--r--macosx/tkMacOSXEmbed.c2
-rw-r--r--macosx/tkMacOSXEvent.c33
-rw-r--r--macosx/tkMacOSXFont.c32
-rw-r--r--macosx/tkMacOSXHLEvents.c741
-rw-r--r--macosx/tkMacOSXInit.c66
-rw-r--r--macosx/tkMacOSXInt.h2
-rw-r--r--macosx/tkMacOSXKeyEvent.c64
-rw-r--r--macosx/tkMacOSXMenu.c52
-rw-r--r--macosx/tkMacOSXMouseEvent.c121
-rw-r--r--macosx/tkMacOSXNotify.c160
-rw-r--r--macosx/tkMacOSXPrivate.h65
-rw-r--r--macosx/tkMacOSXScrlbr.c86
-rw-r--r--macosx/tkMacOSXSubwindows.c91
-rw-r--r--macosx/tkMacOSXWindowEvent.c156
-rw-r--r--macosx/tkMacOSXWm.c222
-rw-r--r--macosx/tkMacOSXXStubs.c99
-rw-r--r--macosx/ttkMacOSXTheme.c2
-rw-r--r--tests/all.tcl3
-rw-r--r--tests/bell.test2
-rw-r--r--tests/bevel.tcl41
-rw-r--r--tests/bind.test393
-rw-r--r--tests/bitmap.test6
-rw-r--r--tests/border.test22
-rw-r--r--tests/button.test264
-rw-r--r--tests/canvImg.test10
-rw-r--r--tests/canvMoveto.test2
-rw-r--r--tests/canvRect.test12
-rw-r--r--tests/canvas.test12
-rw-r--r--tests/clipboard.test2
-rw-r--r--tests/clrpick.test2
-rw-r--r--tests/cmds.test2
-rw-r--r--tests/color.test2
-rw-r--r--tests/config.test34
-rw-r--r--tests/constraints.tcl2
-rw-r--r--tests/cursor.test2
-rw-r--r--tests/entry.test355
-rw-r--r--tests/event.test14
-rw-r--r--tests/filebox.test2
-rw-r--r--tests/focus.test22
-rw-r--r--tests/font.test188
-rw-r--r--tests/frame.test8
-rw-r--r--tests/geometry.test2
-rw-r--r--tests/image.test40
-rw-r--r--tests/imgPhoto.test42
-rw-r--r--tests/listbox.test121
-rw-r--r--tests/main.test2
-rw-r--r--tests/menu.test122
-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.file318
-rw-r--r--tests/option.test14
-rw-r--r--tests/pack.test2
-rw-r--r--tests/panedwindow.test264
-rw-r--r--tests/place.test2
-rw-r--r--tests/raise.test6
-rw-r--r--tests/safe.test8
-rw-r--r--tests/scale.test110
-rw-r--r--tests/scrollbar.test87
-rw-r--r--tests/select.test8
-rw-r--r--tests/spinbox.test347
-rw-r--r--tests/text.test601
-rw-r--r--tests/textDisp.test135
-rw-r--r--tests/textImage.test14
-rw-r--r--tests/textIndex.test48
-rw-r--r--tests/textMark.test2
-rw-r--r--tests/textTag.test761
-rw-r--r--tests/textWind.test19
-rw-r--r--tests/ttk/all.tcl3
-rw-r--r--tests/ttk/checkbutton.test16
-rw-r--r--tests/ttk/combobox.test2
-rw-r--r--tests/ttk/image.test2
-rw-r--r--tests/ttk/labelframe.test2
-rw-r--r--tests/ttk/notebook.test21
-rw-r--r--tests/ttk/panedwindow.test6
-rw-r--r--tests/ttk/scrollbar.test8
-rw-r--r--tests/ttk/spinbox.test27
-rw-r--r--tests/ttk/treetags.test6
-rw-r--r--tests/ttk/ttk.test2
-rw-r--r--tests/ttk/validate.test2
-rw-r--r--tests/unixButton.test14
-rw-r--r--tests/unixEmbed.test38
-rw-r--r--tests/unixFont.test6
-rw-r--r--tests/unixMenu.test156
-rw-r--r--tests/unixWm.test8
-rw-r--r--tests/visual_bb.test12
-rw-r--r--tests/winButton.test10
-rw-r--r--tests/winDialog.test344
-rw-r--r--tests/winFont.test22
-rw-r--r--tests/winMenu.test6
-rw-r--r--tests/winWm.test6
-rw-r--r--tests/wm.test26
-rw-r--r--unix/Makefile.in23
-rwxr-xr-xunix/configure11357
-rw-r--r--unix/configure.ac (renamed from unix/configure.in)16
-rw-r--r--unix/tcl.m416
-rw-r--r--unix/tk.spec6
-rw-r--r--unix/tkConfig.h.in6
-rw-r--r--unix/tkUnixCursor.c1
-rw-r--r--unix/tkUnixDefault.h2
-rw-r--r--unix/tkUnixEmbed.c5
-rw-r--r--unix/tkUnixFont.c40
-rw-r--r--unix/tkUnixPort.h6
-rw-r--r--unix/tkUnixRFont.c158
-rw-r--r--unix/tkUnixSelect.c4
-rw-r--r--unix/tkUnixWm.c7
-rw-r--r--unix/tkUnixXId.c54
-rw-r--r--win/Makefile.in3
-rw-r--r--win/README2
-rwxr-xr-xwin/buildall.vc.bat214
-rwxr-xr-xwin/configure6390
-rw-r--r--win/configure.ac (renamed from win/configure.in)18
-rw-r--r--win/makefile.bc1074
-rw-r--r--win/makefile.vc2063
-rw-r--r--win/mkd.bat24
-rw-r--r--win/nmakehlp.c6
-rw-r--r--win/rc/lamp.bmpbin2102 -> 2102 bytes
-rw-r--r--win/rc/tk_base.rc12
-rw-r--r--win/rc/wish.icobin46878 -> 43646 bytes
-rw-r--r--win/rc/wish.rc2
-rw-r--r--win/rmd.bat40
-rw-r--r--win/rules.vc1437
-rw-r--r--win/tcl.m443
-rw-r--r--win/tkConfig.sh.in2
-rw-r--r--win/tkWinClipboard.c36
-rw-r--r--win/tkWinColor.c14
-rw-r--r--win/tkWinDefault.h2
-rw-r--r--win/tkWinDialog.c98
-rw-r--r--win/tkWinEmbed.c7
-rw-r--r--win/tkWinFont.c27
-rw-r--r--win/tkWinKey.c59
-rw-r--r--win/tkWinMenu.c29
-rw-r--r--win/tkWinPort.h7
-rw-r--r--win/tkWinScrlbr.c4
-rw-r--r--win/tkWinWm.c14
-rw-r--r--win/tkWinX.c129
-rw-r--r--xlib/X11/Xlib.h3
-rw-r--r--xlib/X11/Xutil.h4
441 files changed, 19103 insertions, 17549 deletions
diff --git a/.fossil-settings/crnl-glob b/.fossil-settings/crnl-glob
index e69de29..7175730 100644
--- a/.fossil-settings/crnl-glob
+++ b/.fossil-settings/crnl-glob
@@ -0,0 +1,6 @@
+win/buildall.vc.bat
+win/makefile.bc
+win/makefile.vc
+win/mkd.bat
+win/rmd.bat
+win/rules.vc
diff --git a/.fossil-settings/encoding-glob b/.fossil-settings/encoding-glob
new file mode 100644
index 0000000..7175730
--- /dev/null
+++ b/.fossil-settings/encoding-glob
@@ -0,0 +1,6 @@
+win/buildall.vc.bat
+win/makefile.bc
+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/README b/README
index 1470c04..cb3bdd5 100644
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
README: Tk
- This is the Tk 8.6.4 source distribution.
+ This is the Tk 8.7a0 source distribution.
http://sourceforge.net/projects/tcl/files/Tcl/
You can get any source release of Tk from the URL above.
@@ -10,9 +10,9 @@ This directory contains the sources and documentation for Tk, an X11
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 at
+this release, see the Tcl/Tk 8.7 Web page at
- http://www.tcl.tk/software/tcltk/8.6.html
+ http://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 81be9f1..bf3e62e 100644
--- a/changes
+++ b/changes
@@ -7167,3 +7167,102 @@ Tk Cocoa 2.0: App Store enabled (walzer,culler,desmera,owen,nyberg,reincke)
*** POTENTIAL INCOMPATIBILITY ***
--- Released 8.6.4, March 12, 2015 --- http://core.tcl.tk/tk/ for details
+
+2015-03-10 (bug) Cocoa: premature image free crash (walzer)
+
+2015-03-15 (bug) Cocoa: wish launches in front. [focus -force] works (culler)
+
+2015-04-09 (bug)[e4ed00] [$text index "1.0 display wordstart"] crash (vogel)
+
+2015-04-09 (bug)[562118] Unicode support of "wordstart" modifier (vogel)
+
+2015-05-05 (bug)[06c3fc] PNG alpha error corrupted output file (gauthier,porter)
+
+2015-05-20 (bug)[dece63] various mem corruptions in images (mic42,porter)
+
+2015-05-24 (bug)[53f8fc] panedwindow geometry management (vogel)
+
+2015-05-26 (bug)[1641721] tk_getOpenFile symlink display doubled (nijtmans)
+
+2015-06-01 (bug)[d7bad5][2368195][3592454][1714535][1292219][3592454]
+ panedwindow fixes (vogel)
+
+2015-06-25 (bug)[805cff] Tk_ConfigureWidget() segfault (aspect,nijtmans)
+
+2015-07-13 (bug)[3f179a] Text widget crash with elided text (vogel)
+
+2015-07-16 (bug)[2886436] Stop [$text delete] acting before start index (vogel)
+
+2015-07-28 (bug)[1236306] TraverseToMenu error bound to toplevel destroy (vogel)
+
+2015-08-20 (bug)[00189c] MSVC 14: semi-static UCRT support (dower,nijtmans)
+
+2015-09-13 (bug)[cc0ba3] PNG read buffer overflow (maxjarek,porter)
+
+2015-09-29 (bug)[1501749] Crash embedded window delete bound to <Map> (vogel)
+
+2015-10-04 (license) Replace icons that lacked clear free license (cowals)
+
+2015-10-06 (bug)[46c83f] Win: tk_getOpenFile -initialdir (koend,nadkarni)
+
+2015-10-08 (new feature)[TIP 437] New panedwindow options (vogel)
+
+2015-10-09 (bug)[1669632] [text] autoseparator placement (nash,vogel)
+
+2015-10-09 (bug)[2262711] [text] RE search Unicode+elided (kaitzschu,vogel)
+
+2015-10-09 (bug)[1815161] [$text count -ypixels] needs management (vogel)
+
+2015-10-22 (bug)[1520118] Document spinbox validate expectations (vogel)
+
+2015-10-22 (bug)[1414025] $entry insertion cursor visibility (vogel)
+
+2015-10-26 (bug) PNG rendering on El Capitan (meier,walzer)
+
+2015-11-08 (bug)[2160206] menubutton panic (vogel)
+
+2015-11-08 (bug)[220854] Display trailing TAB in entry (vogel)
+
+2015-11-08 (bug)[542199] double click on lone char in entry (vogel)
+
+2015-11-08 (bug)[297442d] strict motif binding on <Control-underscore> (vogel)
+
+2015-11-08 (bug)[3601604] $listbox -takefocus (vogel)
+
+2015-11-09 (bug)[5ee8af] X, Win: 64-bit enable embedded windows (vogel)
+
+2015-11-29 (bug)[1997299] [text] tag borderwidth leak (vogel)
+
+2015-12-12 (bug)[1739605] [text see] misbehavior (danckaert)
+
+2015-12-13 (bug)[ff8a1e] Never-mapped [text] performance (danckaert)
+
+2015-12-19 (bug)[1700065] Report errors from -textvariable write trace (vogel)
+
+2015-12-19 (bug)[793909] -textvariable handle undefined namespace (vogel)
+
+2015-12-26 (bug)[2f78c7] crash with [text] and [tablelist] (vogel)
+
+2016-01-06 (bug)[1288433,3102228] <<ListboxSelect>> misfires (vogel)
+
+2016-01-08 (bug)[1510538] initial scrollbar width (vogel,nijtmans)
+
+2016-01-08 (bug)[1305128] event not received by scrollbar (vogel,nijtmans)
+
+2016-01-09 (bug)[1927212] Mousewheel/scrollbar bindings (vogel)
+
+2016-01-11 (bug)[63c354] Cocoa message boxes (culler)
+
+2016-01-12 (bug)[2049429] get more $text options from database (vogel)
+
+2016-01-22 (TIP 441) New option [listbox ... -justify] (vogel)
+
+2016-01-25 (bug) OBOE in ttk::notebook options parsing (bromley,english)
+
+2016-02-08 (enhance) [option readile] expects utf-8 file (oehlmann,nijtmans)
+
+2016-02-08 (bug) crash in [$text delete] (griffin,vogel)
+
+Tk Cocoa 2.0: More drawing internals refinements (culler,walzer)
+
+--- Released 8.6.5, February 29, 2016 --- http://core.tcl.tk/tk/ for details
diff --git a/compat/limits.h b/compat/limits.h
deleted file mode 100644
index 2cb082b..0000000
--- a/compat/limits.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * limits.h --
- *
- * This is a dummy header file to #include in Tcl when there
- * is no limits.h in /usr/include. There are only a few
- * definitions here; also see tclPort.h, which already
- * #defines some of the things here if they're not arleady
- * defined.
- *
- * Copyright (c) 1991 The Regents of the University of California.
- * Copyright (c) 1994 Sun Microsystems, Inc.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- */
-
-#define LONG_MIN 0x80000000
-#define LONG_MAX 0x7fffffff
-#define INT_MIN 0x80000000
-#define INT_MAX 0x7fffffff
-#define SHRT_MIN 0x8000
-#define SHRT_MAX 0x7fff
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 d53c5b1..6ae3d97 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 ddc1030..92be073 100644
--- a/doc/ConfigWidg.3
+++ b/doc/ConfigWidg.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_ConfigureWidget 3 4.1 Tk "Tk Library Procedures"
.so man.macros
.BS
@@ -174,7 +174,7 @@ legal values for \fItype\fR, and the corresponding actions, are:
\fBTK_CONFIG_ACTIVE_CURSOR\fR
The value
must be an ASCII string identifying a cursor in a form
-suitable for passing to \fBTk_GetCursor\fR.
+suitable for passing to \fBTk_GetCursor\fR.
The value is converted to a \fBTk_Cursor\fR by calling
\fBTk_GetCursor\fR and the result is stored in the target.
In addition, the resulting cursor is made the active cursor
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 98b93f7..01c3852 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 c2161d1..c2aac03 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..f9198f3 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
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/CrtSelHdlr.3 b/doc/CrtSelHdlr.3
index 2aeffa9..2292ccc 100644
--- a/doc/CrtSelHdlr.3
+++ b/doc/CrtSelHdlr.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_CreateSelHandler 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
@@ -44,7 +44,7 @@ requestor.
\fBTk_CreateSelHandler\fR arranges for a particular procedure
(\fIproc\fR) to be called whenever \fIselection\fR is owned by
\fItkwin\fR and the selection contents are requested in the
-form given by \fItarget\fR.
+form given by \fItarget\fR.
\fITarget\fR should be one of
the entries defined in the left column of Table 2 of the
X Inter-Client Communication Conventions Manual (ICCCM) or
diff --git a/doc/CrtWindow.3 b/doc/CrtWindow.3
index 8f44545..b254460 100644
--- a/doc/CrtWindow.3
+++ b/doc/CrtWindow.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_CreateWindow 3 4.2 Tk "Tk Library Procedures"
.so man.macros
.BS
@@ -52,7 +52,7 @@ Name of new window, specified as path name within application
.BE
.SH DESCRIPTION
.PP
-The procedures \fBTk_CreateWindow\fR,
+The procedures \fBTk_CreateWindow\fR,
\fBTk_CreateAnonymousWindow\fR, and \fBTk_CreateWindowFromPath\fR
are used to create new windows for
use in Tk-based applications. Each of the procedures returns a token
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 97857fb..8c47e78 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/FindPhoto.3 b/doc/FindPhoto.3
index d6ccb5b..61a47de 100644
--- a/doc/FindPhoto.3
+++ b/doc/FindPhoto.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.
@@ -99,6 +99,8 @@ being written to the photo image.
particular photo image to the other procedures. The parameter is the
name of the image, that is, the name specified to the \fBimage create
photo\fR command, or assigned by that command if no name was specified.
+If \fIimageName\fR does not exist or is not a photo image,
+\fBTk_FindPhoto\fR returns NULL.
.PP
\fBTk_PhotoPutBlock\fR is used to supply blocks of image data to be
displayed. The call affects an area of the image of size
@@ -181,6 +183,18 @@ in the structure pointed to by the \fIblockPtr\fR parameter with values
that describe the address and layout of the image data that the
photo image has stored internally. The values are valid
until the image is destroyed or its size is changed.
+.PP
+It is possible to modify an image by writing directly to the data
+the \fIpixelPtr\fR field points to. The size of the image cannot be
+changed this way, though.
+Also, changes made by writing directly to \fIpixelPtr\fR will not be
+immediately visible, but only after a call to
+\fBTk_ImageChanged\fR or after an event that causes the interested
+widgets to redraw themselves.
+For these reasons usually it is preferable to make changes to
+a copy of the image data and write it back with
+\fBTk_PhotoPutBlock\fR or \fBTk_PhotoPutZoomedBlock\fR.
+.PP
\fBTk_PhotoGetImage\fR returns 1 for compatibility with the
corresponding procedure in the old photo widget.
.PP
diff --git a/doc/FontId.3 b/doc/FontId.3
index c79b89f..9d35ae6 100644
--- a/doc/FontId.3
+++ b/doc/FontId.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_FontId 3 8.0 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
-Tk_FontId, Tk_GetFontMetrics, Tk_PostscriptFontName \- accessor functions for
+Tk_FontId, Tk_GetFontMetrics, Tk_PostscriptFontName \- accessor functions for
fonts
.SH SYNOPSIS
.nf
@@ -37,7 +37,7 @@ Postscript font that corresponds to \fItkfont\fR will be appended.
.PP
Given a \fItkfont\fR, \fBTk_FontId\fR returns the token that should be
selected into an XGCValues structure in order to construct a graphics
-context that can be used to draw text in the specified font.
+context that can be used to draw text in the specified font.
.PP
\fBTk_GetFontMetrics\fR computes the ascent, descent, and linespace of the
\fItkfont\fR in pixels and stores those values in the structure pointer to by
@@ -45,7 +45,7 @@ context that can be used to draw text in the specified font.
multiple lines of text, to align the baselines of text in different
fonts, and to vertically align text in a given region. See the
documentation for the \fBfont\fR command for definitions of the terms
-ascent, descent, and linespace, used in font metrics.
+ascent, descent, and linespace, used in font metrics.
.PP
\fBTk_PostscriptFontName\fR maps a \fItkfont\fR to the corresponding
Postscript font name that should be used when printing. The return value
@@ -56,10 +56,10 @@ appended to \fIdsPtr\fR. \fIDsPtr\fR must refer to an initialized
Postscript printer, the
following screen font families should print correctly:
.IP
-\fBAvant Garde\fR, \fBArial\fR, \fBBookman\fR, \fBCourier\fR,
+\fBAvant Garde\fR, \fBArial\fR, \fBBookman\fR, \fBCourier\fR,
\fBCourier New\fR, \fBGeneva\fR, \fBHelvetica\fR, \fBMonaco\fR,
\fBNew Century Schoolbook\fR, \fBNew York\fR, \fBPalatino\fR, \fBSymbol\fR,
-\fBTimes\fR, \fBTimes New Roman\fR, \fBZapf Chancery\fR, and
+\fBTimes\fR, \fBTimes New Roman\fR, \fBZapf Chancery\fR, and
\fBZapf Dingbats\fR.
.PP
Any other font families may not print correctly because the computed
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/GetColor.3 b/doc/GetColor.3
index 9d07d95..15254aa 100644
--- a/doc/GetColor.3
+++ b/doc/GetColor.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_AllocColorFromObj 3 8.1 Tk "Tk Library Procedures"
.so man.macros
.BS
@@ -127,7 +127,7 @@ This package maintains a database
of all the colors currently in use.
If the same color is requested multiple times from
\fBTk_GetColor\fR or \fBTk_AllocColorFromObj\fR (e.g. by different
-windows), or if the
+windows), or if the
same intensities are requested multiple times from
\fBTk_GetColorByValue\fR, then existing pixel values will
be re-used. Re-using an existing pixel avoids any interaction
diff --git a/doc/GetCursor.3 b/doc/GetCursor.3
index 8526a47..403c05e 100644
--- a/doc/GetCursor.3
+++ b/doc/GetCursor.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_AllocCursorFromObj 3 8.1 Tk "Tk Library Procedures"
.so man.macros
.BS
@@ -118,7 +118,7 @@ in preference to black and white cursors.
In this form, \fIsourceName\fR and \fImaskName\fR are the names of
files describing cursors for the cursor's source bits and mask.
Each file must be in standard X11 cursor format.
-\fIFgColor\fR and \fIbgColor\fR
+\fIFgColor\fR and \fIbgColor\fR
indicate the colors to use for the
cursor, in any of the forms acceptable to \fBTk_GetColor\fR. This
form of the command will not work on Macintosh or Windows computers.
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/GetFont.3 b/doc/GetFont.3
index cf02f00..0504916 100644
--- a/doc/GetFont.3
+++ b/doc/GetFont.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_AllocFontFromObj 3 8.1 Tk "Tk Library Procedures"
.so man.macros
.BS
@@ -14,19 +14,19 @@ Tk_AllocFontFromObj, Tk_GetFont, Tk_GetFontFromObj, Tk_NameOfFont, Tk_FreeFontFr
.nf
\fB#include <tk.h>\fR
.sp
-Tk_Font
+Tk_Font
\fBTk_AllocFontFromObj(\fIinterp, tkwin, objPtr\fB)\fR
.sp
-Tk_Font
-\fBTk_GetFont(\fIinterp, tkwin, string\fB)\fR
+Tk_Font
+\fBTk_GetFont(\fIinterp, tkwin, string\fB)\fR
.sp
-Tk_Font
+Tk_Font
\fBTk_GetFontFromObj(\fItkwin, objPtr\fB)\fR
.sp
const char *
\fBTk_NameOfFont(\fItkfont\fB)\fR
.sp
-Tk_Font
+Tk_Font
\fBTk_FreeFontFromObj(\fItkwin, objPtr\fB)\fR
.sp
void
@@ -55,7 +55,7 @@ returns a token that represents the font. The return value can be used
in subsequent calls to procedures such as \fBTk_GetFontMetrics\fR,
\fBTk_MeasureChars\fR, and \fBTk_FreeFont\fR. The Tk_Font token
will remain valid until
-\fBTk_FreeFontFromObj\fR or \fBTk_FreeFont\fR is called to release it.
+\fBTk_FreeFontFromObj\fR or \fBTk_FreeFont\fR is called to release it.
\fIObjPtr\fR can contain either a symbolic name or a font description; see
the documentation for the \fBfont\fR command for a description of the
valid formats. If \fBTk_AllocFontFromObj\fR is unsuccessful (because,
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 abd0880..70145aa 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
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 bc293b6..f3072de 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 5528fa5..d0fccf1 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/MapWindow.3 b/doc/MapWindow.3
index 8abce64..a3c6296 100644
--- a/doc/MapWindow.3
+++ b/doc/MapWindow.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_MapWindow 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
@@ -35,9 +35,9 @@ deferred window creation.
from the screen.
.PP
If \fItkwin\fR is a child window (i.e. \fBTk_CreateWindow\fR was
-used to create a child window), then event handlers interested in map
-and unmap events are invoked immediately. If \fItkwin\fR is not an
-internal window, then the event handlers will be invoked later, after
+used to create a child window), then event handlers interested in map
+and unmap events are invoked immediately. If \fItkwin\fR is not an
+internal window, then the event handlers will be invoked later, after
X has seen the request and returned an event for it.
.PP
These procedures should be used in place of the X procedures
diff --git a/doc/MeasureChar.3 b/doc/MeasureChar.3
index 7433451..3959978 100644
--- a/doc/MeasureChar.3
+++ b/doc/MeasureChar.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_MeasureChars 3 8.1 Tk "Tk Library Procedures"
.so man.macros
.BS
@@ -32,7 +32,7 @@ returned by a previous call to \fBTk_GetFont\fR.
Text to be measured or displayed. Need not be null terminated. Any
non-printing meta-characters in the string (such as tabs, newlines, and
other control characters) will be measured or displayed in a
-platform-dependent manner.
+platform-dependent manner.
.AP int numBytes in
The maximum number of bytes to consider when measuring or drawing
\fIstring\fR. Must be greater than or equal to 0.
@@ -60,11 +60,11 @@ Display on which to draw.
.AP Drawable drawable in
Window or pixmap in which to draw.
.AP GC gc in
-Graphics context for drawing characters. The font selected into this GC
+Graphics context for drawing characters. The font selected into this GC
must be the same as the \fItkfont\fR.
.AP int "x, y" in
Coordinates at which to place the left edge of the baseline when displaying
-\fIstring\fR.
+\fIstring\fR.
.AP int firstByte in
The index of the first byte of the first character to underline in the
\fIstring\fR. Underlining begins at the left edge of this character.
@@ -80,7 +80,7 @@ single-line strings. To measure and display single-font, multi-line,
justified text, refer to the documentation for \fBTk_ComputeTextLayout\fR.
There is no programming interface in the core of Tk that supports
multi-font, multi-line text; support for that behavior must be built on
-top of simpler layers.
+top of simpler layers.
Note that the interfaces described here are
byte-oriented not character-oriented, so index values coming from Tcl
scripts need to be converted to byte offsets using the
@@ -95,7 +95,7 @@ escape sequences, while under Windows and Macintosh hollow or solid boxes
may be substituted. Refer to the documentation for
\fBTk_ComputeTextLayout\fR for a programming interface that supports the
platform-independent expansion of tab characters into columns and
-newlines/returns into multi-line text.
+newlines/returns into multi-line text.
.PP
\fBTk_MeasureChars\fR is used both to compute the length of a given
string and to compute how many characters from a string fit in a given
@@ -106,12 +106,12 @@ value will be \fInumBytes\fR. \fI*lengthPtr\fR is filled with the computed
width, in pixels, of the portion of the string that was measured. For
example, if the return value is 5, then \fI*lengthPtr\fR is filled with the
distance between the left edge of \fIstring\fR[0] and the right edge of
-\fIstring\fR[4].
+\fIstring\fR[4].
.PP
\fBTk_TextWidth\fR is a wrapper function that provides a simpler interface
to the \fBTk_MeasureChars\fR function. The return value is how much
space in pixels the given \fIstring\fR needs.
-.PP
+.PP
\fBTk_DrawChars\fR draws the \fIstring\fR at the given location in the
given \fIdrawable\fR.
.PP
@@ -120,7 +120,7 @@ given \fIstring\fR. It does not draw the characters (which are assumed to
have been displayed previously by \fBTk_DrawChars\fR); it just draws the
underline. This procedure is used to underline a few characters without
having to construct an underlined font. To produce natively underlined
-text, the appropriate underlined font should be constructed and used.
+text, the appropriate underlined font should be constructed and used.
.SH "SEE ALSO"
font(n), FontId(3)
.SH KEYWORDS
diff --git a/doc/MoveToplev.3 b/doc/MoveToplev.3
index effed29..20ff120 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/NameOfImg.3 b/doc/NameOfImg.3
index 78332db..38c7ca9 100644
--- a/doc/NameOfImg.3
+++ b/doc/NameOfImg.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_NameOfImage 3 4.0 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 3a9bd49..b6362bd 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
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 eb1f040..103a80b 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 58618da..a2af479 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
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 ebd6f6a..581b1e6 100644
--- a/doc/SetOptions.3
+++ b/doc/SetOptions.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_SetOptions 3 8.1 Tk "Tk Library Procedures"
.so man.macros
.BS
@@ -129,19 +129,21 @@ option table is no longer needed \fBTk_DeleteOptionTable\fR should be
called to free all of its resources. All of the option tables
for a Tcl interpreter are freed automatically if the interpreter is deleted.
.PP
-\fBTk_InitOptions\fR is invoked when a new widget is created to set
-the default values for all of the widget's configuration options.
-\fBTk_InitOptions\fR is passed a token for an option table (\fIoptionTable\fR)
-and a pointer to a widget record (\fIrecordPtr\fR), which is the C
-structure that holds information about this widget. \fBTk_InitOptions\fR
-uses the information in the option table to
-choose an appropriate default for each option, then it stores the default
-value directly into the widget record, overwriting any information that
-was already present in the widget record. \fBTk_InitOptions\fR normally
-returns \fBTCL_OK\fR. If an error occurred while setting the default values
-(e.g., because a default value was erroneous) then \fBTCL_ERROR\fR is returned
-and an error message is left in \fIinterp\fR's result if \fIinterp\fR
-is not NULL.
+\fBTk_InitOptions\fR is invoked when a new widget is created to set the
+default values for all of the widget's configuration options that do not
+have \fBTK_OPTION_DONT_SET_DEFAULT\fR set in their \fIflags\fR field.
+\fBTk_InitOptions\fR is passed a token for an option table
+(\fIoptionTable\fR) and a pointer to a widget record (\fIrecordPtr\fR),
+which is the C structure that holds information about this widget.
+\fBTk_InitOptions\fR uses the information in the option table to choose an
+appropriate default for each option, except those having
+\fBTK_OPTION_DONT_SET_DEFAULT\fR set, then it stores the default value
+directly into the widget record, overwriting any information that was
+already present in the widget record. \fBTk_InitOptions\fR normally
+returns \fBTCL_OK\fR. If an error occurred while setting the default
+values (e.g., because a default value was erroneous) then \fBTCL_ERROR\fR
+is returned and an error message is left in \fIinterp\fR's result if
+\fIinterp\fR is not NULL.
.PP
\fBTk_SetOptions\fR is invoked to modify configuration options based
on information specified in a Tcl command. The command might be one that
@@ -306,19 +308,27 @@ given by \fIinternalOffset\fR. For example, if the option's type is
value is not stored in that form. At least one of the offsets must be
greater than or equal to zero.
.PP
-The \fIflags\fR field consists of one or more bits ORed together. At
-present only a single flag is supported: \fBTK_OPTION_NULL_OK\fR. If
-this bit is set for an option then an empty string will be accepted as
-the value for the option and the resulting internal form will be a
-NULL pointer, a zero value, or \fBNone\fR, depending on the type of
-the option. If the flag is not set then empty strings will result
-in errors.
+The \fIflags\fR field consists of one or more bits ORed together. The
+following flags are supported:
+.TP
+\fBTK_OPTION_NULL_OK\fR
+If this bit is set for an option then an empty string will be accepted as
+the value for the option and the resulting internal form will be a NULL
+pointer, a zero value, or \fBNone\fR, depending on the type of the option.
+If the flag is not set then empty strings will result in errors.
\fBTK_OPTION_NULL_OK\fR is typically used to allow a
feature to be turned off entirely, e.g. set a cursor value to
\fBNone\fR so that a window simply inherits its parent's cursor.
Not all option types support the \fBTK_OPTION_NULL_OK\fR
flag; for those that do, there is an explicit indication of that fact
in the descriptions below.
+.TP
+\fBTK_OPTION_DONT_SET_DEFAULT\fR
+If this bit is set for an option then no default value will be set in
+\fBTk_InitOptions\fR for this option. Neither the option database, nor any
+system default value, nor \fIoptionTable\fR are used to give a default
+value to this option. Instead it is assumed that the caller has already
+supplied a default value in the widget code.
.PP
The \fItype\fR field of each Tk_OptionSpec structure determines
how to parse the value of that configuration option. The
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/TextLayout.3 b/doc/TextLayout.3
index 3863ee7..5729a44 100644
--- a/doc/TextLayout.3
+++ b/doc/TextLayout.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_ComputeTextLayout 3 8.1 Tk "Tk Library Procedures"
.so man.macros
.BS
@@ -48,7 +48,7 @@ have been returned by a previous call to \fBTk_GetFont\fR.
.AP "const char" *string in
Potentially multi-line string whose dimensions are to be computed and
stored in the text layout. The \fIstring\fR must remain valid for the
-lifetime of the text layout.
+lifetime of the text layout.
.AP int numChars in
The number of characters to consider from \fIstring\fR. If
\fInumChars\fR is less than 0, then assumes \fIstring\fR is null
@@ -77,7 +77,7 @@ measured and displayed in a platform-dependent manner as described in
\fBTk_MeasureChars\fR, and will not have any special behaviors.
.AP int *widthPtr out
If non-NULL, filled with either the width, in pixels, of the widest
-line in the text layout, or the width, in pixels, of the bounding box for the
+line in the text layout, or the width, in pixels, of the bounding box for the
character specified by \fIindex\fR.
.AP int *heightPtr out
If non-NULL, filled with either the total height, in pixels, of all
@@ -101,7 +101,7 @@ text layout when it is being drawn, or the coordinates of a point (with
respect to the upper-left hand corner of the text layout) to check
against the text layout.
.AP int firstChar in
-The index of the first character to draw from the given text layout.
+The index of the first character to draw from the given text layout.
The number 0 means to draw from the beginning.
.AP int lastChar in
The index of the last character up to which to draw. The character
@@ -119,7 +119,7 @@ for the character specified by \fIindex\fR. Either or both \fIxPtr\fR
and \fIyPtr\fR may be NULL, in which case the corresponding value
is not calculated.
.AP int "width, height" in
-Specifies the width and height, in pixels, of the rectangular area to
+Specifies the width and height, in pixels, of the rectangular area to
compare for intersection against the text layout.
.AP Tcl_Interp *interp out
Postscript code that will print the text layout is appended to
@@ -132,7 +132,7 @@ justified text. To measure and display simple single-font, single-line
strings, refer to the documentation for \fBTk_MeasureChars\fR. There is
no programming interface in the core of Tk that supports multi-font,
multi-line text; support for that behavior must be built on top of
-simpler layers.
+simpler layers.
Note that unlike the lower level text display routines, the functions
described here all operate on character-oriented lengths and indices
rather than byte-oriented values. See the description of
@@ -150,11 +150,11 @@ returns a Tk_TextLayout token that holds this information. This token is
used in subsequent calls to procedures such as \fBTk_DrawTextLayout\fR,
\fBTk_DistanceToTextLayout\fR, and \fBTk_FreeTextLayout\fR. The
\fIstring\fR and \fItkfont\fR used when computing the layout must remain
-valid for the lifetime of this token.
+valid for the lifetime of this token.
.PP
\fBTk_FreeTextLayout\fR is called to release the storage associated with
\fIlayout\fR when it is no longer needed. A \fIlayout\fR should not be used
-in any other text layout procedures once it has been released.
+in any other text layout procedures once it has been released.
.PP
\fBTk_DrawTextLayout\fR uses the information in \fIlayout\fR to display a
single-font, multi-line, justified string of text at the specified location.
@@ -191,7 +191,7 @@ placeholder character.
\fBTk_CharBbox\fR uses the information in \fIlayout\fR to return the
bounding box for the character specified by \fIindex\fR. The width of the
bounding box is the advance width of the character, and does not include any
-left or right bearing. Any character that extends partially outside of
+left or right bearing. Any character that extends partially outside of
\fIlayout\fR is considered to be truncated at the edge. Any character
that would be located completely outside of \fIlayout\fR is considered to
be zero-width and pegged against the edge. The height of the bounding
@@ -264,13 +264,13 @@ much as fits placed on the line and the rest on subsequent line(s). If
\fIwrapLength\fR is so small that not even one character can fit on a
given line, the \fIwrapLength\fR is ignored for that line and one
character will be placed on the line anyhow. When wrapping is turned
-off, only newline/return characters may cause a line break.
+off, only newline/return characters may cause a line break.
.PP
When a text layout has been created using an underlined \fItkfont\fR,
then any space characters that occur at the end of individual lines,
-newlines/returns, and tabs will not be displayed underlined when
+newlines/returns, and tabs will not be displayed underlined when
\fBTk_DrawTextLayout\fR is called, because those characters are never
actually drawn \- they are merely placeholders maintained in the
-\fIlayout\fR.
+\fIlayout\fR.
.SH KEYWORDS
font
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/Tk_Main.3 b/doc/Tk_Main.3
index a1bb149..ea5f771 100644
--- a/doc/Tk_Main.3
+++ b/doc/Tk_Main.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_Main 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
@@ -29,7 +29,7 @@ The value for this argument is usually \fBTcl_AppInit\fR.
.SH DESCRIPTION
.PP
\fBTk_Main\fR acts as the main program for most Tk-based applications.
-Starting with Tk 4.0 it is not called \fBmain\fR anymore because it
+Starting with Tk 4.0 it is not called \fBmain\fR anymore because it
is part of the Tk library and having a function \fBmain\fR
in a library (particularly a shared library) causes problems on many
systems.
diff --git a/doc/WindowId.3 b/doc/WindowId.3
index 6d55dc0..f937963 100644
--- a/doc/WindowId.3
+++ b/doc/WindowId.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_WindowId 3 "8.4" Tk "Tk Library Procedures"
.so man.macros
.BS
@@ -168,7 +168,7 @@ the window's minimum requested size. These values correspond to the last
call to \fBTk_SetMinimumRequestSize\fR for \fItkwin\fR.
.PP
\fBTk_InternalBorderLeft\fR, \fBTk_InternalBorderRight\fR,
-\fBTk_InternalBorderTop\fR and \fBTk_InternalBorderBottom\fR
+\fBTk_InternalBorderTop\fR and \fBTk_InternalBorderBottom\fR
return the width of one side of the internal border
that has been requested for \fItkwin\fR, or 0 if no internal border was
requested. The return value is simply the last value passed to
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 d189376..becc08b 100644
--- a/doc/bind.n
+++ b/doc/bind.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 bind n 8.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -351,7 +351,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;
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/button.n b/doc/button.n
index e9a45a3..233feb6 100644
--- a/doc/button.n
+++ b/doc/button.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 button n 4.4 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -69,7 +69,7 @@ In this state the \fB\-disabledforeground\fR and
Specifies a desired width for the button.
If an image or bitmap is being displayed in the button then the value is in
screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR).
-For a text button (no image or with \fB\-compound none\fR) then the width
+For a text button (no image or with \fB\-compound none\fR) then the width
specifies how much space in characters to allocate for the text label.
If the width is negative then this specifies a minimum width.
If this option is not specified, the button's desired width is computed
@@ -96,7 +96,7 @@ one of the characters may optionally be underlined using the
\fB\-underline\fR option.
It can display itself in either of three different ways, according
to
-the \fB\-state\fR option;
+the \fB\-state\fR option;
it can be made to appear raised, sunken, or flat;
and it can be made to flash. When a user invokes the
button (by pressing mouse button 1 with the cursor over the
diff --git a/doc/canvas.n b/doc/canvas.n
index bc29cc3..38697cd 100644
--- a/doc/canvas.n
+++ b/doc/canvas.n
@@ -263,7 +263,7 @@ automatically decremented by one.
A number less than 0 is treated as if it were zero, and a
number greater than the length of the text item is treated
as if it were equal to the length of the text item. For
-polygons, numbers less than 0 or greater then the length
+polygons, numbers less than 0 or greater than the length
of the coordinate list will be adjusted by adding or subtracting
the length until the result is between zero and the length,
inclusive.
@@ -405,7 +405,7 @@ behaves as if the \fIstart\fR argument had not been specified.
.
Selects all the items completely enclosed within the rectangular
region given by \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR.
-\fIX1\fR must be no greater then \fIx2\fR and \fIy1\fR must be
+\fIX1\fR must be no greater than \fIx2\fR and \fIy1\fR must be
no greater than \fIy2\fR.
.TP
\fBoverlapping\fR \fIx1\fR \fIy1\fR \fIx2\fR \fIy2\fR
@@ -413,7 +413,7 @@ no greater than \fIy2\fR.
Selects all the items that overlap or are enclosed within the
rectangular region given by \fIx1\fR, \fIy1\fR, \fIx2\fR,
and \fIy2\fR.
-\fIX1\fR must be no greater then \fIx2\fR and \fIy1\fR must be
+\fIX1\fR must be no greater than \fIx2\fR and \fIy1\fR must be
no greater than \fIy2\fR.
.TP
\fBwithtag \fItagOrId\fR
diff --git a/doc/checkbutton.n b/doc/checkbutton.n
index 2e6f840..bfefca4 100644
--- a/doc/checkbutton.n
+++ b/doc/checkbutton.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 checkbutton n 4.4 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -52,7 +52,7 @@ and setting \fB\-indicatoron\fR to false and \fB\-overrelief\fR to
the effect is achieved
of having a flat button that raises on mouse-over and which is
depressed when activated. This is the behavior typically exhibited by
-the Bold, Italic, and Underline checkbuttons on the toolbar of a
+the Bold, Italic, and Underline checkbuttons on the toolbar of a
word-processor, for example.
.OP \-offvalue offValue Value
Specifies value to store in the button's associated variable whenever
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/chooseDirectory.n b/doc/chooseDirectory.n
index 86c593d..8528ddb 100644
--- a/doc/chooseDirectory.n
+++ b/doc/chooseDirectory.n
@@ -1,7 +1,7 @@
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" All rights reserved.
-'\"
+'\"
.TH tk_chooseDirectory n 8.3 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -20,7 +20,7 @@ possible as command line arguments:
\fB\-initialdir\fR \fIdirname\fR
Specifies that the directories in \fIdirectory\fR should be displayed
when the dialog pops up. If this parameter is not specified,
-the initial directory defaults to the current working directory
+the initial directory defaults to the current working directory
on non-Windows systems and on Windows systems prior to Vista.
On Vista and later systems, the initial directory defaults to the last
user-selected directory for the application. If the
diff --git a/doc/clipboard.n b/doc/clipboard.n
index 374cbd1..6f047dd 100644
--- a/doc/clipboard.n
+++ b/doc/clipboard.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 clipboard n 8.4 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -17,7 +17,7 @@ clipboard \- Manipulate Tk clipboard
.SH DESCRIPTION
.PP
This command provides a Tcl interface to the Tk clipboard,
-which stores data for later retrieval using the selection mechanism
+which stores data for later retrieval using the selection mechanism
(via the \fB\-selection CLIPBOARD\fR option).
In order to copy data into the clipboard, \fBclipboard clear\fR must
be called, followed by a sequence of one or more calls to \fBclipboard
@@ -52,7 +52,7 @@ Table 2 of the ICCCM), and defaults to \fBSTRING\fR. If \fIformat\fR is
divided into fields separated by white space; each field is converted
to its atom value, and the 32-bit atom value is transmitted instead of
the atom name. For any other \fIformat\fR, \fIdata\fR is divided
-into fields separated by white space and each
+into fields separated by white space and each
field is converted to a 32-bit integer; an array of integers is
transmitted to the selection requester. Note that strings passed to
\fBclipboard append\fR are concatenated before conversion, so the
diff --git a/doc/colors.n b/doc/colors.n
index ee44f7b..dc7007b 100644
--- a/doc/colors.n
+++ b/doc/colors.n
@@ -3,8 +3,6 @@
'\" Copyright (c) 2003 ActiveState Corporation.
'\" Copyright (c) 2006-2007 Daniel A. Steffen <das@users.sourceforge.net>
'\" Copyright (c) 2008 Donal K. Fellows
-'\"
-'\"
'\"
.TH colors n 8.3 Tk "Tk Built-In Commands"
.so man.macros
@@ -29,6 +27,7 @@ AntiqueWhite1 255 239 219
AntiqueWhite2 238 223 204
AntiqueWhite3 205 192 176
AntiqueWhite4 139 131 120
+agua 0 255 255
aquamarine 127 255 212
aquamarine1 127 255 212
aquamarine2 118 238 198
@@ -93,6 +92,7 @@ cornsilk1 255 248 220
cornsilk2 238 232 205
cornsilk3 205 200 177
cornsilk4 139 136 120
+crymson 220 20 60
cyan 0 255 255
cyan1 0 255 255
cyan2 0 238 238
@@ -191,6 +191,7 @@ floral white 255 250 240
FloralWhite 255 250 240
forest green 34 139 34
ForestGreen 34 139 34
+fuchsia 255 0 255
gainsboro 220 220 220
ghost white 248 248 255
GhostWhite 248 248 255
@@ -204,7 +205,7 @@ goldenrod1 255 193 37
goldenrod2 238 180 34
goldenrod3 205 155 29
goldenrod4 139 105 20
-gray 190 190 190
+gray 128 128 128
gray0 0 0 0
gray1 3 3 3
gray2 5 5 5
@@ -306,14 +307,14 @@ gray97 247 247 247
gray98 250 250 250
gray99 252 252 252
gray100 255 255 255
-green 0 255 0
+green 0 128 0
green yellow 173 255 47
green1 0 255 0
green2 0 238 0
green3 0 205 0
green4 0 139 0
GreenYellow 173 255 47
-grey 190 190 190
+grey 128 128 128
grey0 0 0 0
grey1 3 3 3
grey2 5 5 5
@@ -432,6 +433,7 @@ IndianRed1 255 106 106
IndianRed2 238 99 99
IndianRed3 205 85 85
IndianRed4 139 58 58
+indigo 75 0 130
ivory 255 255 240
ivory1 255 255 240
ivory2 238 238 224
@@ -523,6 +525,7 @@ LightYellow1 255 255 224
LightYellow2 238 238 209
LightYellow3 205 205 180
LightYellow4 139 139 122
+lime 0 255 0
lime green 50 205 50
LimeGreen 50 205 50
linen 250 240 230
@@ -531,7 +534,7 @@ magenta1 255 0 255
magenta2 238 0 238
magenta3 205 0 205
magenta4 139 0 139
-maroon 176 48 96
+maroon 128 0 0
maroon1 255 52 179
maroon2 238 48 167
maroon3 205 41 144
@@ -584,6 +587,7 @@ navy blue 0 0 128
NavyBlue 0 0 128
old lace 253 245 230
OldLace 253 245 230
+olive 128 128 0
olive drab 107 142 35
OliveDrab 107 142 35
OliveDrab1 192 255 62
@@ -647,7 +651,7 @@ plum3 205 150 205
plum4 139 102 139
powder blue 176 224 230
PowderBlue 176 224 230
-purple 160 32 240
+purple 128 0 128
purple1 155 48 255
purple2 145 44 238
purple3 125 38 205
@@ -694,6 +698,7 @@ sienna1 255 130 71
sienna2 238 121 66
sienna3 205 104 57
sienna4 139 71 38
+silver 192 192 192
sky blue 135 206 235
SkyBlue 135 206 235
SkyBlue1 135 206 255
@@ -736,6 +741,7 @@ tan1 255 165 79
tan2 238 154 73
tan3 205 133 63
tan4 139 90 43
+teal 0 128 128
thistle 216 191 216
thistle1 255 225 255
thistle2 238 210 238
@@ -927,19 +933,19 @@ On Windows, the following additional system colors are available
.RS
.DS
.ta 6c
-3dDarkShadow Highlight
-3dLight HighlightText
-ActiveBorder InactiveBorder
-ActiveCaption InactiveCaption
-AppWorkspace InactiveCaptionText
-Background InfoBackground
-ButtonFace InfoText
-ButtonHighlight Menu
-ButtonShadow MenuText
-ButtonText Scrollbar
-CaptionText Window
-DisabledText WindowFrame
-GrayText WindowText
+system3dDarkShadow systemHighlight
+system3dLight systemHighlightText
+systemActiveBorder systemInactiveBorder
+systemActiveCaption systemInactiveCaption
+systemAppWorkspace systemInactiveCaptionText
+systemBackground systemInfoBackground
+systemButtonFace systemInfoText
+systemButtonHighlight systemMenu
+systemButtonShadow systemMenuText
+systemButtonText systemScrollbar
+systemCaptionText systemWindow
+systemDisabledText systemWindowFrame
+systemGrayText systemWindowText
.DE
.RE
.SH "SEE ALSO"
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..40b45c7 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
diff --git a/doc/event.n b/doc/event.n
index 11782dd..54ad42e 100644
--- a/doc/event.n
+++ b/doc/event.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 event n 8.3 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -172,7 +172,7 @@ one of \fBNotifyNormal\fR, \fBNotifyGrab\fR, \fBNotifyUngrab\fR, or
\fBNotifyWhileGrabbed\fR.
Valid for \fBEnter\fR, \fBLeave\fR, \fBFocusIn\fR, and
\fBFocusOut\fR events.
-Corresponds to the \fB%m\fR substitution for binding scripts.
+Corresponds to the \fB%m\fR substitution for binding scripts.
.TP
\fB\-override\fI boolean\fR
\fIBoolean\fR must be a boolean value; it specifies the
@@ -224,7 +224,7 @@ Corresponds to the \fB%#\fR substitution for binding scripts.
For \fBKeyPress\fR, \fBKeyRelease\fR, \fBButtonPress\fR,
\fBButtonRelease\fR, \fBEnter\fR, \fBLeave\fR, and \fBMotion\fR events
it must be an integer value.
-For \fBVisibility\fR events it must be one of \fBVisibilityUnobscured\fR,
+For \fBVisibility\fR events it must be one of \fBVisibilityUnobscured\fR,
\fBVisibilityPartiallyObscured\fR, or \fBVisibilityFullyObscured\fR.
This option overrides any modifiers such as \fBMeta\fR or \fBControl\fR
specified in the base \fIevent\fR.
@@ -302,9 +302,9 @@ If \fIWindow\fR is empty the coordinate is relative to the
screen, and this option corresponds to the \fB%Y\fR substitution
for binding scripts.
.PP
-Any options that are not specified when generating an event are filled
-with the value 0, except for \fIserial\fR, which is filled with the
-next X event serial number.
+Any options that are not specified when generating an event are filled
+with the value 0, except for \fIserial\fR, which is filled with the
+next X event serial number.
.SH "PREDEFINED VIRTUAL EVENTS"
.PP
Tk defines the following virtual events for the purposes of
@@ -351,6 +351,16 @@ This is sent to a widget when the focus leaves the widget because of a
user-driven
.QW "tab to widget"
action.
+.TP
+\fB<<UndoStack>>\fR
+This is sent to a text widget when its undo stack or redo stack becomes
+empty or unempty.
+.TP
+\fB<<WidgetViewSync>>\fR
+This is sent to a text widget when its internal data become obsolete,
+and again when these internal data are back in sync with the widget
+view. The detail field (%d substitution) is either true (when the
+widget is in sync) or false (when it is not).
.PP
Tk defines the following virtual events for the purposes of unifying
bindings across multiple platforms. Users expect them to behave in the
@@ -540,13 +550,13 @@ will be invoked, because a physical event is considered
more specific than a virtual event, all other things being equal.
However, when the user types Meta-Control-y the
\fB<<Paste>>\fR binding will be invoked, because the
-\fBMeta\fR modifier in the physical pattern associated with the
+\fBMeta\fR modifier in the physical pattern associated with the
virtual binding is more specific than the \fB<Control-y\fR> sequence for
the physical event.
.PP
Bindings on a virtual event may be created before the virtual event exists.
Indeed, the virtual event never actually needs to be defined, for instance,
-on platforms where the specific virtual event would meaningless or
+on platforms where the specific virtual event would be meaningless or
ungeneratable.
.PP
When a definition of a virtual event changes at run time, all windows
@@ -560,7 +570,7 @@ bind Entry <Control-y> {}
.PP
the behavior will change such in two ways. First, the shadowed
\fB<<Paste>>\fR binding will emerge.
-Typing Control-y will no longer invoke the \fB<Control-y>\fR binding,
+Typing Control-y will no longer invoke the \fB<Control-y>\fR binding,
but instead invoke the virtual event \fB<<Paste>>\fR. Second,
pressing the F6 key will now also invoke the \fB<<Paste>>\fR binding.
.SS "MOVING THE MOUSE POINTER"
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/font.n b/doc/font.n
index 49d8aad..72f9270 100644
--- a/doc/font.n
+++ b/doc/font.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 font n 8.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -38,7 +38,7 @@ that character, which will be different from the base font if the base
font does not contain the given character. If \fIchar\fR may be a hyphen, it
should be preceded by \fB\-\|\-\fR to distinguish it from a misspelled
\fIoption\fR.
-.TP
+.TP
\fBfont configure \fIfontname\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
.
Query or modify the desired attributes for the named font called
@@ -88,7 +88,7 @@ omitted, it defaults to the main window.
Measures the amount of space the string \fItext\fR would use in the given
\fIfont\fR when displayed in \fIwindow\fR. \fIfont\fR is a font description;
see \fBFONT DESCRIPTIONS\fR below. If the \fIwindow\fR argument is
-omitted, it
+omitted, it
defaults to the main window. The return value is the total width in pixels
of \fItext\fR, not including the extra pixels used by highly exaggerated
characters such as cursive
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 72a22db..6aa412e 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
diff --git a/doc/getOpenFile.n b/doc/getOpenFile.n
index f5e92ff..39bce41 100644
--- a/doc/getOpenFile.n
+++ b/doc/getOpenFile.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_getOpenFile n 4.2 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -65,8 +65,8 @@ discussion on the contents of \fIfilePatternList\fR.
\fB\-initialdir\fR \fIdirectory\fR
.
Specifies that the files in \fIdirectory\fR should be displayed
-when the dialog pops up. If this parameter is not specified,
-the initial directory defaults to the current working directory
+when the dialog pops up. If this parameter is not specified,
+the initial directory defaults to the current working directory
on non-Windows systems and on Windows systems prior to Vista.
On Vista and later systems, the initial directory defaults to the last
user-selected directory for the application. If the
@@ -95,7 +95,7 @@ turns the file dialog into a sheet attached to the parent window.
\fB\-title\fR \fItitleString\fR
.
Specifies a string to display as the title of the dialog box. If this
-option is not specified, then a default title is displayed.
+option is not specified, then a default title is displayed.
.TP
\fB\-typevariable\fR \fIvariableName\fR
.
diff --git a/doc/grab.n b/doc/grab.n
index a6d0d19..9288e90 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 9ac84d9..07d07aa 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
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/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 4264823..66b75b9 100644
--- a/doc/listbox.n
+++ b/doc/listbox.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 listbox n 8.4 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -17,9 +17,10 @@ listbox \- Create and manipulate 'listbox' item list widgets
\-background \-borderwidth \-cursor
\-disabledforeground \-exportselection \-font
\-foreground \-highlightbackground \-highlightcolor
-\-highlightthickness \-relief \-selectbackground
-\-selectborderwidth \-selectforeground \-setgrid
-\-takefocus \-xscrollcommand \-yscrollcommand
+\-highlightthickness \-justify \-relief
+\-selectbackground \-selectborderwidth \-selectforeground
+\-setgrid \-takefocus \-xscrollcommand
+\-yscrollcommand
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-activestyle activeStyle ActiveStyle
@@ -228,7 +229,7 @@ list. Returns an empty string.
\fIpathName \fBitemcget \fIindex option\fR
.
Returns the current value of the item configuration option given
-by \fIoption\fR. \fIOption\fR may have any of the values accepted
+by \fIoption\fR. \fIOption\fR may have any of the values accepted
by the \fBitemconfigure\fR command.
.TP
\fIpathName \fBitemconfigure \fIindex\fR ?\fIoption\fR? ?\fIvalue\fR? ?\fIoption value ...\fR?
@@ -248,7 +249,7 @@ are currently supported for items:
.TP
\fB\-background \fIcolor\fR
.
-\fIColor\fR specifies the background color to use when displaying the
+\fIColor\fR specifies the background color to use when displaying the
item. It may have any of the forms accepted by \fBTk_GetColor\fR.
.TP
\fB\-foreground \fIcolor\fR
@@ -452,7 +453,7 @@ it and deselects any other selected item.
In \fBbrowse\fR mode it is also possible to drag the selection
with button 1.
On button 1, the listbox will also take focus if it has a \fBnormal\fR
-state and \fB\-takefocus\fR is true.
+state.
.PP
If the selection mode is \fBmultiple\fR or \fBextended\fR,
any number of elements may be selected at once, including discontiguous
@@ -468,9 +469,12 @@ Most people will probably want to use \fBbrowse\fR mode for
single selections and \fBextended\fR mode for multiple selections;
the other modes appear to be useful only in special situations.
.PP
-Any time the selection changes in the listbox, the virtual event
-\fB<<ListboxSelect>>\fR will be generated. It is easiest to bind
-to this event to be made aware of any changes to listbox selection.
+Any time the set of selected item(s) in the listbox is updated by the
+user through the keyboard or mouse, the virtual event
+\fB<<ListboxSelect>>\fR will be generated. This virtual event will not
+be generated when adjusting the selection with the \fIpathName
+\fBselection\fR command. It is easiest to bind to this event to be
+made aware of any user changes to listbox selection.
.PP
In addition to the above behavior, the following additional behavior
is defined by the default bindings:
diff --git a/doc/loadTk.n b/doc/loadTk.n
index d4ec51e..3673e98 100644
--- a/doc/loadTk.n
+++ b/doc/loadTk.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 "Safe Tk" n 8.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -11,7 +11,7 @@
.SH NAME
safe::loadTk \- Load Tk into a safe interpreter.
.SH SYNOPSIS
-\fBsafe::loadTk \fIslave\fR ?\fB\-use\fR \fIwindowId\fR? ?\fB\-display\fR \fIdisplayName\fR?
+\fBsafe::loadTk \fIslave\fR ?\fB\-use\fR \fIwindowId\fR? ?\fB\-display\fR \fIdisplayName\fR?
.BE
.SH DESCRIPTION
.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 e26c2d8..5742e23 100644
--- a/doc/menu.n
+++ b/doc/menu.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 menu n 4.1 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -98,8 +98,10 @@ a bitmap, or an image, controlled by the \fB\-label\fR,
\fB\-bitmap\fR, and \fB\-image\fR options for the entry.
If the \fB\-accelerator\fR option is specified for an entry then a second
textual field is displayed to the right of the label. The accelerator
-typically describes a keystroke sequence that may be typed in the
+typically describes a keystroke sequence that may be used in the
application to cause the same result as invoking the menu entry.
+This is a display option, it does not actually set the corresponding
+binding (which can be achieved using the \fBbind\fR command).
The third field is an \fIindicator\fR. The indicator is present only for
checkbutton or radiobutton entries. It indicates whether the entry
is selected or not, and is displayed to the left of the entry's
@@ -269,8 +271,8 @@ are appended to the standard Help menu of the user's menubar whenever
the window's menubar is in front. The first items in the menu
are provided by Mac OS X.
.PP
-When Tk sees a System menu on Windows, its items are appended to the
-system menu that the menubar is attached to. This menu is tied to the
+When Tk sees a System menu on Windows, its items are appended to the
+system menu that the menubar is attached to. This menu is tied to the
application icon and can be invoked with the mouse or by typing
Alt+Spacebar. Due to limitations in the Windows API, any font changes,
colors, images, bitmaps, or tearoff images will not appear in the
@@ -304,16 +306,10 @@ operations on the widget. It has the following general form:
determine the exact behavior of the command.
.PP
Many of the widget commands for a menu take as one argument an
-indicator of which entry of the menu to operate on. These
+indicator of which entry of the menu to operate on. These
indicators are called \fIindex\fRes and may be specified in
any of the following forms:
.TP 12
-\fInumber\fR
-.
-Specifies the entry numerically, where 0 corresponds
-to the top-most entry of the menu, 1 to the entry below it, and
-so on.
-.TP 12
\fBactive\fR
.
Indicates the entry that is currently active. If no entry is
@@ -348,6 +344,12 @@ For example,
.QW \fB@0\fR
indicates the top-most entry in the window.
.TP 12
+\fInumber\fR
+.
+Specifies the entry numerically, where 0 corresponds
+to the top-most entry of the menu, 1 to the entry below it, and
+so on.
+.TP 12
\fIpattern\fR
.
If the index does not satisfy one of the above forms then this
@@ -356,6 +358,9 @@ each entry in the menu, in order from the top down, until a
matching entry is found. The rules of \fBstring match\fR
are used.
.PP
+If the index could match more than one of the above forms, then
+the form earlier in the above list takes precedence.
+.PP
The following widget commands are possible for menu widgets:
.TP
\fIpathName \fBactivate \fIindex\fR
@@ -534,8 +539,10 @@ This option is not available for separator or tear-off entries.
.
Specifies a string to display at the right side of the menu entry.
Normally describes an accelerator keystroke sequence that may be
-typed to invoke the same function as the menu entry. This option
-is not available for separator or tear-off entries.
+used to invoke the same function as the menu entry. This is a display
+option, it does not actually set the corresponding binding (which can
+be achieved using the \fBbind\fR command). This option is not available
+for separator or tear-off entries.
.TP
\fB\-background \fIvalue\fR
.
@@ -673,7 +680,7 @@ option for the menu along with the \fB\-activebackground\fR option from
the entry. Disabled state means that the entry
should be insensitive: the default bindings will refuse to activate
or invoke the entry.
-In this state the entry is displayed according to the
+In this state the entry is displayed according to the
\fB\-disabledforeground\fR option for the menu and the
\fB\-background\fR option from the entry.
This option is not available for separator entries.
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/messageBox.n b/doc/messageBox.n
index 0b4554c..5ce1745 100644
--- a/doc/messageBox.n
+++ b/doc/messageBox.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_messageBox n 4.2 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -50,9 +50,8 @@ displayed.
.TP
\fB\-message\fR \fIstring\fR
.
-Specifies the message to display in this message box. This option is ignored
-on Mac OS X, where platform guidelines forbid the use of a title on this kind
-of dialog.
+Specifies the message to display in this message box. The
+default value is an empty string.
.TP
\fB\-parent\fR \fIwindow\fR
.
@@ -61,8 +60,9 @@ box is displayed on top of its parent window.
.TP
\fB\-title\fR \fItitleString\fR
.
-Specifies a string to display as the title of the message box. The
-default value is an empty string.
+Specifies a string to display as the title of the message box. This option
+is ignored on Mac OS X, where platform guidelines forbid the use of a title
+on this kind of dialog.
.TP
\fB\-type\fR \fIpredefinedType\fR
.
diff --git a/doc/option.n b/doc/option.n
index 8699c0d..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
@@ -59,6 +59,12 @@ options specified in that file to the option database. If \fIpriority\fR
is specified, it indicates the priority level at which to enter the
options; \fIpriority\fR defaults to \fBinteractive\fR.
.PP
+The file is read through a channel which is in "utf-8" encoding,
+invalid byte sequences are automatically converted to valid ones.
+This means that encodings like ISO 8859-1 or cp1252 with high
+probability will work as well, but this cannot be guaranteed.
+This cannot be changed, setting the [encoding system] has no effect.
+.PP
The \fIpriority\fR arguments to the \fBoption\fR command are
normally specified symbolically using one of the following values:
.TP
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 36937b1..738a1c6 100644
--- a/doc/options.n
+++ b/doc/options.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 options n 4.4 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -268,7 +268,7 @@ traversal (e.g., Tab and Shift-Tab).
Before setting the focus to a window, the traversal scripts
consult the value of the \fB\-takefocus\fR option.
A value of \fB0\fR means that the window should be skipped entirely
-during keyboard traversal.
+during keyboard traversal.
\fB1\fR means that the window should receive the input
focus as long as it is viewable (it and all of its ancestors are mapped).
An empty value for the option means that the traversal scripts make
@@ -278,7 +278,7 @@ disabled, if it has no key bindings, or if it is not viewable.
If the value has any other form, then the traversal scripts take
the value, append the name of the window to it (with a separator space),
and evaluate the resulting string as a Tcl script.
-The script must return \fB0\fR, \fB1\fR, or an empty string: a
+The script must return \fB0\fR, \fB1\fR, or an empty string: a
\fB0\fR or \fB1\fR value specifies whether the window will receive
the input focus, and an empty string results in the default decision
described above.
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..6b39e1d 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
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/panedwindow.n b/doc/panedwindow.n
index c199e63..fcfebf4 100644
--- a/doc/panedwindow.n
+++ b/doc/panedwindow.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 panedwindow n 8.4 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -29,6 +29,16 @@ drawn as squares. May be any value accepted by \fBTk_GetPixels\fR.
Specifies a desired height for the overall panedwindow widget. May be any
value accepted by \fBTk_GetPixels\fR. If an empty string, the widget will be
made high enough to allow all contained widgets to have their natural height.
+.OP \-proxybackground proxyBackground ProxyBackground
+Background color to use when drawing the proxy. If an empty string, the
+value of the \fB-background\fR option will be used.
+.OP \-proxyborderwidth proxyBorderWidth ProxyBorderWidth
+Specifies the borderwidth of the proxy. May be any value accepted by
+\fBTk_GetPixels\fR.
+.OP \-proxyrelief proxyRelief ProxyRelief
+Relief to use when drawing the proxy. May be any of the standard Tk
+relief values. If an empty string, the value of the \fB-sashrelief\fR
+option will be used.
.OP \-opaqueresize opaqueResize OpaqueResize
Specifies whether panes should be resized as a sash is moved (true),
or if resizing should be deferred until the sash is placed (false).
@@ -141,7 +151,7 @@ Remove the proxy from the display.
.TP
\fIpathName \fBproxy place \fIx y\fR
.
-Place the proxy at the given \fIx\fR and \fIy\fR coordinates.
+Place the proxy at the given \fIx\fR and \fIy\fR coordinates.
.RE
.TP
\fIpathName \fBsash \fR?\fIargs\fR?
@@ -229,13 +239,13 @@ dimension for vertical panedwindows. May be any value accepted by
\fB\-padx \fIn\fR
.
Specifies a non-negative value indicating how much extra space to
-leave on each side of the window in the X-direction. The value may
+leave on each side of the window in the X-direction. The value may
have any of the forms accepted by \fBTk_GetPixels\fR.
.TP
\fB\-pady \fIn\fR
.
Specifies a non-negative value indicating how much extra space to
-leave on each side of the window in the Y-direction. The value may
+leave on each side of the window in the Y-direction. The value may
have any of the forms accepted by \fBTk_GetPixels\fR.
.TP
\fB\-sticky \fIstyle\fR
@@ -311,6 +321,15 @@ adjusted.
When a pane is resized from outside (e.g. it is packed to expand and
fill, and the containing toplevel is resized), space is added to the final
(rightmost or bottommost) pane in the window.
+.PP
+Unlike slave windows managed by e.g. pack or grid, the panes managed by a
+panedwindow do not change width or height to accomodate changes in the
+requested widths or heights of the panes, once these have become mapped.
+Therefore it may be advisable, particularly when creating layouts
+interactively, to not add a pane to the panedwindow widget until after the
+geometry requests of that pane has been finalized (i.e., all components of
+the pane inserted, all options affecting geometry set to their proper
+values, etc.).
.SH "SEE ALSO"
ttk::panedwindow(n)
.SH KEYWORDS
diff --git a/doc/photo.n b/doc/photo.n
index 0fe0c61..84cf618 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.
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/radiobutton.n b/doc/radiobutton.n
index 557b42c..c79aa23 100644
--- a/doc/radiobutton.n
+++ b/doc/radiobutton.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 radiobutton n 4.4 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -59,10 +59,10 @@ By setting this option to
.QW flat
and setting \fB\-indicatoron\fR to false and \fB\-overrelief\fR to
.QW raised ,
-the effect is achieved
+the effect is achieved
of having a flat button that raises on mouse-over and which is
depressed when activated. This is the behavior typically exhibited by
-the Align-Left, Align-Right, and Center radiobuttons on the toolbar of a
+the Align-Left, Align-Right, and Center radiobuttons on the toolbar of a
word-processor, for example.
.OP \-overrelief overRelief OverRelief
Specifies an alternative relief for the radiobutton, to be used when the
diff --git a/doc/raise.n b/doc/raise.n
index be20c74..0983ed2 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 7bc5c59..0504b4b 100644
--- a/doc/scale.n
+++ b/doc/scale.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 scale n 4.1 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -209,7 +209,7 @@ the horizontal behavior is described in parentheses.
.IP [1]
If button 1 is pressed in the trough, the scale's value will
be incremented or decremented by the value of the \fB\-resolution\fR
-option so that the slider moves in the direction of the cursor.
+option so that the slider moves in the direction of the cursor.
If the button is held down, the action auto-repeats.
.IP [2]
If button 1 is pressed over the slider, the slider can be dragged
diff --git a/doc/scrollbar.n b/doc/scrollbar.n
index 4d148af..4b1d4ba 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
diff --git a/doc/selection.n b/doc/selection.n
index e06a716..f5bb660 100644
--- a/doc/selection.n
+++ b/doc/selection.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 selection n 8.1 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -36,7 +36,7 @@ atom name such as \fBPRIMARY\fR or \fBCLIPBOARD\fR; see the Inter-Client
Communication Conventions Manual for complete details.
\fISelection\fR defaults to \fBPRIMARY\fR and \fIwindow\fR defaults to
.QW . .
-Returns an empty string.
+Returns an empty string.
.TP
\fBselection get\fR ?\fB\-displayof\fR \fIwindow\fR? ?\fB\-selection\fR \fIselection\fR? ?\fB\-type\fR \fItype\fR?
.
@@ -79,7 +79,7 @@ automatically handled as type \fBUTF8_STRING\fR as well.
When \fIselection\fR is requested, \fIwindow\fR is the selection owner,
and \fItype\fR is the requested type, \fIcommand\fR will be executed
as a Tcl command with two additional numbers appended to it
-(with space separators).
+(with space separators).
The two additional numbers
are \fIoffset\fR and \fImaxChars\fR: \fIoffset\fR specifies a starting
character position in the selection and \fImaxChars\fR gives the maximum
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 1e8cb3a..2f7e6bd 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
@@ -54,8 +54,9 @@ 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.
-If \fB\-values\fR is specified, it supercedes this 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
it to an empty string disables this feature (the default). The best use of
@@ -83,8 +84,9 @@ 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.
-If \fB\-values\fR is specified, it supercedes this 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,
\fBfocus\fR, \fBfocusin\fR, \fBfocusout\fR, \fBkey\fR, or \fBall\fR.
@@ -196,7 +198,7 @@ dangerous to mix. Any problems have been overcome so that using the
the spinbox widget. Using the \fB\-textvariable\fR for read-only purposes will
never cause problems. The danger comes when you try set the
\fB\-textvariable\fR to something that the \fB\-validatecommand\fR would not
-accept, which causes \fB\-validate\fR to become \fInone\fR (the
+accept, which causes \fB\-validate\fR to become \fBnone\fR (the
\fB\-invalidcommand\fR will not be triggered). The same happens
when an error occurs evaluating the \fB\-validatecommand\fR.
.PP
@@ -216,6 +218,16 @@ in the \fB\-validatecommand\fR or \fB\-invalidcommand\fR (whichever one you
were editing the spinbox widget from). It is also recommended to not set an
associated \fB\-textvariable\fR during validation, as that can cause the
spinbox widget to become out of sync with the \fB\-textvariable\fR.
+.PP
+Also, the \fBvalidate\fR option will set itself to \fBnone\fR when the
+spinbox value gets changed because of adjustment of \fBfrom\fR or \fBto\fR
+and the \fBvalidateCommand\fR returns false. For instance
+.CS
+ \fIspinbox pathName \-from 1 \-to 10 \-validate all \-vcmd {return 0}\fR
+.CE
+will in fact set the \fBvalidate\fR option to \fBnone\fR because the default
+value for the spinbox gets changed (due to the \fBfrom\fR and \fBto\fR
+options) to a value not accepted by the validation script.
.SH "WIDGET COMMAND"
.PP
The \fBspinbox\fR command creates a new Tcl command whose
diff --git a/doc/text.n b/doc/text.n
index e55c4a0..860fa30 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
@@ -486,6 +486,16 @@ much the line should be indented from the left edge of the window.
option is only used when wrapping is enabled, and it only applies to the
second and later display lines for a text line.
.TP
+\fB\-lmargincolor \fIcolor\fR
+.
+\fIColor\fR specifies the background color to use in regions that do not
+contain characters because they are indented by \fB\-lmargin1\fR or
+\fB\-lmargin2\fR. It may have any of the forms accepted by
+\fBTk_GetColor\fR. If \fIcolor\fR has not been specified, or if it is
+specified as an empty string, then the color used is specified by the
+\fB-background\fR tag option (or, if this is also unspecified, by the
+\fB-background\fR widget option).
+.TP
\fB\-offset \fIpixels\fR
.
\fIPixels\fR specifies an amount by which the text's baseline should be offset
@@ -500,6 +510,13 @@ Specifies whether or not to draw a horizontal rule through the middle of
characters. \fIBoolean\fR may have any of the forms accepted by
\fBTcl_GetBoolean\fR.
.TP
+\fB\-overstrikefg \fIcolor\fR
+.
+\fIColor\fR specifies the color to use when displaying the overstrike. It may
+have any of the forms accepted by \fBTk_GetColor\fR. If \fIcolor\fR has not
+been specified, or if it is specified as an empty string, then the color
+specified by the \fB\-foreground\fR tag option is used.
+.TP
\fB\-relief \fIrelief\fR
.
\fIRelief\fR specifies the relief style to use for drawing the border, in any
@@ -517,6 +534,29 @@ option is only used when wrapping is enabled. If a text line wraps, the right
margin for each line on the display is determined by the first non-elided
character of that display line.
.TP
+\fB\-rmargincolor \fIcolor\fR
+.
+\fIColor\fR specifies the background color to use in regions that do not
+contain characters because they are indented by \fB\-rmargin1\fR. It may
+have any of the forms accepted by \fBTk_GetColor\fR. If \fIcolor\fR has not
+been specified, or if it is specified as an empty string, then the color
+used is specified by the \fB-background\fR tag option (or, if this is also
+unspecified, by the \fB-background\fR widget option).
+.TP
+\fB\-selectbackground \fIcolor\fR
+\fIColor\fR specifies the background color to use when displaying selected
+items. It may have any of the forms accepted by \fBTk_GetColor\fR. If
+\fIcolor\fR has not been specified, or if it is specified as an empty
+string, then the color specified by the \fB\-background\fR tag option is
+used.
+.TP
+\fB\-selectforeground \fIcolor\fR
+\fIColor\fR specifies the foreground color to use when displaying selected
+items. It may have any of the forms accepted by \fBTk_GetColor\fR. If
+\fIcolor\fR has not been specified, or if it is specified as an empty
+string, then the color specified by the \fB\-foreground\fR tag option is
+used.
+.TP
\fB\-spacing1 \fIpixels\fR
.
\fIPixels\fR specifies how much additional space should be left above each
@@ -559,6 +599,13 @@ unspecified for the tag (the default).
\fIBoolean\fR specifies whether or not to draw an underline underneath
characters. It may have any of the forms accepted by \fBTcl_GetBoolean\fR.
.TP
+\fB\-underlinefg \fIcolor\fR
+.
+\fIColor\fR specifies the color to use when displaying the underline. It may
+have any of the forms accepted by \fBTk_GetColor\fR. If \fIcolor\fR has not
+been specified, or if it is specified as an empty string, then the color
+specified by the \fB\-foreground\fR tag option is used.
+.TP
\fB\-wrap \fImode\fR
.
\fIMode\fR specifies how to handle lines that are wider than the text's
@@ -634,15 +681,23 @@ embedded window annotation causes a window to be displayed at a particular
point in the text. There may be any number of embedded windows in a text
widget, and any widget may be used as an embedded window (subject to the usual
rules for geometry management, which require the text window to be the parent
-of the embedded window or a descendant of its parent). The embedded window's
-position on the screen will be updated as the text is modified or scrolled,
-and it will be mapped and unmapped as it moves into and out of the visible
-area of the text widget. Each embedded window occupies one unit's worth of
-index space in the text widget, and it may be referred to either by the name
-of its embedded window or by its position in the widget's index space. If the
-range of text containing the embedded window is deleted then the window is
-destroyed. Similarly if the text widget as a whole is deleted, then the window
-is destroyed.
+of the embedded window or a descendant of its parent).
+.PP
+The embedded window's position on the screen will be updated as the text is
+modified or scrolled, and it will be mapped and unmapped as it moves into and
+out of the visible area of the text widget. Each embedded window occupies one
+unit's worth of index space in the text widget, and it may be referred to
+either by the name of its embedded window or by its position in the widget's
+index space. If the range of text containing the embedded window is deleted
+then the window is destroyed. Similarly if the text widget as a whole is
+deleted, then the window is destroyed.
+.PP
+Eliding an embedded window immediately after scheduling it for creation via
+\fIpathName \fBwindow create \fIindex \fB-create\fR will prevent it from being
+effectively created. Uneliding an elided embedded window scheduled for creation
+via \fIpathName \fBwindow create \fIindex \fB-create\fR will automatically
+trigger the associated creation script. After destroying an elided embedded
+window, the latter won't get automatically recreated.
.PP
When an embedded window is added to a text widget with the \fIpathName
\fBwindow create\fR widget command, several configuration options may be
@@ -706,13 +761,22 @@ The final form of annotation in text widgets is an embedded image. Each
embedded image annotation causes an image to be displayed at a particular
point in the text. There may be any number of embedded images in a text
widget, and a particular image may be embedded in multiple places in the same
-text widget. The embedded image's position on the screen will be updated as
-the text is modified or scrolled. Each embedded image occupies one unit's
-worth of index space in the text widget, and it may be referred to either by
-its position in the widget's index space, or the name it is assigned when the
-image is inserted into the text widget with \fIpathName \fBimage create\fR. If
-the range of text containing the embedded image is deleted then that copy of
-the image is removed from the screen.
+text widget.
+.PP
+The embedded image's position on the screen will be updated as the text is
+modified or scrolled. Each embedded image occupies one unit's worth of index
+space in the text widget, and it may be referred to either by its position in
+the widget's index space, or the name it is assigned when the image is inserted
+into the text widget with \fIpathName \fBimage create\fR. If the range of text
+containing the embedded image is deleted then that copy of the image is removed
+from the screen.
+.PP
+Eliding an embedded image immediately after scheduling it for creation via
+\fIpathName \fBimage create \fIindex \fB-create\fR will prevent it from being
+effectively created. Uneliding an elided embedded image scheduled for creation
+via \fIpathName \fBimage create \fIindex \fB-create\fR will automatically
+trigger the associated creation script. After destroying an elided embedded
+image, the latter won't get automatically recreated.
.PP
When an embedded image is added to a text widget with the \fIpathName \fBimage
create\fR widget command, a name unique to this instance of the image is
@@ -835,6 +899,9 @@ separator is already present at the top of the undo stack no other will be
inserted. That means that two separators on the undo stack are always
separated by at least one insert or delete action.
.PP
+The \fB<<UndoStack>>\fR virtual event is generated every time the undo stack
+or the redo stack becomes empty or unempty.
+.PP
The undo mechanism is also linked to the modified flag. This means that
undoing or redoing changes can take a modified text widget back to the
unmodified state or vice versa. The modified flag will be set automatically to
@@ -900,6 +967,83 @@ affected.
.PP
See below for the \fIpathName \fBpeer\fR widget command that controls the
creation of peer widgets.
+.SH "ASYNCHRONOUS UPDATE OF LINE HEIGHTS"
+.PP
+In order to maintain a responsive user-experience, the text widget calculates
+lines metrics (line heights in pixels) asynchronously. Because of this, some
+commands of the text widget may return wrong results if the asynchronous
+calculations are not finished at the time of calling. This applies to
+\fIpathName \fBcount -ypixels\fR and \fIpathName \fByview\fR.
+.PP
+Again for performance reasons, it would not be appropriate to let these
+commands always wait for the end of the update calculation each time they are
+called. In most use cases of these commands a more or less inaccurate result
+does not really matter compared to execution speed.
+.PP
+In case accurate result is needed (and if the text widget is managed by a
+geometry manager), one can resort to \fIpathName \fBsync\fR and \fIpathName
+\fBpendingsync\fR to control the synchronization of the view of text widgets.
+.PP
+The \fB<<WidgetViewSync>>\fR virtual event fires when the line heights of the
+text widget become obsolete (due to some editing command or configuration
+change), and again when the internal data of the text widget are back in sync
+with the widget view. The detail field (%d substitution) is either true (when
+the widget is in sync) or false (when it is not).
+.PP
+\fIpathName \fBsync\fR, \fIpathName \fBpendingsync\fR and
+\fB<<WidgetViewSync>>\fR apply to each text widget independently of its peers.
+.PP
+Examples of use:
+.CS
+## Example 1:
+# immediately complete line metrics at any cost (GUI unresponsive)
+$w sync
+$w yview moveto $fraction
+
+## Example 2:
+# synchronously wait for up-to-date line metrics (GUI responsive)
+# before executing the scheduled command, but don't block execution flow
+$w sync -command [list $w yview moveto $fraction]
+
+## Example 3:
+# init
+set yud($w) 0
+proc updateaction w {
+\&set ::yud($w) 1
+\&# any other update action here...
+}
+# runtime, synchronously wait for up-to-date line metrics (GUI responsive)
+$w sync -command [list updateaction $w]
+vwait yud($w)
+$w yview moveto $fraction
+
+## Example 4:
+# init
+set todo($w) {}
+proc updateaction w {
+\&foreach cmd $::todo($w) {uplevel #0 $cmd}
+\&set todo($w) {}
+}
+# runtime
+lappend todo($w) [list $w yview moveto $fraction]
+$w sync -command [list updateaction $w]
+
+## Example 5:
+# init
+set todo($w) {}
+bind $w <<WidgetViewSync>> {
+\&if {%d} {
+\&\&foreach cmd $todo(%W) {eval $cmd}
+\&\&set todo(%W) {}
+\&}
+}
+# runtime
+if {![$w pendingsync]} {
+\&$w yview moveto $fraction
+} else {
+\&lappend todo($w) [list $w yview moveto $fraction]
+}
+.CE
.SH "WIDGET COMMAND"
.PP
The \fBtext\fR command creates a new Tcl command whose name is the same as the
@@ -959,11 +1103,14 @@ each counting option given. Valid counting options are \fB\-chars\fR,
\fB\-displaychars\fR, \fB\-displayindices\fR, \fB\-displaylines\fR,
\fB\-indices\fR, \fB\-lines\fR, \fB\-xpixels\fR and \fB\-ypixels\fR. The
default value, if no option is specified, is \fB\-indices\fR. There is an
-additional possible option \fB\-update\fR which is a modifier. If given, then
-all subsequent options ensure that any possible out of date information is
-recalculated. This currently only has any effect for the \fB\-ypixels\fR count
-(which, if \fB\-update\fR is not given, will use the text widget's current
-cached value for each line). The count options are interpreted as follows:
+additional possible option \fB\-update\fR which is a modifier. If given (and
+if the text widget is managed by a geometry manager), then all subsequent
+options ensure that any possible out of date information is recalculated.
+This currently only has any effect for the \fB\-ypixels\fR count (which, if
+\fB\-update\fR is not given, will use the text widget's current cached value
+for each line). This \fB\-update\fR option is obsoleted by \fIpathName
+\fBsync\fR, \fIpathName \fBpendingsync\fR and \fB<<WidgetViewSync>>\fR. The
+count options are interpreted as follows:
.RS
.IP \fB\-chars\fR
count all characters, whether elided or not. Do not count embedded windows or
@@ -1031,22 +1178,30 @@ test suite.
.TP
\fIpathName \fBdelete \fIindex1 \fR?\fIindex2 ...\fR?
.
-Delete a range of characters from the text. If both \fIindex1\fR and
-\fIindex2\fR are specified, then delete all the characters starting with the
-one given by \fIindex1\fR and stopping just before \fIindex2\fR (i.e. the
-character at \fIindex2\fR is not deleted). If \fIindex2\fR does not specify a
-position later in the text than \fIindex1\fR then no characters are deleted.
-If \fIindex2\fR is not specified then the single character at \fIindex1\fR is
-deleted. It is not allowable to delete characters in a way that would leave
-the text without a newline as the last character. The command returns an empty
-string. If more indices are given, multiple ranges of text will be deleted.
-All indices are first checked for validity before any deletions are made. They
-are sorted and the text is removed from the last range to the first range so
-deleted text does not cause an undesired index shifting side-effects. If
-multiple ranges with the same start index are given, then the longest range is
-used. If overlapping ranges are given, then they will be merged into spans
-that do not cause deletion of text outside the given ranges due to text
-shifted during deletion.
+Delete a range of characters from the text.
+If both \fIindex1\fR and \fIindex2\fR are specified, then delete
+all the characters starting with the one given by \fIindex1\fR
+and stopping just before \fIindex2\fR (i.e. the character at
+\fIindex2\fR is not deleted).
+If \fIindex2\fR does not specify a position later in the text
+than \fIindex1\fR then no characters are deleted.
+If \fIindex2\fR is not specified then the single character at
+\fIindex1\fR is deleted.
+Attempts to delete characters in a way that would leave
+the text without a newline as the last character will be tweaked by the
+text widget to avoid this. In particular, deletion of complete lines of
+text up to the end of the text will also delete the newline character just
+before the deleted block so that it is replaced by the new final newline
+of the text widget.
+The command returns an empty string.
+If more indices are given, multiple ranges of text will be deleted.
+All indices are first checked for validity before any deletions are made.
+They are sorted and the text is removed from the last range to the
+first range so deleted text does not cause an undesired index shifting
+side-effects. If multiple ranges with the same start index are given,
+then the longest range is used. If overlapping ranges are given, then
+they will be merged into spans that do not cause deletion of text
+outside the given ranges due to text shifted during deletion.
.TP
\fIpathName \fBdlineinfo \fIindex\fR
.
@@ -1071,8 +1226,8 @@ including \fIindex2\fR, including the text and information about marks, tags,
and embedded windows. If \fIindex2\fR is not specified, then it defaults to
one character past \fIindex1\fR. The information is returned in the following
format:
-.LP
.RS
+.LP
\fIkey1 value1 index1 key2 value2 index2\fR ...
.LP
The possible \fIkey\fR values are \fBtext\fR, \fBmark\fR, \fBtagon\fR,
@@ -1132,6 +1287,16 @@ behavior of the command depends on the \fIoption\fR argument that follows the
supported:
.RS
.TP
+\fIpathName \fBedit canredo\fR
+.
+Returns a boolean true if redo is possible, i.e. when the redo stack is not
+empty. Otherwise returns false.
+.TP
+\fIpathName \fBedit canundo\fR
+.
+Returns a boolean true if undo is possible, i.e. when the undo stack is not
+empty. Otherwise returns false.
+.TP
\fIpathName \fBedit modified \fR?\fIboolean\fR?
.
If \fIboolean\fR is not specified, returns the modified flag of the widget.
@@ -1142,8 +1307,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
.
@@ -1156,9 +1322,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
@@ -1326,13 +1493,16 @@ Returns a list of peers of this widget (this does not include the widget
itself). The order within this list is undefined.
.RE
.TP
-\fIpathName \fBreplace \fIindex1 index2 chars\fR ?\fItagList chars tagList ...\fR?
-.
-Replaces the range of characters between \fIindex1\fR and \fIindex2\fR with
-the given characters and tags. See the section on \fIpathName \fBinsert\fR for
-an explanation of the handling of the \fItagList...\fR arguments, and the
-section on \fIpathName \fBdelete\fR for an explanation of the handling of the
-indices. If \fIindex2\fR corresponds to an index earlier in the text than
+\fIpathName \fBpendingsync\fR
+Returns 1 if the line heights calculations are not up-to-date, 0 otherwise.
+.TP
+\fIpathName \fBreplace\fR \fIindex1 index2 chars\fR ?\fItagList chars tagList ...\fR?
+Replaces the range of characters between \fIindex1\fR and \fIindex2\fR
+with the given characters and tags. See the section on \fIpathName
+\fBinsert\fR for an explanation of the handling of the \fItagList...\fR
+arguments, and the section on \fIpathName
+\fBdelete\fR for an explanation of the handling of the indices. If
+\fIindex2\fR corresponds to an index earlier in the text than
\fIindex1\fR, an error will be generated.
.RS
.PP
@@ -1505,6 +1675,23 @@ the view just enough to make \fIindex\fR visible at the edge of the window.
If \fIindex\fR is far out of view, then the command centers \fIindex\fR in the
window.
.TP
+\fIpathName \fBsync\fR ?\fB-command \fIcommand\fR?
+Controls the synchronization of the view of the text widget.
+.RS
+.TP
+\fIpathName \fBsync\fR
+Immediately brings the line metrics up-to-date by forcing computation of any
+outdated line heights. The command returns immediately if there is no such
+outdated line heights, otherwise it returns only at the end of the computation.
+The command returns an empty string.
+.TP
+\fIpathName \fBsync -command \fIcommand\fR
+Schedules \fIcommand\fR to be executed (by the event loop) exactly once as soon
+as all line heights are up-to-date. If there are no pending line metrics
+calculations, the scheduling is immediate. The command returns the empty
+string. \fBbgerror\fR is called on \fIcommand\fR failure.
+.RE
+.TP
\fIpathName \fBtag \fIoption \fR?\fIarg arg ...\fR?
.
This command is used to manipulate tags. The exact behavior of the command
@@ -1974,9 +2161,8 @@ the clipboard.
Control-t reverses the order of the two characters to the right of the
insertion cursor.
.IP [32]
-Control-z (and Control-underscore on UNIX when \fBtk_strictMotif\fR is true)
-undoes the last edit action if the \fB\-undo\fR option is true. Does nothing
-otherwise.
+Control-z undoes the last edit action if the \fB\-undo\fR option is true.
+Does nothing otherwise.
.IP [33]
Control-Z (or Control-y on Windows) reapplies the last undone 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 f29ef2f..a1ad758 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
diff --git a/doc/tkerror.n b/doc/tkerror.n
index 0780901..53cb0d1 100644
--- a/doc/tkerror.n
+++ b/doc/tkerror.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 tkerror n 4.1 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -20,11 +20,11 @@ Note: as of Tk 4.1 the \fBtkerror\fR command has been renamed to
\fBbgerror\fR because the event loop (which is what usually invokes
it) is now part of Tcl. For backward compatibility
the \fBbgerror\fR provided by the current Tk version still
-tries to call \fBtkerror\fR if there is one (or an auto loadable one),
+tries to call \fBtkerror\fR if there is one (or an auto loadable one),
so old script defining that error handler should still work, but you
-should anyhow modify your scripts to use \fBbgerror\fR instead
+should anyhow modify your scripts to use \fBbgerror\fR instead
of \fBtkerror\fR because that support for the old name might vanish
-in the near future. If that call fails, \fBbgerror\fR
+in the near future. If that call fails, \fBbgerror\fR
posts a dialog showing the error and offering to see the stack trace
to the user. If you want your own error management you should
directly override \fBbgerror\fR instead of \fBtkerror\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 271d9f1..31f241c 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
diff --git a/doc/ttk_Geometry.3 b/doc/ttk_Geometry.3
index 8dfae37..61015c5 100644
--- a/doc/ttk_Geometry.3
+++ b/doc/ttk_Geometry.3
@@ -75,7 +75,7 @@ Used to store error messages.
.AP int left in
Extra padding (in pixels) to add to the left side of a region.
.AP "Tcl_Obj *" objPtr in
-String value contains a symbolic name
+String value contains a symbolic name
to be converted to an enumerated value or bitmask.
Internal rep may be be modified to cache corresponding value.
.AP Ttk_Padding padding in
@@ -84,18 +84,18 @@ Extra padding to add on the inside of a region.
.AP Ttk_Box parcel in
A rectangular region, allocated from a cavity.
.AP int relief in
-One of the standard Tk relief options
-(TK_RELIEF_RAISED, TK_RELIEF_SUNKEN, etc.).
+One of the standard Tk relief options
+(TK_RELIEF_RAISED, TK_RELIEF_SUNKEN, etc.).
See \fBTk_GetReliefFromObj\fR.
.AP short right in
Extra padding (in pixels) to add to the right side of a region.
.AP Ttk_Side side in
-One of \fBTTK_SIDE_LEFT\fR, \fBTTK_SIDE_TOP\fR,
+One of \fBTTK_SIDE_LEFT\fR, \fBTTK_SIDE_TOP\fR,
\fBTTK_SIDE_RIGHT\fR, or \fBTTK_SIDE_BOTTOM\fR.
.AP unsigned sticky in
A bitmask containing one or more of the bits
-\fBTTK_STICK_W\fR (west, or left),
-\fBTTK_STICK_E\fR (east, or right,
+\fBTTK_STICK_W\fR (west, or left),
+\fBTTK_STICK_E\fR (east, or right,
\fBTTK_STICK_N\fR (north, or top), and
\fBTTK_STICK_S\fR (south, or bottom).
\fBTTK_FILL_X\fR is defined as a synonym for (TTK_STICK_W|TTK_STICK_E),
@@ -104,7 +104,7 @@ and \fBTTK_FILL_BOTH\fR and \fBTTK_STICK_ALL\fR
are synonyms for (TTK_FILL_X|TTK_FILL_Y).
See also: \fIgrid(n)\fR.
.AP Tk_Window tkwin in
-Window whose screen geometry determines
+Window whose screen geometry determines
the conversion between absolute units and pixels.
.AP short top in
Extra padding at the top of a region.
@@ -184,14 +184,14 @@ with all components equal to the specified \fIborder\fR.
and returns a combined padding containing the sum of the
individual padding components.
.PP
-\fBTtk_RelievePadding\fR
+\fBTtk_RelievePadding\fR
adds an extra 2 pixels of padding to \fIpadding\fR
according to the specified \fIrelief\fR.
-If \fIrelief\fR is \fBTK_RELIEF_SUNKEN\fR,
+If \fIrelief\fR is \fBTK_RELIEF_SUNKEN\fR,
adds two pixels at the top and left
so the inner region is shifted down and to the left.
If it is \fBTK_RELIEF_RAISED\fR, adds two pixels
-at the bottom and right so
+at the bottom and right so
the inner region is shifted up and to the right.
Otherwise, adds 1 pixel on all sides.
This is typically used in element geometry procedures to simulate a
@@ -201,17 +201,17 @@ look for pushbuttons.
.PP
\fBTtk_GetPaddingFromObj\fR converts the string in \fIobjPtr\fR
to a \fBTtk_Padding\fR structure.
-The string representation is a list of
-up to four length specifications
+The string representation is a list of
+up to four length specifications
.QW "\fIleft top right bottom\fR" .
-If fewer than four elements are specified,
+If fewer than four elements are specified,
\fIbottom\fR defaults to \fItop\fR,
-\fIright\fR defaults to \fIleft\fR, and
+\fIright\fR defaults to \fIleft\fR, and
\fItop\fR defaults to \fIleft\fR.
See \fBTk_GetPixelsFromObj(3)\fR for the syntax of length specifications.
.PP
\fBTtk_GetBorderFromObj\fR is the same as \fBTtk_GetPaddingFromObj\fR
-except that the lengths are specified as integers
+except that the lengths are specified as integers
(i.e., resolution-dependant values like \fI3m\fR are not allowed).
.PP
\fBTtk_GetStickyFromObj\fR converts the string in \fIobjPtr\fR
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 2f3c845..62ebe47 100644
--- a/doc/ttk_button.n
+++ b/doc/ttk_button.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 ttk::button n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
@@ -36,12 +36,12 @@ button (meaning, roughly,
The default is \fBnormal\fR.
.RS
.PP
-Depending on the theme, the default button may be displayed
+Depending on the theme, the default button may be displayed
with an extra highlight ring, or with a different border color.
.RE
.OP \-width width Width
-If greater than zero, specifies how much space, in character widths,
-to allocate for the text label.
+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
@@ -55,8 +55,8 @@ in the style.
.\" .OP \-relief relief Relief
.SH "WIDGET COMMAND"
.PP
-In addition to the standard
-\fBcget\fR, \fBconfigure\fR, \fBidentify\fR, \fBinstate\fR, and \fBstate\fR
+In addition to the standard
+\fBcget\fR, \fBconfigure\fR, \fBidentify\fR, \fBinstate\fR, and \fBstate\fR
commands, buttons support the following additional widget commands:
.TP
\fIpathName \fBinvoke\fR
diff --git a/doc/ttk_checkbutton.n b/doc/ttk_checkbutton.n
index 6236503..ed79f5a 100644
--- a/doc/ttk_checkbutton.n
+++ b/doc/ttk_checkbutton.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 ttk::checkbutton n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
@@ -14,7 +14,7 @@ ttk::checkbutton \- On/off widget
.BE
.SH DESCRIPTION
A \fBttk::checkbutton\fR widget is used to show or change a setting.
-It has two states, selected and deselected.
+It has two states, selected and deselected.
The state of the checkbutton may be linked to a Tcl variable.
.SO ttk_widget
\-class \-compound \-cursor
@@ -26,18 +26,18 @@ The state of the checkbutton may be linked to a Tcl variable.
.OP \-command command Command
A Tcl script to execute whenever the widget is invoked.
.OP \-offvalue offValue OffValue
-The value to store in the associated \fB\-variable\fR
+The value to store in the associated \fB\-variable\fR
when the widget is deselected. Defaults to \fB0\fR.
.OP \-onvalue onValue OnValue
-The value to store in the associated \fB\-variable\fR
+The value to store in the associated \fB\-variable\fR
when the widget is selected. Defaults to \fB1\fR.
.OP \-variable variable Variable
The name of a global variable whose value is linked to the widget.
Defaults to the widget pathname if not specified.
.SH "WIDGET COMMAND"
.PP
-In addition to the standard
-\fBcget\fR, \fBconfigure\fR, \fBidentify\fR, \fBinstate\fR, and \fBstate\fR
+In addition to the standard
+\fBcget\fR, \fBconfigure\fR, \fBidentify\fR, \fBinstate\fR, and \fBstate\fR
commands, checkbuttons support the following additional
widget commands:
.TP
@@ -48,17 +48,17 @@ If the widget is currently selected, sets the \fB\-variable\fR
to the \fB\-offvalue\fR and deselects the widget;
otherwise, sets the \fB\-variable\fR to the \fB\-onvalue\fR
Returns the result of the \fB\-command\fR.
-.\" Missing: select, deselect, toggle
+.\" Missing: select, deselect, toggle
.\" Are these useful? They don't invoke the -command
.\" Missing: flash. This is definitely not useful.
.SH "WIDGET STATES"
.PP
The widget does not respond to user input if the \fBdisabled\fR state is set.
-The widget sets the \fBselected\fR state whenever
+The widget sets the \fBselected\fR state whenever
the linked \fB\-variable\fR is set to the widget's \fB\-onvalue\fR,
and clears it otherwise.
-The widget sets the \fBalternate\fR state whenever the
-linked \fB\-variable\fR is unset.
+The widget sets the \fBalternate\fR state whenever the
+linked \fB\-variable\fR is unset.
(The \fBalternate\fR state may be used to indicate a
.QW tri-state
or
diff --git a/doc/ttk_combobox.n b/doc/ttk_combobox.n
index dc1c7d1..5e5b3fc 100644
--- a/doc/ttk_combobox.n
+++ b/doc/ttk_combobox.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 ttk::combobox n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
@@ -15,7 +15,7 @@ ttk::combobox \- text field with popdown selection list
.SH DESCRIPTION
.PP
A \fBttk::combobox\fR combines a text field with a pop-down list of values;
-the user may select the value of the text field from among the
+the user may select the value of the text field from among the
values in the list.
.SO ttk_widget
\-class \-cursor \-takefocus
@@ -37,14 +37,14 @@ The \fB\-postcommand\fR script may specify the \fB\-values\fR to display.
.OP \-state state State
One of \fBnormal\fR, \fBreadonly\fR, or \fBdisabled\fR.
In the \fBreadonly\fR state,
-the value may not be edited directly, and
+the value may not be edited directly, and
the user can only select one of the \fB\-values\fR from the
dropdown list.
-In the \fBnormal\fR state,
+In the \fBnormal\fR state,
the text field is directly editable.
In the \fBdisabled\fR state, no interaction is possible.
.OP \-textvariable textVariable TextVariable
-Specifies the name of a global variable whose value is linked
+Specifies the name of a global variable whose value is linked
to the widget value.
Whenever the variable changes value the widget value is updated,
and vice versa.
@@ -66,7 +66,7 @@ The following subcommands are possible for combobox widgets:
'\"See \fIttk::widget(n)\fR.
.TP
\fIpathName \fBcurrent\fR ?\fInewIndex\fR?
-If \fInewIndex\fR is supplied, sets the combobox value
+If \fInewIndex\fR is supplied, sets the combobox value
to the element at position \fInewIndex\fR in the list of \fB\-values\fR.
Otherwise, returns the index of the current value in the list of
\fB\-values\fR or \fB\-1\fR if the current value does not appear in the list.
diff --git a/doc/ttk_entry.n b/doc/ttk_entry.n
index 34779a6..984e957 100644
--- a/doc/ttk_entry.n
+++ b/doc/ttk_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 ttk::entry n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
@@ -18,9 +18,9 @@ ttk::entry \- Editable text field widget
.PP
An \fBttk::entry\fR widget displays a one-line text string and
allows that string to be edited by the user.
-The value of the string may be linked to a Tcl variable
+The value of the string may be linked to a Tcl variable
with the \fB\-textvariable\fR option.
-Entry widgets support horizontal scrolling with the
+Entry widgets support horizontal scrolling with the
standard \fB\-xscrollcommand\fR option and \fBxview\fR widget command.
.SO ttk_widget
\-class \-cursor \-style
@@ -28,7 +28,7 @@ standard \fB\-xscrollcommand\fR option and \fBxview\fR widget command.
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-exportselection exportSelection ExportSelection
-A boolean value specifying whether or not
+A boolean value specifying whether or not
a selection in the widget should be linked to the X selection.
If the selection is exported, then selecting in the widget deselects
the current X selection, selecting outside the widget deselects any
@@ -65,7 +65,7 @@ Specifies one of three states for the entry,
\fBnormal\fR, \fBdisabled\fR, or \fBreadonly\fR.
See \fBWIDGET STATES\fR, below.
.OP \-textvariable textVariable Variable
-Specifies the name of a global variable whose value is linked
+Specifies the name of a global variable whose value is linked
to the entry widget's contents.
Whenever the variable changes value, the widget's contents are updated,
and vice versa.
@@ -217,7 +217,7 @@ earlier one, then the entry's selection is cleared.
'\"See \fIttk::widget(n)\fR.
.TP
\fIpathName \fBvalidate\fR
-Force revalidation, independent of the conditions specified
+Force revalidation, independent of the conditions specified
by the \fB\-validate\fR option.
Returns 0 if validation fails, 1 if it succeeds.
Sets or clears the \fBinvalid\fR state accordingly.
@@ -277,20 +277,20 @@ options are used to enable entry widget validation.
.PP
There are two main validation modes: \fIprevalidation\fR,
in which the \fB\-validatecommand\fR is evaluated prior to each edit
-and the return value is used to determine whether to accept
+and the return value is used to determine whether to accept
or reject the change;
-and \fIrevalidation\fR, in which the \fB\-validatecommand\fR is
+and \fIrevalidation\fR, in which the \fB\-validatecommand\fR is
evaluated to determine whether the current value is valid.
.PP
The \fB\-validate\fR option determines when validation occurs;
it may be set to any of the following values:
.RS
.IP \fBnone\fR
-Default. This means validation will only occur when
+Default. This means validation will only occur when
specifically requested by the \fBvalidate\fR widget command.
.IP \fBkey\fR
The entry will be prevalidated prior to each edit
-(specifically, whenever the \fBinsert\fR or \fBdelete\fR
+(specifically, whenever the \fBinsert\fR or \fBdelete\fR
widget commands are called).
If prevalidation fails, the edit is rejected.
.IP \fBfocus\fR
@@ -311,20 +311,20 @@ may modify the entry widget's value
via the widget \fBinsert\fR or \fBdelete\fR commands,
or by setting the linked \fB\-textvariable\fR.
If either does so during prevalidation,
-then the edit is rejected
+then the edit is rejected
regardless of the value returned by the \fB\-validatecommand\fR.
.PP
-If \fB\-validatecommand\fR is empty (the default),
+If \fB\-validatecommand\fR is empty (the default),
validation always succeeds.
.SS "VALIDATION SCRIPT SUBSTITUTIONS"
.PP
-It is possible to perform percent substitutions on the
+It is possible to perform percent substitutions on the
\fB\-validatecommand\fR and \fB\-invalidcommand\fR,
just as in a \fBbind\fR script.
The following substitutions are recognized:
.RS
.IP \fB%d\fR
-Type of action: 1 for \fBinsert\fR prevalidation,
+Type of action: 1 for \fBinsert\fR prevalidation,
0 for \fBdelete\fR prevalidation,
or \-1 for revalidation.
.IP \fB%i\fR
@@ -348,19 +348,19 @@ The name of the entry widget.
.PP
The standard Tk entry widget automatically disables validation
(by setting \fB\-validate\fR to \fBnone\fR)
-if the \fB\-validatecommand\fR or \fB\-invalidcommand\fR modifies
+if the \fB\-validatecommand\fR or \fB\-invalidcommand\fR modifies
the entry's value.
The Tk themed entry widget only disables validation if one
of the validation scripts raises an error, or if \fB\-validatecommand\fR
does not return a valid boolean value.
-(Thus, it is not necessary to re-enable validation after
+(Thus, it is not necessary to re-enable validation after
modifying the entry value in a validation script).
.PP
In addition, the standard entry widget invokes validation whenever the linked
\fB\-textvariable\fR is modified; the Tk themed entry widget does not.
.SH "DEFAULT BINDINGS"
.PP
-The entry widget's default bindings enable the following behavior.
+The entry widget's default bindings enable the following behavior.
In the descriptions below,
.QW word
refers to a contiguous group of letters, digits, or
@@ -442,22 +442,22 @@ Control-k deletes all the characters to the right of the insertion
cursor.
.SH "WIDGET STATES"
.PP
-In the \fBdisabled\fR state,
+In the \fBdisabled\fR state,
the entry cannot be edited and the text cannot be selected.
In the \fBreadonly\fR state,
-no insert cursor is displayed and
-the entry cannot be edited
+no insert cursor is displayed and
+the entry cannot be edited
(specifically: the \fBinsert\fR and \fBdelete\fR commands have no effect).
-The \fBdisabled\fR state is the same as \fBreadonly\fR,
+The \fBdisabled\fR state is the same as \fBreadonly\fR,
and in addition text cannot be selected.
.PP
-Note that changes to the linked \fB\-textvariable\fR will
+Note that changes to the linked \fB\-textvariable\fR will
still be reflected in the entry, even if it is disabled or readonly.
.PP
Typically, the text is
.QW grayed-out
in the \fBdisabled\fR state,
-and a different background is used in the \fBreadonly\fR state.
+and a different background is used in the \fBreadonly\fR state.
.PP
The entry widget sets the \fBinvalid\fR state if revalidation fails,
and clears it whenever validation succeeds.
diff --git a/doc/ttk_frame.n b/doc/ttk_frame.n
index 3b885e0..b54ce96 100644
--- a/doc/ttk_frame.n
+++ b/doc/ttk_frame.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 ttk::frame n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
@@ -22,9 +22,9 @@ together.
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-borderwidth borderWidth BorderWidth
-The desired width of the widget border. Defaults to 0.
+The desired width of the widget border. Defaults to 0.
.OP \-relief relief Relief
-One of the standard Tk border styles:
+One of the standard Tk border styles:
\fBflat\fR, \fBgroove\fR, \fBraised\fR, \fBridge\fR,
\fBsolid\fR, or \fBsunken\fR.
Defaults to \fBflat\fR.
diff --git a/doc/ttk_image.n b/doc/ttk_image.n
index 99d38c6..4985c20 100644
--- a/doc/ttk_image.n
+++ b/doc/ttk_image.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 ttk_image n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
@@ -16,7 +16,7 @@ ttk_image \- Define an element based on an image
.PP
The \fIimage\fR element factory creates a new element
in the current theme whose visual appearance is determined
-by Tk images.
+by Tk images.
\fIimageSpec\fP is a list of one or more elements.
The first element is the default image name.
The rest of the list is a sequence of \fIstatespec / value\fR
@@ -36,7 +36,7 @@ Specifies a minimum height for the element.
If less than zero, the base image's height is used as a default.
.TP
\fB\-padding\fR \fIpadding\fR
-Specifies the element's interior padding. Defaults to
+Specifies the element's interior padding. Defaults to
\fB\-border\fR if not specified.
.TP
\fB\-sticky\fR \fIspec\fR
@@ -53,13 +53,13 @@ Specifies a minimum width for the element.
If less than zero, the base image's width is used as a default.
.SH "IMAGE STRETCHING"
.PP
-If the element's allocated parcel is larger than the image,
+If the element's allocated parcel is larger than the image,
the image will be placed in the parcel based on the \fB\-sticky\fR option.
If the image needs to stretch horizontally (i.e., \fB\-sticky ew\fR)
or vertically (\fB\-sticky ns\fR),
subregions of the image are replicated to fill the parcel
based on the \fB\-border\fR option.
-The \fB\-border\fR divides the image into 9 regions:
+The \fB\-border\fR divides the image into 9 regions:
four fixed corners, top and left edges (which may be tiled horizontally),
left and right edges (which may be tiled vertically),
and the central area (which may be tiled in both directions).
diff --git a/doc/ttk_intro.n b/doc/ttk_intro.n
index baef34d..bc3cd69 100644
--- a/doc/ttk_intro.n
+++ b/doc/ttk_intro.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 ttk::intro n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
@@ -24,7 +24,7 @@ all aspects of the widget's appearance are controlled by the style of
the widget (i.e. the style of the elements of the widget).
.SH "THEMES"
.PP
-A \fItheme\fR is a collection of elements and styles
+A \fItheme\fR is a collection of elements and styles
that determine the look and feel of the widget set.
Themes can be used to:
.IP \(bu
@@ -47,7 +47,7 @@ For example, a vertical scrollbar widget contains \fBuparrow\fR,
.PP
Element names use a recursive dotted notation.
For example, \fBuparrow\fR identifies a generic arrow element,
-and \fBScrollbar.uparrow\fR and \fBCombobox.uparrow\fR identify
+and \fBScrollbar.uparrow\fR and \fBCombobox.uparrow\fR identify
widget-specific elements.
When looking for an element, the style engine looks for
the specific name first, and if an element of that name is
@@ -56,9 +56,9 @@ successive leading components of the element name.
.PP
Like widgets, elements have \fIoptions\fR which
specify what to display and how to display it.
-For example, the \fBtext\fR element
+For example, the \fBtext\fR element
(which displays a text string) has
-\fB\-text\fR, \fB\-font\fR, \fB\-foreground\fR, \fB\-background\fR,
+\fB\-text\fR, \fB\-font\fR, \fB\-foreground\fR, \fB\-background\fR,
\fB\-underline\fR, and \fB\-width\fR options.
The value of an element option is taken from:
.IP \(bu
@@ -105,14 +105,14 @@ and the various flavors of buttons which have \fBactive\fR state.
The themed Tk widgets generalizes this idea:
every widget has a bitmap of independent state flags.
Widget state flags include \fBactive\fR, \fBdisabled\fR,
-\fBpressed\fR, \fBfocus\fR, etc.,
+\fBpressed\fR, \fBfocus\fR, etc.,
(see \fIttk::widget(n)\fR for the full list of state flags).
.PP
-Instead of a \fB\-state\fR option, every widget now has
+Instead of a \fB\-state\fR option, every widget now has
a \fBstate\fR widget command which is used to set or query
the state.
A \fIstate specification\fR is a list of symbolic state names
-indicating which bits are set, each optionally prefixed with an
+indicating which bits are set, each optionally prefixed with an
exclamation point indicating that the bit is cleared instead.
.PP
For example, the class bindings for the \fBttk::button\fR
@@ -132,7 +132,7 @@ This specifies that the widget becomes \fBactive\fR when
the pointer enters the widget, and inactive when it leaves.
Similarly it becomes \fBpressed\fR when the mouse button is pressed,
and \fB!pressed\fR on the ButtonRelease event.
-In addition, the button unpresses if
+In addition, the button unpresses if
pointer is dragged outside the widget while Button-1 is held down,
and represses if it's dragged back in.
Finally, when the mouse button is released, the widget's
@@ -143,7 +143,7 @@ but not by much).
'\" Note to self: rewrite that paragraph. It's horrible.
.SH "STYLES"
.PP
-Each widget is associated with a \fIstyle\fR,
+Each widget is associated with a \fIstyle\fR,
which specifies values for element options.
Style names use a recursive dotted notation like layouts and elements;
by default, widgets use the class name to look up a style in the current theme.
@@ -157,7 +157,7 @@ ttk::\fBstyle configure\fR TButton \e
;
.CE
.PP
-Many elements are displayed differently depending on the widget state.
+Many elements are displayed differently depending on the widget state.
For example, buttons have a different background when they are active,
a different foreground when disabled, and a different relief when pressed.
The \fBstyle map\fR command specifies dynamic option settings
diff --git a/doc/ttk_label.n b/doc/ttk_label.n
index ff93adf..6781b47 100644
--- a/doc/ttk_label.n
+++ b/doc/ttk_label.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 ttk::label n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
@@ -15,7 +15,7 @@ ttk::label \- Display a text string and/or image
.SH DESCRIPTION
.PP
A \fBttk::label\fR widget displays a textual label and/or image.
-The label may be linked to a Tcl variable
+The label may be linked to a Tcl variable
to automatically change the displayed text.
.SO ttk_widget
\-class \-compound \-cursor
@@ -31,7 +31,7 @@ relative to the inner margins. Legal values are
\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.
+The widget's background color.
If unspecified, the theme default is used.
.OP \-font font Font
Font to use for label text.
@@ -45,17 +45,17 @@ One of \fBleft\fR, \fBcenter\fR, or \fBright\fR.
See also \fB\-anchor\fR.
.OP \-padding padding Padding
Specifies the amount of extra space to allocate for the widget.
-The padding is a list of up to four length specifications
+The padding is a list of up to four length specifications
\fIleft top right bottom\fR.
-If fewer than four elements are specified,
+If fewer than four elements are specified,
\fIbottom\fR defaults to \fItop\fR,
-\fIright\fR defaults to \fIleft\fR, and
+\fIright\fR defaults to \fIleft\fR, and
\fItop\fR defaults to \fIleft\fR.
.OP \-relief relief Relief
.\" Rewrite this:
Specifies the 3-D effect desired for the widget border.
Valid values are
-\fBflat\fR, \fBgroove\fR, \fBraised\fR, \fBridge\fR, \fBsolid\fR,
+\fBflat\fR, \fBgroove\fR, \fBraised\fR, \fBridge\fR, \fBsolid\fR,
and \fBsunken\fR.
.OP \-text text Text
Specifies a text string to be displayed inside the widget
diff --git a/doc/ttk_labelframe.n b/doc/ttk_labelframe.n
index 2dae91f..64edf6a 100644
--- a/doc/ttk_labelframe.n
+++ b/doc/ttk_labelframe.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 ttk::labelframe n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
@@ -22,7 +22,7 @@ another widget.
\-style
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
-.\" XXX: Currently included, but may go away:
+.\" XXX: Currently included, but may go away:
.\" XXX: .OP -borderwidth borderWidth BorderWidth
.\" XXX: The desired width of the widget border. Default is theme-dependent.
.\" XXX: .OP -relief relief Relief
@@ -31,7 +31,7 @@ another widget.
.\" XXX: \fBsolid\fR, or \fBsunken\fR.
.\" XXX: Default is theme-dependent.
.OP \-labelanchor labelAnchor LabelAnchor
-Specifies where to place the label.
+Specifies where to place the label.
Allowed values are (clockwise from the top upper left corner):
\fBnw\fR, \fBn\fR, \fBne\fR, \fBen\fR, \fBe\fR, \fBes\fR,
\fBse\fR, \fBs\fR,\fBsw\fR, \fBws\fR, \fBw\fR and \fBwn\fR.
@@ -43,10 +43,10 @@ The default value is theme-dependent.
.OP \-text text Text
Specifies the text of the label.
.OP \-underline underline Underline
-If set, specifies the integer index (0-based) of a character to
+If set, specifies the integer index (0-based) of a character to
underline in the text string.
-The underlined character is used for mnemonic activation.
-Mnemonic activation for a \fBttk::labelframe\fR
+The underlined character is used for mnemonic activation.
+Mnemonic activation for a \fBttk::labelframe\fR
sets the keyboard focus to the first child of the \fBttk::labelframe\fR widget.
.OP \-padding padding Padding
Additional padding to include inside the border.
diff --git a/doc/ttk_menubutton.n b/doc/ttk_menubutton.n
index 33189e8..698bd0c 100644
--- a/doc/ttk_menubutton.n
+++ b/doc/ttk_menubutton.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 ttk::menubutton n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
@@ -24,10 +24,10 @@ and displays a menu when pressed.
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-direction direction Direction
-Specifies where the menu is to be popped up relative
-to the menubutton.
+Specifies where the menu is to be popped up relative
+to the menubutton.
One of: \fBabove\fR, \fBbelow\fR, \fBleft\fR, \fBright\fR,
-or \fBflush\fR. The default is \fBbelow\fR.
+or \fBflush\fR. The default is \fBbelow\fR.
\fBflush\fR pops the menu up directly over the menubutton.
.OP \-menu menu Menu
Specifies the path name of the menu associated with the menubutton.
@@ -38,8 +38,8 @@ menubutton.
.\" .OP \-padding padding Pad
.SH "WIDGET COMMAND"
.PP
-Menubutton widgets support the standard
-\fBcget\fR, \fBconfigure\fR, \fBidentify\fR, \fBinstate\fR, and \fBstate\fR
+Menubutton widgets support the standard
+\fBcget\fR, \fBconfigure\fR, \fBidentify\fR, \fBinstate\fR, and \fBstate\fR
methods. No other widget methods are used.
.SH "STANDARD STYLES"
.PP
diff --git a/doc/ttk_notebook.n b/doc/ttk_notebook.n
index cecae48..4d1b789 100644
--- a/doc/ttk_notebook.n
+++ b/doc/ttk_notebook.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 ttk::notebook n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
@@ -18,7 +18,7 @@ ttk::notebook \- Multi-paned container widget
.fi
.BE
.SH DESCRIPTION
-A \fBttk::notebook\fR widget manages a collection of windows
+A \fBttk::notebook\fR widget manages a collection of windows
and displays a single one at a time.
Each slave window is associated with a \fItab\fR,
which the user may select to change the currently-displayed window.
@@ -28,35 +28,35 @@ which the user may select to change the currently-displayed window.
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-height height Height
-If present and greater than zero,
+If present and greater than zero,
specifies the desired height of the pane area
(not including internal padding or tabs).
Otherwise, the maximum height of all panes is used.
.OP \-padding padding Padding
Specifies the amount of extra space to add around the outside
of the notebook.
-The padding is a list of up to four length specifications
+The padding is a list of up to four length specifications
\fIleft top right bottom\fR.
-If fewer than four elements are specified,
+If fewer than four elements are specified,
\fIbottom\fR defaults to \fItop\fR,
-\fIright\fR defaults to \fIleft\fR, and
+\fIright\fR defaults to \fIleft\fR, and
\fItop\fR defaults to \fIleft\fR.
.OP \-width width Width
-If present and greater than zero,
+If present and greater than zero,
specifies the desired width of the pane area
(not including internal padding).
Otherwise, the maximum width of all panes is used.
.SH "TAB OPTIONS"
The following options may be specified for individual notebook panes:
.OP \-state state State
-Either \fBnormal\fR, \fBdisabled\fR or \fBhidden\fR.
+Either \fBnormal\fR, \fBdisabled\fR or \fBhidden\fR.
If \fBdisabled\fR, then the tab is not selectable.
If \fBhidden\fR, then the tab is not shown.
.OP \-sticky sticky Sticky
Specifies how the slave window is positioned within the pane area.
Value is a string containing zero or more of the characters
\fBn, s, e,\fR or \fBw\fR.
-Each letter refers to a side (north, south, east, or west)
+Each letter refers to a side (north, south, east, or west)
that the slave window will
.QW stick
to, as per the \fBgrid\fR geometry manager.
@@ -73,7 +73,7 @@ Specifies how to display the image relative to the text,
in the case both \fB\-text\fR and \fB\-image\fR are present.
See \fIlabel(n)\fR for legal values.
.OP \-underline underline Underline
-Specifies the integer index (0-based) of a character to underline
+Specifies the integer index (0-based) of a character to underline
in the text string.
The underlined character is used for mnemonic activation
if \fBttk::notebook::enableTraversal\fR is called.
@@ -87,7 +87,7 @@ The name of a slave window;
.IP \(bu
A positional specification of the form
.QW @\fIx\fR,\fIy\fR ,
-which identifies the tab
+which identifies the tab
.IP \(bu
The literal string
.QW \fBcurrent\fR ,
@@ -95,7 +95,7 @@ which identifies the currently-selected tab; or:
.IP \(bu
The literal string
.QW \fBend\fR ,
-which returns the number of tabs
+which returns the number of tabs
(only valid for
.QW "\fIpathname \fBindex\fR" ).
.SH "WIDGET COMMAND"
@@ -142,9 +142,9 @@ or the total number of tabs if \fItabid\fR is the string
.TP
\fIpathname \fBinsert \fIpos subwindow options...\fR
Inserts a pane at the specified position.
-\fIpos\fR is either the string \fBend\fR, an integer index,
+\fIpos\fR is either the string \fBend\fR, an integer index,
or the name of a managed subwindow.
-If \fIsubwindow\fR is already managed by the notebook,
+If \fIsubwindow\fR is already managed by the notebook,
moves it to the specified position.
See \fBTAB OPTIONS\fR for the list of available options.
.TP
@@ -190,7 +190,7 @@ containing the notebook as follows:
of any tab, will select that tab.
.PP
Multiple notebooks in a single toplevel may be enabled for traversal,
-including nested notebooks.
+including nested notebooks.
However, notebook traversal only works properly if all panes
are direct children of the notebook.
.SH "VIRTUAL EVENTS"
diff --git a/doc/ttk_progressbar.n b/doc/ttk_progressbar.n
index 6306450..1945f70 100644
--- a/doc/ttk_progressbar.n
+++ b/doc/ttk_progressbar.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 ttk::progressbar n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
@@ -44,15 +44,15 @@ that is, the progress bar completes one
when the \fB\-value\fR increases by \fB\-maximum\fR.
.OP \-variable variable Variable
The name of a global Tcl variable which is linked to the \fB\-value\fR.
-If specified, the \fB\-value\fR of the progress bar is
-automatically set to the value of the variable whenever
+If specified, the \fB\-value\fR of the progress bar is
+automatically set to the value of the variable whenever
the latter is modified.
.OP \-phase phase Phase
Read-only option.
-The widget periodically increments the value of this option
+The widget periodically increments the value of this option
whenever the \fB\-value\fR is greater than 0 and,
in \fIdeterminate\fR mode, less than \fB\-maximum\fR.
-This option may be used by the current theme
+This option may be used by the current theme
to provide additional animation effects.
.SH "WIDGET COMMAND"
.PP
@@ -72,7 +72,7 @@ Test the widget state; see \fIttk::widget(n)\fR.
.TP
\fIpathName \fBstart\fR ?\fIinterval\fR?
Begin autoincrement mode:
-schedules a recurring timer event that calls \fBstep\fR
+schedules a recurring timer event that calls \fBstep\fR
every \fIinterval\fR milliseconds.
If omitted, \fIinterval\fR defaults to 50 milliseconds (20 steps/second).
.TP
@@ -80,7 +80,7 @@ If omitted, \fIinterval\fR defaults to 50 milliseconds (20 steps/second).
Modify or query the widget state; see \fIttk::widget(n)\fR.
.TP
\fIpathName \fBstep\fR ?\fIamount\fR?
-Increments the \fB\-value\fR by \fIamount\fR.
+Increments the \fB\-value\fR by \fIamount\fR.
\fIamount\fR defaults to 1.0 if omitted.
.TP
\fIpathName \fBstop\fR
diff --git a/doc/ttk_radiobutton.n b/doc/ttk_radiobutton.n
index c16f2cd..5b4dcce 100644
--- a/doc/ttk_radiobutton.n
+++ b/doc/ttk_radiobutton.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 ttk::radiobutton n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
@@ -29,21 +29,21 @@ it sets the variable to its associated value.
.OP \-command command Command
A Tcl script to evaluate whenever the widget is invoked.
.OP \-value Value Value
-The value to store in the associated \fB\-variable\fR
-when the widget is selected.
+The value to store in the associated \fB\-variable\fR
+when the widget is selected.
.OP \-variable variable Variable
The name of a global variable whose value is linked to the widget.
Default value is \fB::selectedButton\fR.
.SH "WIDGET COMMAND"
.PP
-In addition to the standard
-\fBcget\fR, \fBconfigure\fR, \fBidentify\fR, \fBinstate\fR, and \fBstate\fR
+In addition to the standard
+\fBcget\fR, \fBconfigure\fR, \fBidentify\fR, \fBinstate\fR, and \fBstate\fR
commands, radiobuttons support the following additional
widget commands:
.TP
\fIpathname\fB invoke\fR
Sets the \fB\-variable\fR to the \fB\-value\fR, selects the widget,
-and evaluates the associated \fB\-command\fR.
+and evaluates the associated \fB\-command\fR.
Returns the result of the \fB\-command\fR, or the empty
string if no \fB\-command\fR is specified.
.\" Missing: select, deselect. Useful?
@@ -51,11 +51,11 @@ string if no \fB\-command\fR is specified.
.SH "WIDGET STATES"
.PP
The widget does not respond to user input if the \fBdisabled\fR state is set.
-The widget sets the \fBselected\fR state whenever
+The widget sets the \fBselected\fR state whenever
the linked \fB\-variable\fR is set to the widget's \fB\-value\fR,
and clears it otherwise.
-The widget sets the \fBalternate\fR state whenever the
-linked \fB\-variable\fR is unset.
+The widget sets the \fBalternate\fR state whenever the
+linked \fB\-variable\fR is unset.
(The \fBalternate\fR state may be used to indicate a
.QW tri-state
or
diff --git a/doc/ttk_scrollbar.n b/doc/ttk_scrollbar.n
index 56df214..03d09f2 100644
--- a/doc/ttk_scrollbar.n
+++ b/doc/ttk_scrollbar.n
@@ -4,12 +4,12 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH ttk::scrollbar n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
.SH NAME
-ttk::scrollbar \- Control the viewport of a scrollable widget
+ttk::scrollbar \- Control the viewport of a scrollable widget
.SH SYNOPSIS
\fBttk::scrollbar\fR \fIpathName \fR?\fIoptions...\fR?
.BE
@@ -30,7 +30,7 @@ these are used to scroll the visible region in discrete units.
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-command command Command
-A Tcl script prefix to evaluate
+A Tcl script prefix to evaluate
to change the view in the widget associated with the scrollbar.
Additional arguments are appended to the value of this option,
as described in \fBSCROLLING COMMANDS\fR below,
@@ -66,7 +66,7 @@ See \fIttk::widget(n)\fR.
Test the widget state; see \fIttk::widget(n)\fR.
.TP
\fIpathName \fBset \fIfirst last\fR
-This command is normally invoked by the scrollbar's associated widget
+This command is normally invoked by the scrollbar's associated widget
from an \fB\-xscrollcommand\fR or \fB\-yscrollcommand\fR callback.
Specifies the visible range to be displayed.
\fIfirst\fR and \fIlast\fR are real fractions between 0 and 1.
@@ -147,7 +147,7 @@ of individual elements, based on the position and state of the mouse pointer.
set f [frame .f]
ttk::scrollbar $f.hsb \-orient horizontal \-command [list $f.t xview]
ttk::scrollbar $f.vsb \-orient vertical \-command [list $f.t yview]
-text $f.t \-xscrollcommand [list $f.hsb set] \-yscrollcommand [list $f.vsb set]
+text $f.t \-xscrollcommand [list $f.hsb set] \-yscrollcommand [list $f.vsb set]
grid $f.t \-row 0 \-column 0 \-sticky nsew
grid $f.vsb \-row 0 \-column 1 \-sticky nsew
grid $f.hsb \-row 1 \-column 0 \-sticky nsew
diff --git a/doc/ttk_separator.n b/doc/ttk_separator.n
index d955fc4..fea2701 100644
--- a/doc/ttk_separator.n
+++ b/doc/ttk_separator.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 ttk::separator n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
@@ -26,8 +26,8 @@ One of \fBhorizontal\fR or \fBvertical\fR.
Specifies the orientation of the separator.
.SH "WIDGET COMMAND"
.PP
-Separator widgets support the standard
-\fBcget\fR, \fBconfigure\fR, \fBidentify\fR, \fBinstate\fR, and \fBstate\fR
+Separator widgets support the standard
+\fBcget\fR, \fBconfigure\fR, \fBidentify\fR, \fBinstate\fR, and \fBstate\fR
methods. No other widget methods are used.
.SH "SEE ALSO"
ttk::widget(n)
diff --git a/doc/ttk_sizegrip.n b/doc/ttk_sizegrip.n
index 8b3429e..64d3ef6 100644
--- a/doc/ttk_sizegrip.n
+++ b/doc/ttk_sizegrip.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 ttk::sizegrip n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
diff --git a/doc/ttk_spinbox.n b/doc/ttk_spinbox.n
index f10af3d..7ae586f 100644
--- a/doc/ttk_spinbox.n
+++ b/doc/ttk_spinbox.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 ttk::spinbox n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
@@ -42,7 +42,7 @@ time one of the widget spin buttons is pressed. The up button applies a
positive increment, the down button applies a negative increment.
.OP \-values values Values
This must be a Tcl list of values. If this option is set then this will
-override any range set using the \fB\-from\fR, \fB\-to\fR and
+override any range set using the \fB\-from\fR, \fB\-to\fR and
\fB\-increment\fR options. The widget will instead use the values
specified beginning with the first value.
.OP \-wrap wrap Wrap
@@ -60,7 +60,7 @@ Specifies a Tcl command to be invoked whenever a spinbutton is invoked.
See the \fBttk::entry\fR manual for information about indexing characters.
.SH "VALIDATION"
.PP
-See the \fBttk::entry\fR manual for information about using the
+See the \fBttk::entry\fR manual for information about using the
\fB\-validate\fR and \fB\-validatecommand\fR options.
.SH "WIDGET COMMAND"
.PP
diff --git a/doc/ttk_style.n b/doc/ttk_style.n
index dc3bade..985e3cd 100644
--- a/doc/ttk_style.n
+++ b/doc/ttk_style.n
@@ -1,9 +1,9 @@
'\"
'\" Copyright (c) 2004 Joe English
-'\"
+'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH ttk::style n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
@@ -23,9 +23,9 @@ which specifies the set of elements making up the widget
and how they are arranged, along with dynamic and default
settings for element options.
By default, the style name is the same as the widget's class;
-this may be overridden by the \fB\-style\fR option.
+this may be overridden by the \fB\-style\fR option.
.PP
-A \fItheme\fR is a collection of elements and styles
+A \fItheme\fR is a collection of elements and styles
which controls the overall look and feel of an application.
.SH DESCRIPTION
.PP
@@ -43,31 +43,31 @@ is used.
\fBttk::style lookup \fIstyle\fR \fI\-option \fR?\fIstate \fR?\fIdefault\fR??
Returns the value specified for \fI\-option\fR in style \fIstyle\fR
in state \fIstate\fR, using the standard lookup rules for element options.
-\fIstate\fR is a list of state names; if omitted,
+\fIstate\fR is a list of state names; if omitted,
it defaults to all bits off (the
.QW normal
state).
If the \fIdefault\fR argument is present, it is used as a fallback
value in case no specification for \fI\-option\fR is found.
-.\" Otherwise -- signal error? return empty string? Leave unspecified for now.
+.\" Otherwise -- signal error? return empty string? Leave unspecified for now.
.TP
\fBttk::style layout \fIstyle\fR ?\fIlayoutSpec\fR?
-Define the widget layout for style \fIstyle\fR.
+Define the widget layout for style \fIstyle\fR.
See \fBLAYOUTS\fR below for the format of \fIlayoutSpec\fR.
If \fIlayoutSpec\fR is omitted, return the layout specification
for style \fIstyle\fR.
-.TP
+.TP
\fBttk::style element create\fR \fIelementName\fR \fItype\fR ?\fIargs...\fR?
Creates a new element in the current theme of type \fItype\fR.
-The only cross-platform built-in element type is \fIimage\fR
-(see \fBttk_image\fR(n)) but themes may define other element types
+The only cross-platform built-in element type is \fIimage\fR
+(see \fBttk_image\fR(n)) but themes may define other element types
(see \fBTtk_RegisterElementFactory\fR). On suitable versions of Windows
an element factory is registered to create Windows theme elements
(see \fBttk_vsapi\fR(n)).
-.TP
+.TP
\fBttk::style element names\fR
Returns the list of elements defined in the current theme.
-.TP
+.TP
\fBttk::style element options \fIelement\fR
Returns the list of \fIelement\fR's options.
.TP
@@ -79,7 +79,7 @@ If \fB\-settings\fR is present, \fIscript\fR is evaluated in the
context of the new theme as per \fBttk::style theme settings\fR.
.TP
\fBttk::style theme settings \fIthemeName\fR \fIscript\fR
-Temporarily sets the current theme to \fIthemeName\fR,
+Temporarily sets the current theme to \fIthemeName\fR,
evaluate \fIscript\fR, then restore the previous theme.
Typically \fIscript\fR simply defines styles and elements,
though arbitrary Tcl code may appear.
@@ -99,7 +99,7 @@ The layout mechanism uses a simplified version of the \fBpack\fR
geometry manager: given an initial cavity,
each element is allocated a parcel.
Valid options are:
-.TP
+.TP
\fB\-side \fIside\fR
Specifies which side of the cavity to place the element;
one of \fBleft\fR, \fBright\fR, \fBtop\fR, or \fBbottom\fR.
diff --git a/doc/ttk_treeview.n b/doc/ttk_treeview.n
index dd83c20..660b076 100644
--- a/doc/ttk_treeview.n
+++ b/doc/ttk_treeview.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 ttk::treeview n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
@@ -15,15 +15,15 @@ ttk::treeview \- hierarchical multicolumn data display widget
.SH DESCRIPTION
.PP
The \fBttk::treeview\fR widget displays a hierarchical collection of items.
-Each item has a textual label, an optional image,
+Each item has a textual label, an optional image,
and an optional list of data values.
The data values are displayed in successive columns after
the tree label.
.PP
The order in which data values are displayed may be controlled
-by setting the \fB\-displaycolumns\fR widget option.
+by setting the \fB\-displaycolumns\fR widget option.
The tree widget can also display column headings.
-Columns may be accessed by number or by symbolic names
+Columns may be accessed by number or by symbolic names
listed in the \fB\-columns\fR widget option;
see \fBCOLUMN IDENTIFIERS\fR.
.PP
@@ -40,7 +40,7 @@ and control the appearance of the item.
.\" @@@HERE: describe selection, focus item
.PP
Treeview widgets support horizontal and vertical scrolling with the
-standard \fB\-\fR[\fBxy\fR]\fBscrollcommand\fR options
+standard \fB\-\fR[\fBxy\fR]\fBscrollcommand\fR options
and [\fBxy\fR]\fBview\fR widget commands.
.SO ttk_widget
\-class \-cursor \-takefocus
@@ -48,14 +48,14 @@ and [\fBxy\fR]\fBview\fR widget commands.
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-columns columns Columns
-A list of column identifiers,
+A list of column identifiers,
specifying the number of columns and their names.
.\"X: This is a read-only option; it may only be set when the widget is created.
.OP \-displaycolumns displayColumns DisplayColumns
-A list of column identifiers
+A list of column identifiers
(either symbolic names or integer indices)
-specifying which data columns are displayed
-and the order in which they appear,
+specifying which data columns are displayed
+and the order in which they appear,
or the string \fB#all\fP.
If set to \fB#all\fP (the default),
all columns are shown in the order given.
@@ -76,7 +76,7 @@ If set to \fBextended\fR (the default), multiple items may be selected.
If \fBbrowse\fR, only a single item will be selected at a time.
If \fBnone\fR, the selection will not be changed.
.PP
-Note that application code and tag bindings can set the selection
+Note that application code and tag bindings can set the selection
however they wish, regardless of the value of \fB\-selectmode\fR.
.RE
.OP \-show show Show
@@ -84,7 +84,7 @@ A list containing zero or more of the following values, specifying
which elements of the tree to display.
.RS
.IP \fBtree\fR
-Display tree labels in column #0.
+Display tree labels in column #0.
.IP \fBheadings\fR
Display the heading row.
.PP
@@ -114,7 +114,7 @@ returns the list of children belonging to \fIitem\fR.
.RS
.PP
If \fInewchildren\fR is specified, replaces \fIitem\fR's child list
-with \fInewchildren\fR.
+with \fInewchildren\fR.
Items in the old child list not present in the new child list
are detached from the tree.
None of the items in \fInewchildren\fR may be an ancestor
@@ -125,7 +125,7 @@ of \fIitem\fR.
Query or modify the options for the specified \fIcolumn\fR.
If no \fI\-option\fR is specified,
returns a dictionary of option/value pairs.
-If a single \fI\-option\fR is specified,
+If a single \fI\-option\fR is specified,
returns the value of that option.
Otherwise, the options are updated with the specified values.
The following options may be set on each column:
@@ -134,7 +134,7 @@ The following options may be set on each column:
\fB\-id \fIname\fR
The column name. This is a read-only option.
For example, [\fI$pathname \fBcolumn #\fIn \fB\-id\fR]
-returns the data column associated with display column #\fIn\fR.
+returns the data column associated with display column #\fIn\fR.
.TP
\fB\-anchor\fR
Specifies how the text in this column should be aligned
@@ -145,7 +145,7 @@ with respect to the cell. One of
\fB\-minwidth\fR
The minimum width of the column in pixels.
The treeview widget will not make the column any smaller than
-\fB\-minwidth\fR when the widget is resized or the user drags a
+\fB\-minwidth\fR when the widget is resized or the user drags a
column separator.
.TP
\fB\-stretch\fR
@@ -184,7 +184,7 @@ Returns 1 if the specified \fIitem\fR is present in the tree,
If \fIitem\fR is specified, sets the focus item to \fIitem\fR.
Otherwise, returns the current focus item, or \fB{}\fR if there is none.
.\" Need: way to clear the focus item. {} works for this...
-.TP
+.TP
\fIpathname \fBheading \fIcolumn\fR ?\fI\-option \fR?\fIvalue \-option value...\fR?
Query or modify the heading options for the specified \fIcolumn\fR.
Valid options are:
@@ -251,13 +251,13 @@ and data columns.
Returns the integer index of \fIitem\fR within its parent's list of children.
.TP
\fIpathname \fBinsert \fIparent index\fR ?\fB\-id \fIid\fR? \fIoptions...\fR
-Creates a new item.
+Creates a new item.
\fIparent\fR is the item ID of the parent item,
or the empty string \fB{}\fR
to create a new top-level item.
\fIindex\fR is an integer, or the value \fBend\fR, specifying where in the
list of \fIparent\fR's children to insert the new item.
-If \fIindex\fR is less than or equal to zero,
+If \fIindex\fR is less than or equal to zero,
the new node is inserted at the beginning;
if \fIindex\fR is greater than or equal to the current number of children,
it is inserted at the end.
@@ -276,9 +276,9 @@ Test the widget state; see \fIttk::widget(n)\fR.
.TP
\fIpathname \fBitem \fIitem\fR ?\fI\-option \fR?\fIvalue \-option value...\fR?
Query or modify the options for the specified \fIitem\fR.
-If no \fI\-option\fR is specified,
+If no \fI\-option\fR is specified,
returns a dictionary of option/value pairs.
-If a single \fI\-option\fR is specified,
+If a single \fI\-option\fR is specified,
returns the value of that option.
Otherwise, the item's options are updated with the specified values.
See \fBITEM OPTIONS\fR for the list of available options.
@@ -292,7 +292,7 @@ If \fIindex\fR is less than or equal to zero, \fIitem\fR is moved
to the beginning; if greater than or equal to the number of children,
it is moved to the end.
.RE
-.TP
+.TP
\fIpathname \fBnext \fIitem\fR
Returns the identifier of \fIitem\fR's next sibling,
or \fB{}\fR if \fIitem\fR is the last child of its parent.
@@ -300,7 +300,7 @@ or \fB{}\fR if \fIitem\fR is the last child of its parent.
\fIpathname \fBparent \fIitem\fR
Returns the ID of the parent of \fIitem\fR,
or \fB{}\fR if \fIitem\fR is at the top level of the hierarchy.
-.TP
+.TP
\fIpathname \fBprev \fIitem\fR
Returns the identifier of \fIitem\fR's previous sibling,
or \fB{}\fR if \fIitem\fR is the first child of its parent.
@@ -308,7 +308,7 @@ or \fB{}\fR if \fIitem\fR is the first child of its parent.
\fIpathname \fBsee \fIitem\fR
Ensure that \fIitem\fR is visible:
sets all of \fIitem\fR's ancestors to \fB\-open true\fR,
-and scrolls the widget if necessary so that \fIitem\fR is
+and scrolls the widget if necessary so that \fIitem\fR is
within the visible portion of the tree.
.TP
\fIpathname \fBselection\fR ?\fIselop itemList\fR?
@@ -344,7 +344,7 @@ Modify or query the widget state; see \fIttk::widget(n)\fR.
.RS
.TP
\fIpathName \fBtag bind \fItagName \fR?\fIsequence\fR? ?\fIscript\fR?
-Add a Tk binding script for the event sequence \fIsequence\fR
+Add a Tk binding script for the event sequence \fIsequence\fR
to the tag \fItagName\fR. When an X event is delivered to an item,
binding scripts for each of the item's \fB\-tags\fR are evaluated
in order as per \fIbindtags(n)\fR.
@@ -353,10 +353,10 @@ in order as per \fIbindtags(n)\fR.
\fB<KeyPress>\fR, \fB<KeyRelease>\fR, and virtual events
are sent to the focus item.
\fB<ButtonPress>\fR, \fB<ButtonRelease>\fR, and \fB<Motion>\fR events
-are sent to the item under the mouse pointer.
+are sent to the item under the mouse pointer.
No other event types are supported.
.PP
-The binding \fIscript\fR undergoes \fB%\fR-substitutions before
+The binding \fIscript\fR undergoes \fB%\fR-substitutions before
evaluation; see \fBbind(n)\fR for details.
.RE
.TP
@@ -364,10 +364,10 @@ evaluation; see \fBbind(n)\fR for details.
Query or modify the options for the specified \fItagName\fR.
If one or more \fIoption/value\fR pairs are specified,
sets the value of those options for the specified tag.
-If a single \fIoption\fR is specified,
-returns the value of that option
+If a single \fIoption\fR is specified,
+returns the value of that option
(or the empty string if the option has not been specified for \fItagName\fR).
-With no additional arguments,
+With no additional arguments,
returns a dictionary of the option settings for \fItagName\fR.
See \fBTAG OPTIONS\fR for the list of available options.
.TP
@@ -420,7 +420,7 @@ the extra values are ignored.
A boolean value indicating whether the item's children
should be displayed (\fB\-open true\fR) or hidden (\fB\-open false\fR).
.OP \-tags tags Tags
-A list of tags associated with this item.
+A list of tags associated with this item.
.SH "TAG OPTIONS"
.PP
The following options may be specified on tags:
@@ -448,8 +448,8 @@ An integer \fIn\fR, specifying the \fIn\fRth data column.
A string of the form \fB#\fIn\fR, where \fIn\fR is an integer,
specifying the \fIn\fRth display column.
.PP
-\fBNOTE:\fR
-Item \fB\-values\fR may be displayed in a different order than
+\fBNOTE:\fR
+Item \fB\-values\fR may be displayed in a different order than
the order in which they are stored.
.PP
\fBNOTE:\fR Column #0 always refers to the tree column,
@@ -457,7 +457,7 @@ even if \fB\-show tree\fR is not specified.
.PP
A \fIdata column number\fR is an index into an item's \fB\-values\fR list;
a \fIdisplay column number\fR is the column number in the tree
-where the values are displayed.
+where the values are displayed.
Tree labels are displayed in column #0.
If \fB\-displaycolumns\fR is not set,
then data column \fIn\fR is displayed in display column \fB#\fIn+1\fR.
diff --git a/doc/ttk_vsapi.n b/doc/ttk_vsapi.n
index 34145fb..334836c 100644
--- a/doc/ttk_vsapi.n
+++ b/doc/ttk_vsapi.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 ttk_vsapi n 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
@@ -72,7 +72,7 @@ If no \fIstateMap\fR parameter is given there is an implicit default
map of {{} 1}
.SH "EXAMPLE"
.PP
-Create a correctly themed close button by changing the layout of
+Create a correctly themed close button by changing the layout of
a \fBttk::button\fR(n). This uses the WINDOW part WP_SMALLCLOSEBUTTON
and as documented the states CBS_DISABLED, CBS_HOT, CBS_NORMAL and
CBS_PUSHED are mapped from ttk states.
diff --git a/doc/winfo.n b/doc/winfo.n
index 5008448..bff4973 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 c44ab9b..b1a9fea 100644
--- a/doc/wm.n
+++ b/doc/wm.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 wm n 8.5 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -796,7 +796,7 @@ Gridded geometry management is typically invoked by turning on
the \fBsetGrid\fR option for a widget; it can also be invoked
with the \fBwm grid\fR command or by calling \fBTk_SetGrid\fR.
In each of these approaches the particular widget (or sometimes
-code in the application as a whole) specifies the relationship between
+code in the application as a whole) specifies the relationship between
integral grid sizes for the window and pixel sizes.
To return to non-gridded geometry management, invoke
\fBwm grid\fR with empty argument strings.
diff --git a/generic/tk.h b/generic/tk.h
index 4a655a4..9403f31 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -17,8 +17,8 @@
#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
@@ -59,8 +59,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 +73,12 @@ extern "C" {
*/
#define TK_MAJOR_VERSION 8
-#define TK_MINOR_VERSION 6
-#define TK_RELEASE_LEVEL TCL_FINAL_RELEASE
-#define TK_RELEASE_SERIAL 4
+#define TK_MINOR_VERSION 7
+#define TK_RELEASE_LEVEL TCL_ALPHA_RELEASE
+#define TK_RELEASE_SERIAL 0
-#define TK_VERSION "8.6"
-#define TK_PATCH_LEVEL "8.6.4"
+#define TK_VERSION "8.7"
+#define TK_PATCH_LEVEL "8.7a0"
/*
* A special definition used to allow this header file to be included from
diff --git a/generic/tkBind.c b/generic/tkBind.c
index 9cd3b7b..bb95fa9 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -2868,7 +2868,7 @@ GetAllVirtualEvents(
* Any other fields in eventPtr which are not specified by the pattern
* string or the optional arguments, are set to 0.
*
- * The event may be handled sychronously or asynchronously, depending on
+ * The event may be handled synchronously or asynchronously, depending on
* the value specified by the optional "-when" option. The default
* setting is synchronous.
*
@@ -3460,7 +3460,7 @@ HandleEventGenerate(
Tcl_DoWhenIdle(DoWarp, dispPtr);
dispPtr->flags |= TK_DISPLAY_IN_WARP;
}
- dispPtr->warpWindow = Tk_IdToWindow(Tk_Display(mainWin),
+ dispPtr->warpWindow = Tk_IdToWindow(dispPtr->display,
event.general.xmotion.window);
dispPtr->warpMainwin = mainWin;
dispPtr->warpX = event.general.xmotion.x;
@@ -3535,8 +3535,20 @@ DoWarp(
{
TkDisplay *dispPtr = clientData;
- TkpWarpPointer(dispPtr);
- XForceScreenSaver(dispPtr->display, ScreenSaverReset);
+ /*
+ * DoWarp was scheduled only if the window was mapped. It needs to be
+ * still mapped at the time the present idle callback is executed. Also
+ * one needs to guard against window destruction in the meantime.
+ * Finally, the case warpWindow == NULL is special in that it means
+ * the whole screen.
+ */
+
+ if ((dispPtr->warpWindow == NULL) ||
+ (Tk_IsMapped(dispPtr->warpWindow)
+ && (Tk_WindowId(dispPtr->warpWindow) != None))) {
+ TkpWarpPointer(dispPtr);
+ XForceScreenSaver(dispPtr->display, ScreenSaverReset);
+ }
dispPtr->flags &= ~TK_DISPLAY_IN_WARP;
}
@@ -3937,7 +3949,7 @@ ParseEventDescription(
p = GetField(p, field, FIELD_SIZE);
}
if (*field != '\0') {
- if ((*field >= '1') && (*field <= '5') && (field[1] == '\0')) {
+ if ((*field >= '1') && (*field <= '9') && (field[1] == '\0')) {
if (eventFlags == 0) {
patPtr->eventType = ButtonPress;
eventMask = ButtonPressMask;
diff --git a/generic/tkBusy.c b/generic/tkBusy.c
index 65248a2..b36d453 100644
--- a/generic/tkBusy.c
+++ b/generic/tkBusy.c
@@ -433,6 +433,10 @@ MakeTransparentWindowExist(
TkpMakeTransparentWindowExist(tkwin, parent);
+ if (winPtr->window == None) {
+ return; /* Platform didn't make Window. */
+ }
+
dispPtr = winPtr->dispPtr;
hPtr = Tcl_CreateHashEntry(&dispPtr->winTable, (char *) winPtr->window,
&notUsed);
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index 8e14852..9c4d60a 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -2447,6 +2447,19 @@ DisplayCanvas(
goto done;
}
+#ifdef MAC_OSX_TK
+ /*
+ * If drawing is disabled, all we need to do is
+ * clear the REDRAW_PENDING flag.
+ */
+ TkWindow *winPtr = (TkWindow *)(canvasPtr->tkwin);
+ MacDrawable *macWin = winPtr->privatePtr;
+ if (macWin && (macWin->flags & TK_DO_NOT_DRAW)){
+ canvasPtr->flags &= ~REDRAW_PENDING;
+ return;
+ }
+#endif
+
/*
* Choose a new current item if that is needed (this could cause event
* handlers to be invoked).
diff --git a/generic/tkDecls.h b/generic/tkDecls.h
index 64c32cd..eaaaf6c 100644
--- a/generic/tkDecls.h
+++ b/generic/tkDecls.h
@@ -1721,6 +1721,9 @@ extern const TkStubs *tkStubsPtr;
#undef Tk_SafeInit
#undef Tk_CreateConsoleWindow
+#undef Tk_FreeXId
+#define Tk_FreeXId(display,xid)
+
#if defined(_WIN32) && defined(UNICODE)
# define Tk_MainEx Tk_MainExW
EXTERN void Tk_MainExW(int argc, wchar_t **argv,
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index 3ad9acd..acfdd31 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -133,7 +133,7 @@ static const Tk_OptionSpec entryOptSpec[] = {
0, DEF_ENTRY_SELECT_BD_MONO, 0},
{TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background",
DEF_ENTRY_SELECT_FG_COLOR, -1, Tk_Offset(Entry, selFgColorPtr),
- TK_CONFIG_NULL_OK, DEF_ENTRY_SELECT_FG_MONO, 0},
+ TK_OPTION_NULL_OK, DEF_ENTRY_SELECT_FG_MONO, 0},
{TK_OPTION_STRING, "-show", "show", "Show",
DEF_ENTRY_SHOW, -1, Tk_Offset(Entry, showChar),
TK_OPTION_NULL_OK, 0, 0},
@@ -279,23 +279,23 @@ static const Tk_OptionSpec sbOptSpec[] = {
0, DEF_ENTRY_SELECT_BD_MONO, 0},
{TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background",
DEF_ENTRY_SELECT_FG_COLOR, -1, Tk_Offset(Entry, selFgColorPtr),
- TK_CONFIG_NULL_OK, DEF_ENTRY_SELECT_FG_MONO, 0},
+ 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),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
DEF_ENTRY_TAKE_FOCUS, -1, Tk_Offset(Entry, takeFocus),
- TK_CONFIG_NULL_OK, 0, 0},
+ TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
DEF_ENTRY_TEXT_VARIABLE, -1, Tk_Offset(Entry, textVarName),
- TK_CONFIG_NULL_OK, 0, 0},
+ TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_DOUBLE, "-to", "to", "To",
DEF_SPINBOX_TO, -1, Tk_Offset(Spinbox, toValue), 0, 0, 0},
{TK_OPTION_STRING_TABLE, "-validate", "validate", "Validate",
DEF_ENTRY_VALIDATE, -1, Tk_Offset(Entry, validate),
0, validateStrings, 0},
{TK_OPTION_STRING, "-validatecommand", "validateCommand","ValidateCommand",
- NULL, -1, Tk_Offset(Entry, validateCmd), TK_CONFIG_NULL_OK, 0, 0},
+ NULL, -1, Tk_Offset(Entry, validateCmd), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-values", "values", "Values",
DEF_SPINBOX_VALUES, -1, Tk_Offset(Spinbox, valueStr),
TK_OPTION_NULL_OK, 0, 0},
@@ -307,7 +307,7 @@ static const Tk_OptionSpec sbOptSpec[] = {
DEF_SPINBOX_WRAP, -1, Tk_Offset(Spinbox, wrap), 0, 0, 0},
{TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
DEF_ENTRY_SCROLL_COMMAND, -1, Tk_Offset(Entry, scrollCmd),
- TK_CONFIG_NULL_OK, 0, 0},
+ TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
};
@@ -390,8 +390,8 @@ static const char *const selElementNames[] = {
*/
static int ConfigureEntry(Tcl_Interp *interp, Entry *entryPtr,
- int objc, Tcl_Obj *const objv[], int flags);
-static void DeleteChars(Entry *entryPtr, int index, int count);
+ int objc, Tcl_Obj *const objv[]);
+static int DeleteChars(Entry *entryPtr, int index, int count);
static void DestroyEntry(void *memPtr);
static void DisplayEntry(ClientData clientData);
static void EntryBlinkProc(ClientData clientData);
@@ -417,7 +417,7 @@ static int EntryValidateChange(Entry *entryPtr, const char *change,
static void ExpandPercents(Entry *entryPtr, const char *before,
const char *change, const char *newStr, int index,
int type, Tcl_DString *dsPtr);
-static void EntryValueChanged(Entry *entryPtr,
+static int EntryValueChanged(Entry *entryPtr,
const char *newValue);
static void EntryVisibleRange(Entry *entryPtr,
double *firstPtr, double *lastPtr);
@@ -427,7 +427,7 @@ static int EntryWidgetObjCmd(ClientData clientData,
static void EntryWorldChanged(ClientData instanceData);
static int GetEntryIndex(Tcl_Interp *interp, Entry *entryPtr,
const char *string, int *indexPtr);
-static void InsertChars(Entry *entryPtr, int index, const char *string);
+static int InsertChars(Entry *entryPtr, int index, const char *string);
/*
* These forward declarations are the spinbox specific ones:
@@ -554,7 +554,7 @@ Tk_EntryObjCmd(
if ((Tk_InitOptions(interp, (char *) entryPtr, optionTable, tkwin)
!= TCL_OK) ||
- (ConfigureEntry(interp, entryPtr, objc-2, objv+2, 0) != TCL_OK)) {
+ (ConfigureEntry(interp, entryPtr, objc-2, objv+2) != TCL_OK)) {
Tk_DestroyWindow(entryPtr->tkwin);
return TCL_ERROR;
}
@@ -659,12 +659,12 @@ EntryWidgetObjCmd(
}
Tcl_SetObjResult(interp, objPtr);
} else {
- result = ConfigureEntry(interp, entryPtr, objc-2, objv+2, 0);
+ result = ConfigureEntry(interp, entryPtr, objc-2, objv+2);
}
break;
case COMMAND_DELETE: {
- int first, last;
+ int first, last, code;
if ((objc < 3) || (objc > 4)) {
Tcl_WrongNumArgs(interp, 2, objv, "firstIndex ?lastIndex?");
@@ -681,7 +681,10 @@ EntryWidgetObjCmd(
goto error;
}
if ((last >= first) && (entryPtr->state == STATE_NORMAL)) {
- DeleteChars(entryPtr, first, last - first);
+ code = DeleteChars(entryPtr, first, last - first);
+ if (code != TCL_OK) {
+ goto error;
+ }
}
break;
}
@@ -722,7 +725,7 @@ EntryWidgetObjCmd(
}
case COMMAND_INSERT: {
- int index;
+ int index, code;
if (objc != 4) {
Tcl_WrongNumArgs(interp, 2, objv, "index text");
@@ -733,7 +736,10 @@ EntryWidgetObjCmd(
goto error;
}
if (entryPtr->state == STATE_NORMAL) {
- InsertChars(entryPtr, index, Tcl_GetString(objv[3]));
+ code = InsertChars(entryPtr, index, Tcl_GetString(objv[3]));
+ if (code != TCL_OK) {
+ goto error;
+ }
}
break;
}
@@ -1082,8 +1088,7 @@ ConfigureEntry(
Entry *entryPtr, /* Information about widget; may or may not
* already have values for some fields. */
int objc, /* Number of valid entries in argv. */
- Tcl_Obj *const objv[], /* Argument objects. */
- int flags) /* Flags to pass to Tk_ConfigureWidget. */
+ Tcl_Obj *const objv[]) /* Argument objects. */
{
Tk_SavedOptions savedOptions;
Tk_3DBorder border;
@@ -1098,6 +1103,7 @@ ConfigureEntry(
int valuesChanged = 0; /* lint initialization */
double oldFrom = 0.0; /* lint initialization */
double oldTo = 0.0; /* lint initialization */
+ int code;
/*
* Eliminate any existing trace on a variable monitored by the entry.
@@ -1170,13 +1176,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)) {
/*
@@ -1305,6 +1313,17 @@ ConfigureEntry(
value = Tcl_GetVar2(interp, entryPtr->textVarName, NULL, TCL_GLOBAL_ONLY);
if (value == NULL) {
+
+ /*
+ * Since any trace on the textvariable was eliminated above,
+ * the only possible reason for EntryValueChanged to return
+ * an error is that the textvariable lives in a namespace
+ * that does not (yet) exist. Indeed, namespaces are not
+ * automatically created as needed. Don't trap this error
+ * here, better do it below when attempting to trace the
+ * variable.
+ */
+
EntryValueChanged(entryPtr, NULL);
} else {
EntrySetValue(entryPtr, value);
@@ -1323,7 +1342,13 @@ ConfigureEntry(
*/
Tcl_ListObjIndex(interp, sbPtr->listObj, 0, &objPtr);
- EntryValueChanged(entryPtr, Tcl_GetString(objPtr));
+
+ /*
+ * No check for error return here as well, because any possible
+ * error will be trapped below when attempting tracing.
+ */
+
+ EntryValueChanged(entryPtr, Tcl_GetString(objPtr));
} else if ((sbPtr->valueStr == NULL)
&& !DOUBLES_EQ(sbPtr->fromValue, sbPtr->toValue)
&& (!DOUBLES_EQ(sbPtr->fromValue, oldFrom)
@@ -1346,6 +1371,12 @@ ConfigureEntry(
dvalue = sbPtr->fromValue;
}
sprintf(sbPtr->formatBuf, sbPtr->valueFormat, dvalue);
+
+ /*
+ * No check for error return here as well, because any possible
+ * error will be trapped below when attempting tracing.
+ */
+
EntryValueChanged(entryPtr, sbPtr->formatBuf);
}
}
@@ -1357,10 +1388,13 @@ ConfigureEntry(
if ((entryPtr->textVarName != NULL)
&& !(entryPtr->flags & ENTRY_VAR_TRACED)) {
- Tcl_TraceVar2(interp, entryPtr->textVarName,
+ code = Tcl_TraceVar2(interp, entryPtr->textVarName,
NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
EntryTextVarProc, entryPtr);
- entryPtr->flags |= ENTRY_VAR_TRACED;
+ if (code != TCL_OK) {
+ return TCL_ERROR;
+ }
+ entryPtr->flags |= ENTRY_VAR_TRACED;
}
EntryWorldChanged(entryPtr);
@@ -1680,7 +1714,7 @@ DisplayEntry(
Tk_CharBbox(entryPtr->textLayout, entryPtr->insertPos, &cursorX, NULL,
NULL, NULL);
cursorX += entryPtr->layoutX;
- cursorX -= (entryPtr->insertWidth)/2;
+ cursorX -= (entryPtr->insertWidth == 1) ? 1 : (entryPtr->insertWidth)/2;
Tk_SetCaretPos(entryPtr->tkwin, cursorX, baseY - fm.ascent,
fm.ascent + fm.descent);
if (entryPtr->insertPos >= entryPtr->leftIndex && cursorX < xBound) {
@@ -1892,8 +1926,8 @@ EntryComputeGeometry(
*/
if (entryPtr->showChar != NULL) {
- Tcl_UniChar ch;
- char buf[TCL_UTF_MAX];
+ int ch;
+ char buf[6];
int size;
/*
@@ -1903,15 +1937,16 @@ EntryComputeGeometry(
* resulting string.
*/
- Tcl_UtfToUniChar(entryPtr->showChar, &ch);
- size = Tcl_UniCharToUtf(ch, buf);
+ TkUtfToUniChar(entryPtr->showChar, &ch);
+ size = TkUniCharToUtf(ch, buf);
entryPtr->numDisplayBytes = entryPtr->numChars * size;
p = ckalloc(entryPtr->numDisplayBytes + 1);
entryPtr->displayString = p;
for (i = entryPtr->numChars; --i >= 0; ) {
- p += Tcl_UniCharToUtf(ch, p);
+ memcpy(p, buf, size);
+ p += size;
}
*p = '\0';
}
@@ -1993,7 +2028,8 @@ EntryComputeGeometry(
* Add new characters to an entry widget.
*
* Results:
- * None.
+ * A standard Tcl result. If an error occurred then an error message is
+ * left in the interp's result.
*
* Side effects:
* New information gets added to entryPtr; it will be redisplayed soon,
@@ -2002,12 +2038,12 @@ EntryComputeGeometry(
*----------------------------------------------------------------------
*/
-static void
+static int
InsertChars(
Entry *entryPtr, /* Entry that is to get the new elements. */
int index, /* Add the new elements before this character
* index. */
- const char *value) /* New characters to add (NULL-terminated
+ const char *value) /* New characters to add (NULL-terminated
* string). */
{
ptrdiff_t byteIndex;
@@ -2020,7 +2056,7 @@ InsertChars(
byteIndex = Tcl_UtfAtIndex(string, index) - string;
byteCount = strlen(value);
if (byteCount == 0) {
- return;
+ return TCL_OK;
}
newByteCount = entryPtr->numBytes + byteCount + 1;
@@ -2034,7 +2070,7 @@ InsertChars(
EntryValidateChange(entryPtr, value, newStr, index,
VALIDATE_INSERT) != TCL_OK) {
ckfree(newStr);
- return;
+ return TCL_OK;
}
ckfree((char *)string);
@@ -2082,7 +2118,7 @@ InsertChars(
if (entryPtr->insertPos >= index) {
entryPtr->insertPos += charsAdded;
}
- EntryValueChanged(entryPtr, NULL);
+ return EntryValueChanged(entryPtr, NULL);
}
/*
@@ -2093,7 +2129,8 @@ InsertChars(
* Remove one or more characters from an entry widget.
*
* Results:
- * None.
+ * A standard Tcl result. If an error occurred then an error message is
+ * left in the interp's result.
*
* Side effects:
* Memory gets freed, the entry gets modified and (eventually)
@@ -2102,7 +2139,7 @@ InsertChars(
*----------------------------------------------------------------------
*/
-static void
+static int
DeleteChars(
Entry *entryPtr, /* Entry widget to modify. */
int index, /* Index of first character to delete. */
@@ -2116,7 +2153,7 @@ DeleteChars(
count = entryPtr->numChars - index;
}
if (count <= 0) {
- return;
+ return TCL_OK;
}
string = entryPtr->string;
@@ -2138,7 +2175,7 @@ DeleteChars(
VALIDATE_DELETE) != TCL_OK) {
ckfree(newStr);
ckfree(toDelete);
- return;
+ return TCL_OK;
}
ckfree(toDelete);
@@ -2197,7 +2234,7 @@ DeleteChars(
entryPtr->insertPos = index;
}
}
- EntryValueChanged(entryPtr, NULL);
+ return EntryValueChanged(entryPtr, NULL);
}
/*
@@ -2210,7 +2247,8 @@ DeleteChars(
* is one, and does other bookkeeping such as arranging for redisplay.
*
* Results:
- * None.
+ * A standard Tcl result. If an error occurred then an error message is
+ * left in the interp's result.
*
* Side effects:
* None.
@@ -2218,7 +2256,7 @@ DeleteChars(
*----------------------------------------------------------------------
*/
-static void
+static int
EntryValueChanged(
Entry *entryPtr, /* Entry whose value just changed. */
const char *newValue) /* If this value is not NULL, we first force
@@ -2232,7 +2270,7 @@ EntryValueChanged(
newValue = NULL;
} else {
newValue = Tcl_SetVar2(entryPtr->interp, entryPtr->textVarName,
- NULL, entryPtr->string, TCL_GLOBAL_ONLY);
+ NULL, entryPtr->string, TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG);
}
if ((newValue != NULL) && (strcmp(newValue, entryPtr->string) != 0)) {
@@ -2254,6 +2292,19 @@ EntryValueChanged(
EntryComputeGeometry(entryPtr);
EventuallyRedraw(entryPtr);
}
+
+ /*
+ * An error may have happened when setting the textvariable in case there
+ * is a trace on that variable and the trace proc triggered an error.
+ * Another possibility is that the textvariable is in a namespace that
+ * does not (yet) exist.
+ * Signal this error.
+ */
+
+ if ((entryPtr->textVarName != NULL) && (newValue == NULL)) {
+ return TCL_ERROR;
+ }
+ return TCL_OK;
}
/*
@@ -3363,7 +3414,7 @@ ExpandPercents(
* list element. */
int number, length;
register const char *string;
- Tcl_UniChar ch;
+ int ch;
char numStorage[2*TCL_INTEGER_SPACE];
while (1) {
@@ -3396,7 +3447,7 @@ ExpandPercents(
before++; /* skip over % */
if (*before != '\0') {
- before += Tcl_UtfToUniChar(before, &ch);
+ before += TkUtfToUniChar(before, &ch);
} else {
ch = '%';
}
@@ -3416,7 +3467,7 @@ ExpandPercents(
string = Tk_PathName(entryPtr->tkwin);
break;
default:
- length = Tcl_UniCharToUtf(ch, numStorage);
+ length = TkUniCharToUtf(ch, numStorage);
numStorage[length] = '\0';
string = numStorage;
break;
@@ -3476,7 +3527,7 @@ ExpandPercents(
string = Tk_PathName(entryPtr->tkwin);
break;
default:
- length = Tcl_UniCharToUtf(ch, numStorage);
+ length = TkUniCharToUtf(ch, numStorage);
numStorage[length] = '\0';
string = numStorage;
break;
@@ -3611,7 +3662,7 @@ Tk_SpinboxObjCmd(
Tk_DestroyWindow(entryPtr->tkwin);
return TCL_ERROR;
}
- if (ConfigureEntry(interp, entryPtr, objc-2, objv+2, 0) != TCL_OK) {
+ if (ConfigureEntry(interp, entryPtr, objc-2, objv+2) != TCL_OK) {
goto error;
}
@@ -3719,12 +3770,12 @@ SpinboxWidgetObjCmd(
}
Tcl_SetObjResult(interp, objPtr);
} else {
- result = ConfigureEntry(interp, entryPtr, objc-2, objv+2, 0);
+ result = ConfigureEntry(interp, entryPtr, objc-2, objv+2);
}
break;
case SB_CMD_DELETE: {
- int first, last;
+ int first, last, code;
if ((objc < 3) || (objc > 4)) {
Tcl_WrongNumArgs(interp, 2, objv, "firstIndex ?lastIndex?");
@@ -3743,7 +3794,10 @@ SpinboxWidgetObjCmd(
}
}
if ((last >= first) && (entryPtr->state == STATE_NORMAL)) {
- DeleteChars(entryPtr, first, last - first);
+ code = DeleteChars(entryPtr, first, last - first);
+ if (code != TCL_OK) {
+ goto error;
+ }
}
break;
}
@@ -3803,7 +3857,7 @@ SpinboxWidgetObjCmd(
}
case SB_CMD_INSERT: {
- int index;
+ int index, code;
if (objc != 4) {
Tcl_WrongNumArgs(interp, 2, objv, "index text");
@@ -3814,7 +3868,10 @@ SpinboxWidgetObjCmd(
goto error;
}
if (entryPtr->state == STATE_NORMAL) {
- InsertChars(entryPtr, index, Tcl_GetString(objv[3]));
+ code = InsertChars(entryPtr, index, Tcl_GetString(objv[3]));
+ if (code != TCL_OK) {
+ goto error;
+ }
}
break;
}
@@ -4024,16 +4081,22 @@ SpinboxWidgetObjCmd(
break;
}
- case SB_CMD_SET:
+ case SB_CMD_SET: {
+ int code = TCL_OK;
+
if (objc > 3) {
Tcl_WrongNumArgs(interp, 2, objv, "?string?");
goto error;
}
if (objc == 3) {
- EntryValueChanged(entryPtr, Tcl_GetString(objv[2]));
+ code = EntryValueChanged(entryPtr, Tcl_GetString(objv[2]));
+ if (code != TCL_OK) {
+ goto error;
+ }
}
Tcl_SetObjResult(interp, Tcl_NewStringObj(entryPtr->string, -1));
break;
+ }
case SB_CMD_VALIDATE: {
int code;
@@ -4174,7 +4237,7 @@ GetSpinboxElement(
* TCL_OK.
*
* Side effects:
- * An background error condition may arise when invoking the callback.
+ * A background error condition may arise when invoking the callback.
* The widget value may change.
*
*--------------------------------------------------------------
@@ -4205,6 +4268,7 @@ SpinboxInvoke(
return TCL_OK;
}
+ code = TCL_OK;
if (fabs(sbPtr->increment) > MIN_DBL_VAL) {
if (sbPtr->listObj != NULL) {
Tcl_Obj *objPtr;
@@ -4250,7 +4314,7 @@ SpinboxInvoke(
}
}
Tcl_ListObjIndex(interp, sbPtr->listObj, sbPtr->eIndex, &objPtr);
- EntryValueChanged(entryPtr, Tcl_GetString(objPtr));
+ code = EntryValueChanged(entryPtr, Tcl_GetString(objPtr));
} else if (!DOUBLES_EQ(sbPtr->fromValue, sbPtr->toValue)) {
double dvalue;
@@ -4297,9 +4361,12 @@ SpinboxInvoke(
}
}
sprintf(sbPtr->formatBuf, sbPtr->valueFormat, dvalue);
- EntryValueChanged(entryPtr, sbPtr->formatBuf);
+ code = EntryValueChanged(entryPtr, sbPtr->formatBuf);
}
}
+ if (code != TCL_OK) {
+ return TCL_ERROR;
+ }
if (sbPtr->command != NULL) {
Tcl_DStringInit(&script);
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index bcc6d98..95aeda1 100644
--- a/generic/tkEvent.c
+++ b/generic/tkEvent.c
@@ -2039,6 +2039,12 @@ TkFinalize(
{
ExitHandler *exitPtr;
+#if defined(_WIN32) && !defined(STATIC_BUILD)
+ if (!tclStubsPtr) {
+ return;
+ }
+#endif
+
Tcl_DeleteExitHandler(TkFinalize, NULL);
Tcl_MutexLock(&exitMutex);
diff --git a/generic/tkFont.c b/generic/tkFont.c
index 447f9e1..7f2715b 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -497,7 +497,7 @@ Tk_FontObjCmd(
const char *s;
Tk_Font tkfont;
Tcl_Obj *optPtr, *charPtr, *resultPtr;
- Tcl_UniChar uniChar = 0;
+ int uniChar = 0;
const TkFontAttributes *faPtr;
TkFontAttributes fa;
@@ -562,17 +562,19 @@ Tk_FontObjCmd(
*/
if (charPtr != NULL) {
- if (Tcl_GetCharLength(charPtr) != 1) {
+ const char *string = Tcl_GetString(charPtr);
+ int len = TkUtfToUniChar(string, &uniChar);
+
+ if (len != charPtr->length) {
resultPtr = Tcl_NewStringObj(
"expected a single character but got \"", -1);
- Tcl_AppendLimitedToObj(resultPtr, Tcl_GetString(charPtr),
+ Tcl_AppendLimitedToObj(resultPtr, string,
-1, 40, "...");
Tcl_AppendToObj(resultPtr, "\"", -1);
Tcl_SetObjResult(interp, resultPtr);
Tcl_SetErrorCode(interp, "TK", "VALUE", "FONT_SAMPLE", NULL);
return TCL_ERROR;
}
- uniChar = Tcl_GetUniChar(charPtr, 0);
}
/*
@@ -1694,7 +1696,7 @@ Tk_PostscriptFontName(
} else if (strcasecmp(family, "ZapfDingbats") == 0) {
family = "ZapfDingbats";
} else {
- Tcl_UniChar ch;
+ int ch;
/*
* Inline, capitalize the first letter of each word, lowercase the
@@ -1712,14 +1714,14 @@ Tk_PostscriptFontName(
src++;
upper = 1;
}
- src += Tcl_UtfToUniChar(src, &ch);
+ src += TkUtfToUniChar(src, &ch);
if (upper) {
ch = Tcl_UniCharToUpper(ch);
upper = 0;
} else {
ch = Tcl_UniCharToLower(ch);
}
- dest += Tcl_UniCharToUtf(ch, dest);
+ dest += TkUniCharToUtf(ch, dest);
}
*dest = '\0';
Tcl_DStringSetLength(dsPtr, dest - Tcl_DStringValue(dsPtr));
@@ -2067,14 +2069,14 @@ Tk_ComputeTextLayout(
NewChunk(&layoutPtr, &maxChunks, start, 1, curX, newX,
baseline)->numDisplayChars = -1;
start++;
+ curX = newX;
+ flags &= ~TK_AT_LEAST_ONE;
if ((start < end) &&
((wrapLength <= 0) || (newX <= wrapLength))) {
/*
* More chars can still fit on this line.
*/
- curX = newX;
- flags &= ~TK_AT_LEAST_ONE;
continue;
}
} else {
@@ -3249,7 +3251,7 @@ Tk_TextLayoutToPostscript(
int i, j, len;
const char *p, *glyphname;
char uindex[5], c, *ps;
- Tcl_UniChar ch;
+ int ch;
Tcl_AppendToObj(psObj, "[(", -1);
for (i = 0; i < layoutPtr->numChunks; i++, chunkPtr++) {
@@ -3272,7 +3274,7 @@ Tk_TextLayoutToPostscript(
* international postscript fonts.
*/
- p += Tcl_UtfToUniChar(p, &ch);
+ p += TkUtfToUniChar(p, &ch);
if ((ch == '(') || (ch == ')') || (ch == '\\') || (ch < 0x20)) {
/*
* Tricky point: the "03" is necessary in the sprintf below,
@@ -3298,6 +3300,9 @@ Tk_TextLayoutToPostscript(
* use the full glyph name.
*/
+ if (ch > 0xffff) {
+ goto noMapping;
+ }
sprintf(uindex, "%04X", ch); /* endianness? */
glyphname = Tcl_GetVar2(interp, "::tk::psglyphs", uindex, 0);
if (glyphname) {
@@ -3318,6 +3323,7 @@ Tk_TextLayoutToPostscript(
* No known mapping for the character into the space of
* PostScript glyphs. Ignore it. :-(
*/
+noMapping: ;
#ifdef TK_DEBUG_POSTSCRIPT_OUTPUT
fprintf(stderr, "Warning: no mapping to PostScript "
diff --git a/generic/tkFrame.c b/generic/tkFrame.c
index 057b4b8..0f1a1b3 100644
--- a/generic/tkFrame.c
+++ b/generic/tkFrame.c
@@ -447,6 +447,29 @@ TkCreateFrame(
return result;
}
+int
+TkListCreateFrame(
+ ClientData clientData, /* Either NULL or pointer to option table. */
+ Tcl_Interp *interp, /* Current interpreter. */
+ Tcl_Obj *listObj, /* List of arguments. */
+ int toplevel, /* Non-zero means create a toplevel window,
+ * zero means create a frame. */
+ Tcl_Obj *nameObj) /* Should only be non-NULL if there is no main
+ * window associated with the interpreter.
+ * Gives the base name to use for the new
+ * application. */
+{
+ int objc;
+ Tcl_Obj **objv;
+
+ if (TCL_OK != Tcl_ListObjGetElements(interp, listObj, &objc, &objv)) {
+ return TCL_ERROR;
+ }
+ return CreateFrame(clientData, interp, objc, objv,
+ toplevel ? TYPE_TOPLEVEL : TYPE_FRAME,
+ nameObj ? Tcl_GetString(nameObj) : NULL);
+}
+
static int
CreateFrame(
ClientData clientData, /* NULL. */
diff --git a/generic/tkGC.c b/generic/tkGC.c
index 5663ede..c424e30 100644
--- a/generic/tkGC.c
+++ b/generic/tkGC.c
@@ -314,7 +314,6 @@ Tk_FreeGC(
gcPtr = Tcl_GetHashValue(idHashPtr);
gcPtr->refCount--;
if (gcPtr->refCount == 0) {
- Tk_FreeXId(gcPtr->display, (XID) XGContextFromGC(gcPtr->gc));
XFreeGC(gcPtr->display, gcPtr->gc);
Tcl_DeleteHashEntry(gcPtr->valueHashPtr);
Tcl_DeleteHashEntry(idHashPtr);
@@ -351,12 +350,6 @@ TkGCCleanup(
entryPtr != NULL; entryPtr = Tcl_NextHashEntry(&search)) {
gcPtr = Tcl_GetHashValue(entryPtr);
- /*
- * This call is not needed, as it is only used on Unix to restore the
- * Id to the stack pool, and we don't want to use them anymore.
- * Tk_FreeXId(gcPtr->display, (XID) XGContextFromGC(gcPtr->gc));
- */
-
XFreeGC(gcPtr->display, gcPtr->gc);
Tcl_DeleteHashEntry(gcPtr->valueHashPtr);
Tcl_DeleteHashEntry(entryPtr);
diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c
index 27de486..1c28b54 100644
--- a/generic/tkImgGIF.c
+++ b/generic/tkImgGIF.c
@@ -393,7 +393,8 @@ FileReadGIF(
* image being read. */
{
int fileWidth, fileHeight, imageWidth, imageHeight;
- int nBytes, index = 0, argc = 0, i, result = TCL_ERROR;
+ unsigned int nBytes;
+ int index = 0, argc = 0, i, result = TCL_ERROR;
Tcl_Obj **objv;
unsigned char buf[100];
unsigned char *trashBuffer = NULL;
@@ -410,6 +411,7 @@ FileReadGIF(
* source and not a file.
*/
+ memset(colorMap, 0, MAXCOLORMAPSIZE*4);
memset(gifConfPtr, 0, sizeof(GIFImageConfig));
if (fileName == INLINE_DATA_BINARY || fileName == INLINE_DATA_BASE64) {
gifConfPtr->fromData = fileName;
@@ -425,8 +427,9 @@ FileReadGIF(
return TCL_ERROR;
}
for (i = 1; i < argc; i++) {
+ int optionIdx;
if (Tcl_GetIndexFromObjStruct(interp, objv[i], optionStrings,
- sizeof(char *), "option name", 0, &nBytes) != TCL_OK) {
+ sizeof(char *), "option name", 0, &optionIdx) != TCL_OK) {
return TCL_ERROR;
}
if (i == (argc-1)) {
@@ -590,8 +593,14 @@ FileReadGIF(
*/
if (trashBuffer == NULL) {
+ if (fileWidth > (int)((UINT_MAX/3)/fileHeight)) {
+ goto error;
+ }
nBytes = fileWidth * fileHeight * 3;
trashBuffer = ckalloc(nBytes);
+ if (trashBuffer) {
+ memset(trashBuffer, 0, nBytes);
+ }
}
/*
@@ -675,9 +684,18 @@ FileReadGIF(
block.offset[1] = 1;
block.offset[2] = 2;
block.offset[3] = (transparent>=0) ? 3 : 0;
+ if (imageWidth > INT_MAX/block.pixelSize) {
+ goto error;
+ }
block.pitch = block.pixelSize * imageWidth;
+ if (imageHeight > (int)(UINT_MAX/block.pitch)) {
+ goto error;
+ }
nBytes = block.pitch * imageHeight;
block.pixelPtr = ckalloc(nBytes);
+ if (block.pixelPtr) {
+ memset(block.pixelPtr, 0, nBytes);
+ }
if (ReadImage(gifConfPtr, interp, block.pixelPtr, chan, imageWidth,
imageHeight, colorMap, srcX, srcY, BitSet(buf[8], INTERLACE),
diff --git a/generic/tkImgPNG.c b/generic/tkImgPNG.c
index 8a740d2..c6e3029 100644
--- a/generic/tkImgPNG.c
+++ b/generic/tkImgPNG.c
@@ -10,6 +10,7 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
+#include "assert.h"
#include "tkInt.h"
#define PNG_INT32(a,b,c,d) \
@@ -334,7 +335,7 @@ InitPNGImage(
if (Tcl_ZlibStreamInit(NULL, dir, TCL_ZLIB_FORMAT_ZLIB,
TCL_ZLIB_COMPRESS_DEFAULT, NULL, &pngPtr->stream) != TCL_OK) {
- if (interp) {
+ if (interp) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"zlib initialization failed", -1));
Tcl_SetErrorCode(interp, "TK", "IMAGE", "PNG", "ZLIB_INIT", NULL);
@@ -1846,6 +1847,13 @@ DecodeLine(
if (UnfilterLine(interp, pngPtr) == TCL_ERROR) {
return TCL_ERROR;
}
+ if (pngPtr->currentLine >= pngPtr->block.height) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "PNG image data overflow"));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PNG", "DATA_OVERFLOW", NULL);
+ return TCL_ERROR;
+ }
+
if (pngPtr->interlace) {
switch (pngPtr->phase) {
@@ -2175,10 +2183,13 @@ ReadIDAT(
/*
* Try to read another line of pixels out of the buffer
- * immediately.
+ * immediately, but don't allow write past end of block.
*/
- goto getNextLine;
+ if (pngPtr->currentLine < pngPtr->block.height) {
+ goto getNextLine;
+ }
+
}
/*
@@ -3345,7 +3356,7 @@ EncodePNG(
pngPtr->colorType = PNG_COLOR_RGBA;
pngPtr->bytesPerPixel = 4;
} else {
- pngPtr->colorType = PNG_COLOR_RGBA;
+ pngPtr->colorType = PNG_COLOR_RGB;
pngPtr->bytesPerPixel = 3;
}
} else {
diff --git a/generic/tkImgPhInstance.c b/generic/tkImgPhInstance.c
index 666a9b0..bd152f2 100644
--- a/generic/tkImgPhInstance.c
+++ b/generic/tkImgPhInstance.c
@@ -404,6 +404,9 @@ TkImgPhotoGet(
*
* Note that Win32 pre-defines those operations that we really need.
*
+ * Note that on MacOS, if the background comes from a Retina display
+ * then it will be twice as wide and twice as high as the photoimage.
+ *
*----------------------------------------------------------------------
*/
@@ -433,7 +436,16 @@ BlendComplexAlpha(
unsigned long pixel;
unsigned char r, g, b, alpha, unalpha, *masterPtr;
unsigned char *alphaAr = iPtr->masterPtr->pix32;
-
+#if defined(MAC_OSX_TK)
+ /* Background "pixels" are actually 2^pp x 2^pp blocks of subpixels. Each
+ * block gets blended with the color of one image pixel. Since we iterate
+ * over the background subpixels, we reset the width and height to the
+ * subpixel dimensions of the background image we are using.
+ */
+ int pp = bgImg->pixelpower;
+ width = width << pp;
+ height = height << pp;
+#endif
/*
* This blending is an integer version of the Source-Over compositing rule
* (see Porter&Duff, "Compositing Digital Images", proceedings of SIGGRAPH
@@ -532,9 +544,16 @@ BlendComplexAlpha(
#endif /* !_WIN32 && !MAC_OSX_TK */
for (y = 0; y < height; y++) {
+# if !defined(MAC_OSX_TK)
line = (y + yOffset) * iPtr->masterPtr->width;
for (x = 0; x < width; x++) {
masterPtr = alphaAr + ((line + x + xOffset) * 4);
+#else
+ /* Repeat each image row and column 2^pp times. */
+ line = ((y>>pp) + yOffset) * iPtr->masterPtr->width;
+ for (x = 0; x < width; x++) {
+ masterPtr = alphaAr + ((line + (x>>pp) + xOffset) * 4);
+#endif
alpha = masterPtr[3];
/*
@@ -635,7 +654,9 @@ TkImgPhotoDisplay(
(unsigned int)width, (unsigned int)height, AllPlanes, ZPixmap);
if (bgImg == NULL) {
Tk_DeleteErrorHandler(handler);
- /* We failed to get the image so draw without blending alpha. It's the best we can do */
+ /* We failed to get the image, so draw without blending alpha.
+ * It's the best we can do.
+ */
goto fallBack;
}
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index 9527c93..3e03f3d 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -886,6 +886,19 @@ ImgPhotoCmd(
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) {
@@ -2051,8 +2064,8 @@ static int
ToggleComplexAlphaIfNeeded(
PhotoMaster *mPtr)
{
- size_t len = MAX(mPtr->userWidth, mPtr->width) *
- MAX(mPtr->userHeight, mPtr->height) * 4;
+ size_t len = (size_t)MAX(mPtr->userWidth, mPtr->width) *
+ (size_t)MAX(mPtr->userHeight, mPtr->height) * 4;
unsigned char *c = mPtr->pix32;
unsigned char *end = c + len;
@@ -2062,6 +2075,9 @@ ToggleComplexAlphaIfNeeded(
*/
mPtr->flags &= ~COMPLEX_ALPHA;
+ if (c == NULL) {
+ return 0;
+ }
c += 3; /* Start at first alpha byte. */
for (; c < end; c += 4) {
if (*c && *c != 255) {
@@ -2192,6 +2208,10 @@ ImgPhotoSetSize(
height = masterPtr->userHeight;
}
+ if (width > INT_MAX / 4) {
+ /* Pitch overflows int */
+ return TCL_ERROR;
+ }
pitch = width * 4;
/*
@@ -2201,11 +2221,12 @@ ImgPhotoSetSize(
if ((width != masterPtr->width) || (height != masterPtr->height)
|| (masterPtr->pix32 == NULL)) {
- /*
- * Not a u-long, but should be one.
- */
+ unsigned newPixSize;
- unsigned /*long*/ newPixSize = (unsigned /*long*/) (height * pitch);
+ if (pitch && height > (int)(UINT_MAX / pitch)) {
+ return TCL_ERROR;
+ }
+ newPixSize = height * pitch;
/*
* Some mallocs() really hate allocating zero bytes. [Bug 619544]
@@ -2257,14 +2278,14 @@ ImgPhotoSetSize(
if ((masterPtr->pix32 != NULL)
&& ((width == masterPtr->width) || (width == validBox.width))) {
if (validBox.y > 0) {
- memset(newPix32, 0, (size_t) (validBox.y * pitch));
+ memset(newPix32, 0, ((size_t) validBox.y * pitch));
}
h = validBox.y + validBox.height;
if (h < height) {
- memset(newPix32 + h*pitch, 0, (size_t) ((height - h) * pitch));
+ memset(newPix32 + h*pitch, 0, ((size_t) (height - h) * pitch));
}
} else {
- memset(newPix32, 0, (size_t) (height * pitch));
+ memset(newPix32, 0, ((size_t)height * pitch));
}
if (masterPtr->pix32 != NULL) {
@@ -2281,7 +2302,7 @@ ImgPhotoSetSize(
offset = validBox.y * pitch;
memcpy(newPix32 + offset, masterPtr->pix32 + offset,
- (size_t) (validBox.height * pitch));
+ ((size_t)validBox.height * pitch));
} else if ((validBox.width > 0) && (validBox.height > 0)) {
/*
@@ -2292,7 +2313,7 @@ ImgPhotoSetSize(
srcPtr = masterPtr->pix32 + (validBox.y * masterPtr->width
+ validBox.x) * 4;
for (h = validBox.height; h > 0; h--) {
- memcpy(destPtr, srcPtr, (size_t) (validBox.width * 4));
+ memcpy(destPtr, srcPtr, ((size_t)validBox.width * 4));
destPtr += width * 4;
srcPtr += masterPtr->width * 4;
}
@@ -2772,7 +2793,7 @@ Tk_PhotoPutBlock(
&& (blockPtr->pitch == pitch)))
&& (compRule == TK_PHOTO_COMPOSITE_SET)) {
memmove(destLinePtr, blockPtr->pixelPtr + blockPtr->offset[0],
- (size_t) (height * width * 4));
+ ((size_t)height * width * 4));
/*
* We know there's an alpha offset and we're setting the data, so skip
@@ -2804,7 +2825,7 @@ Tk_PhotoPutBlock(
&& (blueOffset == 2) && (alphaOffset == 3)
&& (width <= blockPtr->width)
&& compRuleSet) {
- memcpy(destLinePtr, srcLinePtr, (size_t) (width * 4));
+ memcpy(destLinePtr, srcLinePtr, ((size_t)width * 4));
srcLinePtr += blockPtr->pitch;
destLinePtr += pitch;
continue;
@@ -3454,7 +3475,7 @@ Tk_PhotoBlank(
*/
memset(masterPtr->pix32, 0,
- (size_t) (masterPtr->width * masterPtr->height * 4));
+ ((size_t)masterPtr->width * masterPtr->height * 4));
for (instancePtr = masterPtr->instancePtr; instancePtr != NULL;
instancePtr = instancePtr->nextPtr) {
TkImgResetDither(instancePtr);
@@ -3683,6 +3704,9 @@ ImgGetPhoto(
break;
}
}
+ if (!alphaOffset) {
+ blockPtr->offset[3]= -1; /* Tell caller alpha need not be read */
+ }
greenOffset = blockPtr->offset[1] - blockPtr->offset[0];
blueOffset = blockPtr->offset[2] - blockPtr->offset[0];
if (((optPtr->options & OPT_BACKGROUND) && alphaOffset) ||
@@ -3696,6 +3720,10 @@ ImgGetPhoto(
if ((greenOffset||blueOffset) && !(optPtr->options & OPT_GRAYSCALE)) {
newPixelSize += 2;
}
+
+ if (blockPtr->height > (int)((UINT_MAX/newPixelSize)/blockPtr->width)) {
+ return NULL;
+ }
data = attemptckalloc(newPixelSize*blockPtr->width*blockPtr->height);
if (data == NULL) {
return NULL;
@@ -3803,9 +3831,6 @@ ImgGetPhoto(
blockPtr->offset[2] = 0;
blockPtr->offset[3]= 1;
}
- if (!alphaOffset) {
- blockPtr->offset[3]= -1;
- }
return data;
}
return NULL;
@@ -3835,32 +3860,30 @@ ImgStringWrite(
Tk_PhotoImageBlock *blockPtr)
{
int greenOffset, blueOffset;
- Tcl_DString data;
+ Tcl_Obj *data;
greenOffset = blockPtr->offset[1] - blockPtr->offset[0];
blueOffset = blockPtr->offset[2] - blockPtr->offset[0];
- Tcl_DStringInit(&data);
+ data = Tcl_NewObj();
if ((blockPtr->width > 0) && (blockPtr->height > 0)) {
- char *line = ckalloc((8 * blockPtr->width) + 2);
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;
- char *linePtr = line;
for (col=0; col<blockPtr->width; col++) {
- sprintf(linePtr, " #%02x%02x%02x", *pixelPtr,
+ Tcl_AppendPrintfToObj(line, "%s#%02x%02x%02x",
+ col ? " " : "", *pixelPtr,
pixelPtr[greenOffset], pixelPtr[blueOffset]);
pixelPtr += blockPtr->pixelSize;
- linePtr += 8;
}
- Tcl_DStringAppendElement(&data, line+1);
+ Tcl_ListObjAppendElement(NULL, data, line);
}
- ckfree(line);
}
- Tcl_DStringResult(interp, &data);
+ Tcl_SetObjResult(interp, data);
return TCL_OK;
}
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index ebbadba..586b407 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -1017,6 +1017,9 @@ declare 50 aqua {
declare 51 aqua {
void TkGenWMDestroyEvent(Tk_Window tkwin)
}
+declare 52 aqua {
+ void TkMacOSXSetDrawingEnabled(TkWindow *winPtr, int flag)
+}
# removed duplicate from tkPlat table (tk.decls)
#declare 52 aqua {
diff --git a/generic/tkInt.h b/generic/tkInt.h
index b644c5b..1615a81 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.h
@@ -1196,7 +1196,7 @@ MODULE_SCOPE void TkUnderlineCharsInContext(Display *display,
const char *string, int numBytes, int x, int y,
int firstByte, int lastByte);
MODULE_SCOPE void TkpGetFontAttrsForChar(Tk_Window tkwin, Tk_Font tkfont,
- Tcl_UniChar c, struct TkFontAttributes *faPtr);
+ int c, struct TkFontAttributes *faPtr);
MODULE_SCOPE Tcl_Obj * TkNewWindowObj(Tk_Window tkwin);
MODULE_SCOPE void TkpShowBusyWindow(TkBusy busy);
MODULE_SCOPE void TkpHideBusyWindow(TkBusy busy);
@@ -1208,7 +1208,7 @@ MODULE_SCOPE void TkpCreateBusy(Tk_FakeWin *winPtr, Tk_Window tkRef,
MODULE_SCOPE int TkBackgroundEvalObjv(Tcl_Interp *interp,
int objc, Tcl_Obj *const *objv, int flags);
MODULE_SCOPE void TkSendVirtualEvent(Tk_Window tgtWin,
- const char *eventName);
+ const char *eventName, Tcl_Obj *detail);
MODULE_SCOPE Tcl_Command TkMakeEnsemble(Tcl_Interp *interp,
const char *nsname, const char *name,
ClientData clientData, const TkEnsemble *map);
@@ -1217,6 +1217,9 @@ MODULE_SCOPE int TkInitTkCmd(Tcl_Interp *interp,
MODULE_SCOPE int TkInitFontchooser(Tcl_Interp *interp,
ClientData clientData);
MODULE_SCOPE void TkpWarpPointer(TkDisplay *dispPtr);
+MODULE_SCOPE int TkListCreateFrame(ClientData clientData,
+ Tcl_Interp *interp, Tcl_Obj *listObj,
+ int toplevel, Tcl_Obj *nameObj);
#ifdef _WIN32
#define TkParseColor XParseColor
@@ -1229,6 +1232,14 @@ MODULE_SCOPE Status TkParseColor (Display * display,
MODULE_SCOPE void TkUnixSetXftClipRegion(TkRegion clipRegion);
#endif
+#if TCL_UTF_MAX > 4
+# define TkUtfToUniChar Tcl_UtfToUniChar
+# define TkUniCharToUtf Tcl_UniCharToUtf
+#else
+ MODULE_SCOPE int TkUtfToUniChar(const char *, int *);
+ MODULE_SCOPE int TkUniCharToUtf(int, char *);
+#endif
+
/*
* Unsupported commands.
*/
diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h
index 3a2a8aa..e48e803 100644
--- a/generic/tkIntPlatDecls.h
+++ b/generic/tkIntPlatDecls.h
@@ -250,7 +250,8 @@ EXTERN int TkGenerateButtonEvent(int x, int y, Window window,
unsigned int state);
/* 51 */
EXTERN void TkGenWMDestroyEvent(Tk_Window tkwin);
-/* Slot 52 is reserved */
+/* 52 */
+EXTERN void TkMacOSXSetDrawingEnabled(TkWindow *winPtr, int flag);
/* 53 */
EXTERN unsigned long TkpGetMS(void);
/* 54 */
@@ -395,7 +396,7 @@ typedef struct TkIntPlatStubs {
Window (*tkGetTransientMaster) (TkWindow *winPtr); /* 49 */
int (*tkGenerateButtonEvent) (int x, int y, Window window, unsigned int state); /* 50 */
void (*tkGenWMDestroyEvent) (Tk_Window tkwin); /* 51 */
- void (*reserved52)(void);
+ void (*tkMacOSXSetDrawingEnabled) (TkWindow *winPtr, int flag); /* 52 */
unsigned long (*tkpGetMS) (void); /* 53 */
void * (*tkMacOSXDrawable) (Drawable drawable); /* 54 */
int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 55 */
@@ -621,7 +622,8 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr;
(tkIntPlatStubsPtr->tkGenerateButtonEvent) /* 50 */
#define TkGenWMDestroyEvent \
(tkIntPlatStubsPtr->tkGenWMDestroyEvent) /* 51 */
-/* Slot 52 is reserved */
+#define TkMacOSXSetDrawingEnabled \
+ (tkIntPlatStubsPtr->tkMacOSXSetDrawingEnabled) /* 52 */
#define TkpGetMS \
(tkIntPlatStubsPtr->tkpGetMS) /* 53 */
#define TkMacOSXDrawable \
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index 437973a..b059727 100644
--- a/generic/tkListbox.c
+++ b/generic/tkListbox.c
@@ -90,14 +90,14 @@ typedef struct {
* display. */
int topIndex; /* Index of top-most element visible in
* window. */
- int fullLines; /* Number of lines that fit are completely
+ int fullLines; /* Number of lines that are completely
* visible in window. There may be one
* additional line at the bottom that is
* partially visible. */
int partialLine; /* 0 means that the window holds exactly
* fullLines lines. 1 means that there is one
* additional line that is partially
- * visble. */
+ * visible. */
int setGrid; /* Non-zero means pass gridding information to
* window manager. */
@@ -114,7 +114,8 @@ typedef struct {
int xOffset; /* The left edge of each string in the listbox
* is offset to the left by this many pixels
* (0 means no offset, positive means there is
- * an offset). */
+ * an offset). This is x scrolling information
+ * is not linked to justification. */
/*
* Information about what's selected or active, if any.
@@ -131,7 +132,7 @@ typedef struct {
int active; /* Index of "active" element (the one that has
* been selected by keyboard traversal). -1
* means none. */
- int activeStyle; /* style in which to draw the active element.
+ int activeStyle; /* Style in which to draw the active element.
* One of: underline, none, dotbox */
/*
@@ -165,6 +166,7 @@ typedef struct {
Pixmap gray; /* Pixmap for displaying disabled text. */
int flags; /* Various flag bits: see below for
* definitions. */
+ Tk_Justify justify; /* Justification. */
} Listbox;
/*
@@ -197,7 +199,7 @@ typedef struct {
* be updated.
* GOT_FOCUS: Non-zero means this widget currently has the
* input focus.
- * MAXWIDTH_IS_STALE: Stored maxWidth may be out-of-date
+ * MAXWIDTH_IS_STALE: Stored maxWidth may be out-of-date.
* LISTBOX_DELETED: This listbox has been effectively destroyed.
*/
@@ -275,6 +277,8 @@ static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", DEF_LISTBOX_HIGHLIGHT_WIDTH, -1,
Tk_Offset(Listbox, highlightWidth), 0, 0, 0},
+ {TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
+ DEF_LISTBOX_JUSTIFY, -1, Tk_Offset(Listbox, justify), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
DEF_LISTBOX_RELIEF, -1, Tk_Offset(Listbox, relief), 0, 0, 0},
{TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground",
@@ -285,7 +289,7 @@ static const Tk_OptionSpec optionSpecs[] = {
Tk_Offset(Listbox, selBorderWidth), 0, 0, 0},
{TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background",
DEF_LISTBOX_SELECT_FG_COLOR, -1, Tk_Offset(Listbox, selFgColorPtr),
- TK_CONFIG_NULL_OK, DEF_LISTBOX_SELECT_FG_MONO, 0},
+ 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),
TK_OPTION_NULL_OK, 0, 0},
@@ -313,7 +317,7 @@ static const Tk_OptionSpec optionSpecs[] = {
/*
* The itemAttrOptionSpecs table defines the valid configuration options for
- * listbox items
+ * listbox items.
*/
static const Tk_OptionSpec itemAttrOptionSpecs[] = {
@@ -340,7 +344,7 @@ static const Tk_OptionSpec itemAttrOptionSpecs[] = {
};
/*
- * The following tables define the listbox widget commands (and sub- commands)
+ * The following tables define the listbox widget commands (and sub-commands)
* and map the indexes into the string tables into enumerated types used to
* dispatch the listbox widget command.
*/
@@ -386,7 +390,7 @@ enum indices {
static void ChangeListboxOffset(Listbox *listPtr, int offset);
static void ChangeListboxView(Listbox *listPtr, int index);
static int ConfigureListbox(Tcl_Interp *interp, Listbox *listPtr,
- int objc, Tcl_Obj *const objv[], int flags);
+ int objc, Tcl_Obj *const objv[]);
static int ConfigureListboxItem(Tcl_Interp *interp,
Listbox *listPtr, ItemAttr *attrs, int objc,
Tcl_Obj *const objv[], int index);
@@ -408,6 +412,7 @@ static void ListboxEventProc(ClientData clientData,
static int ListboxFetchSelection(ClientData clientData,
int offset, char *buffer, int maxBytes);
static void ListboxLostSelection(ClientData clientData);
+static void GenerateListboxSelectEvent(Listbox *listPtr);
static void EventuallyRedrawRange(Listbox *listPtr,
int first, int last);
static void ListboxScanTo(Listbox *listPtr, int x, int y);
@@ -435,6 +440,7 @@ static char * ListboxListVarProc(ClientData clientData,
const char *name2, int flags);
static void MigrateHashEntries(Tcl_HashTable *table,
int first, int last, int offset);
+static int GetMaxOffset(Listbox *listPtr);
/*
* The structure below defines button class behavior by means of procedures
@@ -545,6 +551,7 @@ Tk_ListboxObjCmd(
listPtr->cursor = None;
listPtr->state = STATE_NORMAL;
listPtr->gray = None;
+ listPtr->justify = TK_JUSTIFY_LEFT;
/*
* Keep a hold of the associated tkwin until we destroy the listbox,
@@ -566,7 +573,7 @@ Tk_ListboxObjCmd(
return TCL_ERROR;
}
- if (ConfigureListbox(interp, listPtr, objc-2, objv+2, 0) != TCL_OK) {
+ if (ConfigureListbox(interp, listPtr, objc-2, objv+2) != TCL_OK) {
Tk_DestroyWindow(listPtr->tkwin);
return TCL_ERROR;
}
@@ -612,7 +619,7 @@ ListboxWidgetObjCmd(
/*
* Parse the command by looking up the second argument in the list of
- * valid subcommand names
+ * valid subcommand names.
*/
result = Tcl_GetIndexFromObj(interp, objv[1], commandNames,
@@ -697,7 +704,7 @@ ListboxWidgetObjCmd(
Tcl_SetObjResult(interp, objPtr);
result = TCL_OK;
} else {
- result = ConfigureListbox(interp, listPtr, objc-2, objv+2, 0);
+ result = ConfigureListbox(interp, listPtr, objc-2, objv+2);
}
break;
@@ -1075,6 +1082,7 @@ ListboxBboxSubCmd(
Listbox *listPtr, /* Information about the listbox */
int index) /* Index of the element to get bbox info on */
{
+ register Tk_Window tkwin = listPtr->tkwin;
int lastVisibleIndex;
/*
@@ -1110,7 +1118,15 @@ ListboxBboxSubCmd(
Tk_GetFontMetrics(listPtr->tkfont, &fm);
pixelWidth = Tk_TextWidth(listPtr->tkfont, stringRep, stringLen);
- x = listPtr->inset + listPtr->selBorderWidth - listPtr->xOffset;
+ if (listPtr->justify == TK_JUSTIFY_LEFT) {
+ x = (listPtr->inset + listPtr->selBorderWidth) - listPtr->xOffset;
+ } else if (listPtr->justify == TK_JUSTIFY_RIGHT) {
+ x = Tk_Width(tkwin) - (listPtr->inset + listPtr->selBorderWidth)
+ - pixelWidth - listPtr->xOffset + GetMaxOffset(listPtr);
+ } else {
+ x = (Tk_Width(tkwin) - pixelWidth)/2
+ - listPtr->xOffset + GetMaxOffset(listPtr)/2;
+ }
y = ((index - listPtr->topIndex)*listPtr->lineHeight)
+ listPtr->inset + listPtr->selBorderWidth;
results[0] = Tcl_NewIntObj(x);
@@ -1542,8 +1558,7 @@ ConfigureListbox(
register Listbox *listPtr, /* Information about widget; may or may not
* already have values for some fields. */
int objc, /* Number of valid entries in argv. */
- Tcl_Obj *const objv[], /* Arguments. */
- int flags) /* Flags to pass to Tk_ConfigureWidget. */
+ Tcl_Obj *const objv[]) /* Arguments. */
{
Tk_SavedOptions savedOptions;
Tcl_Obj *oldListObj = NULL;
@@ -1837,6 +1852,7 @@ DisplayListbox(
* or right edge of the listbox is
* off-screen. */
Pixmap pixmap;
+ int textWidth;
listPtr->flags &= ~REDRAW_PENDING;
if (listPtr->flags & LISTBOX_DELETED) {
@@ -2016,7 +2032,7 @@ DisplayListbox(
} else {
/*
* If there is an item attributes record for this item, draw
- * the background box and set the foreground color accordingly
+ * the background box and set the foreground color accordingly.
*/
if (entry != NULL) {
@@ -2056,12 +2072,24 @@ DisplayListbox(
* Draw the actual text of this item.
*/
+ Tcl_ListObjIndex(listPtr->interp, listPtr->listObj, i, &curElement);
+ stringRep = Tcl_GetStringFromObj(curElement, &stringLen);
+ textWidth = Tk_TextWidth(listPtr->tkfont, stringRep, stringLen);
+
Tk_GetFontMetrics(listPtr->tkfont, &fm);
y += fm.ascent + listPtr->selBorderWidth;
- x = listPtr->inset + listPtr->selBorderWidth - listPtr->xOffset;
- Tcl_ListObjIndex(listPtr->interp, listPtr->listObj, i, &curElement);
- stringRep = Tcl_GetStringFromObj(curElement, &stringLen);
- Tk_DrawChars(listPtr->display, pixmap, gc, listPtr->tkfont,
+
+ if (listPtr->justify == TK_JUSTIFY_LEFT) {
+ x = (listPtr->inset + listPtr->selBorderWidth) - listPtr->xOffset;
+ } else if (listPtr->justify == TK_JUSTIFY_RIGHT) {
+ x = Tk_Width(tkwin) - (listPtr->inset + listPtr->selBorderWidth)
+ - textWidth - listPtr->xOffset + GetMaxOffset(listPtr);
+ } else {
+ x = (Tk_Width(tkwin) - textWidth)/2
+ - listPtr->xOffset + GetMaxOffset(listPtr)/2;
+ }
+
+ Tk_DrawChars(listPtr->display, pixmap, gc, listPtr->tkfont,
stringRep, stringLen, x, y);
/*
@@ -2458,7 +2486,7 @@ ListboxDeleteSubCmd(
/*
* Check width of the element. We only have to check if widthChanged
* has not already been set to 1, because we only need one maxWidth
- * element to disappear for us to have to recompute the width
+ * element to disappear for us to have to recompute the width.
*/
if (widthChanged == 0) {
@@ -2735,7 +2763,11 @@ GetListboxIndex(
stringRep = Tcl_GetString(indexObj);
if (stringRep[0] == '@') {
- /* @x,y index */
+
+ /*
+ * @x,y index
+ */
+
int y;
const char *start;
char *end;
@@ -2844,9 +2876,7 @@ ChangeListboxOffset(
*/
offset += listPtr->xScrollUnit / 2;
- maxOffset = listPtr->maxWidth - (Tk_Width(listPtr->tkwin) -
- 2*listPtr->inset - 2*listPtr->selBorderWidth)
- + listPtr->xScrollUnit - 1;
+ maxOffset = GetMaxOffset(listPtr);
if (offset > maxOffset) {
offset = maxOffset;
}
@@ -2887,9 +2917,7 @@ ListboxScanTo(
int newTopIndex, newOffset, maxIndex, maxOffset;
maxIndex = listPtr->nElements - listPtr->fullLines;
- maxOffset = listPtr->maxWidth + (listPtr->xScrollUnit - 1)
- - (Tk_Width(listPtr->tkwin) - 2*listPtr->inset
- - 2*listPtr->selBorderWidth - listPtr->xScrollUnit);
+ maxOffset = GetMaxOffset(listPtr);
/*
* Compute new top line for screen by amplifying the difference between
@@ -3170,12 +3198,37 @@ ListboxLostSelection(
if ((listPtr->exportSelection) && (listPtr->nElements > 0)) {
ListboxSelect(listPtr, 0, listPtr->nElements-1, 0);
+ GenerateListboxSelectEvent(listPtr);
}
}
/*
*----------------------------------------------------------------------
*
+ * GenerateListboxSelectEvent --
+ *
+ * Send an event that the listbox selection was updated. This is
+ * equivalent to event generate $listboxWidget <<ListboxSelect>>
+ *
+ * Results:
+ * None
+ *
+ * Side effects:
+ * Any side effect possible, depending on bindings to this event.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+GenerateListboxSelectEvent(
+ Listbox *listPtr) /* Information about widget. */
+{
+ TkSendVirtualEvent(listPtr->tkwin, "ListboxSelect", NULL);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
* EventuallyRedrawRange --
*
* Ensure that a given range of elements is eventually redrawn on the
@@ -3431,7 +3484,7 @@ ListboxListVarProc(
/*
* If the list length has decreased, then we should clean up selection and
- * attributes information for elements past the end of the new list
+ * attributes information for elements past the end of the new list.
*/
oldLength = listPtr->nElements;
@@ -3549,6 +3602,42 @@ MigrateHashEntries(
}
/*
+ *----------------------------------------------------------------------
+ *
+ * GetMaxOffset --
+ *
+ * Passing in a listbox pointer, returns the maximum offset for the box,
+ * i.e. the maximum possible horizontal scrolling value (in pixels).
+ *
+ * Results:
+ * Listbox's maxOffset.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+*/
+static int GetMaxOffset(
+ register Listbox *listPtr)
+{
+ int maxOffset;
+
+ maxOffset = listPtr->maxWidth -
+ (Tk_Width(listPtr->tkwin) - 2*listPtr->inset -
+ 2*listPtr->selBorderWidth) + listPtr->xScrollUnit - 1;
+ if (maxOffset < 0) {
+
+ /*
+ * Listbox is larger in width than its largest width item.
+ */
+
+ maxOffset = 0;
+ }
+ maxOffset -= maxOffset % listPtr->xScrollUnit;
+
+ return maxOffset;
+}
+/*
* Local Variables:
* mode: c
* c-basic-offset: 4
diff --git a/generic/tkMain.c b/generic/tkMain.c
index f6f4013..1b21223 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -55,7 +55,16 @@ extern int TkCygwinMainEx(int, char **, Tcl_AppInitProc *, Tcl_Interp *);
* to strcmp here.
*/
#ifdef _WIN32
-# include "tclInt.h"
+/* Little hack to eliminate the need for "tclInt.h" here:
+ Just copy a small portion of TclIntPlatStubs, just
+ enough to make it work. See [600b72bfbc] */
+typedef struct {
+ int magic;
+ void *hooks;
+ void (*dummy[16]) (void); /* dummy entries 0-15, not used */
+ int (*tclpIsAtty) (int fd); /* 16 */
+} TclIntPlatStubs;
+extern const TclIntPlatStubs *tclIntPlatStubsPtr;
# include "tkWinInt.h"
#else
# define TCHAR char
@@ -108,9 +117,9 @@ static int WinIsTty(int fd) {
*/
#if !defined(STATIC_BUILD)
- if (tclStubsPtr->reserved9 && TclpIsAtty) {
+ if (tclStubsPtr->reserved9 && tclIntPlatStubsPtr->tclpIsAtty) {
/* We are running on Cygwin */
- return TclpIsAtty(fd);
+ return tclIntPlatStubsPtr->tclpIsAtty(fd);
}
#endif
handle = GetStdHandle(STD_INPUT_HANDLE + fd);
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index 354d329..7f5389c 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
@@ -885,9 +885,14 @@ MenuWidgetObjCmd(
* Tearoff menus are posted differently on Mac and Windows than
* non-tearoffs. TkpPostMenu does not actually map the menu's window
* on those platforms, and popup menus have to be handled specially.
+ * Also, menubar menues are not intended to be posted (bug 1567681,
+ * 2160206).
*/
- if (menuPtr->menuType != TEAROFF_MENU) {
+ if (menuPtr->menuType == MENUBAR) {
+ Tcl_AppendResult(interp, "a menubar menu cannot be posted", NULL);
+ return TCL_ERROR;
+ } else if (menuPtr->menuType != TEAROFF_MENU) {
result = TkpPostMenu(interp, menuPtr, x, y);
} else {
result = TkPostTearoffMenu(interp, menuPtr, x, y);
diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c
index d2d864f..920d93e 100644
--- a/generic/tkOldConfig.c
+++ b/generic/tkOldConfig.c
@@ -113,6 +113,10 @@ Tk_ConfigureWidget(
staticSpecs = GetCachedSpecs(interp, specs);
+ for (specPtr = staticSpecs; specPtr->type != TK_CONFIG_END; specPtr++) {
+ specPtr->specFlags &= ~TK_CONFIG_OPTION_SPECIFIED;
+ }
+
/*
* Pass one: scan through all of the arguments, processing those that
* match entries in the specs.
@@ -167,7 +171,6 @@ Tk_ConfigureWidget(
if ((specPtr->specFlags & TK_CONFIG_OPTION_SPECIFIED)
|| (specPtr->argvName == NULL)
|| (specPtr->type == TK_CONFIG_SYNONYM)) {
- specPtr->specFlags &= ~TK_CONFIG_OPTION_SPECIFIED;
continue;
}
if (((specPtr->specFlags & needFlags) != needFlags)
@@ -1126,7 +1129,6 @@ GetCachedSpecs(
specPtr->defValue = Tk_GetUid(specPtr->defValue);
}
}
- specPtr->specFlags &= ~TK_CONFIG_OPTION_SPECIFIED;
}
} else {
cachedSpecs = Tcl_GetHashValue(entryPtr);
diff --git a/generic/tkOption.c b/generic/tkOption.c
index 75dc3b9..24e7fb3 100644
--- a/generic/tkOption.c
+++ b/generic/tkOption.c
@@ -560,7 +560,7 @@ Tk_GetOption(
count -= levelPtr[-1].bases[currentStack];
}
- if (currentStack && CLASS) {
+ if (currentStack & CLASS) {
nodeId = winClassId;
} else {
nodeId = winNameId;
@@ -1080,7 +1080,7 @@ ReadOptionFile(
* TK_MAX_PRIO. */
{
const char *realName;
- char *buffer;
+ Tcl_Obj *buffer;
int result, bufferSize;
Tcl_Channel chan;
Tcl_DString newName;
@@ -1108,24 +1108,10 @@ ReadOptionFile(
return TCL_ERROR;
}
- /*
- * Compute size of file by seeking to the end of the file. This will
- * overallocate if we are performing CRLF translation.
- */
-
- bufferSize = (int) Tcl_Seek(chan, (Tcl_WideInt) 0, SEEK_END);
- Tcl_Seek(chan, (Tcl_WideInt) 0, SEEK_SET);
-
- if (bufferSize < 0) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "error seeking to end of file \"%s\": %s",
- fileName, Tcl_PosixError(interp)));
- Tcl_Close(NULL, chan);
- return TCL_ERROR;
- }
-
- buffer = ckalloc(bufferSize + 1);
- bufferSize = Tcl_Read(chan, buffer, bufferSize);
+ buffer = Tcl_NewObj();
+ Tcl_IncrRefCount(buffer);
+ Tcl_SetChannelOption(NULL, chan, "-encoding", "utf-8");
+ bufferSize = Tcl_ReadChars(chan, buffer, -1, 0);
if (bufferSize < 0) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"error reading file \"%s\": %s",
@@ -1134,9 +1120,8 @@ ReadOptionFile(
return TCL_ERROR;
}
Tcl_Close(NULL, chan);
- buffer[bufferSize] = 0;
- result = AddFromString(interp, tkwin, buffer, priority);
- ckfree(buffer);
+ result = AddFromString(interp, tkwin, Tcl_GetString(buffer), priority);
+ Tcl_DecrRefCount(buffer);
return result;
}
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c
index 733610e..f350d0a 100644
--- a/generic/tkPanedWindow.c
+++ b/generic/tkPanedWindow.c
@@ -147,6 +147,10 @@ typedef struct PanedWindow {
GC gc; /* Graphics context for copying from
* off-screen pixmap onto screen. */
int proxyx, proxyy; /* Proxy x,y coordinates. */
+ Tk_3DBorder proxyBackground;/* Background color used to draw proxy. If NULL, use background. */
+ Tcl_Obj *proxyBorderWidthPtr; /* Tcl_Obj rep for proxyBorderWidth */
+ int proxyBorderWidth; /* Borderwidth used to draw proxy. */
+ int proxyRelief; /* Relief used to draw proxy, if TK_RELIEF_NULL then use relief. */
Slave **slaves; /* Pointer to array of Slaves. */
int numSlaves; /* Number of slaves. */
int sizeofSlaves; /* Number of elements in the slaves array. */
@@ -203,6 +207,8 @@ static void PanedWindowReqProc(ClientData clientData,
static void ArrangePanes(ClientData clientData);
static void Unlink(Slave *slavePtr);
static Slave * GetPane(PanedWindow *pwPtr, Tk_Window tkwin);
+static void GetFirstLastVisiblePane(PanedWindow *pwPtr,
+ int *firstPtr, int *lastPtr);
static void SlaveStructureProc(ClientData clientData,
XEvent *eventPtr);
static int PanedWindowSashCommand(PanedWindow *pwPtr,
@@ -296,6 +302,15 @@ static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient",
DEF_PANEDWINDOW_ORIENT, -1, Tk_Offset(PanedWindow, orient),
0, orientStrings, GEOMETRY},
+ {TK_OPTION_BORDER, "-proxybackground", "proxyBackground", "ProxyBackground",
+ 0, -1, Tk_Offset(PanedWindow, proxyBackground), TK_OPTION_NULL_OK,
+ (ClientData) DEF_PANEDWINDOW_BG_MONO},
+ {TK_OPTION_PIXELS, "-proxyborderwidth", "proxyBorderWidth", "ProxyBorderWidth",
+ DEF_PANEDWINDOW_PROXYBORDER, Tk_Offset(PanedWindow, proxyBorderWidthPtr),
+ Tk_Offset(PanedWindow, proxyBorderWidth), 0, 0, GEOMETRY},
+ {TK_OPTION_RELIEF, "-proxyrelief", "proxyRelief", "Relief",
+ 0, -1, Tk_Offset(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},
{TK_OPTION_CURSOR, "-sashcursor", "sashCursor", "Cursor",
@@ -682,6 +697,15 @@ PanedWindowWidgetObjCmd(
if (objc <= 4) {
tkwin = Tk_NameToWindow(interp, Tcl_GetString(objv[2]),
pwPtr->tkwin);
+ if (tkwin == NULL) {
+ /*
+ * Just a plain old bad window; Tk_NameToWindow filled in an
+ * error message for us.
+ */
+
+ result = TCL_ERROR;
+ break;
+ }
for (i = 0; i < pwPtr->numSlaves; i++) {
if (pwPtr->slaves[i]->tkwin == tkwin) {
resultObj = Tk_GetOptionInfo(interp,
@@ -1329,6 +1353,7 @@ PanedWindowEventProc(
XEvent *eventPtr) /* Information about event. */
{
PanedWindow *pwPtr = clientData;
+ int i;
if (eventPtr->type == Expose) {
if (pwPtr->tkwin != NULL && !(pwPtr->flags & REDRAW_PENDING)) {
@@ -1343,6 +1368,18 @@ PanedWindowEventProc(
}
} else if (eventPtr->type == DestroyNotify) {
DestroyPanedWindow(pwPtr);
+ } else if (eventPtr->type == UnmapNotify) {
+ for (i = 0; i < pwPtr->numSlaves; i++) {
+ if (!pwPtr->slaves[i]->hide) {
+ Tk_UnmapWindow(pwPtr->slaves[i]->tkwin);
+ }
+ }
+ } else if (eventPtr->type == MapNotify) {
+ for (i = 0; i < pwPtr->numSlaves; i++) {
+ if (!pwPtr->slaves[i]->hide) {
+ Tk_MapWindow(pwPtr->slaves[i]->tkwin);
+ }
+ }
}
}
@@ -1411,6 +1448,7 @@ DisplayPanedWindow(
Tk_Window tkwin = pwPtr->tkwin;
int i, sashWidth, sashHeight;
const int horizontal = (pwPtr->orient == ORIENT_HORIZONTAL);
+ int first, last;
pwPtr->flags &= ~REDRAW_PENDING;
if ((pwPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) {
@@ -1457,9 +1495,10 @@ DisplayPanedWindow(
* Draw the sashes.
*/
+ GetFirstLastVisiblePane(pwPtr, &first, &last);
for (i = 0; i < pwPtr->numSlaves - 1; i++) {
slavePtr = pwPtr->slaves[i];
- if (slavePtr->hide) {
+ if (slavePtr->hide || i == last) {
continue;
}
if (sashWidth > 0 && sashHeight > 0) {
@@ -1705,17 +1744,10 @@ ArrangePanes(
Tcl_Preserve(pwPtr);
/*
- * Find index of last visible pane.
+ * Find index of first and last visible panes.
*/
- for (i = 0, last = 0, first = -1; i < pwPtr->numSlaves; i++) {
- if (pwPtr->slaves[i]->hide == 0) {
- if (first < 0) {
- first = i;
- }
- last = i;
- }
- }
+ GetFirstLastVisiblePane(pwPtr, &first, &last);
/*
* First pass; compute sizes
@@ -2053,6 +2085,41 @@ GetPane(
}
/*
+ *----------------------------------------------------------------------
+ *
+ * GetFirstLastVisiblePane --
+ *
+ * Given panedwindow, find the index of the first and last visible panes
+ * of that paned window.
+ *
+ * Results:
+ * Index of the first and last visible panes.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+GetFirstLastVisiblePane(
+ PanedWindow *pwPtr, /* Pointer to the paned window info. */
+ int *firstPtr, /* Returned index for first. */
+ int *lastPtr) /* Returned index for last. */
+{
+ int i;
+
+ for (i = 0, *lastPtr = 0, *firstPtr = -1; i < pwPtr->numSlaves; i++) {
+ if (pwPtr->slaves[i]->hide == 0) {
+ if (*firstPtr < 0) {
+ *firstPtr = i;
+ }
+ *lastPtr = i;
+ }
+ }
+}
+
+/*
*--------------------------------------------------------------
*
* SlaveStructureProc --
@@ -2553,7 +2620,7 @@ MoveSash(
slavePtr->paneWidth = slavePtr->width = slavePtr->sashx
- sashOffset - slavePtr->x - (2 * slavePtr->padx);
} else {
- slavePtr->paneWidth = slavePtr->height = slavePtr->sashy
+ slavePtr->paneHeight = slavePtr->height = slavePtr->sashy
- sashOffset - slavePtr->y - (2 * slavePtr->pady);
}
}
@@ -2726,8 +2793,10 @@ DisplayProxyWindow(
* Redraw the widget's background and border.
*/
- Tk_Fill3DRectangle(tkwin, pixmap, pwPtr->background, 0, 0,
- Tk_Width(tkwin), Tk_Height(tkwin), 2, pwPtr->sashRelief);
+ Tk_Fill3DRectangle(tkwin, pixmap,
+ pwPtr->proxyBackground ? pwPtr->proxyBackground : pwPtr->background,
+ 0, 0, Tk_Width(tkwin), Tk_Height(tkwin), pwPtr->proxyBorderWidth,
+ (pwPtr->proxyRelief != TK_RELIEF_NULL) ? pwPtr->proxyRelief : pwPtr->sashRelief);
#ifndef TK_NO_DOUBLE_BUFFERING
/*
@@ -2771,6 +2840,7 @@ PanedWindowProxyCommand(
PROXY_COORD, PROXY_FORGET, PROXY_PLACE
};
int index, x, y, sashWidth, sashHeight;
+ int internalBW, pwWidth, pwHeight;
Tcl_Obj *coords[2];
if (objc < 3) {
@@ -2820,11 +2890,16 @@ PanedWindowProxyCommand(
return TCL_ERROR;
}
+ internalBW = Tk_InternalBorderWidth(pwPtr->tkwin);
if (pwPtr->orient == ORIENT_HORIZONTAL) {
if (x < 0) {
x = 0;
}
- y = Tk_InternalBorderWidth(pwPtr->tkwin);
+ pwWidth = Tk_Width(pwPtr->tkwin) - (2 * internalBW);
+ if (x > pwWidth) {
+ x = pwWidth;
+ }
+ y = Tk_InternalBorderWidth(pwPtr->tkwin);
sashWidth = pwPtr->sashWidth;
sashHeight = Tk_Height(pwPtr->tkwin) -
(2 * Tk_InternalBorderWidth(pwPtr->tkwin));
@@ -2832,6 +2907,10 @@ PanedWindowProxyCommand(
if (y < 0) {
y = 0;
}
+ pwHeight = Tk_Height(pwPtr->tkwin) - (2 * internalBW);
+ if (y > pwHeight) {
+ y = pwHeight;
+ }
x = Tk_InternalBorderWidth(pwPtr->tkwin);
sashHeight = pwPtr->sashWidth;
sashWidth = Tk_Width(pwPtr->tkwin) -
@@ -2966,6 +3045,7 @@ PanedWindowIdentifyCoords(
{
int i, sashHeight, sashWidth, thisx, thisy;
int found, isHandle, lpad, rpad, tpad, bpad;
+ int first, last;
if (pwPtr->orient == ORIENT_HORIZONTAL) {
if (Tk_IsMapped(pwPtr->tkwin)) {
@@ -3005,10 +3085,11 @@ PanedWindowIdentifyCoords(
lpad = rpad = 0;
}
+ GetFirstLastVisiblePane(pwPtr, &first, &last);
isHandle = 0;
found = -1;
for (i = 0; i < pwPtr->numSlaves - 1; i++) {
- if (pwPtr->slaves[i]->hide) {
+ if (pwPtr->slaves[i]->hide || i == last) {
continue;
}
thisx = pwPtr->slaves[i]->sashx;
diff --git a/generic/tkScale.c b/generic/tkScale.c
index cc7c294..cbc5202 100644
--- a/generic/tkScale.c
+++ b/generic/tkScale.c
@@ -303,6 +303,12 @@ Tk_ScaleObjCmd(
return TCL_ERROR;
}
+ /*
+ * The widget was just created, no command callback must be invoked.
+ */
+
+ scalePtr->flags &= ~INVOKE_COMMAND;
+
Tcl_SetObjResult(interp, TkNewWindowObj(scalePtr->tkwin));
return TCL_OK;
}
@@ -1268,7 +1274,14 @@ TkScaleSetValue(
return;
}
scalePtr->value = value;
- if (invokeCommand) {
+
+ /*
+ * Schedule command callback invocation only if there is such a command
+ * already registered, otherwise the callback would trigger later when
+ * configuring the widget -command option even if the value did not change.
+ */
+
+ if ((invokeCommand) && (scalePtr->command != NULL)) {
scalePtr->flags |= INVOKE_COMMAND;
}
TkEventuallyRedrawScale(scalePtr, REDRAW_SLIDER);
diff --git a/generic/tkScrollbar.c b/generic/tkScrollbar.c
index d453187..5017d30 100644
--- a/generic/tkScrollbar.c
+++ b/generic/tkScrollbar.c
@@ -622,6 +622,8 @@ TkScrollbarEventProc(
TkScrollbarEventuallyRedraw(scrollPtr);
}
}
+ } else if (eventPtr->type == MapNotify) {
+ TkScrollbarEventuallyRedraw(scrollPtr);
}
}
diff --git a/generic/tkSelect.c b/generic/tkSelect.c
index ab9018a..74b3964 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[TCL_UTF_MAX]; /* 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
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index f621d82..21e6a68 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -38,6 +38,15 @@ MODULE_SCOPE const TkStubs tkStubs;
*/
#undef Tk_MainEx
+#undef Tk_FreeXId
+
+static void
+doNothing(void)
+{
+ /* dummy implementation, no need to do anything */
+}
+
+#define Tk_FreeXId ((void (*)(Display *, XID)) doNothing)
#ifdef _WIN32
@@ -556,7 +565,7 @@ static const TkIntPlatStubs tkIntPlatStubs = {
TkGetTransientMaster, /* 49 */
TkGenerateButtonEvent, /* 50 */
TkGenWMDestroyEvent, /* 51 */
- 0, /* 52 */
+ TkMacOSXSetDrawingEnabled, /* 52 */
TkpGetMS, /* 53 */
TkMacOSXDrawable, /* 54 */
TkpScanWindowId, /* 55 */
diff --git a/generic/tkTest.c b/generic/tkTest.c
index fa9e073..faba89d 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.c
@@ -227,7 +227,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) {
@@ -239,7 +239,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);
diff --git a/generic/tkText.c b/generic/tkText.c
index 0d06233..8ae17a5 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -122,7 +122,8 @@ 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), 0, 0, 0},
+ Tk_Offset(TkText, autoSeparators),
+ TK_OPTION_DONT_SET_DEFAULT, 0, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
DEF_TEXT_BG_COLOR, -1, Tk_Offset(TkText, border),
0, DEF_TEXT_BG_MONO, 0},
@@ -193,7 +194,8 @@ static const Tk_OptionSpec optionSpecs[] = {
DEF_TEXT_INSERT_WIDTH, -1, Tk_Offset(TkText, insertWidth),
0, 0, 0},
{TK_OPTION_INT, "-maxundo", "maxUndo", "MaxUndo",
- DEF_TEXT_MAX_UNDO, -1, Tk_Offset(TkText, maxUndo), 0, 0, 0},
+ DEF_TEXT_MAX_UNDO, -1, Tk_Offset(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,
TK_TEXT_LINE_GEOMETRY},
@@ -211,18 +213,18 @@ static const Tk_OptionSpec optionSpecs[] = {
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),
- TK_CONFIG_NULL_OK, DEF_TEXT_SELECT_FG_MONO, 0},
+ 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},
{TK_OPTION_PIXELS, "-spacing1", "spacing1", "Spacing",
DEF_TEXT_SPACING1, -1, Tk_Offset(TkText, spacing1),
- TK_OPTION_DONT_SET_DEFAULT, 0 , TK_TEXT_LINE_GEOMETRY },
+ 0, 0 , TK_TEXT_LINE_GEOMETRY },
{TK_OPTION_PIXELS, "-spacing2", "spacing2", "Spacing",
DEF_TEXT_SPACING2, -1, Tk_Offset(TkText, spacing2),
- TK_OPTION_DONT_SET_DEFAULT, 0 , TK_TEXT_LINE_GEOMETRY },
+ 0, 0 , TK_TEXT_LINE_GEOMETRY },
{TK_OPTION_PIXELS, "-spacing3", "spacing3", "Spacing",
DEF_TEXT_SPACING3, -1, Tk_Offset(TkText, spacing3),
- TK_OPTION_DONT_SET_DEFAULT, 0 , TK_TEXT_LINE_GEOMETRY },
+ 0, 0 , TK_TEXT_LINE_GEOMETRY },
{TK_OPTION_CUSTOM, "-startline", NULL, NULL,
NULL, -1, Tk_Offset(TkText, start), TK_OPTION_NULL_OK,
&lineOption, TK_TEXT_LINE_RANGE},
@@ -239,7 +241,8 @@ static const Tk_OptionSpec optionSpecs[] = {
DEF_TEXT_TAKE_FOCUS, -1, Tk_Offset(TkText, takeFocus),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-undo", "undo", "Undo",
- DEF_TEXT_UNDO, -1, Tk_Offset(TkText, undo), 0, 0 , 0},
+ DEF_TEXT_UNDO, -1, Tk_Offset(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,
TK_TEXT_LINE_GEOMETRY},
@@ -401,7 +404,9 @@ static Tcl_Obj * TextGetText(const TkText *textPtr,
const TkTextIndex *index1,
const TkTextIndex *index2, int visibleOnly);
static void GenerateModifiedEvent(TkText *textPtr);
+static void GenerateUndoStackEvent(TkText *textPtr);
static void UpdateDirtyFlag(TkSharedText *sharedPtr);
+static void RunAfterSyncCmd(ClientData clientData);
static void TextPushUndoAction(TkText *textPtr,
Tcl_Obj *undoString, int insert,
const TkTextIndex *index1Ptr,
@@ -542,7 +547,7 @@ CreateWidget(
Tcl_InitHashTable(&sharedPtr->windowTable, TCL_STRING_KEYS);
Tcl_InitHashTable(&sharedPtr->imageTable, TCL_STRING_KEYS);
sharedPtr->undoStack = TkUndoInitStack(interp,0);
- sharedPtr->undo = 1;
+ sharedPtr->undo = 0;
sharedPtr->isDirty = 0;
sharedPtr->dirtyMode = TK_TEXT_DIRTY_NORMAL;
sharedPtr->autoSeparators = 1;
@@ -580,14 +585,6 @@ CreateWidget(
textPtr->end = NULL;
}
- /*
- * Register with the B-tree. In some sense it would be best if we could do
- * this later (after configuration options), so that any changes to
- * start,end do not require a total recalculation.
- */
-
- TkBTreeAddClient(sharedPtr->tree, textPtr, textPtr->charHeight);
-
textPtr->state = TK_TEXT_STATE_NORMAL;
textPtr->relief = TK_RELIEF_FLAT;
textPtr->cursor = None;
@@ -598,6 +595,14 @@ CreateWidget(
textPtr->prevHeight = Tk_Height(newWin);
/*
+ * Register with the B-tree. In some sense it would be best if we could do
+ * this later (after configuration options), so that any changes to
+ * start,end do not require a total recalculation.
+ */
+
+ TkBTreeAddClient(sharedPtr->tree, textPtr, textPtr->charHeight);
+
+ /*
* This will add refCounts to textPtr.
*/
@@ -702,15 +707,16 @@ TextWidgetObjCmd(
static const char *const optionStrings[] = {
"bbox", "cget", "compare", "configure", "count", "debug", "delete",
"dlineinfo", "dump", "edit", "get", "image", "index", "insert",
- "mark", "peer", "replace", "scan", "search", "see", "tag", "window",
- "xview", "yview", NULL
+ "mark", "peer", "pendingsync", "replace", "scan", "search",
+ "see", "sync", "tag", "window", "xview", "yview", NULL
};
enum options {
TEXT_BBOX, TEXT_CGET, TEXT_COMPARE, TEXT_CONFIGURE, TEXT_COUNT,
TEXT_DEBUG, TEXT_DELETE, TEXT_DLINEINFO, TEXT_DUMP, TEXT_EDIT,
TEXT_GET, TEXT_IMAGE, TEXT_INDEX, TEXT_INSERT, TEXT_MARK,
- TEXT_PEER, TEXT_REPLACE, TEXT_SCAN, TEXT_SEARCH, TEXT_SEE,
- TEXT_TAG, TEXT_WINDOW, TEXT_XVIEW, TEXT_YVIEW
+ TEXT_PEER, TEXT_PENDINGSYNC, TEXT_REPLACE, TEXT_SCAN,
+ TEXT_SEARCH, TEXT_SEE, TEXT_SYNC, TEXT_TAG, TEXT_WINDOW,
+ TEXT_XVIEW, TEXT_YVIEW
};
if (objc < 2) {
@@ -917,43 +923,43 @@ TextWidgetObjCmd(
* We're going to count up all display lines in the logical
* line of 'indexFromPtr' up to, but not including the logical
* line of 'indexToPtr' (except if this line is elided), and
- * then subtract off what came in too much from elided lines,
- * also subtract off what we didn't want from 'from' and add
+ * then subtract off what came in too much from elided lines,
+ * also subtract off what we didn't want from 'from' and add
* on what we didn't count from 'to'.
*/
- while (TkTextIndexCmp(&index,indexToPtr) < 0) {
+ while (TkTextIndexCmp(&index,indexToPtr) < 0) {
value += TkTextUpdateOneLine(textPtr, index.linePtr,
- 0, &index, 0);
+ 0, &index, 0);
}
- index2 = index;
-
- /*
- * Now we need to adjust the count to:
- * - subtract off the number of display lines between
- * indexToPtr and index2, since we might have skipped past
- * indexToPtr, if we have several logical lines in a
- * single display line
- * - subtract off the number of display lines overcounted
- * in the first logical line
- * - add on the number of display lines in the last logical
- * line
- * This logic is still ok if both indexFromPtr and indexToPtr
- * are in the same logical line.
- */
-
- index = *indexToPtr;
- index.byteIndex = 0;
- while (TkTextIndexCmp(&index,&index2) < 0) {
- value -= TkTextUpdateOneLine(textPtr, index.linePtr,
- 0, &index, 0);
- }
+ index2 = index;
+
+ /*
+ * Now we need to adjust the count to:
+ * - subtract off the number of display lines between
+ * indexToPtr and index2, since we might have skipped past
+ * indexToPtr, if we have several logical lines in a
+ * single display line
+ * - subtract off the number of display lines overcounted
+ * in the first logical line
+ * - add on the number of display lines in the last logical
+ * line
+ * This logic is still ok if both indexFromPtr and indexToPtr
+ * are in the same logical line.
+ */
+
+ index = *indexToPtr;
+ index.byteIndex = 0;
+ while (TkTextIndexCmp(&index,&index2) < 0) {
+ value -= TkTextUpdateOneLine(textPtr, index.linePtr,
+ 0, &index, 0);
+ }
index.linePtr = indexFromPtr->linePtr;
index.byteIndex = 0;
while (1) {
TkTextFindDisplayLineEnd(textPtr, &index, 1, NULL);
- if (TkTextIndexCmp(&index,indexFromPtr) >= 0) {
+ if (TkTextIndexCmp(&index,indexFromPtr) >= 0) {
break;
}
TkTextIndexForwBytes(textPtr, &index, 1, &index);
@@ -965,7 +971,7 @@ TextWidgetObjCmd(
index.byteIndex = 0;
while (1) {
TkTextFindDisplayLineEnd(textPtr, &index, 1, NULL);
- if (TkTextIndexCmp(&index,indexToPtr) >= 0) {
+ if (TkTextIndexCmp(&index,indexToPtr) >= 0) {
break;
}
TkTextIndexForwBytes(textPtr, &index, 1, &index);
@@ -1392,6 +1398,16 @@ TextWidgetObjCmd(
case TEXT_PEER:
result = TextPeerCmd(textPtr, interp, objc, objv);
break;
+ case TEXT_PENDINGSYNC: {
+ if (objc != 2) {
+ Tcl_WrongNumArgs(interp, 2, objv, NULL);
+ result = TCL_ERROR;
+ goto done;
+ }
+ Tcl_SetObjResult(interp,
+ Tcl_NewBooleanObj(TkTextPendingsync(textPtr)));
+ break;
+ }
case TEXT_REPLACE: {
const TkTextIndex *indexFromPtr, *indexToPtr;
@@ -1506,6 +1522,39 @@ TextWidgetObjCmd(
case TEXT_SEE:
result = TkTextSeeCmd(textPtr, interp, objc, objv);
break;
+ case TEXT_SYNC: {
+ if (objc == 4) {
+ Tcl_Obj *cmd = objv[3];
+ const char *option = Tcl_GetString(objv[2]);
+ if (strncmp(option, "-command", objv[2]->length)) {
+ Tcl_AppendResult(interp, "wrong option \"", option, "\": should be \"-command\"", NULL);
+ result = TCL_ERROR;
+ goto done;
+ }
+ Tcl_IncrRefCount(cmd);
+ if (TkTextPendingsync(textPtr)) {
+ if (textPtr->afterSyncCmd) {
+ Tcl_DecrRefCount(textPtr->afterSyncCmd);
+ }
+ textPtr->afterSyncCmd = cmd;
+ } else {
+ textPtr->afterSyncCmd = cmd;
+ Tcl_DoWhenIdle(RunAfterSyncCmd, (ClientData) textPtr);
+ }
+ break;
+ } else if (objc != 2) {
+ Tcl_WrongNumArgs(interp, 2, objv, "?-command command?");
+ result = TCL_ERROR;
+ goto done;
+ }
+ if (textPtr->afterSyncCmd) {
+ Tcl_DecrRefCount(textPtr->afterSyncCmd);
+ }
+ textPtr->afterSyncCmd = NULL;
+ TkTextUpdateLineMetrics(textPtr, 1,
+ TkBTreeNumLines(textPtr->sharedTextPtr->tree, textPtr), -1);
+ break;
+ }
case TEXT_TAG:
result = TkTextTagCmd(textPtr, interp, objc, objv);
break;
@@ -1995,6 +2044,10 @@ DestroyText(
textPtr->tkwin = NULL;
textPtr->refCount--;
Tcl_DeleteCommandFromToken(textPtr->interp, textPtr->widgetCmd);
+ if (textPtr->afterSyncCmd){
+ Tcl_DecrRefCount(textPtr->afterSyncCmd);
+ textPtr->afterSyncCmd = NULL;
+ }
if (textPtr->refCount == 0) {
ckfree(textPtr);
}
@@ -2044,7 +2097,7 @@ ConfigureText(
textPtr->sharedTextPtr->maxUndo = textPtr->maxUndo;
textPtr->sharedTextPtr->autoSeparators = textPtr->autoSeparators;
- TkUndoSetDepth(textPtr->sharedTextPtr->undoStack,
+ TkUndoSetMaxDepth(textPtr->sharedTextPtr->undoStack,
textPtr->sharedTextPtr->maxUndo);
/*
@@ -2142,10 +2195,10 @@ ConfigureText(
* Also, clamp the insert and current (unshared) marks to the new
* -startline/-endline range limits of the widget. All other (shared)
* marks are unchanged.
- * The return value of TkTextMarkNameToIndex does not need to be
- * checked: "insert" and "current" marks always exist, and the
- * purpose of the code below precisely is to move them inside the
- * -startline/-endline range.
+ * The return value of TkTextMarkNameToIndex does not need to be
+ * checked: "insert" and "current" marks always exist, and the
+ * purpose of the code below precisely is to move them inside the
+ * -startline/-endline range.
*/
textPtr->sharedTextPtr->stateEpoch++;
@@ -2204,12 +2257,20 @@ ConfigureText(
* replaced in the widget record.
*/
- textPtr->selTagPtr->border = textPtr->selBorder;
+ if (textPtr->selTagPtr->selBorder == NULL) {
+ textPtr->selTagPtr->border = textPtr->selBorder;
+ } else {
+ textPtr->selTagPtr->selBorder = textPtr->selBorder;
+ }
if (textPtr->selTagPtr->borderWidthPtr != textPtr->selBorderWidthPtr) {
textPtr->selTagPtr->borderWidthPtr = textPtr->selBorderWidthPtr;
textPtr->selTagPtr->borderWidth = textPtr->selBorderWidth;
}
- textPtr->selTagPtr->fgColor = textPtr->selFgColorPtr;
+ if (textPtr->selTagPtr->selFgColor == NULL) {
+ textPtr->selTagPtr->fgColor = textPtr->selFgColorPtr;
+ } else {
+ textPtr->selTagPtr->selFgColor = textPtr->selFgColorPtr;
+ }
textPtr->selTagPtr->affectsDisplay = 0;
textPtr->selTagPtr->affectsDisplayGeometry = 0;
if ((textPtr->selTagPtr->elideString != NULL)
@@ -2228,12 +2289,18 @@ ConfigureText(
textPtr->selTagPtr->affectsDisplayGeometry = 1;
}
if ((textPtr->selTagPtr->border != NULL)
+ || (textPtr->selTagPtr->selBorder != NULL)
|| (textPtr->selTagPtr->reliefString != NULL)
|| (textPtr->selTagPtr->bgStipple != None)
|| (textPtr->selTagPtr->fgColor != NULL)
+ || (textPtr->selTagPtr->selFgColor != NULL)
|| (textPtr->selTagPtr->fgStipple != None)
|| (textPtr->selTagPtr->overstrikeString != NULL)
- || (textPtr->selTagPtr->underlineString != NULL)) {
+ || (textPtr->selTagPtr->overstrikeColor != NULL)
+ || (textPtr->selTagPtr->underlineString != NULL)
+ || (textPtr->selTagPtr->underlineColor != NULL)
+ || (textPtr->selTagPtr->lMarginColor != NULL)
+ || (textPtr->selTagPtr->rMarginColor != NULL)) {
textPtr->selTagPtr->affectsDisplay = 1;
}
TkTextRedrawTag(NULL, textPtr, NULL, NULL, textPtr->selTagPtr, 1);
@@ -2344,6 +2411,7 @@ TextWorldChanged(
{
Tk_FontMetrics fm;
int border;
+ int oldCharHeight = textPtr->charHeight;
textPtr->charWidth = Tk_TextWidth(textPtr->tkfont, "0", 1);
if (textPtr->charWidth <= 0) {
@@ -2355,6 +2423,9 @@ TextWorldChanged(
if (textPtr->charHeight <= 0) {
textPtr->charHeight = 1;
}
+ if (textPtr->charHeight != oldCharHeight) {
+ TkBTreeClientRangeChanged(textPtr, textPtr->charHeight);
+ }
border = textPtr->borderWidth + textPtr->highlightWidth;
Tk_GeometryRequest(textPtr->tkwin,
textPtr->width * textPtr->charWidth + 2*textPtr->padX + 2*border,
@@ -2702,6 +2773,10 @@ TextPushUndoAction(
/* Index describing second location. */
{
TkUndoSubAtom *iAtom, *dAtom;
+ int canUndo, canRedo;
+ char lMarkName[20] = "tk::undoMarkL";
+ char rMarkName[20] = "tk::undoMarkR";
+ char stringUndoMarkId[7] = "";
/*
* Create the helpers.
@@ -2712,6 +2787,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.
@@ -2761,6 +2840,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
@@ -2778,16 +2891,27 @@ 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);
Tcl_DecrRefCount(index2Obj);
+ canUndo = TkUndoCanUndo(textPtr->sharedTextPtr->undoStack);
+ canRedo = TkUndoCanRedo(textPtr->sharedTextPtr->undoStack);
+
/*
* Depending whether the action is to insert or delete, we provide the
* appropriate second and third arguments to TkUndoPushAction. (The first
@@ -2799,6 +2923,10 @@ TextPushUndoAction(
} else {
TkUndoPushAction(textPtr->sharedTextPtr->undoStack, dAtom, iAtom);
}
+
+ if (!canUndo || canRedo) {
+ GenerateUndoStackEvent(textPtr);
+ }
}
/*
@@ -2963,7 +3091,7 @@ CountIndices(
* If 'viewUpdate' is true, we may adjust the window contents'
* y-position, and scrollbar setting.
*
- * If 'viewUpdate' is false, true we can guarantee that textPtr->topIndex
+ * If 'viewUpdate' is true we can guarantee that textPtr->topIndex
* points to a valid TkTextLine after this function returns. However, if
* 'viewUpdate' is false, then there is no such guarantee (since
* topIndex.linePtr can be garbage). The caller is expected to take
@@ -3023,12 +3151,15 @@ DeleteIndexRange(
* dummy empty line at the end of the text. If the final newline of the
* file (just before the dummy line) is being deleted, then back up index
* to just before the newline. If there is a newline just before the first
- * character being deleted, then back up the first index too, so that an
- * even number of lines gets deleted. Furthermore, remove any tags that
- * are present on the newline that isn't going to be deleted after all
- * (this simulates deleting the newline and then adding a "clean" one back
- * again). Note that index1 and index2 might now be equal again which
- * means that no text will be deleted but tags might be removed.
+ * character being deleted, then back up the first index too. The idea is
+ * that a deletion involving a range starting at a line start and
+ * including the final \n (i.e. index2 is "end") is an attempt to delete
+ * complete lines, so the \n before the deleted block shall become the new
+ * final \n. Furthermore, remove any tags that are present on the newline
+ * that isn't going to be deleted after all (this simulates deleting the
+ * newline and then adding a "clean" one back again). Note that index1 and
+ * index2 might now be equal again which means that no text will be
+ * deleted but tags might be removed.
*/
line1 = TkBTreeLinesTo(textPtr, index1.linePtr);
@@ -3132,11 +3263,11 @@ DeleteIndexRange(
resetView = 1;
line = line1;
byteIndex = tPtr->topIndex.byteIndex;
- } else {
- /*
- * Deletion range starts after the top line. This peers's view
- * will not need to be reset. Nothing to do.
- */
+ } else {
+ /*
+ * Deletion range starts after the top line. This peers's view
+ * will not need to be reset. Nothing to do.
+ */
}
} else if (index2.linePtr == tPtr->topIndex.linePtr) {
/*
@@ -3153,11 +3284,11 @@ DeleteIndexRange(
} else {
byteIndex -= (index2.byteIndex - index1.byteIndex);
}
- } else {
- /*
- * Deletion range ends before the top line. This peers's view
- * will not need to be reset. Nothing to do.
- */
+ } else {
+ /*
+ * Deletion range ends before the top line. This peers's view
+ * will not need to be reset. Nothing to do.
+ */
}
if (resetView) {
lineAndByteIndex[resetViewCount] = line;
@@ -3202,43 +3333,43 @@ DeleteIndexRange(
TkTextIndex indexTmp;
if (tPtr == textPtr) {
- if (viewUpdate) {
- /*
- * line cannot be before -startline of textPtr because
- * this line corresponds to an index which is necessarily
- * between "1.0" and "end" relative to textPtr.
- * Therefore no need to clamp line to the -start/-end
- * range.
- */
+ if (viewUpdate) {
+ /*
+ * line cannot be before -startline of textPtr because
+ * this line corresponds to an index which is necessarily
+ * between "1.0" and "end" relative to textPtr.
+ * Therefore no need to clamp line to the -start/-end
+ * range.
+ */
TkTextMakeByteIndex(sharedTextPtr->tree, textPtr, line,
byteIndex, &indexTmp);
TkTextSetYView(tPtr, &indexTmp, 0);
}
} else {
- TkTextMakeByteIndex(sharedTextPtr->tree, tPtr, line,
+ TkTextMakeByteIndex(sharedTextPtr->tree, tPtr, line,
byteIndex, &indexTmp);
- /*
- * line may be before -startline of tPtr and must be
- * clamped to -startline before providing it to
- * TkTextSetYView otherwise lines before -startline
- * would be displayed.
- * There is no need to worry about -endline however,
- * because the view will only be reset if the deletion
- * involves the TOP line of the screen
- */
-
- if (tPtr->start != NULL) {
- int start;
- TkTextIndex indexStart;
-
- start = TkBTreeLinesTo(NULL, tPtr->start);
- TkTextMakeByteIndex(sharedTextPtr->tree, NULL, start,
+ /*
+ * line may be before -startline of tPtr and must be
+ * clamped to -startline before providing it to
+ * TkTextSetYView otherwise lines before -startline
+ * would be displayed.
+ * There is no need to worry about -endline however,
+ * because the view will only be reset if the deletion
+ * involves the TOP line of the screen
+ */
+
+ if (tPtr->start != NULL) {
+ int start;
+ TkTextIndex indexStart;
+
+ start = TkBTreeLinesTo(NULL, tPtr->start);
+ TkTextMakeByteIndex(sharedTextPtr->tree, NULL, start,
0, &indexStart);
- if (TkTextIndexCmp(&indexTmp, &indexStart) < 0) {
- indexTmp = indexStart;
- }
- }
+ if (TkTextIndexCmp(&indexTmp, &indexStart) < 0) {
+ indexTmp = indexStart;
+ }
+ }
TkTextSetYView(tPtr, &indexTmp, 0);
}
}
@@ -3484,16 +3615,7 @@ TkTextSelectionEvent(
* event generate $textWidget <<Selection>>
*/
- union {XEvent general; XVirtualEvent virtual;} event;
-
- memset(&event, 0, sizeof(event));
- event.general.xany.type = VirtualEvent;
- event.general.xany.serial = NextRequest(Tk_Display(textPtr->tkwin));
- event.general.xany.send_event = False;
- event.general.xany.window = Tk_WindowId(textPtr->tkwin);
- event.general.xany.display = Tk_Display(textPtr->tkwin);
- event.virtual.name = Tk_GetUid("Selection");
- Tk_HandleEvent(&event.general);
+ TkSendVirtualEvent(textPtr->tkwin, "Selection", NULL);
}
/*
@@ -4240,7 +4362,11 @@ TextSearchFoundMatch(
matchOffset += Tcl_NumUtfChars(segPtr->body.chars, -1);
}
} else {
- leftToScan -= segPtr->size;
+ if (searchSpecPtr->exact) {
+ leftToScan -= segPtr->size;
+ } else {
+ leftToScan -= Tcl_NumUtfChars(segPtr->body.chars, -1);
+ }
}
curIndex.byteIndex += segPtr->size;
}
@@ -4382,7 +4508,7 @@ TkTextGetTabs(
Tcl_Obj **objv;
TkTextTabArray *tabArrayPtr;
TkTextTab *tabPtr;
- Tcl_UniChar ch;
+ int ch;
double prevStop, lastStop;
/*
* Map these strings to TkTextTabAlign values.
@@ -4489,7 +4615,7 @@ TkTextGetTabs(
* There may be a more efficient way of getting this.
*/
- Tcl_UtfToUniChar(Tcl_GetString(objv[i+1]), &ch);
+ TkUtfToUniChar(Tcl_GetString(objv[i+1]), &ch);
if (!Tcl_UniCharIsAlpha(ch)) {
continue;
}
@@ -4992,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;
@@ -5015,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;
}
@@ -5040,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;
@@ -5062,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;
}
@@ -5090,11 +5253,16 @@ TextEditCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
int index, setModified, oldModified;
+ int canRedo = 0;
+ int canUndo = 0;
+
static const char *const editOptionStrings[] = {
- "modified", "redo", "reset", "separator", "undo", NULL
+ "canundo", "canredo", "modified", "redo", "reset", "separator",
+ "undo", NULL
};
enum editOptions {
- EDIT_MODIFIED, EDIT_REDO, EDIT_RESET, EDIT_SEPARATOR, EDIT_UNDO
+ EDIT_CANUNDO, EDIT_CANREDO, EDIT_MODIFIED, EDIT_REDO, EDIT_RESET,
+ EDIT_SEPARATOR, EDIT_UNDO
};
if (objc < 3) {
@@ -5108,6 +5276,26 @@ TextEditCmd(
}
switch ((enum editOptions) index) {
+ case EDIT_CANREDO:
+ if (objc != 3) {
+ Tcl_WrongNumArgs(interp, 3, objv, NULL);
+ return TCL_ERROR;
+ }
+ if (textPtr->sharedTextPtr->undo) {
+ canRedo = TkUndoCanRedo(textPtr->sharedTextPtr->undoStack);
+ }
+ Tcl_SetObjResult(interp, Tcl_NewBooleanObj(canRedo));
+ break;
+ case EDIT_CANUNDO:
+ if (objc != 3) {
+ Tcl_WrongNumArgs(interp, 3, objv, NULL);
+ return TCL_ERROR;
+ }
+ if (textPtr->sharedTextPtr->undo) {
+ canUndo = TkUndoCanUndo(textPtr->sharedTextPtr->undoStack);
+ }
+ Tcl_SetObjResult(interp, Tcl_NewBooleanObj(canUndo));
+ break;
case EDIT_MODIFIED:
if (objc == 3) {
Tcl_SetObjResult(interp,
@@ -5149,18 +5337,28 @@ TextEditCmd(
Tcl_WrongNumArgs(interp, 3, objv, NULL);
return TCL_ERROR;
}
+ canUndo = TkUndoCanUndo(textPtr->sharedTextPtr->undoStack);
if (TextEditRedo(textPtr)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj("nothing to redo", -1));
Tcl_SetErrorCode(interp, "TK", "TEXT", "NO_REDO", NULL);
return TCL_ERROR;
}
+ canRedo = TkUndoCanRedo(textPtr->sharedTextPtr->undoStack);
+ if (!canUndo || !canRedo) {
+ GenerateUndoStackEvent(textPtr);
+ }
break;
case EDIT_RESET:
if (objc != 3) {
Tcl_WrongNumArgs(interp, 3, objv, NULL);
return TCL_ERROR;
}
+ canUndo = TkUndoCanUndo(textPtr->sharedTextPtr->undoStack);
+ canRedo = TkUndoCanRedo(textPtr->sharedTextPtr->undoStack);
TkUndoClearStacks(textPtr->sharedTextPtr->undoStack);
+ if (canUndo || canRedo) {
+ GenerateUndoStackEvent(textPtr);
+ }
break;
case EDIT_SEPARATOR:
if (objc != 3) {
@@ -5174,11 +5372,16 @@ TextEditCmd(
Tcl_WrongNumArgs(interp, 3, objv, NULL);
return TCL_ERROR;
}
+ canRedo = TkUndoCanRedo(textPtr->sharedTextPtr->undoStack);
if (TextEditUndo(textPtr)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj("nothing to undo", -1));
Tcl_SetErrorCode(interp, "TK", "TEXT", "NO_UNDO", NULL);
return TCL_ERROR;
}
+ canUndo = TkUndoCanUndo(textPtr->sharedTextPtr->undoStack);
+ if (!canRedo || !canUndo) {
+ GenerateUndoStackEvent(textPtr);
+ }
break;
}
return TCL_OK;
@@ -5273,6 +5476,7 @@ TextGetText(
*
* Send an event that the text was modified. This is equivalent to:
* event generate $textWidget <<Modified>>
+ * for all peers of $textWidget.
*
* Results:
* None
@@ -5287,21 +5491,41 @@ static void
GenerateModifiedEvent(
TkText *textPtr) /* Information about text widget. */
{
- union {
- XEvent general;
- XVirtualEvent virtual;
- } event;
-
- Tk_MakeWindowExist(textPtr->tkwin);
-
- memset(&event, 0, sizeof(event));
- event.general.xany.type = VirtualEvent;
- event.general.xany.serial = NextRequest(Tk_Display(textPtr->tkwin));
- event.general.xany.send_event = False;
- event.general.xany.window = Tk_WindowId(textPtr->tkwin);
- event.general.xany.display = Tk_Display(textPtr->tkwin);
- event.virtual.name = Tk_GetUid("Modified");
- Tk_HandleEvent(&event.general);
+ for (textPtr = textPtr->sharedTextPtr->peers; textPtr != NULL;
+ textPtr = textPtr->next) {
+ Tk_MakeWindowExist(textPtr->tkwin);
+ TkSendVirtualEvent(textPtr->tkwin, "Modified", NULL);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GenerateUndoStackEvent --
+ *
+ * Send an event that the undo or redo stack became empty or unempty.
+ * This is equivalent to:
+ * event generate $textWidget <<UndoStack>>
+ * for all peers of $textWidget.
+ *
+ * Results:
+ * None
+ *
+ * Side effects:
+ * May force the text window (and all peers) into existence.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+GenerateUndoStackEvent(
+ TkText *textPtr) /* Information about text widget. */
+{
+ for (textPtr = textPtr->sharedTextPtr->peers; textPtr != NULL;
+ textPtr = textPtr->next) {
+ Tk_MakeWindowExist(textPtr->tkwin);
+ TkSendVirtualEvent(textPtr->tkwin, "UndoStack", NULL);
+ }
}
/*
@@ -5325,7 +5549,6 @@ UpdateDirtyFlag(
TkSharedText *sharedTextPtr)/* Information about text widget. */
{
int oldDirtyFlag;
- TkText *textPtr;
/*
* If we've been forced to be dirty, we stay dirty (until explicitly
@@ -5356,11 +5579,54 @@ UpdateDirtyFlag(
}
if (sharedTextPtr->isDirty == 0 || oldDirtyFlag == 0) {
- for (textPtr = sharedTextPtr->peers; textPtr != NULL;
- textPtr = textPtr->next) {
- GenerateModifiedEvent(textPtr);
+ GenerateModifiedEvent(sharedTextPtr->peers);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * RunAfterSyncCmd --
+ *
+ * This function is called by the event loop and executes the command
+ * scheduled by [.text sync -command $cmd].
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Anything may happen, depending on $cmd contents.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+RunAfterSyncCmd(
+ ClientData clientData) /* Information about text widget. */
+{
+ register TkText *textPtr = (TkText *) clientData;
+ int code;
+
+ if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)) {
+ /*
+ * The widget has been deleted. Don't do anything.
+ */
+
+ if (--textPtr->refCount == 0) {
+ ckfree((char *) textPtr);
}
+ return;
+ }
+
+ Tcl_Preserve((ClientData) textPtr->interp);
+ 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_Release((ClientData) textPtr->interp);
+ Tcl_DecrRefCount(textPtr->afterSyncCmd);
+ textPtr->afterSyncCmd = NULL;
}
/*
@@ -5700,7 +5966,7 @@ SearchCore(
CLANG_ASSERT(pattern);
do {
- Tcl_UniChar ch;
+ int ch;
const char *p;
int lastFullLine = lastOffset;
@@ -5930,7 +6196,7 @@ SearchCore(
}
} else {
firstOffset = p - startOfLine +
- Tcl_UtfToUniChar(startOfLine+matchOffset,&ch);
+ TkUtfToUniChar(startOfLine+matchOffset,&ch);
}
}
} while (searchSpecPtr->all);
diff --git a/generic/tkText.h b/generic/tkText.h
index 99a4888..430c96b 100644
--- a/generic/tkText.h
+++ b/generic/tkText.h
@@ -168,7 +168,7 @@ typedef struct TkTextSegment {
int size; /* Size of this segment (# of bytes of index
* space it occupies). */
union {
- char chars[1]; /* Characters that make up character info.
+ char chars[2]; /* Characters that make up character info.
* Actual length varies to hold as many
* characters as needed.*/
TkTextToggle toggle; /* Information about tag toggle. */
@@ -347,6 +347,9 @@ typedef struct TkTextTag {
int lMargin2; /* Left margin for second and later display
* lines of each text line, in pixels. Only
* valid if lMargin2String is non-NULL. */
+ Tk_3DBorder lMarginColor; /* Used for drawing background in left margins.
+ * This is used for both lmargin1 and lmargin2.
+ * NULL means no value specified here. */
char *offsetString; /* -offset option string (malloc-ed). NULL
* means option not specified. */
int offset; /* Vertical offset of text's baseline from
@@ -358,10 +361,18 @@ typedef struct TkTextTag {
int overstrike; /* Non-zero means draw horizontal line through
* middle of text. Only valid if
* overstrikeString is non-NULL. */
+ XColor *overstrikeColor; /* Color for the overstrike. NULL means same
+ * color as foreground. */
char *rMarginString; /* -rmargin option string (malloc-ed). NULL
* means option not specified. */
int rMargin; /* Right margin for text, in pixels. Only
* valid if rMarginString is non-NULL. */
+ Tk_3DBorder rMarginColor; /* Used for drawing background in right margin.
+ * NULL means no value specified here. */
+ Tk_3DBorder selBorder; /* Used for drawing background for selected text.
+ * NULL means no value specified here. */
+ XColor *selFgColor; /* Foreground color for selected text. NULL means
+ * no value specified here. */
char *spacing1String; /* -spacing1 option string (malloc-ed). NULL
* means option not specified. */
int spacing1; /* Extra spacing above first display line for
@@ -389,6 +400,8 @@ typedef struct TkTextTag {
int underline; /* Non-zero means draw underline underneath
* text. Only valid if underlineString is
* non-NULL. */
+ XColor *underlineColor; /* Color for the underline. NULL means same
+ * color as foreground. */
TkWrapMode wrapMode; /* How to handle wrap-around for this tag.
* Must be TEXT_WRAPMODE_CHAR,
* TEXT_WRAPMODE_NONE, TEXT_WRAPMODE_WORD, or
@@ -567,6 +580,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
@@ -785,6 +800,8 @@ typedef struct TkText {
* statements. */
int autoSeparators; /* Non-zero means the separators will be
* inserted automatically. */
+ Tcl_Obj *afterSyncCmd; /* Command to be executed when lines are up to
+ * date */
} TkText;
/*
@@ -1109,6 +1126,7 @@ MODULE_SCOPE int TkTextMarkNameToIndex(TkText *textPtr,
MODULE_SCOPE void TkTextMarkSegToIndex(TkText *textPtr,
TkTextSegment *markPtr, TkTextIndex *indexPtr);
MODULE_SCOPE void TkTextEventuallyRepick(TkText *textPtr);
+MODULE_SCOPE Bool TkTextPendingsync(TkText *textPtr);
MODULE_SCOPE void TkTextPickCurrent(TkText *textPtr, XEvent *eventPtr);
MODULE_SCOPE void TkTextPixelIndex(TkText *textPtr, int x, int y,
TkTextIndex *indexPtr, int *nearest);
diff --git a/generic/tkTextBTree.c b/generic/tkTextBTree.c
index 7383d21..0fdc280 100644
--- a/generic/tkTextBTree.c
+++ b/generic/tkTextBTree.c
@@ -1112,7 +1112,7 @@ TkBTreeInsertChars(
/*
* I don't believe it's possible for either of the two lines passed to
* this function to be the last line of text, but the function is robust
- * to that case anyway. (We must never re-calculated the line height of
+ * to that case anyway. (We must never re-calculate the line height of
* the last line).
*/
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 01ec22d..eb917cf 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -136,11 +136,15 @@ typedef struct StyleValues {
* line of each text line. */
int lMargin2; /* Left margin, in pixels, for second and
* later display lines of each text line. */
+ Tk_3DBorder lMarginColor; /* Color of left margins (1 and 2). */
int offset; /* Offset in pixels of baseline, relative to
* baseline of line. */
int overstrike; /* Non-zero means draw overstrike through
* text. */
+ XColor *overstrikeColor; /* Foreground color for overstrike through
+ * text. */
int rMargin; /* Right margin, in pixels. */
+ Tk_3DBorder rMarginColor; /* Color of right margin. */
int spacing1; /* Spacing above first dline in text line. */
int spacing2; /* Spacing between lines of dline. */
int spacing3; /* Spacing below last dline in text line. */
@@ -149,6 +153,8 @@ typedef struct StyleValues {
int tabStyle; /* One of TABULAR or WORDPROCESSOR. */
int underline; /* Non-zero means draw underline underneath
* text. */
+ XColor *underlineColor; /* Foreground color for underline underneath
+ * text. */
int elide; /* Zero means draw text, otherwise not. */
TkWrapMode wrapMode; /* How to handle wrap-around for this tag.
* One of TEXT_WRAPMODE_CHAR,
@@ -167,6 +173,8 @@ typedef struct TextStyle {
GC bgGC; /* Graphics context for background. None means
* use widget background. */
GC fgGC; /* Graphics context for foreground. */
+ GC ulGC; /* Graphics context for underline. */
+ GC ovGC; /* Graphics context for overstrike. */
StyleValues *sValuePtr; /* Raw information from which GCs were
* derived. */
Tcl_HashEntry *hPtr; /* Pointer to entry in styleTable. Used to
@@ -234,6 +242,14 @@ typedef struct DLine {
int spaceBelow; /* How much extra space was added to the
* bottom of the line because of spacing
* options. This is included in height. */
+ Tk_3DBorder lMarginColor; /* Background color of the area corresponding
+ * to the left margin of the display line. */
+ int lMarginWidth; /* Pixel width of the area corresponding to
+ * the left margin. */
+ Tk_3DBorder rMarginColor; /* Background color of the area corresponding
+ * to the right margin of the display line. */
+ int rMarginWidth; /* Pixel width of the area corresponding to
+ * the right margin. */
int length; /* Total length of line, in pixels. */
TkTextDispChunk *chunkPtr; /* Pointer to first chunk in list of all of
* those that are displayed on this line of
@@ -591,9 +607,10 @@ static int TextGetScrollInfoObj(Tcl_Interp *interp,
Tcl_Obj *const objv[], double *dblPtr,
int *intPtr);
static void AsyncUpdateLineMetrics(ClientData clientData);
+static void GenerateWidgetViewSyncEvent(TkText *textPtr, Bool InSync);
static void AsyncUpdateYScrollbar(ClientData clientData);
static int IsStartOfNotMergedLine(TkText *textPtr,
- CONST TkTextIndex *indexPtr);
+ const TkTextIndex *indexPtr);
/*
* Result values returned by TextGetScrollInfoObj:
@@ -659,17 +676,8 @@ TkTextCreateDInfo(
dInfoPtr->metricEpoch = -1;
dInfoPtr->metricIndex.textPtr = NULL;
dInfoPtr->metricIndex.linePtr = NULL;
-
- /*
- * Add a refCount for each of the idle call-backs.
- */
-
- textPtr->refCount++;
- dInfoPtr->lineUpdateTimer = Tcl_CreateTimerHandler(0,
- AsyncUpdateLineMetrics, textPtr);
- textPtr->refCount++;
- dInfoPtr->scrollbarTimer = Tcl_CreateTimerHandler(200,
- AsyncUpdateYScrollbar, textPtr);
+ dInfoPtr->lineUpdateTimer = NULL;
+ dInfoPtr->scrollbarTimer = NULL;
textPtr->dInfoPtr = dInfoPtr;
}
@@ -756,6 +764,7 @@ GetStyle(
TextStyle *stylePtr;
Tcl_HashEntry *hPtr;
int numTags, isNew, i;
+ int isSelected;
XGCValues gcValues;
unsigned long mask;
/*
@@ -766,6 +775,7 @@ GetStyle(
int fgPrio, fontPrio, fgStipplePrio;
int underlinePrio, elidePrio, justifyPrio, offsetPrio;
int lMargin1Prio, lMargin2Prio, rMarginPrio;
+ int lMarginColorPrio, rMarginColorPrio;
int spacing1Prio, spacing2Prio, spacing3Prio;
int overstrikePrio, tabPrio, tabStylePrio, wrapPrio;
@@ -780,11 +790,14 @@ GetStyle(
fgPrio = fontPrio = fgStipplePrio = -1;
underlinePrio = elidePrio = justifyPrio = offsetPrio = -1;
lMargin1Prio = lMargin2Prio = rMarginPrio = -1;
+ lMarginColorPrio = rMarginColorPrio = -1;
spacing1Prio = spacing2Prio = spacing3Prio = -1;
overstrikePrio = tabPrio = tabStylePrio = wrapPrio = -1;
memset(&styleValues, 0, sizeof(StyleValues));
styleValues.relief = TK_RELIEF_FLAT;
styleValues.fgColor = textPtr->fgColor;
+ styleValues.underlineColor = textPtr->fgColor;
+ styleValues.overstrikeColor = textPtr->fgColor;
styleValues.tkfont = textPtr->tkfont;
styleValues.justify = TK_JUSTIFY_LEFT;
styleValues.spacing1 = textPtr->spacing1;
@@ -794,12 +807,22 @@ GetStyle(
styleValues.tabStyle = textPtr->tabStyle;
styleValues.wrapMode = textPtr->wrapMode;
styleValues.elide = 0;
+ isSelected = 0;
+
+ for (i = 0 ; i < numTags; i++) {
+ if (textPtr->selTagPtr == tagPtrs[i]) {
+ isSelected = 1;
+ break;
+ }
+ }
for (i = 0 ; i < numTags; i++) {
Tk_3DBorder border;
+ XColor *fgColor;
tagPtr = tagPtrs[i];
border = tagPtr->border;
+ fgColor = tagPtr->fgColor;
/*
* If this is the selection tag, and inactiveSelBorder is NULL (the
@@ -819,6 +842,14 @@ GetStyle(
border = textPtr->inactiveSelBorder;
}
+ if ((tagPtr->selBorder != NULL) && (isSelected)) {
+ border = tagPtr->selBorder;
+ }
+
+ if ((tagPtr->selFgColor != None) && (isSelected)) {
+ fgColor = tagPtr->selFgColor;
+ }
+
if ((border != NULL) && (tagPtr->priority > borderPrio)) {
styleValues.border = border;
borderPrio = tagPtr->priority;
@@ -842,8 +873,8 @@ GetStyle(
styleValues.bgStipple = tagPtr->bgStipple;
bgStipplePrio = tagPtr->priority;
}
- if ((tagPtr->fgColor != None) && (tagPtr->priority > fgPrio)) {
- styleValues.fgColor = tagPtr->fgColor;
+ if ((fgColor != None) && (tagPtr->priority > fgPrio)) {
+ styleValues.fgColor = fgColor;
fgPrio = tagPtr->priority;
}
if ((tagPtr->tkfont != None) && (tagPtr->priority > fontPrio)) {
@@ -870,6 +901,11 @@ GetStyle(
styleValues.lMargin2 = tagPtr->lMargin2;
lMargin2Prio = tagPtr->priority;
}
+ if ((tagPtr->lMarginColor != NULL)
+ && (tagPtr->priority > lMarginColorPrio)) {
+ styleValues.lMarginColor = tagPtr->lMarginColor;
+ lMarginColorPrio = tagPtr->priority;
+ }
if ((tagPtr->offsetString != NULL)
&& (tagPtr->priority > offsetPrio)) {
styleValues.offset = tagPtr->offset;
@@ -879,12 +915,22 @@ GetStyle(
&& (tagPtr->priority > overstrikePrio)) {
styleValues.overstrike = tagPtr->overstrike;
overstrikePrio = tagPtr->priority;
+ if (tagPtr->overstrikeColor != None) {
+ styleValues.overstrikeColor = tagPtr->overstrikeColor;
+ } else if (fgColor != None) {
+ styleValues.overstrikeColor = fgColor;
+ }
}
if ((tagPtr->rMarginString != NULL)
&& (tagPtr->priority > rMarginPrio)) {
styleValues.rMargin = tagPtr->rMargin;
rMarginPrio = tagPtr->priority;
}
+ if ((tagPtr->rMarginColor != NULL)
+ && (tagPtr->priority > rMarginColorPrio)) {
+ styleValues.rMarginColor = tagPtr->rMarginColor;
+ rMarginColorPrio = tagPtr->priority;
+ }
if ((tagPtr->spacing1String != NULL)
&& (tagPtr->priority > spacing1Prio)) {
styleValues.spacing1 = tagPtr->spacing1;
@@ -914,6 +960,11 @@ GetStyle(
&& (tagPtr->priority > underlinePrio)) {
styleValues.underline = tagPtr->underline;
underlinePrio = tagPtr->priority;
+ if (tagPtr->underlineColor != None) {
+ styleValues.underlineColor = tagPtr->underlineColor;
+ } else if (fgColor != None) {
+ styleValues.underlineColor = fgColor;
+ }
}
if ((tagPtr->elideString != NULL)
&& (tagPtr->priority > elidePrio)) {
@@ -970,6 +1021,11 @@ GetStyle(
mask |= GCStipple|GCFillStyle;
}
stylePtr->fgGC = Tk_GetGC(textPtr->tkwin, mask, &gcValues);
+ mask = GCForeground;
+ gcValues.foreground = styleValues.underlineColor->pixel;
+ stylePtr->ulGC = Tk_GetGC(textPtr->tkwin, mask, &gcValues);
+ gcValues.foreground = styleValues.overstrikeColor->pixel;
+ stylePtr->ovGC = Tk_GetGC(textPtr->tkwin, mask, &gcValues);
stylePtr->sValuePtr = (StyleValues *)
Tcl_GetHashKey(&textPtr->dInfoPtr->styleTable, hPtr);
stylePtr->hPtr = hPtr;
@@ -1010,6 +1066,12 @@ FreeStyle(
if (stylePtr->fgGC != None) {
Tk_FreeGC(textPtr->display, stylePtr->fgGC);
}
+ if (stylePtr->ulGC != None) {
+ Tk_FreeGC(textPtr->display, stylePtr->ulGC);
+ }
+ if (stylePtr->ovGC != None) {
+ Tk_FreeGC(textPtr->display, stylePtr->ovGC);
+ }
Tcl_DeleteHashEntry(stylePtr->hPtr);
ckfree(stylePtr);
}
@@ -1121,6 +1183,10 @@ LayoutDLine(
dlPtr->nextPtr = NULL;
dlPtr->flags = NEW_LAYOUT | OLD_Y_INVALID;
dlPtr->logicalLinesMerged = 0;
+ dlPtr->lMarginColor = NULL;
+ dlPtr->lMarginWidth = 0;
+ dlPtr->rMarginColor = NULL;
+ dlPtr->rMarginWidth = 0;
/*
* This is not necessarily totally correct, where we have merged logical
@@ -1395,6 +1461,7 @@ LayoutDLine(
x = chunkPtr->stylePtr->sValuePtr->lMargin2;
}
+ dlPtr->lMarginWidth = x;
if (wrapMode == TEXT_WRAPMODE_NONE) {
maxX = -1;
} else {
@@ -1648,7 +1715,7 @@ LayoutDLine(
* Make one more pass over the line to recompute various things like its
* height, length, and total number of bytes. Also modify the x-locations
* of chunks to reflect justification. If we're not wrapping, I'm not sure
- * what is the best way to handle left and center justification: should
+ * what is the best way to handle right and center justification: should
* the total length, for purposes of justification, be (a) the window
* width, (b) the length of the longest line in the window, or (c) the
* length of the longest line in the text? (c) isn't available, (b) seems
@@ -1706,6 +1773,11 @@ LayoutDLine(
}
dlPtr->height += dlPtr->spaceAbove + dlPtr->spaceBelow;
dlPtr->baseline += dlPtr->spaceAbove;
+ dlPtr->lMarginColor = sValuePtr->lMarginColor;
+ dlPtr->rMarginColor = sValuePtr->rMarginColor;
+ if (wrapMode != TEXT_WRAPMODE_NONE) {
+ dlPtr->rMarginWidth = rMargin;
+ }
/*
* Recompute line length: may have changed because of justification.
@@ -2226,7 +2298,7 @@ UpdateDisplayInfo(
* Here's a problem: see the tests textDisp-29.2.1-4
*
* If the widget is being created, but has not yet been configured it will
- * have a maxY of 1 above, and we we won't have examined all the lines
+ * have a maxY of 1 above, and we won't have examined all the lines
* (just the first line, in fact), and so maxOffset will not be a true
* reflection of the widget's lines. Therefore we must not overwrite the
* original newXPixelOffset in this case.
@@ -2392,12 +2464,26 @@ DisplayDLine(
Tk_Width(textPtr->tkwin), dlPtr->height, 0, TK_RELIEF_FLAT);
/*
- * Next, draw background information for the whole line.
+ * Second, draw background information for the whole line.
*/
DisplayLineBackground(textPtr, dlPtr, prevPtr, pixmap);
/*
+ * Third, draw the background color of the left and right margins.
+ */
+ if (dlPtr->lMarginColor != NULL) {
+ Tk_Fill3DRectangle(textPtr->tkwin, pixmap, dlPtr->lMarginColor, 0, y,
+ dlPtr->lMarginWidth + dInfoPtr->x - dInfoPtr->curXPixelOffset,
+ dlPtr->height, 0, TK_RELIEF_FLAT);
+ }
+ if (dlPtr->rMarginColor != NULL) {
+ Tk_Fill3DRectangle(textPtr->tkwin, pixmap, dlPtr->rMarginColor,
+ dInfoPtr->maxX - dlPtr->rMarginWidth + dInfoPtr->curXPixelOffset,
+ y, dlPtr->rMarginWidth, dlPtr->height, 0, TK_RELIEF_FLAT);
+ }
+
+ /*
* Make another pass through all of the chunks to redraw the insertion
* cursor, if it is visible on this line. Must do it here rather than in
* the foreground pass below because otherwise a wide insertion cursor
@@ -2541,7 +2627,7 @@ DisplayLineBackground(
* current x coordinate? */
int matchRight; /* Does line's style match its neighbor just
* to the right of the current x-coord? */
- int minX, maxX, xOffset;
+ int minX, maxX, xOffset, bw;
StyleValues *sValuePtr;
Display *display;
#ifndef TK_NO_DOUBLE_BUFFERING
@@ -2612,16 +2698,25 @@ DisplayLineBackground(
rightX = leftX + 32767;
}
+ /*
+ * Prevent the borders from leaking on adjacent characters,
+ * which would happen for too large border width.
+ */
+
+ bw = sValuePtr->borderWidth;
+ if (leftX + sValuePtr->borderWidth > rightX) {
+ bw = rightX - leftX;
+ }
+
XFillRectangle(display, pixmap, chunkPtr->stylePtr->bgGC,
leftX + xOffset, y, (unsigned int) (rightX - leftX),
(unsigned int) dlPtr->height);
if (sValuePtr->relief != TK_RELIEF_FLAT) {
Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border,
- leftX + xOffset, y, sValuePtr->borderWidth,
- dlPtr->height, 1, sValuePtr->relief);
+ leftX + xOffset, y, bw, dlPtr->height, 1,
+ sValuePtr->relief);
Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border,
- rightX - sValuePtr->borderWidth + xOffset,
- y, sValuePtr->borderWidth, dlPtr->height, 0,
+ rightX - bw + xOffset, y, bw, dlPtr->height, 0,
sValuePtr->relief);
}
}
@@ -2718,22 +2813,29 @@ DisplayLineBackground(
matchRight = (nextPtr2 != NULL)
&& SAME_BACKGROUND(nextPtr2->stylePtr, chunkPtr->stylePtr);
if (matchLeft && !matchRight) {
+ bw = sValuePtr->borderWidth;
+ if (rightX2 - sValuePtr->borderWidth < leftX) {
+ bw = rightX2 - leftX;
+ }
if (sValuePtr->relief != TK_RELIEF_FLAT) {
Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border,
- rightX2 - sValuePtr->borderWidth + xOffset, y,
- sValuePtr->borderWidth, sValuePtr->borderWidth, 0,
- sValuePtr->relief);
+ rightX2 - bw + xOffset, y, bw,
+ sValuePtr->borderWidth, 0, sValuePtr->relief);
}
- leftX = rightX2 - sValuePtr->borderWidth;
+ leftX = rightX2 - bw;
leftXIn = 0;
} else if (!matchLeft && matchRight
&& (sValuePtr->relief != TK_RELIEF_FLAT)) {
+ bw = sValuePtr->borderWidth;
+ if (rightX2 + sValuePtr->borderWidth > rightX) {
+ bw = rightX - rightX2;
+ }
Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border,
- rightX2 + xOffset, y, sValuePtr->borderWidth,
- sValuePtr->borderWidth, 1, sValuePtr->relief);
+ rightX2 + xOffset, y, bw, sValuePtr->borderWidth,
+ 1, sValuePtr->relief);
Tk_3DHorizontalBevel(textPtr->tkwin, pixmap, sValuePtr->border,
- leftX + xOffset, y, rightX2 + sValuePtr->borderWidth -
- leftX, sValuePtr->borderWidth, leftXIn, 0, 1,
+ leftX + xOffset, y, rightX2 + bw - leftX,
+ sValuePtr->borderWidth, leftXIn, 0, 1,
sValuePtr->relief);
}
@@ -2765,7 +2867,7 @@ DisplayLineBackground(
chunkPtr2 = NULL;
if (dlPtr->nextPtr != NULL && dlPtr->nextPtr->chunkPtr != NULL) {
/*
- * Find the chunk in the previous line that covers leftX.
+ * Find the chunk in the next line that covers leftX.
*/
nextPtr2 = dlPtr->nextPtr->chunkPtr;
@@ -2821,26 +2923,33 @@ DisplayLineBackground(
matchRight = (nextPtr2 != NULL)
&& SAME_BACKGROUND(nextPtr2->stylePtr, chunkPtr->stylePtr);
if (matchLeft && !matchRight) {
+ bw = sValuePtr->borderWidth;
+ if (rightX2 - sValuePtr->borderWidth < leftX) {
+ bw = rightX2 - leftX;
+ }
if (sValuePtr->relief != TK_RELIEF_FLAT) {
Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border,
- rightX2 - sValuePtr->borderWidth + xOffset,
+ rightX2 - bw + xOffset,
y + dlPtr->height - sValuePtr->borderWidth,
- sValuePtr->borderWidth, sValuePtr->borderWidth, 0,
- sValuePtr->relief);
+ bw, sValuePtr->borderWidth, 0, sValuePtr->relief);
}
- leftX = rightX2 - sValuePtr->borderWidth;
+ leftX = rightX2 - bw;
leftXIn = 1;
} else if (!matchLeft && matchRight
&& (sValuePtr->relief != TK_RELIEF_FLAT)) {
+ bw = sValuePtr->borderWidth;
+ if (rightX2 + sValuePtr->borderWidth > rightX) {
+ bw = rightX - rightX2;
+ }
Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border,
- rightX2 + xOffset, y + dlPtr->height -
- sValuePtr->borderWidth, sValuePtr->borderWidth,
+ rightX2 + xOffset,
+ y + dlPtr->height - sValuePtr->borderWidth, bw,
sValuePtr->borderWidth, 1, sValuePtr->relief);
Tk_3DHorizontalBevel(textPtr->tkwin, pixmap, sValuePtr->border,
- leftX + xOffset, y + dlPtr->height -
- sValuePtr->borderWidth, rightX2 + sValuePtr->borderWidth -
- leftX, sValuePtr->borderWidth, leftXIn, 1, 0,
- sValuePtr->relief);
+ leftX + xOffset,
+ y + dlPtr->height - sValuePtr->borderWidth,
+ rightX2 + bw - leftX, sValuePtr->borderWidth, leftXIn,
+ 1, 0, sValuePtr->relief);
}
nextChunk2b:
@@ -2890,9 +2999,10 @@ AsyncUpdateLineMetrics(
dInfoPtr->lineUpdateTimer = NULL;
- if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)) {
+ if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)
+ || !Tk_IsMapped(textPtr->tkwin)) {
/*
- * The widget has been deleted. Don't do anything.
+ * The widget has been deleted, or is not mapped. Don't do anything.
*/
if (--textPtr->refCount == 0) {
@@ -2926,6 +3036,8 @@ AsyncUpdateLineMetrics(
lineNum = TkTextUpdateLineMetrics(textPtr, lineNum,
dInfoPtr->lastMetricUpdateLine, 256);
+ dInfoPtr->currentMetricUpdateLine = lineNum;
+
if (tkTextDebug) {
char buffer[2 * TCL_INTEGER_SPACE + 1];
@@ -2943,16 +3055,37 @@ AsyncUpdateLineMetrics(
/*
* We have looped over all lines, so we're done. We must release our
* refCount on the widget (the timer token was already set to NULL
- * above).
+ * above). If there is a registered aftersync command, run that first.
*/
+ if (textPtr->afterSyncCmd) {
+ int code;
+ Tcl_Preserve((ClientData) textPtr->interp);
+ 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_Release((ClientData) textPtr->interp);
+ Tcl_DecrRefCount(textPtr->afterSyncCmd);
+ textPtr->afterSyncCmd = NULL;
+ }
+
+ /*
+ * Fire the <<WidgetViewSync>> event since the widget view is in sync
+ * with its internal data (actually it will be after the next trip
+ * through the event loop, because the widget redraws at idle-time).
+ */
+
+ GenerateWidgetViewSyncEvent(textPtr, 1);
+
textPtr->refCount--;
if (textPtr->refCount == 0) {
ckfree(textPtr);
}
return;
}
- dInfoPtr->currentMetricUpdateLine = lineNum;
/*
* Re-arm the timer. We already have a refCount on the text widget so no
@@ -2966,6 +3099,36 @@ AsyncUpdateLineMetrics(
/*
*----------------------------------------------------------------------
*
+ * GenerateWidgetViewSyncEvent --
+ *
+ * Send the <<WidgetViewSync>> event related to the text widget
+ * line metrics asynchronous update.
+ * This is equivalent to:
+ * event generate $textWidget <<WidgetViewSync>> -data $s
+ * where $s is the sync status: true (when the widget view is in
+ * sync with its internal data) or false (when it is not).
+ *
+ * Results:
+ * None
+ *
+ * Side effects:
+ * If corresponding bindings are present, they will trigger.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+GenerateWidgetViewSyncEvent(
+ TkText *textPtr, /* Information about text widget. */
+ Bool InSync) /* true if in sync, false otherwise */
+{
+ TkSendVirtualEvent(textPtr->tkwin, "WidgetViewSync",
+ Tcl_NewBooleanObj(InSync));
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
* TkTextUpdateLineMetrics --
*
* This function updates the pixel height calculations of a range of
@@ -3338,6 +3501,7 @@ TextInvalidateLineMetrics(
textPtr->refCount++;
dInfoPtr->lineUpdateTimer = Tcl_CreateTimerHandler(1,
AsyncUpdateLineMetrics, textPtr);
+ GenerateWidgetViewSyncEvent(textPtr, 0);
}
}
@@ -3948,6 +4112,18 @@ DisplayText(
* warnings. */
Tcl_Interp *interp;
+#ifdef MAC_OSX_TK
+ /*
+ * If drawing is disabled, all we need to do is
+ * clear the REDRAW_PENDING flag.
+ */
+ TkWindow *winPtr = (TkWindow *)(textPtr->tkwin);
+ MacDrawable *macWin = winPtr->privatePtr;
+ if (macWin && (macWin->flags & TK_DO_NOT_DRAW)){
+ dInfoPtr->flags &= ~REDRAW_PENDING;
+ return;
+ }
+#endif
if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)) {
/*
@@ -3964,14 +4140,6 @@ DisplayText(
Tcl_SetVar2(interp, "tk_textRelayout", NULL, "", TCL_GLOBAL_ONLY);
}
- if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)) {
- /*
- * The widget has been deleted. Don't do anything.
- */
-
- goto end;
- }
-
if (!Tk_IsMapped(textPtr->tkwin) || (dInfoPtr->maxX <= dInfoPtr->x)
|| (dInfoPtr->maxY <= dInfoPtr->y)) {
UpdateDisplayInfo(textPtr);
@@ -3983,14 +4151,6 @@ DisplayText(
Tcl_SetVar2(interp, "tk_textRedraw", NULL, "", TCL_GLOBAL_ONLY);
}
- if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)) {
- /*
- * The widget has been deleted. Don't do anything.
- */
-
- goto end;
- }
-
/*
* Choose a new current item if that is needed (this could cause event
* handlers to be invoked, hence the preserve/release calls and the loop,
@@ -5046,6 +5206,7 @@ TkTextRelayoutWindow(
textPtr->refCount++;
dInfoPtr->lineUpdateTimer = Tcl_CreateTimerHandler(1,
AsyncUpdateLineMetrics, textPtr);
+ GenerateWidgetViewSyncEvent(textPtr, 0);
}
}
}
@@ -5157,7 +5318,10 @@ TkTextSetYView(
dInfoPtr->newTopPixelOffset = 0;
goto scheduleUpdate;
- }
+ }
+ /*
+ * The line is already on screen, with no need to scroll.
+ */
return;
}
}
@@ -5220,6 +5384,15 @@ TkTextSetYView(
}
/*
+ * If the window height is smaller than the line height, prefer to make
+ * the top of the line visible.
+ */
+
+ if (dInfoPtr->maxY - dInfoPtr->y < lineHeight) {
+ bottomY = lineHeight;
+ }
+
+ /*
* Our job now is to arrange the display so that indexPtr appears as low
* on the screen as possible but with its bottom no lower than bottomY.
* BottomY is the bottom of the window if the desired line is just below
@@ -6039,6 +6212,35 @@ TkTextYviewCmd(
/*
*--------------------------------------------------------------
*
+ * TkTextPendingsync --
+ *
+ * This function checks if any line heights are not up-to-date.
+ *
+ * Results:
+ * Returns a boolean true if it is the case, or false if all line
+ * heights are up-to-date.
+ *
+ * Side effects:
+ * None.
+ *
+ *--------------------------------------------------------------
+ */
+
+Bool
+TkTextPendingsync(
+ TkText *textPtr) /* Information about text widget. */
+{
+ TextDInfo *dInfoPtr = textPtr->dInfoPtr;
+
+ return (
+ ((dInfoPtr->metricEpoch == -1) &&
+ (dInfoPtr->lastMetricUpdateLine == dInfoPtr->currentMetricUpdateLine)) ?
+ 0 : 1);
+}
+
+/*
+ *--------------------------------------------------------------
+ *
* TkTextScanCmd --
*
* This function is invoked to process the "scan" option for the widget
@@ -6582,6 +6784,7 @@ FindDLine(
const TkTextIndex *indexPtr)/* Index of desired character. */
{
DLine *dlPtrPrev;
+ TkTextIndex indexPtr2;
if (dlPtr == NULL) {
return NULL;
@@ -6606,24 +6809,58 @@ FindDLine(
dlPtrPrev = dlPtr;
dlPtr = dlPtr->nextPtr;
if (dlPtr == NULL) {
- TkTextIndex indexPtr2;
/*
* We're past the last display line, either because the desired
* index lies past the visible text, or because the desired index
- * is on the last display line showing the last logical line.
+ * is on the last display line.
*/
indexPtr2 = dlPtrPrev->index;
TkTextIndexForwBytes(textPtr, &indexPtr2, dlPtrPrev->byteCount,
&indexPtr2);
if (TkTextIndexCmp(&indexPtr2,indexPtr) > 0) {
+ /*
+ * The desired index is on the last display line.
+ * --> return this display line.
+ */
dlPtr = dlPtrPrev;
- break;
} else {
- return NULL;
+ /*
+ * The desired index is past the visible text. There is no
+ * display line displaying something at the desired index.
+ * --> return NULL.
+ */
}
+ break;
}
if (TkTextIndexCmp(&dlPtr->index,indexPtr) > 0) {
- dlPtr = dlPtrPrev;
+ /*
+ * If we're here then we would normally expect that:
+ * dlPtrPrev->index <= indexPtr < dlPtr->index
+ * i.e. we have found the searched display line being dlPtr.
+ * However it is possible that some DLines were unlinked
+ * previously, leading to a situation where going through
+ * the list of display lines skips display lines that did
+ * exist just a moment ago.
+ */
+ indexPtr2 = dlPtrPrev->index;
+ TkTextIndexForwBytes(textPtr, &indexPtr2, dlPtrPrev->byteCount,
+ &indexPtr2);
+ if (TkTextIndexCmp(&indexPtr2,indexPtr) > 0) {
+ /*
+ * Confirmed:
+ * dlPtrPrev->index <= indexPtr < dlPtr->index
+ * --> return dlPtrPrev.
+ */
+ dlPtr = dlPtrPrev;
+ } else {
+ /*
+ * The last (rightmost) index shown by dlPtrPrev is still
+ * before the desired index. This may be because there was
+ * previously a display line between dlPtrPrev and dlPtr
+ * and this display line has been unlinked.
+ * --> return dlPtr.
+ */
+ }
break;
}
}
@@ -6653,7 +6890,7 @@ FindDLine(
static int
IsStartOfNotMergedLine(
TkText *textPtr, /* Widget record for text widget. */
- CONST TkTextIndex *indexPtr) /* Index to check. */
+ const TkTextIndex *indexPtr) /* Index to check. */
{
TkTextIndex indexPtr2;
@@ -7029,7 +7266,7 @@ TkTextIndexBbox(
dlPtr = FindDLine(textPtr, dInfoPtr->dLinePtr, indexPtr);
- /*
+ /*
* Two cases shall be trapped here because the logic later really
* needs dlPtr to be the display line containing indexPtr:
* 1. if no display line contains the desired index (NULL dlPtr)
@@ -7173,7 +7410,7 @@ TkTextDLineInfo(
dlPtr = FindDLine(textPtr, dInfoPtr->dLinePtr, indexPtr);
- /*
+ /*
* Two cases shall be trapped here because the logic later really
* needs dlPtr to be the display line containing indexPtr:
* 1. if no display line contains the desired index (NULL dlPtr)
@@ -7344,8 +7581,8 @@ TkTextCharLayoutProc(
if (bytesThatFit < maxBytes) {
if ((bytesThatFit == 0) && noCharsYet) {
- Tcl_UniChar ch;
- int chLen = Tcl_UtfToUniChar(p, &ch);
+ int ch;
+ int chLen = TkUtfToUniChar(p, &ch);
#if TK_LAYOUT_WITH_BASE_CHUNKS
bytesThatFit = CharChunkMeasureChars(chunkPtr, line,
@@ -7693,7 +7930,7 @@ CharDisplayProc(
y + baseline - sValuePtr->offset);
if (sValuePtr->underline) {
- TkUnderlineCharsInContext(display, dst, stylePtr->fgGC,
+ TkUnderlineCharsInContext(display, dst, stylePtr->ulGC,
sValuePtr->tkfont, string, numBytes,
ciPtr->baseChunkPtr->x + xDisplacement,
y + baseline - sValuePtr->offset,
@@ -7703,7 +7940,7 @@ CharDisplayProc(
Tk_FontMetrics fm;
Tk_GetFontMetrics(sValuePtr->tkfont, &fm);
- TkUnderlineCharsInContext(display, dst, stylePtr->fgGC,
+ TkUnderlineCharsInContext(display, dst, stylePtr->ovGC,
sValuePtr->tkfont, string, numBytes,
ciPtr->baseChunkPtr->x + xDisplacement,
y + baseline - sValuePtr->offset
@@ -7720,7 +7957,7 @@ CharDisplayProc(
Tk_DrawChars(display, dst, stylePtr->fgGC, sValuePtr->tkfont, string,
numBytes, offsetX, y + baseline - sValuePtr->offset);
if (sValuePtr->underline) {
- Tk_UnderlineChars(display, dst, stylePtr->fgGC, sValuePtr->tkfont,
+ Tk_UnderlineChars(display, dst, stylePtr->ulGC, sValuePtr->tkfont,
string, offsetX,
y + baseline - sValuePtr->offset,
0, numBytes);
@@ -7730,7 +7967,7 @@ CharDisplayProc(
Tk_FontMetrics fm;
Tk_GetFontMetrics(sValuePtr->tkfont, &fm);
- Tk_UnderlineChars(display, dst, stylePtr->fgGC, sValuePtr->tkfont,
+ Tk_UnderlineChars(display, dst, stylePtr->ovGC, sValuePtr->tkfont,
string, offsetX,
y + baseline - sValuePtr->offset
- fm.descent - (fm.ascent * 3) / 10,
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c
index 70f74fb..7aebc84 100644
--- a/generic/tkTextIndex.c
+++ b/generic/tkTextIndex.c
@@ -40,9 +40,9 @@ static const char * StartEnd(TkText *textPtr, const char *string,
static int GetIndex(Tcl_Interp *interp, TkSharedText *sharedPtr,
TkText *textPtr, const char *string,
TkTextIndex *indexPtr, int *canCachePtr);
-static int IndexCountBytesOrdered(CONST TkText *textPtr,
- CONST TkTextIndex *indexPtr1,
- CONST TkTextIndex *indexPtr2);
+static int IndexCountBytesOrdered(const TkText *textPtr,
+ const TkTextIndex *indexPtr1,
+ const TkTextIndex *indexPtr2);
/*
* The "textindex" Tcl_Obj definition:
@@ -1636,9 +1636,9 @@ TkTextIndexForwChars(
int
TkTextIndexCountBytes(
- CONST TkText *textPtr,
- CONST TkTextIndex *indexPtr1, /* Index describing one location. */
- CONST TkTextIndex *indexPtr2) /* Index describing second location. */
+ const TkText *textPtr,
+ const TkTextIndex *indexPtr1, /* Index describing one location. */
+ const TkTextIndex *indexPtr2) /* Index describing second location. */
{
int compare = TkTextIndexCmp(indexPtr1, indexPtr2);
@@ -1653,11 +1653,11 @@ TkTextIndexCountBytes(
static int
IndexCountBytesOrdered(
- CONST TkText *textPtr,
- CONST TkTextIndex *indexPtr1,
+ const TkText *textPtr,
+ const TkTextIndex *indexPtr1,
/* Index describing location of character from
* which to count. */
- CONST TkTextIndex *indexPtr2)
+ const TkTextIndex *indexPtr2)
/* Index describing location of last character
* at which to stop the count. */
{
@@ -1683,7 +1683,7 @@ IndexCountBytesOrdered(
byteCount += segPtr->size;
}
- linePtr = indexPtr1->linePtr->nextPtr;
+ linePtr = TkBTreeNextLine(textPtr, indexPtr1->linePtr);
while (linePtr != indexPtr2->linePtr) {
for (segPtr = linePtr->segPtr; segPtr != NULL;
segPtr = segPtr->nextPtr) {
@@ -2205,7 +2205,7 @@ StartEnd(
TkText *textPtr, /* Information about text widget. */
const char *string, /* String to parse for additional info about
* modifier (count and units). Points to first
- * character of modifer word. */
+ * character of modifier word. */
TkTextIndex *indexPtr) /* Index to modify based on string. */
{
const char *p;
@@ -2298,9 +2298,9 @@ StartEnd(
int chSize = 1;
if (segPtr->typePtr == &tkTextCharType) {
- Tcl_UniChar ch;
+ int ch;
- chSize = Tcl_UtfToUniChar(segPtr->body.chars + offset, &ch);
+ chSize = TkUtfToUniChar(segPtr->body.chars + offset, &ch);
if (!Tcl_UniCharIsWordChar(ch)) {
break;
}
@@ -2327,7 +2327,7 @@ StartEnd(
int offset;
if (modifier == TKINDEX_DISPLAY) {
- TkTextIndexForwChars(NULL, indexPtr, 0, indexPtr,
+ TkTextIndexForwChars(textPtr, indexPtr, 0, indexPtr,
COUNT_DISPLAY_INDICES);
}
@@ -2343,9 +2343,9 @@ StartEnd(
int chSize = 1;
if (segPtr->typePtr == &tkTextCharType) {
- Tcl_UniChar ch;
- Tcl_UtfToUniChar(segPtr->body.chars + offset, &ch);
+ int ch;
+ TkUtfToUniChar(segPtr->body.chars + offset, &ch);
if (!Tcl_UniCharIsWordChar(ch)) {
break;
}
@@ -2356,11 +2356,20 @@ StartEnd(
}
firstChar = 0;
}
- offset -= chSize;
- indexPtr->byteIndex -= chSize;
+ if (offset == 0) {
+ if (modifier == TKINDEX_DISPLAY) {
+ TkTextIndexBackChars(textPtr, indexPtr, 1, indexPtr,
+ COUNT_DISPLAY_INDICES);
+ } else {
+ TkTextIndexBackChars(NULL, indexPtr, 1, indexPtr,
+ COUNT_INDICES);
+ }
+ } else {
+ indexPtr->byteIndex -= chSize;
+ }
+ offset -= chSize;
if (offset < 0) {
- if (indexPtr->byteIndex < 0) {
- indexPtr->byteIndex = 0;
+ if (indexPtr->byteIndex == 0) {
goto done;
}
segPtr = TkTextIndexToSeg(indexPtr, &offset);
diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c
index af3f235..dd3127d 100644
--- a/generic/tkTextTag.c
+++ b/generic/tkTextTag.c
@@ -30,7 +30,7 @@ static const char *const wrapStrings[] = {
/*
* The 'TkTextTabStyle' enum in tkText.h is used to define a type for the
* -tabstyle option of the Text widget. These values are used as indices into
- * the string table below. Tags are allowed an empty wrap value, but the
+ * the string table below. Tags are allowed an empty tabstyle value, but the
* widget as a whole is not.
*/
@@ -44,11 +44,11 @@ static const Tk_OptionSpec tagOptionSpecs[] = {
{TK_OPTION_BITMAP, "-bgstipple", NULL, NULL,
NULL, -1, Tk_Offset(TkTextTag, bgStipple), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-borderwidth", NULL, NULL,
- "0", Tk_Offset(TkTextTag, borderWidthPtr), Tk_Offset(TkTextTag, borderWidth),
- TK_OPTION_DONT_SET_DEFAULT|TK_OPTION_NULL_OK, 0, 0},
+ NULL, Tk_Offset(TkTextTag, borderWidthPtr), Tk_Offset(TkTextTag, borderWidth),
+ TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, 0, 0},
{TK_OPTION_STRING, "-elide", NULL, NULL,
- "0", -1, Tk_Offset(TkTextTag, elideString),
- TK_OPTION_DONT_SET_DEFAULT|TK_OPTION_NULL_OK, 0, 0},
+ NULL, -1, Tk_Offset(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},
{TK_OPTION_FONT, "-font", NULL, NULL,
@@ -61,15 +61,26 @@ static const Tk_OptionSpec tagOptionSpecs[] = {
NULL, -1, Tk_Offset(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},
+ {TK_OPTION_BORDER, "-lmargincolor", NULL, NULL,
+ NULL, -1, Tk_Offset(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},
{TK_OPTION_STRING, "-overstrike", NULL, NULL,
NULL, -1, Tk_Offset(TkTextTag, overstrikeString),
TK_OPTION_NULL_OK, 0, 0},
+ {TK_OPTION_COLOR, "-overstrikefg", NULL, NULL,
+ NULL, -1, Tk_Offset(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},
{TK_OPTION_STRING, "-rmargin", NULL, NULL,
NULL, -1, Tk_Offset(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},
+ {TK_OPTION_BORDER, "-selectbackground", NULL, NULL,
+ NULL, -1, Tk_Offset(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},
{TK_OPTION_STRING, "-spacing1", NULL, NULL,
NULL, -1, Tk_Offset(TkTextTag, spacing1String), TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-spacing2", NULL, NULL,
@@ -84,6 +95,9 @@ static const Tk_OptionSpec tagOptionSpecs[] = {
{TK_OPTION_STRING, "-underline", NULL, NULL,
NULL, -1, Tk_Offset(TkTextTag, underlineString),
TK_OPTION_NULL_OK, 0, 0},
+ {TK_OPTION_COLOR, "-underlinefg", NULL, NULL,
+ NULL, -1, Tk_Offset(TkTextTag, underlineColor),
+ TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-wrap", NULL, NULL,
NULL, -1, Tk_Offset(TkTextTag, wrapMode),
TK_OPTION_NULL_OK, wrapStrings, 0},
@@ -484,10 +498,18 @@ TkTextTagCmd(
*/
if (tagPtr == textPtr->selTagPtr) {
- textPtr->selBorder = tagPtr->border;
+ if (tagPtr->selBorder == NULL) {
+ textPtr->selBorder = tagPtr->border;
+ } else {
+ textPtr->selBorder = tagPtr->selBorder;
+ }
textPtr->selBorderWidth = tagPtr->borderWidth;
textPtr->selBorderWidthPtr = tagPtr->borderWidthPtr;
- textPtr->selFgColorPtr = tagPtr->fgColor;
+ if (tagPtr->selFgColor == NULL) {
+ textPtr->selFgColorPtr = tagPtr->fgColor;
+ } else {
+ textPtr->selFgColorPtr = tagPtr->selFgColor;
+ }
}
tagPtr->affectsDisplay = 0;
@@ -509,12 +531,18 @@ TkTextTagCmd(
tagPtr->affectsDisplayGeometry = 1;
}
if ((tagPtr->border != NULL)
+ || (tagPtr->selBorder != NULL)
|| (tagPtr->reliefString != NULL)
|| (tagPtr->bgStipple != None)
|| (tagPtr->fgColor != NULL)
+ || (tagPtr->selFgColor != NULL)
|| (tagPtr->fgStipple != None)
|| (tagPtr->overstrikeString != NULL)
- || (tagPtr->underlineString != NULL)) {
+ || (tagPtr->overstrikeColor != NULL)
+ || (tagPtr->underlineString != NULL)
+ || (tagPtr->underlineColor != NULL)
+ || (tagPtr->lMarginColor != NULL)
+ || (tagPtr->rMarginColor != NULL)) {
tagPtr->affectsDisplay = 1;
}
if (!newTag) {
@@ -1011,12 +1039,17 @@ TkTextCreateTag(
tagPtr->lMargin1 = 0;
tagPtr->lMargin2String = NULL;
tagPtr->lMargin2 = 0;
+ tagPtr->lMarginColor = NULL;
tagPtr->offsetString = NULL;
tagPtr->offset = 0;
tagPtr->overstrikeString = NULL;
tagPtr->overstrike = 0;
+ tagPtr->overstrikeColor = NULL;
tagPtr->rMarginString = NULL;
tagPtr->rMargin = 0;
+ tagPtr->rMarginColor = NULL;
+ tagPtr->selBorder = NULL;
+ tagPtr->selFgColor = NULL;
tagPtr->spacing1String = NULL;
tagPtr->spacing1 = 0;
tagPtr->spacing2String = NULL;
@@ -1028,6 +1061,7 @@ TkTextCreateTag(
tagPtr->tabStyle = TK_TEXT_TABSTYLE_NONE;
tagPtr->underlineString = NULL;
tagPtr->underline = 0;
+ tagPtr->underlineColor = NULL;
tagPtr->elideString = NULL;
tagPtr->elide = 0;
tagPtr->wrapMode = TEXT_WRAPMODE_NULL;
diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c
index bd61d75..c9fc20f 100644
--- a/generic/tkTextWind.c
+++ b/generic/tkTextWind.c
@@ -1134,6 +1134,16 @@ TkTextEmbWinDisplayProc(
&lineX, &windowY, &width, &height);
windowX = lineX - chunkPtr->x + x;
+ /*
+ * Mark the window as displayed so that it won't get unmapped.
+ * This needs to be done before the next instruction block because
+ * Tk_MaintainGeometry/Tk_MapWindow will run event handlers, in
+ * particular for the <Map> event, and if the bound script deletes
+ * the embedded window its clients will get freed.
+ */
+
+ client->displayed = 1;
+
if (textPtr->tkwin == Tk_Parent(tkwin)) {
if ((windowX != Tk_X(tkwin)) || (windowY != Tk_Y(tkwin))
|| (Tk_ReqWidth(tkwin) != Tk_Width(tkwin))
@@ -1145,12 +1155,6 @@ TkTextEmbWinDisplayProc(
Tk_MaintainGeometry(tkwin, textPtr->tkwin, windowX, windowY,
width, height);
}
-
- /*
- * Mark the window as displayed so that it won't get unmapped.
- */
-
- client->displayed = 1;
}
/*
diff --git a/generic/tkUndo.c b/generic/tkUndo.c
index 8359e0a..c66905d 100644
--- a/generic/tkUndo.c
+++ b/generic/tkUndo.c
@@ -353,7 +353,7 @@ TkUndoInitStack(
/*
*----------------------------------------------------------------------
*
- * TkUndoSetDepth --
+ * TkUndoSetMaxDepth --
*
* Set the maximum depth of stack.
*
@@ -368,7 +368,7 @@ TkUndoInitStack(
*/
void
-TkUndoSetDepth(
+TkUndoSetMaxDepth(
TkUndoRedoStack *stack, /* An Undo/Redo stack */
int maxdepth) /* The maximum stack depth */
{
@@ -478,6 +478,52 @@ TkUndoFreeStack(
/*
*----------------------------------------------------------------------
*
+ * TkUndoCanRedo --
+ *
+ * Returns true if redo is possible, i.e. if the redo stack is not empty.
+ *
+ * Results:
+ * A boolean.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TkUndoCanRedo(
+ TkUndoRedoStack *stack) /* An Undo/Redo stack */
+{
+ return stack->redoStack != NULL;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TkUndoCanUndo --
+ *
+ * Returns true if undo is possible, i.e. if the undo stack is not empty.
+ *
+ * Results:
+ * A boolean.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TkUndoCanUndo(
+ TkUndoRedoStack *stack) /* An Undo/Redo stack */
+{
+ return stack->undoStack != NULL;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
* TkUndoInsertUndoSeparator --
*
* Insert a separator on the undo stack, indicating a border for an
@@ -498,7 +544,7 @@ TkUndoInsertUndoSeparator(
{
if (TkUndoInsertSeparator(&stack->undoStack)) {
stack->depth++;
- TkUndoSetDepth(stack, stack->maxdepth);
+ TkUndoSetMaxDepth(stack, stack->maxdepth);
}
}
diff --git a/generic/tkUndo.h b/generic/tkUndo.h
index e63aac4..490ede9 100644
--- a/generic/tkUndo.h
+++ b/generic/tkUndo.h
@@ -96,9 +96,11 @@ MODULE_SCOPE void TkUndoClearStack(TkUndoAtom **stack);
*/
MODULE_SCOPE TkUndoRedoStack *TkUndoInitStack(Tcl_Interp *interp, int maxdepth);
-MODULE_SCOPE void TkUndoSetDepth(TkUndoRedoStack *stack, int maxdepth);
+MODULE_SCOPE void TkUndoSetMaxDepth(TkUndoRedoStack *stack, int maxdepth);
MODULE_SCOPE void TkUndoClearStacks(TkUndoRedoStack *stack);
MODULE_SCOPE void TkUndoFreeStack(TkUndoRedoStack *stack);
+MODULE_SCOPE int TkUndoCanRedo(TkUndoRedoStack *stack);
+MODULE_SCOPE int TkUndoCanUndo(TkUndoRedoStack *stack);
MODULE_SCOPE void TkUndoInsertUndoSeparator(TkUndoRedoStack *stack);
MODULE_SCOPE TkUndoSubAtom *TkUndoMakeCmdSubAtom(Tcl_Command command,
Tcl_Obj *actionScript, TkUndoSubAtom *subAtomList);
diff --git a/generic/tkUtil.c b/generic/tkUtil.c
index 7ff9ecb..d89282f 100644
--- a/generic/tkUtil.c
+++ b/generic/tkUtil.c
@@ -1162,7 +1162,8 @@ TkMakeEnsemble(
* TkSendVirtualEvent --
*
* Send a virtual event notification to the specified target window.
- * Equivalent to "event generate $target <<$eventName>>"
+ * Equivalent to:
+ * "event generate $target <<$eventName>> -data $detail"
*
* Note that we use Tk_QueueWindowEvent, not Tk_HandleEvent, so this
* routine does not reenter the interpreter.
@@ -1173,7 +1174,8 @@ TkMakeEnsemble(
void
TkSendVirtualEvent(
Tk_Window target,
- const char *eventName)
+ const char *eventName,
+ Tcl_Obj *detail)
{
union {XEvent general; XVirtualEvent virtual;} event;
@@ -1184,9 +1186,92 @@ TkSendVirtualEvent(
event.general.xany.window = Tk_WindowId(target);
event.general.xany.display = Tk_Display(target);
event.virtual.name = Tk_GetUid(eventName);
+ if (detail != NULL) {
+ event.virtual.user_data = detail;
+ }
Tk_QueueWindowEvent(&event.general, TCL_QUEUE_TAIL);
}
+
+#if TCL_UTF_MAX <= 4
+/*
+ *---------------------------------------------------------------------------
+ *
+ * TkUtfToUniChar --
+ *
+ * Almost the same as Tcl_UtfToUniChar but using int instead of Tcl_UniChar.
+ * This function is capable of collapsing a upper/lower surrogate pair to a
+ * single unicode character. So, up to 6 bytes might be consumed.
+ *
+ * Results:
+ * *chPtr is filled with the Tcl_UniChar, and the return value is the
+ * number of bytes from the UTF-8 string that were consumed.
+ *
+ * Side effects:
+ * None.
+ *
+ *---------------------------------------------------------------------------
+ */
+
+int
+TkUtfToUniChar(
+ const char *src, /* The UTF-8 string. */
+ int *chPtr) /* Filled with the Tcl_UniChar represented by
+ * the UTF-8 string. */
+{
+ Tcl_UniChar uniChar = 0;
+
+ int len = Tcl_UtfToUniChar(src, &uniChar);
+ if ((uniChar & 0xfc00) == 0xd800) {
+ Tcl_UniChar high = 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, &uniChar);
+ if ((uniChar & 0xfc00) == 0xdc00) {
+ *chPtr = (((high & 0x3ff) << 10) | (uniChar & 0x3ff)) + 0x10000;
+ len += len2;
+ } else {
+ *chPtr = high;
+ }
+ } else {
+ *chPtr = uniChar;
+ }
+ return len;
+}
+
+/*
+ *---------------------------------------------------------------------------
+ *
+ * TkUniCharToUtf --
+ *
+ * Almost the same as Tcl_UniCharToUtf but producing surrogates if
+ * TCL_UTF_MAX==3. So, up to 6 bytes might be produced.
+ *
+ * Results:
+ * *buf is filled with the UTF-8 string, and the return value is the
+ * number of bytes produced.
+ *
+ * Side effects:
+ * None.
+ *
+ *---------------------------------------------------------------------------
+ */
+
+int TkUniCharToUtf(int ch, char *buf)
+{
+ int size = Tcl_UniCharToUtf(ch, buf);
+ if ((ch > 0xffff) && (ch <= 0x10ffff) && (size < 4)) {
+ /* Hey, this is wrong, we must be running TCL_UTF_MAX==3
+ * The best thing we can do is spit out 2 surrogates */
+ ch -= 0x10000;
+ size = Tcl_UniCharToUtf(((ch >> 10) | 0xd800), buf);
+ size += Tcl_UniCharToUtf(((ch & 0x3ff) | 0xdc00), buf+size);
+ }
+ return size;
+}
+
+
+#endif
/*
* Local Variables:
* mode: c
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index b5cbbab..5855b7c 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -54,12 +54,6 @@ typedef struct ThreadSpecificData {
static Tcl_ThreadDataKey dataKey;
/*
- * The Mutex below is used to lock access to the Tk_Uid structs above.
- */
-
-TCL_DECLARE_MUTEX(windowMutex)
-
-/*
* Default values for "changes" and "atts" fields of TkWindows. Note that Tk
* always requests all events for all windows, except StructureNotify events
* on internal windows: these events are generated internally.
@@ -206,40 +200,6 @@ static const TkCmd commands[] = {
};
/*
- * The variables and table below are used to parse arguments from the "argv"
- * variable in Tk_Init.
- */
-
-static int synchronize = 0;
-static char *name = NULL;
-static char *display = NULL;
-static char *geometry = NULL;
-static char *colormap = NULL;
-static char *use = NULL;
-static char *visual = NULL;
-static int rest = 0;
-
-static const Tk_ArgvInfo argTable[] = {
- {"-colormap", TK_ARGV_STRING, NULL, (char *) &colormap,
- "Colormap for main window"},
- {"-display", TK_ARGV_STRING, NULL, (char *) &display,
- "Display to use"},
- {"-geometry", TK_ARGV_STRING, NULL, (char *) &geometry,
- "Initial geometry for window"},
- {"-name", TK_ARGV_STRING, NULL, (char *) &name,
- "Name to use for application"},
- {"-sync", TK_ARGV_CONSTANT, (char *) 1, (char *) &synchronize,
- "Use synchronous mode for display server"},
- {"-visual", TK_ARGV_STRING, NULL, (char *) &visual,
- "Visual for main window"},
- {"-use", TK_ARGV_STRING, NULL, (char *) &use,
- "Id of window in which to embed application"},
- {"--", TK_ARGV_REST, (char *) 1, (char *) &rest,
- "Pass all remaining arguments through to script"},
- {NULL, TK_ARGV_END, NULL, NULL, NULL}
-};
-
-/*
* Forward declarations to functions defined later in this file:
*/
@@ -2391,6 +2351,9 @@ Tk_IdToWindow(
break;
}
}
+ if (window == None) {
+ return NULL;
+ }
hPtr = Tcl_FindHashEntry(&dispPtr->winTable, (char *) window);
if (hPtr == NULL) {
@@ -3028,16 +2991,51 @@ MODULE_SCOPE const TkStubs tkStubs;
*/
static int
+CopyValue(
+ ClientData dummy,
+ Tcl_Obj *objPtr,
+ void *dstPtr)
+{
+ *(Tcl_Obj **)dstPtr = objPtr;
+ return 1;
+}
+
+static int
Initialize(
Tcl_Interp *interp) /* Interpreter to initialize. */
{
- char *p;
- int argc, code;
- const char **argv;
- const char *args[20];
- const char *argString = NULL;
- Tcl_DString class;
+ int code = TCL_OK;
ThreadSpecificData *tsdPtr;
+ Tcl_Obj *value = NULL;
+ Tcl_Obj *cmd;
+
+ Tcl_Obj *nameObj = NULL;
+ Tcl_Obj *classObj = NULL;
+ Tcl_Obj *displayObj = NULL;
+ Tcl_Obj *colorMapObj = NULL;
+ Tcl_Obj *useObj = NULL;
+ Tcl_Obj *visualObj = NULL;
+ Tcl_Obj *geometryObj = NULL;
+
+ int sync = 0;
+
+ const Tcl_ArgvInfo table[] = {
+ {TCL_ARGV_CONSTANT, "-sync", INT2PTR(1), &sync,
+ "Use synchronous mode for display server", NULL},
+ {TCL_ARGV_FUNC, "-colormap", CopyValue, &colorMapObj,
+ "Colormap for main window", NULL},
+ {TCL_ARGV_FUNC, "-display", CopyValue, &displayObj,
+ "Display to use", NULL},
+ {TCL_ARGV_FUNC, "-geometry", CopyValue, &geometryObj,
+ "Initial geometry for window", NULL},
+ {TCL_ARGV_FUNC, "-name", CopyValue, &nameObj,
+ "Name to use for application", NULL},
+ {TCL_ARGV_FUNC, "-visual", CopyValue, &visualObj,
+ "Visual for main window", NULL},
+ {TCL_ARGV_FUNC, "-use", CopyValue, &useObj,
+ "Id of window in which to embed application", NULL},
+ TCL_ARGV_AUTO_REST, TCL_ARGV_AUTO_HELP, TCL_ARGV_TABLE_END
+ };
/*
* Ensure that we are getting a compatible version of Tcl.
@@ -3056,23 +3054,6 @@ Initialize(
tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
/*
- * Start by initializing all the static variables to default acceptable
- * values so that no information is leaked from a previous run of this
- * code.
- */
-
- Tcl_MutexLock(&windowMutex);
- synchronize = 0;
- name = NULL;
- display = NULL;
- geometry = NULL;
- colormap = NULL;
- use = NULL;
- visual = NULL;
- rest = 0;
- argv = NULL;
-
- /*
* We start by resetting the result because it might not be clean.
*/
@@ -3084,8 +3065,6 @@ Initialize(
* master.
*/
- Tcl_DString ds;
-
/*
* Step 1 : find the master and construct the interp name (could be a
* function if new APIs were ok). We could also construct the path
@@ -3095,18 +3074,13 @@ Initialize(
Tcl_Interp *master = interp;
- while (1) {
+ while (Tcl_IsSafe(master)) {
master = Tcl_GetMaster(master);
if (master == NULL) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"no controlling master interpreter", -1));
Tcl_SetErrorCode(interp, "TK", "SAFE", "NO_MASTER", NULL);
- code = TCL_ERROR;
- goto done;
- }
- if (!Tcl_IsSafe(master)) {
- /* Found the trusted master. */
- break;
+ return TCL_ERROR;
}
}
@@ -3116,39 +3090,30 @@ Initialize(
code = Tcl_GetInterpPath(master, interp);
if (code != TCL_OK) {
- Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "error in Tcl_GetInterpPath", -1));
- Tcl_SetErrorCode(interp, "TK", "SAFE", "FAILED", NULL);
- goto done;
+ Tcl_Panic("Tcl_GetInterpPath broken!");
}
/*
- * Build the string to eval.
+ * Build the command to eval in trusted master.
*/
- Tcl_DStringInit(&ds);
- Tcl_DStringAppendElement(&ds, "::safe::TkInit");
- Tcl_DStringAppendElement(&ds, Tcl_GetString(Tcl_GetObjResult(master)));
+ cmd = Tcl_NewListObj(2, NULL);
+ Tcl_ListObjAppendElement(NULL, cmd,
+ Tcl_NewStringObj("::safe::TkInit", -1));
+ Tcl_ListObjAppendElement(NULL, cmd, Tcl_GetObjResult(master));
/*
* Step 2 : Eval in the master. The argument is the *reversed* interp
* path of the slave.
*/
- code = Tcl_EvalEx(master, Tcl_DStringValue(&ds), -1, 0);
+ Tcl_IncrRefCount(cmd);
+ code = Tcl_EvalObjEx(master, cmd, 0);
+ Tcl_DecrRefCount(cmd);
+ Tcl_TransferResult(master, code, interp);
if (code != TCL_OK) {
- /*
- * We might want to transfer the error message or not. We don't.
- * (No API to do it and maybe security reasons).
- */
-
- Tcl_DStringFree(&ds);
- Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "not allowed to start Tk by master's safe::TkInit", -1));
- Tcl_SetErrorCode(interp, "TK", "SAFE", "FAILED", NULL);
- goto done;
+ return code;
}
- Tcl_DStringFree(&ds);
/*
* Use the master's result as argv. Note: We don't use the Obj
@@ -3156,7 +3121,7 @@ Initialize(
* changing the code below.
*/
- argString = Tcl_GetString(Tcl_GetObjResult(master));
+ value = Tcl_GetObjResult(interp);
} else {
/*
* If there is an "argv" variable, get its value, extract out relevant
@@ -3164,50 +3129,67 @@ Initialize(
* that we used.
*/
- argString = Tcl_GetVar2(interp, "argv", NULL, TCL_GLOBAL_ONLY);
+ value = Tcl_GetVar2Ex(interp, "argv", NULL, TCL_GLOBAL_ONLY);
}
- if (argString != NULL) {
- char buffer[TCL_INTEGER_SPACE];
- if (Tcl_SplitList(interp, argString, &argc, &argv) != TCL_OK) {
- argError:
+ if (value) {
+ int objc;
+ Tcl_Obj **objv, **rest;
+ Tcl_Obj *parseList = Tcl_NewListObj(1, NULL);
+
+ Tcl_ListObjAppendElement(NULL, parseList, Tcl_NewObj());
+
+ Tcl_IncrRefCount(value);
+ if (TCL_OK != Tcl_ListObjAppendList(interp, parseList, value) ||
+ TCL_OK != Tcl_ListObjGetElements(NULL, parseList, &objc, &objv) ||
+ TCL_OK != Tcl_ParseArgsObjv(interp, table, &objc, objv, &rest)) {
Tcl_AddErrorInfo(interp,
"\n (processing arguments in argv variable)");
code = TCL_ERROR;
- goto done;
}
- if (Tk_ParseArgv(interp, (Tk_Window) NULL, &argc, argv,
- argTable, TK_ARGV_DONT_SKIP_FIRST_ARG|TK_ARGV_NO_DEFAULTS)
- != TCL_OK) {
- goto argError;
+ if (code == TCL_OK) {
+ 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);
+ ckfree(rest);
+ }
+ Tcl_DecrRefCount(parseList);
+ if (code != TCL_OK) {
+ goto done;
}
- p = Tcl_Merge(argc, argv);
- Tcl_SetVar2(interp, "argv", NULL, p, TCL_GLOBAL_ONLY);
- sprintf(buffer, "%d", argc);
- Tcl_SetVar2(interp, "argc", NULL, buffer, TCL_GLOBAL_ONLY);
- ckfree(p);
}
/*
* Figure out the application's name and class.
*/
- Tcl_DStringInit(&class);
- if (name == NULL) {
- int offset;
+ /*
+ * If we got no -name argument, fetch from TkpGetAppName().
+ */
- TkpGetAppName(interp, &class);
- offset = Tcl_DStringLength(&class)+1;
- Tcl_DStringSetLength(&class, offset);
- Tcl_DStringAppend(&class, Tcl_DStringValue(&class), offset-1);
- name = Tcl_DStringValue(&class) + offset;
- } else {
- Tcl_DStringAppend(&class, name, -1);
+ if (nameObj == NULL) {
+ Tcl_DString nameDS;
+
+ Tcl_DStringInit(&nameDS);
+ TkpGetAppName(interp, &nameDS);
+ nameObj = Tcl_NewStringObj(Tcl_DStringValue(&nameDS),
+ Tcl_DStringLength(&nameDS));
+ Tcl_DStringFree(&nameDS);
}
- p = Tcl_DStringValue(&class);
- if (*p) {
- Tcl_UtfToTitle(p);
+ /*
+ * The -class argument is always the ToTitle of the -name
+ */
+
+ {
+ int numBytes;
+ const char *bytes = Tcl_GetStringFromObj(nameObj, &numBytes);
+
+ classObj = Tcl_NewStringObj(bytes, numBytes);
+
+ numBytes = Tcl_UtfToTitle(Tcl_GetString(classObj));
+ Tcl_SetObjLength(classObj, numBytes);
}
/*
@@ -3215,15 +3197,14 @@ Initialize(
* information parsed from argv, if any.
*/
- args[0] = "toplevel";
- args[1] = ".";
- args[2] = "-class";
- args[3] = Tcl_DStringValue(&class);
- argc = 4;
- if (display != NULL) {
- args[argc] = "-screen";
- args[argc+1] = display;
- argc += 2;
+ cmd = Tcl_NewStringObj("toplevel . -class", -1);
+
+ Tcl_ListObjAppendElement(NULL, cmd, classObj);
+ classObj = NULL;
+
+ if (displayObj) {
+ Tcl_ListObjAppendElement(NULL, cmd, Tcl_NewStringObj("-screen", -1));
+ Tcl_ListObjAppendElement(NULL, cmd, displayObj);
/*
* If this is the first application for this process, save the display
@@ -3232,36 +3213,35 @@ Initialize(
*/
if (tsdPtr->numMainWindows == 0) {
- Tcl_SetVar2(interp, "env", "DISPLAY", display, TCL_GLOBAL_ONLY);
+ Tcl_SetVar2Ex(interp, "env", "DISPLAY", displayObj, TCL_GLOBAL_ONLY);
}
+ displayObj = NULL;
}
- if (colormap != NULL) {
- args[argc] = "-colormap";
- args[argc+1] = colormap;
- argc += 2;
- colormap = NULL;
+ if (colorMapObj) {
+ Tcl_ListObjAppendElement(NULL, cmd, Tcl_NewStringObj("-colormap", -1));
+ Tcl_ListObjAppendElement(NULL, cmd, colorMapObj);
+ colorMapObj = NULL;
}
- if (use != NULL) {
- args[argc] = "-use";
- args[argc+1] = use;
- argc += 2;
- use = NULL;
+ if (useObj) {
+ Tcl_ListObjAppendElement(NULL, cmd, Tcl_NewStringObj("-use", -1));
+ Tcl_ListObjAppendElement(NULL, cmd, useObj);
+ useObj = NULL;
}
- if (visual != NULL) {
- args[argc] = "-visual";
- args[argc+1] = visual;
- argc += 2;
- visual = NULL;
+ if (visualObj) {
+ Tcl_ListObjAppendElement(NULL, cmd, Tcl_NewStringObj("-visual", -1));
+ Tcl_ListObjAppendElement(NULL, cmd, visualObj);
+ visualObj = NULL;
}
- args[argc] = NULL;
- code = TkCreateFrame(NULL, interp, argc, args, 1, name);
- Tcl_DStringFree(&class);
+ code = TkListCreateFrame(NULL, interp, cmd, 1, nameObj);
+
+ Tcl_DecrRefCount(cmd);
+
if (code != TCL_OK) {
goto done;
}
Tcl_ResetResult(interp);
- if (synchronize) {
+ if (sync) {
XSynchronize(Tk_Display(Tk_MainWindow(interp)), True);
}
@@ -3270,19 +3250,19 @@ Initialize(
* geometry into the "geometry" variable.
*/
- if (geometry != NULL) {
- Tcl_DString buf;
+ if (geometryObj) {
+
+ Tcl_SetVar2Ex(interp, "geometry", NULL, geometryObj, TCL_GLOBAL_ONLY);
- Tcl_SetVar2(interp, "geometry", NULL, geometry, TCL_GLOBAL_ONLY);
- Tcl_DStringInit(&buf);
- Tcl_DStringAppend(&buf, "wm geometry . ", -1);
- Tcl_DStringAppend(&buf, geometry, -1);
- code = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, 0);
- Tcl_DStringFree(&buf);
+ cmd = Tcl_NewStringObj("wm geometry .", -1);
+ Tcl_ListObjAppendElement(NULL, cmd, geometryObj);
+ Tcl_IncrRefCount(cmd);
+ code = Tcl_EvalObjEx(interp, cmd, 0);
+ Tcl_DecrRefCount(cmd);
+ geometryObj = NULL;
if (code != TCL_OK) {
goto done;
}
- geometry = NULL;
}
/*
@@ -3319,10 +3299,6 @@ Initialize(
* console window interpreter.
*/
- Tcl_MutexUnlock(&windowMutex);
- if (argv != NULL) {
- ckfree(argv);
- }
code = TkpInit(interp);
if (code == TCL_OK) {
@@ -3355,12 +3331,10 @@ tkInit", -1, 0);
TkCreateThreadExitHandler(DeleteWindowsExitProc, tsdPtr);
}
- return code;
-
done:
- Tcl_MutexUnlock(&windowMutex);
- if (argv != NULL) {
- ckfree(argv);
+ if (value) {
+ Tcl_DecrRefCount(value);
+ value = NULL;
}
return code;
}
diff --git a/generic/ttk/ttkButton.c b/generic/ttk/ttkButton.c
index 2954184..c00754b 100644
--- a/generic/ttk/ttkButton.c
+++ b/generic/ttk/ttkButton.c
@@ -136,6 +136,15 @@ BaseCleanup(void *recordPtr)
TtkFreeImageSpec(basePtr->base.imageSpec);
}
+static void
+BaseImageChanged(
+ ClientData clientData, int x, int y, int width, int height,
+ int imageWidth, int imageHeight)
+{
+ Base *basePtr = (Base *)clientData;
+ TtkResizeWidget(&basePtr->core);
+}
+
static int BaseConfigure(Tcl_Interp *interp, void *recordPtr, int mask)
{
Base *basePtr = recordPtr;
@@ -149,8 +158,8 @@ static int BaseConfigure(Tcl_Interp *interp, void *recordPtr, int mask)
}
if (basePtr->base.imageObj) {
- imageSpec = TtkGetImageSpec(
- interp, basePtr->core.tkwin, basePtr->base.imageObj);
+ imageSpec = TtkGetImageSpecEx(
+ interp, basePtr->core.tkwin, basePtr->base.imageObj, BaseImageChanged, basePtr);
if (!imageSpec) {
goto error;
}
@@ -413,8 +422,8 @@ typedef struct
static Tk_OptionSpec CheckbuttonOptionSpecs[] =
{
{TK_OPTION_STRING, "-variable", "variable", "Variable",
- "", Tk_Offset(Checkbutton, checkbutton.variableObj), -1,
- TK_OPTION_DONT_SET_DEFAULT,0,0},
+ NULL, Tk_Offset(Checkbutton, checkbutton.variableObj), -1,
+ TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-onvalue", "onValue", "OnValue",
"1", Tk_Offset(Checkbutton, checkbutton.onValueObj), -1,
0,0,0},
diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c
index 15ebcb7..b44eeb5 100644
--- a/generic/ttk/ttkClamTheme.c
+++ b/generic/ttk/ttkClamTheme.c
@@ -7,8 +7,8 @@
#include <tk.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.
*/
@@ -123,8 +123,8 @@ static Ttk_ElementOptionSpec BorderElementOptions[] = {
/*
* <<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.
*/
@@ -402,7 +402,7 @@ typedef struct {
static Ttk_ElementOptionSpec MenuIndicatorElementOptions[] =
{
{ "-arrowsize", TK_OPTION_PIXELS,
- Tk_Offset(MenuIndicatorElement,sizeObj),
+ Tk_Offset(MenuIndicatorElement,sizeObj),
STR(MENUBUTTON_ARROW_SIZE)},
{ "-arrowcolor",TK_OPTION_COLOR,
Tk_Offset(MenuIndicatorElement,colorObj),
@@ -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.
*/
diff --git a/generic/ttk/ttkClassicTheme.c b/generic/ttk/ttkClassicTheme.c
index 2fbcd76..d16cb85 100644
--- a/generic/ttk/ttkClassicTheme.c
+++ b/generic/ttk/ttkClassicTheme.c
@@ -68,7 +68,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),
@@ -85,13 +85,13 @@ typedef struct {
static Ttk_ElementOptionSpec ButtonBorderElementOptions[] =
{
- { "-background", TK_OPTION_BORDER,
+ { "-background", TK_OPTION_BORDER,
Tk_Offset(ButtonBorderElement,borderObj), DEFAULT_BACKGROUND },
- { "-borderwidth", TK_OPTION_PIXELS,
+ { "-borderwidth", TK_OPTION_PIXELS,
Tk_Offset(ButtonBorderElement,borderWidthObj), DEFAULT_BORDERWIDTH },
- { "-relief", TK_OPTION_RELIEF,
+ { "-relief", TK_OPTION_RELIEF,
Tk_Offset(ButtonBorderElement,reliefObj), "flat" },
- { "-default", TK_OPTION_ANY,
+ { "-default", TK_OPTION_ANY,
Tk_Offset(ButtonBorderElement,defaultStateObj), "disabled" },
{ NULL, 0, 0, NULL }
};
@@ -115,7 +115,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(
@@ -281,19 +281,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 {
@@ -306,13 +306,13 @@ typedef struct {
} SashElement;
static Ttk_ElementOptionSpec SashOptions[] = {
- { "-background", TK_OPTION_BORDER,
+ { "-background", TK_OPTION_BORDER,
Tk_Offset(SashElement,borderObj), DEFAULT_BACKGROUND },
- { "-sashrelief", TK_OPTION_RELIEF,
+ { "-sashrelief", TK_OPTION_RELIEF,
Tk_Offset(SashElement,sashReliefObj), "sunken" },
{ "-sashthickness", TK_OPTION_PIXELS,
Tk_Offset(SashElement,sashThicknessObj), "6" },
- { "-sashpad", TK_OPTION_PIXELS,
+ { "-sashpad", TK_OPTION_PIXELS,
Tk_Offset(SashElement,sashPadObj), "2" },
{ "-handlesize", TK_OPTION_PIXELS,
Tk_Offset(SashElement,handleSizeObj), "8" },
@@ -367,10 +367,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;
@@ -398,7 +398,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);
}
}
@@ -495,7 +495,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/ttkEntry.c b/generic/ttk/ttkEntry.c
index f395649..a25574a 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -282,15 +282,16 @@ static char *EntryDisplayString(const char *showChar, int numChars)
{
char *displayString, *p;
int size;
- Tcl_UniChar ch;
- char buf[TCL_UTF_MAX];
+ int ch;
+ char buf[6];
- Tcl_UtfToUniChar(showChar, &ch);
- size = Tcl_UniCharToUtf(ch, buf);
+ TkUtfToUniChar(showChar, &ch);
+ size = TkUniCharToUtf(ch, buf);
p = displayString = ckalloc(numChars * size + 1);
while (numChars--) {
- p += Tcl_UniCharToUtf(ch, p);
+ memcpy(p, buf, size);
+ p += size;
}
*p = '\0';
@@ -405,7 +406,7 @@ ExpandPercents(
int number, length;
const char *string;
int stringLength;
- Tcl_UniChar ch;
+ int ch;
char numStorage[2*TCL_INTEGER_SPACE];
while (*template) {
@@ -429,7 +430,7 @@ ExpandPercents(
*/
++template; /* skip over % */
if (*template != '\0') {
- template += Tcl_UtfToUniChar(template, &ch);
+ template += TkUtfToUniChar(template, &ch);
} else {
ch = '%';
}
@@ -479,7 +480,7 @@ ExpandPercents(
string = Tk_PathName(entryPtr->core.tkwin);
break;
default:
- length = Tcl_UniCharToUtf(ch, numStorage);
+ length = TkUniCharToUtf(ch, numStorage);
numStorage[length] = '\0';
string = numStorage;
break;
diff --git a/generic/ttk/ttkGenStubs.tcl b/generic/ttk/ttkGenStubs.tcl
index 56ba2fa..8047e3f 100644
--- a/generic/ttk/ttkGenStubs.tcl
+++ b/generic/ttk/ttkGenStubs.tcl
@@ -18,8 +18,6 @@
# + Allow trailing semicolon in function declarations
#
-package require Tcl 8.4
-
namespace eval genStubs {
# libraryName --
#
diff --git a/generic/ttk/ttkImage.c b/generic/ttk/ttkImage.c
index a5a3a52..e403e2d 100644
--- a/generic/ttk/ttkImage.c
+++ b/generic/ttk/ttkImage.c
@@ -25,6 +25,8 @@ struct TtkImageSpec {
int mapCount; /* #state-specific overrides */
Ttk_StateSpec *states; /* array[mapCount] of states ... */
Tk_Image *images; /* ... per-state images to use */
+ Tk_ImageChangedProc *imageChanged;
+ ClientData imageChangedClientData;
};
/* NullImageChanged --
@@ -34,15 +36,41 @@ static void NullImageChanged(ClientData clientData,
int x, int y, int width, int height, int imageWidth, int imageHeight)
{ /* No-op */ }
+/* ImageSpecImageChanged --
+ * Image changes should trigger a repaint.
+ */
+static void ImageSpecImageChanged(ClientData clientData,
+ int x, int y, int width, int height, int imageWidth, int imageHeight)
+{
+ Ttk_ImageSpec *imageSpec = (Ttk_ImageSpec *)clientData;
+ if (imageSpec->imageChanged != NULL) {
+ imageSpec->imageChanged(imageSpec->imageChangedClientData,
+ x, y, width, height,
+ imageWidth, imageHeight);
+ }
+}
+
/* TtkGetImageSpec --
* Constructs a Ttk_ImageSpec * from a Tcl_Obj *.
* Result must be released using TtkFreeImageSpec.
*
- * TODO: Need a variant of this that takes a user-specified ImageChanged proc
*/
Ttk_ImageSpec *
TtkGetImageSpec(Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr)
{
+ return TtkGetImageSpecEx(interp, tkwin, objPtr, NULL, NULL);
+}
+
+/* TtkGetImageSpecEx --
+ * Constructs a Ttk_ImageSpec * from a Tcl_Obj *.
+ * Result must be released using TtkFreeImageSpec.
+ * imageChangedProc will be called when not NULL when
+ * the image changes to allow widgets to repaint.
+ */
+Ttk_ImageSpec *
+TtkGetImageSpecEx(Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr,
+ Tk_ImageChangedProc *imageChangedProc, ClientData imageChangedClientData)
+{
Ttk_ImageSpec *imageSpec = 0;
int i = 0, n = 0, objc;
Tcl_Obj **objv;
@@ -52,6 +80,8 @@ TtkGetImageSpec(Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr)
imageSpec->mapCount = 0;
imageSpec->states = 0;
imageSpec->images = 0;
+ imageSpec->imageChanged = imageChangedProc;
+ imageSpec->imageChangedClientData = imageChangedClientData;
if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
goto error;
@@ -74,7 +104,7 @@ TtkGetImageSpec(Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr)
/* Get base image:
*/
imageSpec->baseImage = Tk_GetImage(
- interp, tkwin, Tcl_GetString(objv[0]), NullImageChanged, NULL);
+ interp, tkwin, Tcl_GetString(objv[0]), ImageSpecImageChanged, imageSpec);
if (!imageSpec->baseImage) {
goto error;
}
diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c
index 1037840..b8b7f29 100644
--- a/generic/ttk/ttkLabel.c
+++ b/generic/ttk/ttkLabel.c
@@ -139,7 +139,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);
@@ -342,15 +342,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
@@ -577,7 +577,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;
@@ -588,11 +588,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/ttkManager.c b/generic/ttk/ttkManager.c
index 24a0fb1..031fdec 100644
--- a/generic/ttk/ttkManager.c
+++ b/generic/ttk/ttkManager.c
@@ -320,7 +320,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 16a8bfe..81a8b64 100644
--- a/generic/ttk/ttkNotebook.c
+++ b/generic/ttk/ttkNotebook.c
@@ -901,7 +901,7 @@ static int NotebookAddCommand(
if (tab->state == TAB_STATE_HIDDEN) {
tab->state = TAB_STATE_NORMAL;
}
- if (ConfigureTab(interp, nb, tab, slaveWindow, objc-4,objv+4) != TCL_OK) {
+ if (ConfigureTab(interp, nb, tab, slaveWindow, objc-3,objv+3) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/generic/ttk/ttkProgress.c b/generic/ttk/ttkProgress.c
index 4dc50a2..eed90ec 100644
--- a/generic/ttk/ttkProgress.c
+++ b/generic/ttk/ttkProgress.c
@@ -398,7 +398,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) {
@@ -424,7 +424,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) {
return Tcl_ObjSetVar2(
@@ -444,7 +444,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(
diff --git a/generic/ttk/ttkScale.c b/generic/ttk/ttkScale.c
index 69753d1..95824af 100644
--- a/generic/ttk/ttkScale.c
+++ b/generic/ttk/ttkScale.c
@@ -46,14 +46,14 @@ typedef struct
static Tk_OptionSpec ScaleOptionSpecs[] =
{
{TK_OPTION_STRING, "-command", "command", "Command", "",
- Tk_Offset(Scale,scale.commandObj), -1,
+ Tk_Offset(Scale,scale.commandObj), -1,
TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-variable", "variable", "Variable", "",
- Tk_Offset(Scale,scale.variableObj), -1,
+ Tk_Offset(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,
+ Tk_Offset(Scale,scale.orient), 0,
(ClientData)ttkOrientStrings, STYLE_CHANGED },
{TK_OPTION_DOUBLE, "-from", "from", "From", "0",
@@ -63,7 +63,7 @@ static Tk_OptionSpec ScaleOptionSpecs[] =
{TK_OPTION_DOUBLE, "-value", "value", "Value", "0",
Tk_Offset(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, Tk_Offset(Scale,scale.lengthObj), -1, 0, 0,
GEOMETRY_CHANGED},
WIDGET_TAKEFOCUS_TRUE,
@@ -76,7 +76,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)
@@ -172,7 +172,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;
@@ -236,7 +236,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..9d99ea5 100644
--- a/generic/ttk/ttkScrollbar.c
+++ b/generic/ttk/ttkScrollbar.c
@@ -22,7 +22,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;
@@ -50,7 +50,7 @@ static Tk_OptionSpec ScrollbarOptionSpecs[] =
* +++ Widget hooks.
*/
-static void
+static void
ScrollbarInitialize(Tcl_Interp *interp, void *recordPtr)
{
Scrollbar *sb = recordPtr;
@@ -241,7 +241,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/ttkSquare.c b/generic/ttk/ttkSquare.c
index d002f2f..7837310 100644
--- a/generic/ttk/ttkSquare.c
+++ b/generic/ttk/ttkSquare.c
@@ -56,24 +56,24 @@ static Tk_OptionSpec SquareOptionSpecs[] =
{TK_OPTION_BORDER, "-foreground", "foreground", "Foreground",
DEFAULT_BACKGROUND, Tk_Offset(Square,square.foregroundObj),
-1, 0, 0, 0},
-
+
{TK_OPTION_PIXELS, "-width", "width", "Width",
"50", Tk_Offset(Square,square.widthObj), -1, 0, 0,
GEOMETRY_CHANGED},
{TK_OPTION_PIXELS, "-height", "height", "Height",
"50", Tk_Offset(Square,square.heightObj), -1, 0, 0,
GEOMETRY_CHANGED},
-
+
{TK_OPTION_STRING, "-padding", "padding", "Pad", NULL,
- Tk_Offset(Square,square.paddingObj), -1,
+ Tk_Offset(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},
-
+
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
NULL, Tk_Offset(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,7 +176,7 @@ typedef struct
Tcl_Obj *heightObj;
} SquareElement;
-static Ttk_ElementOptionSpec SquareElementOptions[] =
+static Ttk_ElementOptionSpec SquareElementOptions[] =
{
{ "-background", TK_OPTION_BORDER, Tk_Offset(SquareElement,borderObj),
DEFAULT_BACKGROUND },
@@ -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/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..31798ea 100644
--- a/generic/ttk/ttkTagSet.c
+++ b/generic/ttk/ttkTagSet.c
@@ -188,7 +188,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.h b/generic/ttk/ttkTheme.h
index 7bf2a7f..9251dea 100644
--- a/generic/ttk/ttkTheme.h
+++ b/generic/ttk/ttkTheme.h
@@ -372,6 +372,8 @@ MODULE_SCOPE void Ttk_RegisterNamedColor(Ttk_ResourceCache, const char *, XColor
typedef struct TtkImageSpec Ttk_ImageSpec;
TTKAPI Ttk_ImageSpec *TtkGetImageSpec(Tcl_Interp *, Tk_Window, Tcl_Obj *);
+TTKAPI Ttk_ImageSpec *TtkGetImageSpecEx(Tcl_Interp *, Tk_Window, Tcl_Obj *,
+ Tk_ImageChangedProc *, ClientData);
TTKAPI void TtkFreeImageSpec(Ttk_ImageSpec *);
TTKAPI Tk_Image TtkSelectImage(Ttk_ImageSpec *, Ttk_State);
diff --git a/generic/ttk/ttkTrace.c b/generic/ttk/ttkTrace.c
index ba66db4..c0f17cf 100644
--- a/generic/ttk/ttkTrace.c
+++ b/generic/ttk/ttkTrace.c
@@ -3,7 +3,7 @@
*
* 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).
*/
diff --git a/generic/ttk/ttkWidget.h b/generic/ttk/ttkWidget.h
index e4dd712..798bcce 100644
--- a/generic/ttk/ttkWidget.h
+++ b/generic/ttk/ttkWidget.h
@@ -111,8 +111,8 @@ 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 \
diff --git a/library/bgerror.tcl b/library/bgerror.tcl
index d1ed60a..b15387e 100644
--- a/library/bgerror.tcl
+++ b/library/bgerror.tcl
@@ -98,7 +98,7 @@ proc ::tk::dialog::error::ReturnInDetails w {
# err - The error message.
#
proc ::tk::dialog::error::bgerror err {
- global errorInfo tcl_platform
+ global errorInfo
variable button
set info $errorInfo
diff --git a/library/button.tcl b/library/button.tcl
index b2bafb2..80d8bf9 100644
--- a/library/button.tcl
+++ b/library/button.tcl
@@ -597,12 +597,25 @@ proc ::tk::ButtonUp w {
# w - The name of the widget.
proc ::tk::ButtonInvoke w {
- if {[$w cget -state] ne "disabled"} {
+ if {[winfo exists $w] && [$w cget -state] ne "disabled"} {
set oldRelief [$w cget -relief]
set oldState [$w cget -state]
$w configure -state active -relief sunken
- update idletasks
- after 100
+ after 100 [list ::tk::ButtonInvokeEnd $w $oldState $oldRelief]
+ }
+}
+
+# ::tk::ButtonInvokeEnd --
+# The procedure below is called after a button is invoked through
+# the keyboard. It simulate a release of the button via the mouse.
+#
+# Arguments:
+# w - The name of the widget.
+# oldState - Old state to be set back.
+# oldRelief - Old relief to be set back.
+
+proc ::tk::ButtonInvokeEnd {w oldState oldRelief} {
+ if {[winfo exists $w]} {
$w configure -state $oldState -relief $oldRelief
uplevel #0 [list $w invoke]
}
diff --git a/library/console.tcl b/library/console.tcl
index 566140f..ba68ccc 100644
--- a/library/console.tcl
+++ b/library/console.tcl
@@ -41,8 +41,6 @@ interp alias {} EvalAttached {} consoleinterp eval
# None.
proc ::tk::ConsoleInit {} {
- global tcl_platform
-
if {![consoleinterp eval {set tcl_interactive}]} {
wm withdraw .
}
@@ -78,7 +76,7 @@ proc ::tk::ConsoleInit {} {
AmpMenuArgs .menubar.edit add command -label [mc P&aste] -accel "$mod+V"\
-command {event generate .console <<Paste>>}
- if {$tcl_platform(platform) ne "windows"} {
+ if {[tk windowingsystem] ne "win32"} {
AmpMenuArgs .menubar.edit add command -label [mc Cl&ear] \
-command {event generate .console <<Clear>>}
} else {
@@ -114,6 +112,8 @@ proc ::tk::ConsoleInit {} {
-accel "$mod++" -command {event generate .console <<Console_FontSizeIncr>>}
AmpMenuArgs .menubar.edit add command -label [mc "&Decrease Font Size"] \
-accel "$mod+-" -command {event generate .console <<Console_FontSizeDecr>>}
+ AmpMenuArgs .menubar.edit add command -label [mc "Fit To Screen Width"] \
+ -command {event generate .console <<Console_FitScreenWidth>>}
if {[tk windowingsystem] eq "aqua"} {
.menubar add cascade -label [mc Window] -menu [menu .menubar.window]
@@ -193,7 +193,7 @@ proc ::tk::ConsoleInit {} {
$w mark set promptEnd insert
$w mark gravity promptEnd left
- if {$tcl_platform(platform) eq "windows"} {
+ if {[tk windowingsystem] ne "aqua"} {
# Subtle work-around to erase the '% ' that tclMain.c prints out
after idle [subst -nocommand {
if {[$con get 1.0 output] eq "% "} { $con delete 1.0 output }
@@ -378,6 +378,26 @@ proc ::tk::console::Paste {w} {
}
}
+# Fit TkConsoleFont to window width
+proc ::tk::console::FitScreenWidth {w} {
+ set width [winfo screenwidth $w]
+ set cwidth [$w cget -width]
+ set s -50
+ set fit 0
+ array set fi [font configure TkConsoleFont]
+ while {$s < 0} {
+ set fi(-size) $s
+ set f [font create {*}[array get fi]]
+ set c [font measure $f "eM"]
+ font delete $f
+ if {$c * $cwidth < 1.667 * $width} {
+ font configure TkConsoleFont -size $s
+ break
+ }
+ incr s 2
+ }
+}
+
# ::tk::ConsoleBind --
# This procedure first ensures that the default bindings for the Text
# class have been defined. Then certain bindings are overridden for
@@ -600,6 +620,9 @@ proc ::tk::ConsoleBind {w} {
tk fontchooser configure -font TkConsoleFont
}
}
+ bind Console <<Console_FitScreenWidth>> {
+ ::tk::console::FitScreenWidth %W
+ }
##
## Bindings for doing special things based on certain keys
@@ -987,8 +1010,7 @@ proc ::tk::console::ExpandPathname str {
set match {}
} else {
if {[llength $m] > 1} {
- global tcl_platform
- if {[string match windows $tcl_platform(platform)]} {
+ if { $::tcl_platform(platform) eq "windows" } {
## Windows is screwy because it's case insensitive
set tmp [ExpandBestMatch [string tolower $m] \
[string tolower $dir]]
diff --git a/library/demos/aniwave.tcl b/library/demos/aniwave.tcl
index 6122132..a7539fb 100644
--- a/library/demos/aniwave.tcl
+++ b/library/demos/aniwave.tcl
@@ -17,7 +17,7 @@ wm title $w "Animated Wave Demonstration"
wm iconname $w "aniwave"
positionWindow $w
-label $w.msg -font $font -wraplength 4i -justify left -text "This demonstration contains a canvas widget with a line item inside it. The animation routines work by adjusting the coordinates list of the line; a trace on a variable is used so updates to the variable result in a change of position of the line."
+label $w.msg -font $font -wraplength 4i -justify left -text "This demonstration contains a canvas widget with a line item inside it. The animation routines work by adjusting the coordinates list of the line; a trace on a variable is used so updates to the variable result in a change of position of the line."
pack $w.msg -side top
## See Code / Dismiss buttons
diff --git a/library/demos/bind.tcl b/library/demos/bind.tcl
index d9bc22f..03f6d3b 100644
--- a/library/demos/bind.tcl
+++ b/library/demos/bind.tcl
@@ -22,7 +22,7 @@ pack $btns -side bottom -fill x
text $w.text -yscrollcommand "$w.scroll set" -setgrid true \
-width 60 -height 24 -font $font -wrap word
-scrollbar $w.scroll -command "$w.text yview"
+ttk::scrollbar $w.scroll -command "$w.text yview"
pack $w.scroll -side right -fill y
pack $w.text -expand yes -fill both
diff --git a/library/demos/entry2.tcl b/library/demos/entry2.tcl
index d0ca35a..9e3f4ef 100644
--- a/library/demos/entry2.tcl
+++ b/library/demos/entry2.tcl
@@ -27,15 +27,15 @@ frame $w.frame -borderwidth 10
pack $w.frame -side top -fill x -expand 1
entry $w.frame.e1 -xscrollcommand "$w.frame.s1 set"
-scrollbar $w.frame.s1 -relief sunken -orient horiz -command \
+ttk::scrollbar $w.frame.s1 -orient horiz -command \
"$w.frame.e1 xview"
frame $w.frame.spacer1 -width 20 -height 10
entry $w.frame.e2 -xscrollcommand "$w.frame.s2 set"
-scrollbar $w.frame.s2 -relief sunken -orient horiz -command \
+ttk::scrollbar $w.frame.s2 -orient horiz -command \
"$w.frame.e2 xview"
frame $w.frame.spacer2 -width 20 -height 10
entry $w.frame.e3 -xscrollcommand "$w.frame.s3 set"
-scrollbar $w.frame.s3 -relief sunken -orient horiz -command \
+ttk::scrollbar $w.frame.s3 -orient horiz -command \
"$w.frame.e3 xview"
pack $w.frame.e1 $w.frame.s1 $w.frame.spacer1 $w.frame.e2 $w.frame.s2 \
$w.frame.spacer2 $w.frame.e3 $w.frame.s3 -side top -fill x
diff --git a/library/demos/floor.tcl b/library/demos/floor.tcl
index 827600b..c36979b 100644
--- a/library/demos/floor.tcl
+++ b/library/demos/floor.tcl
@@ -1307,8 +1307,8 @@ pack $btns -side bottom -fill x
set f [frame $w.frame]
pack $f -side top -fill both -expand yes
-set h [scrollbar $f.hscroll -orient horizontal]
-set v [scrollbar $f.vscroll -orient vertical]
+set h [ttk::scrollbar $f.hscroll -orient horizontal]
+set v [ttk::scrollbar $f.vscroll -orient vertical]
set f1 [frame $f.f1 -borderwidth 2 -relief sunken]
set c [canvas $f1.c -width 900 -height 500 -highlightthickness 0 \
-xscrollcommand [list $h set] \
diff --git a/library/demos/fontchoose.tcl b/library/demos/fontchoose.tcl
index def30c3..8b34377 100644
--- a/library/demos/fontchoose.tcl
+++ b/library/demos/fontchoose.tcl
@@ -57,7 +57,7 @@ grid columnconfigure $f 0 -weight 1
grid rowconfigure $f 0 -weight 1
bind $w <Visibility> {
bind %W <Visibility> {}
- grid propagate %W.f 0
+ grid propagate %W.f 0
}
## See Code / Dismiss buttons
diff --git a/library/demos/image2.tcl b/library/demos/image2.tcl
index a17da31..2d7ba03 100644
--- a/library/demos/image2.tcl
+++ b/library/demos/image2.tcl
@@ -92,7 +92,7 @@ pack $w.dir.b -side left -fill y -padx {0 2m} -pady 2m
labelframe $w.f -text "File:" -padx 2m -pady 2m
listbox $w.f.list -width 20 -height 10 -yscrollcommand "$w.f.scroll set"
-scrollbar $w.f.scroll -command "$w.f.list yview"
+ttk::scrollbar $w.f.scroll -command "$w.f.list yview"
pack $w.f.list $w.f.scroll -side left -fill y -expand 1
$w.f.list insert 0 earth.gif earthris.gif teapot.ppm
bind $w.f.list <Double-1> "loadImage $w %x %y"
diff --git a/library/demos/items.tcl b/library/demos/items.tcl
index 177e9a4..000e4cb 100644
--- a/library/demos/items.tcl
+++ b/library/demos/items.tcl
@@ -31,8 +31,8 @@ canvas $c -scrollregion {0c 0c 30c 24c} -width 15c -height 10c \
-relief sunken -borderwidth 2 \
-xscrollcommand "$w.frame.hscroll set" \
-yscrollcommand "$w.frame.vscroll set"
-scrollbar $w.frame.vscroll -command "$c yview"
-scrollbar $w.frame.hscroll -orient horiz -command "$c xview"
+ttk::scrollbar $w.frame.vscroll -command "$c yview"
+ttk::scrollbar $w.frame.hscroll -orient horiz -command "$c xview"
grid $c -in $w.frame \
-row 0 -column 0 -rowspan 1 -columnspan 1 -sticky news
diff --git a/library/demos/ixset b/library/demos/ixset
index 06b644d..13235de 100644
--- a/library/demos/ixset
+++ b/library/demos/ixset
@@ -9,7 +9,6 @@ exec wish "$0" ${1+"$@"}
# 91/11/23 : pda@masi.ibp.fr, jt@ratp.fr : design
# 92/08/01 : pda@masi.ibp.fr : cleaning
-package require Tcl 8.4
package require Tk
#
@@ -186,12 +185,12 @@ proc createwindows {} {
#
frame .buttons
- button .buttons.ok -default active -command ok -text "Ok"
+ button .buttons.ok -default active -command ok -text "Ok"
button .buttons.apply -default normal -command apply -text "Apply" \
-state disabled
button .buttons.cancel -default normal -command cancel -text "Cancel" \
-state disabled
- button .buttons.quit -default normal -command quit -text "Quit"
+ button .buttons.quit -default normal -command quit -text "Quit"
pack .buttons.ok .buttons.apply .buttons.cancel .buttons.quit \
-side left -expand yes -pady 5
diff --git a/library/demos/knightstour.tcl b/library/demos/knightstour.tcl
index 73ca3a3..6113db2 100644
--- a/library/demos/knightstour.tcl
+++ b/library/demos/knightstour.tcl
@@ -221,7 +221,7 @@ proc CreateGUI {} {
$c bind knight <ButtonPress-1> [namespace code [list DragStart %W %x %y]]
$c bind knight <Motion> [namespace code [list DragMotion %W %x %y]]
$c bind knight <ButtonRelease-1> [namespace code [list DragEnd %W %x %y]]
-
+
grid $c $f.txt $f.vs -sticky news
grid rowconfigure $f 0 -weight 1
grid columnconfigure $f 1 -weight 1
@@ -244,7 +244,7 @@ proc CreateGUI {} {
if {[info exists ::widgetDemo]} {
grid [addSeeDismiss $dlg.buttons $dlg] - - - - - -sticky ew
}
-
+
grid rowconfigure $dlg 0 -weight 1
grid columnconfigure $dlg 0 -weight 1
diff --git a/library/demos/menu.tcl b/library/demos/menu.tcl
index e19df57..e32b54f 100644
--- a/library/demos/menu.tcl
+++ b/library/demos/menu.tcl
@@ -16,7 +16,7 @@ wm title $w "Menu Demonstration"
wm iconname $w "menu"
positionWindow $w
-label $w.msg -font $font -wraplength 4i -justify left
+label $w.msg -font $font -wraplength 4i -justify left
if {[tk windowingsystem] eq "aqua"} {
catch {set origUseCustomMDEF $::tk::mac::useCustomMDEF; set ::tk::mac::useCustomMDEF 1}
$w.msg configure -text "This window has a menubar with cascaded menus. You can invoke entries with an accelerator by typing Command+x, where \"x\" is the character next to the command key symbol. The rightmost menu can be torn off into a palette by selecting the first item in the menu."
diff --git a/library/demos/menubu.tcl b/library/demos/menubu.tcl
index 86326b5..96e3b15 100644
--- a/library/demos/menubu.tcl
+++ b/library/demos/menubu.tcl
@@ -21,7 +21,7 @@ pack $w.body -expand 1 -fill both
if {[tk windowingsystem] eq "aqua"} {catch {set origUseCustomMDEF $::tk::mac::useCustomMDEF; set ::tk::mac::useCustomMDEF 1}}
menubutton $w.body.below -text "Below" -underline 0 -direction below -menu $w.body.below.m -relief raised
-menu $w.body.below.m -tearoff 0
+menu $w.body.below.m -tearoff 0
$w.body.below.m add command -label "Below menu: first item" -command "puts \"You have selected the first item from the Below menu.\""
$w.body.below.m add command -label "Below menu: second item" -command "puts \"You have selected the second item from the Below menu.\""
grid $w.body.below -row 0 -column 1 -sticky n
diff --git a/library/demos/msgbox.tcl b/library/demos/msgbox.tcl
index bd98bf2..2c2cc2d 100644
--- a/library/demos/msgbox.tcl
+++ b/library/demos/msgbox.tcl
@@ -23,7 +23,7 @@ pack [addSeeDismiss $w.buttons $w {} {
}] -side bottom -fill x
#pack $w.buttons.dismiss $w.buttons.code $w.buttons.vars -side left -expand 1
-frame $w.left
+frame $w.left
frame $w.right
pack $w.left $w.right -side left -expand yes -fill y -pady .5c -padx .5c
@@ -56,7 +56,7 @@ proc showMessageBox {w} {
set button [tk_messageBox -icon $msgboxIcon -type $msgboxType \
-title Message -parent $w\
-message "This is a \"$msgboxType\" type messagebox with the \"$msgboxIcon\" icon"]
-
+
tk_messageBox -icon info -message "You have selected \"$button\"" -type ok\
-parent $w
}
diff --git a/library/demos/paned2.tcl b/library/demos/paned2.tcl
index f481d14..c549249 100644
--- a/library/demos/paned2.tcl
+++ b/library/demos/paned2.tcl
@@ -54,7 +54,7 @@ listbox $f.list -listvariable paneList -yscrollcommand "$f.scr set"
# Invert the first item to highlight it
$f.list itemconfigure 0 \
-background [$f.list cget -fg] -foreground [$f.list cget -bg]
-scrollbar $f.scr -orient vertical -command "$f.list yview"
+ttk::scrollbar $f.scr -orient vertical -command "$f.list yview"
pack $f.scr -side right -fill y
pack $f.list -fill both -expand 1
@@ -62,8 +62,8 @@ pack $f.list -fill both -expand 1
set f [frame $w.pane.bottom]
text $f.text -xscrollcommand "$f.xscr set" -yscrollcommand "$f.yscr set" \
-width 30 -height 8 -wrap none
-scrollbar $f.xscr -orient horizontal -command "$f.text xview"
-scrollbar $f.yscr -orient vertical -command "$f.text yview"
+ttk::scrollbar $f.xscr -orient horizontal -command "$f.text xview"
+ttk::scrollbar $f.yscr -orient vertical -command "$f.text yview"
grid $f.text $f.yscr -sticky nsew
grid $f.xscr -sticky nsew
grid columnconfigure $f 0 -weight 1
diff --git a/library/demos/puzzle.tcl b/library/demos/puzzle.tcl
index fb8ab4c..4f7f955 100644
--- a/library/demos/puzzle.tcl
+++ b/library/demos/puzzle.tcl
@@ -54,7 +54,7 @@ pack $btns -side bottom -fill x
scrollbar $w.s
# The button metrics are a bit bigger in Aqua, and since we are
-# using place which doesn't autosize, then we need to have a
+# using place which doesn't autosize, then we need to have a
# slightly larger frame here...
if {[tk windowingsystem] eq "aqua"} {
diff --git a/library/demos/rmt b/library/demos/rmt
index 51886de..00bdc9d 100644
--- a/library/demos/rmt
+++ b/library/demos/rmt
@@ -7,7 +7,6 @@ exec wish "$0" ${1+"$@"}
# Tk applications. It allows you to select an application and
# then type commands to that application.
-package require Tcl 8.4
package require Tk
wm title . "Tk Remote Controller"
diff --git a/library/demos/sayings.tcl b/library/demos/sayings.tcl
index 4d26ffe..aa3479c 100644
--- a/library/demos/sayings.tcl
+++ b/library/demos/sayings.tcl
@@ -28,8 +28,8 @@ frame $w.frame -borderwidth 10
pack $w.frame -side top -expand yes -fill both -padx 1c
-scrollbar $w.frame.yscroll -command "$w.frame.list yview"
-scrollbar $w.frame.xscroll -orient horizontal \
+ttk::scrollbar $w.frame.yscroll -command "$w.frame.list yview"
+ttk::scrollbar $w.frame.xscroll -orient horizontal \
-command "$w.frame.list xview"
listbox $w.frame.list -width 20 -height 10 -setgrid 1 \
-yscroll "$w.frame.yscroll set" -xscroll "$w.frame.xscroll set"
diff --git a/library/demos/search.tcl b/library/demos/search.tcl
index 9f44e16..a1a3d7f 100644
--- a/library/demos/search.tcl
+++ b/library/demos/search.tcl
@@ -109,7 +109,7 @@ pack $w.string.button -side left -pady 5 -padx 10
bind $w.string.entry <Return> "textSearch $w.text \$searchString search"
text $w.text -yscrollcommand "$w.scroll set" -setgrid true
-scrollbar $w.scroll -command "$w.text yview"
+ttk::scrollbar $w.scroll -command "$w.text yview"
pack $w.file $w.string -side top -fill x
pack $w.scroll -side right -fill y
pack $w.text -expand yes -fill both
diff --git a/library/demos/square b/library/demos/square
index 08c362b..1d7eb20 100644
--- a/library/demos/square
+++ b/library/demos/square
@@ -7,7 +7,7 @@ exec wish "$0" ${1+"$@"}
# widget. It's only usable in the "tktest" application or if Tk has
# been compiled with tkSquare.c. This demo arranges the following
# bindings for the widget:
-#
+#
# Button-1 press/drag: moves square to mouse
# "a": toggle size animation on/off
diff --git a/library/demos/states.tcl b/library/demos/states.tcl
index e76540d..aeb3d5b 100644
--- a/library/demos/states.tcl
+++ b/library/demos/states.tcl
@@ -19,6 +19,17 @@ positionWindow $w
label $w.msg -font $font -wraplength 4i -justify left -text "A listbox containing the 50 states is displayed below, along with a scrollbar. You can scan the list either using the scrollbar or by scanning. To scan, press button 2 in the widget and drag up or down."
pack $w.msg -side top
+labelframe $w.justif -text Justification
+foreach c {Left Center Right} {
+ set lower [string tolower $c]
+ radiobutton $w.justif.$lower -text $c -variable just \
+ -relief flat -value $lower -anchor w \
+ -command "$w.frame.list configure -justify \$just" \
+ -tristatevalue "multi"
+ pack $w.justif.$lower -side left -pady 2 -fill x
+}
+pack $w.justif
+
## See Code / Dismiss buttons
set btns [addSeeDismiss $w.buttons $w]
pack $btns -side bottom -fill x
@@ -26,7 +37,7 @@ pack $btns -side bottom -fill x
frame $w.frame -borderwidth .5c
pack $w.frame -side top -expand yes -fill y
-scrollbar $w.frame.scroll -command "$w.frame.list yview"
+ttk::scrollbar $w.frame.scroll -command "$w.frame.list yview"
listbox $w.frame.list -yscroll "$w.frame.scroll set" -setgrid 1 -height 12
pack $w.frame.scroll -side right -fill y
pack $w.frame.list -side left -expand 1 -fill both
diff --git a/library/demos/style.tcl b/library/demos/style.tcl
index 614ea1f..a529a03 100644
--- a/library/demos/style.tcl
+++ b/library/demos/style.tcl
@@ -26,7 +26,7 @@ set family Courier
text $w.text -yscrollcommand "$w.scroll set" -setgrid true \
-width 70 -height 32 -wrap word -font "$family 12"
-scrollbar $w.scroll -command "$w.text yview"
+ttk::scrollbar $w.scroll -command "$w.text yview"
pack $w.scroll -side right -fill y
pack $w.text -expand yes -fill both
diff --git a/library/demos/text.tcl b/library/demos/text.tcl
index 785e9e6..d1801d1 100644
--- a/library/demos/text.tcl
+++ b/library/demos/text.tcl
@@ -23,7 +23,7 @@ pack $btns -side bottom -fill x
text $w.text -yscrollcommand [list $w.scroll set] -setgrid 1 \
-height 30 -undo 1 -autosep 1
-scrollbar $w.scroll -command [list $w.text yview]
+ttk::scrollbar $w.scroll -command [list $w.text yview]
pack $w.scroll -side right -fill y
pack $w.text -expand yes -fill both
diff --git a/library/demos/textpeer.tcl b/library/demos/textpeer.tcl
index e94284e..83e8e14 100644
--- a/library/demos/textpeer.tcl
+++ b/library/demos/textpeer.tcl
@@ -36,7 +36,7 @@ proc makeClone {w parent} {
global count
set t [$parent peer create $w.text[incr count] -yscroll "$w.sb$count set"\
-height 10 -wrap word]
- set sb [scrollbar $w.sb$count -command "$t yview" -orient vertical]
+ set sb [ttk::scrollbar $w.sb$count -command "$t yview" -orient vertical]
set b1 [button $w.clone$count -command "makeClone $w $t" \
-text "Make Peer"]
set b2 [button $w.kill$count -command "killClone $w $count" \
diff --git a/library/demos/timer b/library/demos/timer
index e10b840..6b61ca4 100644
--- a/library/demos/timer
+++ b/library/demos/timer
@@ -5,7 +5,6 @@ exec wish "$0" ${1+"$@"}
# timer --
# This script generates a counter with start and stop buttons.
-package require Tcl 8.4
package require Tk
label .counter -text 0.00 -relief raised -width 10 -padx 2m -pady 1m
diff --git a/library/demos/twind.tcl b/library/demos/twind.tcl
index 8f3c12e..bafb57e 100644
--- a/library/demos/twind.tcl
+++ b/library/demos/twind.tcl
@@ -25,7 +25,7 @@ set t $w.f.text
text $t -yscrollcommand "$w.scroll set" -setgrid true -font $font -width 70 \
-height 35 -wrap word -highlightthickness 0 -borderwidth 0
pack $t -expand yes -fill both
-scrollbar $w.scroll -command "$t yview"
+ttk::scrollbar $w.scroll -command "$t yview"
pack $w.scroll -side right -fill y
panedwindow $w.pane
pack $w.pane -expand yes -fill both
@@ -166,7 +166,7 @@ $t image create end -image \
proc textWindBigB w {
- $w configure -borderwidth 15
+ $w configure -borderwidth 15
}
proc textWindBigH w {
@@ -193,7 +193,7 @@ proc textWindSmallP w {
proc textWindOn w {
catch {destroy $w.scroll2}
set t $w.f.text
- scrollbar $w.scroll2 -orient horizontal -command "$t xview"
+ ttk::scrollbar $w.scroll2 -orient horizontal -command "$t xview"
pack $w.scroll2 -after $w.buttons -side bottom -fill x
$t configure -xscrollcommand "$w.scroll2 set" -wrap none
}
@@ -230,7 +230,7 @@ proc createPlot {t} {
$c create line 100 250 400 250 -width 2
$c create line 100 250 100 50 -width 2
$c create text 225 20 -text "A Simple Plot" -font $font -fill brown
-
+
for {set i 0} {$i <= 10} {incr i} {
set x [expr {100 + ($i*30)}]
$c create line $x 250 $x 245 -width 2
@@ -241,7 +241,7 @@ proc createPlot {t} {
$c create line 100 $y 105 $y -width 2
$c create text 96 $y -text [expr {$i*50}].0 -anchor e -font $font
}
-
+
foreach point {
{12 56} {20 94} {33 98} {32 120} {61 180} {75 160} {98 223}
} {
@@ -303,7 +303,7 @@ proc textMakePeer {parent} {
set t [$parent peer create $w.f.text -yscrollcommand "$w.scroll set" \
-borderwidth 0 -highlightthickness 0]
pack $t -expand yes -fill both
- scrollbar $w.scroll -command "$t yview"
+ ttk::scrollbar $w.scroll -command "$t yview"
pack $w.scroll -side right -fill y
pack $w.f -expand yes -fill both
}
diff --git a/library/demos/widget b/library/demos/widget
index 8b92f9a..1d838ad 100644
--- a/library/demos/widget
+++ b/library/demos/widget
@@ -10,7 +10,6 @@ exec wish "$0" ${1+"$@"}
# separate ".tcl" files is this directory, which are sourced by this script as
# needed.
-package require Tcl 8.5
package require Tk 8.5
package require msgcat
@@ -145,7 +144,7 @@ catch {
}
ttk::frame .textFrame
-scrollbar .s -orient vertical -command {.t yview} -takefocus 1
+ttk::scrollbar .s -orient vertical -command {.t yview} -takefocus 1
pack .s -in .textFrame -side right -fill y
text .t -yscrollcommand {.s set} -wrap word -width 70 -height $textheight \
-font mainFont -setgrid 1 -highlightthickness 0 \
@@ -565,8 +564,10 @@ proc showCode w {
-xscrollcommand [list $t.xscroll set] \
-yscrollcommand [list $t.yscroll set] \
-setgrid 1 -highlightthickness 0 -pady 2 -padx 3]
- scrollbar $t.xscroll -command [list $t.text xview] -orient horizontal
- scrollbar $t.yscroll -command [list $t.text yview] -orient vertical
+ ttk::scrollbar $t.xscroll -command [list $t.text xview] \
+ -orient horizontal
+ ttk::scrollbar $t.yscroll -command [list $t.text yview] \
+ -orient vertical
grid $t.text $t.yscroll -sticky news
#grid $t.xscroll
diff --git a/library/dialog.tcl b/library/dialog.tcl
index 22c4dd3..c751621 100644
--- a/library/dialog.tcl
+++ b/library/dialog.tcl
@@ -28,7 +28,6 @@
# bottom of the dialog box.
proc ::tk_dialog {w title text bitmap default args} {
- global tcl_platform
variable ::tk::Priv
# Check that $default was properly given
diff --git a/library/entry.tcl b/library/entry.tcl
index c8422dc..6243d26 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -46,7 +46,6 @@ bind Entry <<Copy>> {
}
}
bind Entry <<Paste>> {
- global tcl_platform
catch {
if {[tk windowingsystem] ne "x11"} {
catch {
@@ -358,12 +357,18 @@ proc ::tk::EntryMouseSelect {w x} {
}
}
word {
- if {$cur < [$w index anchor]} {
+ if {$cur < $anchor} {
set before [tcl_wordBreakBefore [$w get] $cur]
set after [tcl_wordBreakAfter [$w get] [expr {$anchor-1}]]
- } else {
+ } elseif {$cur > $anchor} {
set before [tcl_wordBreakBefore [$w get] $anchor]
set after [tcl_wordBreakAfter [$w get] [expr {$cur - 1}]]
+ } else {
+ if {[$w index @$Priv(pressX)] < $anchor} {
+ incr anchor -1
+ }
+ set before [tcl_wordBreakBefore [$w get] $anchor]
+ set after [tcl_wordBreakAfter [$w get] $anchor]
}
if {$before < 0} {
set before 0
diff --git a/library/images/lamp.png b/library/images/lamp.png
deleted file mode 100644
index 5445746..0000000
--- a/library/images/lamp.png
+++ /dev/null
Binary files differ
diff --git a/library/images/lamp.svg b/library/images/lamp.svg
deleted file mode 100644
index aa34765..0000000
--- a/library/images/lamp.svg
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="256"
- height="256"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.46"
- version="1.0"
- sodipodi:docname="lamp.svg"
- inkscape:output_extension="org.inkscape.output.svg.inkscape"
- inkscape:export-filename="C:\Users\pat\Documents\SVG\wish\lamp.png"
- inkscape:export-xdpi="45"
- inkscape:export-ydpi="45">
- <defs
- id="defs4">
- <inkscape:perspective
- sodipodi:type="inkscape:persp3d"
- inkscape:vp_x="0 : 526.18109 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_z="744.09448 : 526.18109 : 1"
- inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
- id="perspective10" />
- <inkscape:perspective
- id="perspective4202"
- inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
- inkscape:vp_z="744.09448 : 526.18109 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_x="0 : 526.18109 : 1"
- sodipodi:type="inkscape:persp3d" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.9765625"
- inkscape:cx="122.94071"
- inkscape:cy="132.27976"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="false"
- inkscape:window-width="1253"
- inkscape:window-height="696"
- inkscape:window-x="155"
- inkscape:window-y="130" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title>Wish</dc:title>
- <cc:license
- rdf:resource="http://creativecommons.org/licenses/by-nc-sa/3.0/" />
- </cc:Work>
- <cc:License
- rdf:about="http://creativecommons.org/licenses/by-nc-sa/3.0/">
- <cc:permits
- rdf:resource="http://creativecommons.org/ns#Reproduction" />
- <cc:permits
- rdf:resource="http://creativecommons.org/ns#Distribution" />
- <cc:requires
- rdf:resource="http://creativecommons.org/ns#Notice" />
- <cc:requires
- rdf:resource="http://creativecommons.org/ns#Attribution" />
- <cc:prohibits
- rdf:resource="http://creativecommons.org/ns#CommercialUse" />
- <cc:permits
- rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
- <cc:requires
- rdf:resource="http://creativecommons.org/ns#ShareAlike" />
- </cc:License>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <path
- id="path4244"
- d="M 415.15644,157.10949 C 415.95395,156.55285 413.63871,156.20026 408.98022,156.16891 C 400.39605,156.11114 394.03714,153.62619 389.90404,148.71428 C 386.80837,145.03529 386.70005,142.56479 389.55139,140.67157 C 392.33793,138.82138 391.59696,137.74624 384.94986,133.99485 C 377.10186,129.56571 367.45876,120.11083 361.01771,110.52982 C 356.2238,103.39891 354.835,102.02199 351.39782,100.99218 C 348.07028,99.995225 347.3807,99.349945 347.3807,97.233135 C 347.3807,95.827615 348.28389,93.409235 349.38778,91.858965 C 350.70625,90.007345 351.00116,88.909055 350.24734,88.657785 C 348.52268,88.082895 349.12369,71.212775 351.01049,67.236642 C 352.72697,63.619426 358.4038,59.341601 362.8807,58.291741 C 368.19851,57.044683 371.3807,54.944074 371.3807,52.68077 C 371.3807,51.505545 370.0325,48.443002 368.38469,45.875118 C 364.6377,40.035936 363.56213,33.352517 365.70314,29.212273 C 368.86873,23.090696 378.69381,16.159436 389.80945,12.206085 C 396.16957,9.9440683 409.19029,7.9006403 416.8807,7.9576143 C 429.56583,8.0515923 430.45121,10.684797 418.52387,12.844573 C 408.41402,14.675243 395.40533,18.738492 389.39058,21.944323 C 382.19817,25.777834 375.3807,32.024842 375.3807,34.781896 C 375.3807,35.961118 376.7307,39.600271 378.3807,42.868903 C 381.7881,49.618923 382.10517,53.281819 379.7158,58.292375 C 377.80005,62.30975 372.62836,64.868903 366.42556,64.868903 C 361.00253,64.868903 357.56106,66.378947 356.20597,69.353051 C 354.65926,72.747705 355.39815,73.177385 359.69504,71.382035 C 364.84442,69.230481 369.94545,69.499889 378.3807,72.368905 C 386.08854,74.990505 393.19753,75.572485 396.42352,73.845985 C 399.16382,72.379425 400.20168,69.980487 401.8714,61.253678 C 402.8156,56.318785 404.11402,52.717225 405.46884,51.27508 C 409.57057,46.908996 417.3263,46.188254 435.8807,48.4489 C 440.51899,49.014024 441.21999,48.798052 445.57071,45.463499 C 448.15021,43.486471 450.93616,41.868903 451.76169,41.868903 C 456.39638,41.868903 453.00898,47.459001 446.28417,50.908252 C 444.30607,51.922844 437.33107,53.551117 430.78417,54.526637 C 415.93531,56.739186 415.13628,57.382184 413.51607,68.422706 C 412.86967,72.827445 411.54206,77.483105 410.53723,78.868905 C 407.37979,83.223475 398.88397,87.099935 391.31007,87.641845 C 382.34323,88.283415 380.33433,87.656565 374.36395,82.354025 C 370.03354,78.508005 368.69669,77.868905 364.98218,77.868905 C 360.03038,77.868905 356.23453,80.317105 353.75648,85.109115 C 352.31064,87.905065 352.31073,88.250245 353.75754,89.059915 C 354.62947,89.547875 358.14729,92.392935 361.57494,95.382295 C 373.67667,105.93659 385.05189,109.87945 387.55431,104.38722 C 389.01862,101.17342 400.23138,93.868905 403.70042,93.868905 C 405.61476,93.868905 406.3807,93.354525 406.3807,92.068905 C 406.3807,89.300765 408.42915,87.865755 412.3307,87.900705 C 416.2925,87.936195 418.45173,89.238425 420.29952,92.706685 C 421.27351,94.534825 422.08643,94.908595 424.02848,94.421175 C 425.97033,93.933795 427.14185,94.472205 429.40044,96.890035 C 430.98913,98.590725 433.7721,100.41478 435.58483,100.94347 C 438.47789,101.78726 439.06063,101.62756 440.35288,99.636815 C 445.10643,92.313915 453.6284,87.868905 462.91432,87.868905 C 471.25226,87.868905 477.3762,94.861065 477.37915,104.38451 C 477.38132,111.40533 474.73351,115.99375 469.63732,117.8004 C 465.8216,119.15312 465.3143,119.09082 460.41928,116.6683 L 455.23918,114.10469 L 455.55994,118.7368 C 455.85694,123.02582 455.69553,123.39336 453.3807,123.69898 C 452.0057,123.88052 449.0807,125.72311 446.8807,127.79362 C 444.6807,129.86413 441.3057,132.60737 439.3807,133.88971 C 437.4557,135.17205 435.71687,136.34329 435.51663,136.49247 C 435.3164,136.64165 436.1039,138.303 437.26663,140.18434 C 440.00489,144.61494 439.95186,145.14881 436.36797,149.23063 C 433.17349,152.86894 427.63954,155.56972 421.9273,156.27821 C 420.02228,156.51449 417.43247,156.99854 416.17217,157.35387 C 414.69967,157.76902 414.33665,157.68168 415.15644,157.10949 z M 461.66289,105.49411 C 466.02111,106.09147 466.3807,105.96302 467.55302,103.39006 C 468.64455,100.9944 468.56244,100.47497 466.9,99.259355 C 463.50165,96.774425 454.03816,98.379955 450.76501,101.99675 C 449.2334,103.68915 449.23826,104.00257 450.83387,106.43778 L 452.55063,109.05789 L 454.78597,106.9579 C 456.6536,105.20335 457.78484,104.96256 461.66289,105.49411 z M 480.08955,157.24443 C 479.03653,156.19141 479.23148,154.86891 480.43972,154.86891 C 481.02218,154.86891 481.22062,155.31891 480.8807,155.86891 C 480.53516,156.42801 481.28072,156.85424 482.57168,156.83564 L 484.8807,156.80237 L 482.82974,155.08564 C 481.26204,153.77341 480.78031,152.19079 480.78523,148.36891 C 480.78878,145.61891 480.4093,142.24744 479.94194,140.87675 C 479.17159,138.6174 479.24977,138.51536 480.77884,139.78437 C 482.10899,140.8883 482.72069,140.92526 483.67308,139.95921 C 484.61817,139.00056 484.50928,138.45979 483.17218,137.47168 C 480.67758,135.62817 479.8077,125.30277 482.07374,124.43321 C 484.50372,123.50074 486.09262,125.4993 484.69743,127.73335 C 484.07418,128.73133 483.86705,130.0378 484.23714,130.63662 C 484.60722,131.23543 484.90343,137.49517 484.89536,144.54714 C 484.88148,156.68738 484.7722,157.38444 482.83955,157.66109 C 481.71692,157.82179 480.47942,157.63429 480.08955,157.24443 z M 482.25305,118.70224 C 481.74301,109.37956 481.9401,107.3904 483.40197,107.10616 C 484.64333,106.86478 484.91924,108.04245 484.9015,113.50646 C 484.88705,117.95665 484.46065,120.34226 483.63023,120.61907 C 482.88848,120.86632 482.32882,120.08736 482.25305,118.70224 z M 379.00441,69.349758 C 376.06529,66.410633 377.10113,63.67485 383.3807,57.791426 C 389.1743,52.363315 389.3807,51.996847 389.3807,47.13811 C 389.3807,42.527633 389.68488,41.874271 393.01325,39.335601 C 396.00346,37.054853 398.10542,36.431883 404.90027,35.812562 C 416.73834,34.733574 419.96577,32.472032 421.51698,24.168809 C 422.76442,17.491595 424.77273,15.934307 435.02949,13.690888 C 444.53714,11.61132 473.5654,10.035808 469.8807,11.799335 C 462.39978,15.379766 448.69837,19.973669 443.16225,20.757679 C 434.68965,21.957548 433.72397,22.530265 426.73194,30.502062 C 423.51376,34.171199 419.46171,37.767608 417.72739,38.494081 C 415.99308,39.220554 410.20812,40.121839 404.87193,40.496935 C 392.82345,41.34386 390.96003,42.710991 391.65408,50.194442 C 392.08855,54.878864 391.98999,55.090456 388.28416,57.429845 C 384.39732,59.883502 381.94201,63.096875 383.08255,64.23742 C 383.42987,64.584736 386.14059,64.868903 389.10639,64.868903 C 395.04346,64.868903 395.33233,66.026622 389.95576,68.273094 C 383.92501,70.792905 380.75884,71.104181 379.00441,69.349758 z M 434.60321,38.312199 C 427.83023,33.568222 439.44607,28.281864 448.8156,31.844152 C 452.78899,33.354831 451.84999,34.868903 446.93972,34.868903 C 442.58714,34.868903 440.3344,36.104222 442.3807,37.368903 C 442.94864,37.719911 443.15443,38.426005 442.838,38.938001 C 441.93507,40.398969 437.05277,40.027939 434.60321,38.312199 z M 399.1307,26.788804 C 398.1682,26.228199 397.3807,24.907716 397.3807,23.854397 C 397.3807,19.888982 404.86882,18.583104 410.97957,21.482844 C 414.6962,23.2465 415.79992,26.473299 412.3807,25.579154 C 411.08084,25.239232 410.3807,25.548472 410.3807,26.462523 C 410.3807,28.151255 401.89255,28.397435 399.1307,26.788804 z"
- style="fill:#a19ea5" />
- <path
- id="path4242"
- d="M 105.76326,194.33186 C 96.199481,191.3282 86.035511,183.95952 84.415432,178.8551 C 83.669624,176.50526 84.619431,173.43151 87.043677,170.34958 C 89.131529,167.6953 90.839771,164.85771 90.839771,164.04381 C 90.839771,163.22992 85.918717,159.94111 79.904096,156.73534 C 65.654177,149.14022 48.534772,133.52161 39.035518,119.44956 C 25.94837,100.06246 20.676575,94.528555 15.260318,94.492261 C 12.544659,94.474078 9.7834525,93.586577 9.1243032,92.52005 C 7.1111542,89.262706 9.8582449,82.714405 14.697759,79.234457 L 19.284506,75.93627 L 32.226689,86.830368 C 45.242318,97.786283 61.932601,107.70092 70.896763,109.80181 C 74.874966,110.73415 76.973245,109.63504 82.823316,103.55448 C 91.577415,94.455454 106.5437,84.581571 109.7288,85.803804 C 112.30619,86.792846 119.14001,82.528975 119.50937,79.701372 C 119.63551,78.735652 119.84193,77.072338 119.96808,76.00515 C 120.1008,74.882421 123.45816,74.302552 127.93568,74.629009 C 134.42967,75.102512 136.37445,76.225828 140.03071,81.615217 C 142.42694,85.147312 144.93094,87.89196 145.59516,87.714438 C 146.25938,87.536916 148.11372,86.880753 149.71593,86.256298 C 151.55372,85.540025 154.60158,87.11622 157.97278,90.526315 C 160.91183,93.499275 166.37382,96.761572 170.11052,97.77588 C 176.63713,99.547487 177.10469,99.356038 181.99078,92.911204 C 189.2319,83.360053 193.30348,80.314122 203.42538,76.876064 C 213.99829,73.284813 227.86298,74.099195 234.92479,78.726276 C 249.97261,88.585994 246.13011,121.71137 229.57839,124.81649 C 217.25776,127.12786 203.68336,119.34028 204.912,110.66549 C 205.47565,106.68593 206.35069,106.38575 217.3878,106.38575 C 228.7903,106.38575 229.33057,106.17926 231.11535,101.13898 C 232.77591,96.449555 232.39214,95.427248 227.50256,91.5151 C 221.01109,86.321288 212.43622,85.84151 203.33017,90.162611 C 193.1595,94.988901 192.26182,99.390772 198.85898,112.08736 C 201.94886,118.03401 204.71121,125.78933 204.99756,129.32143 C 205.44391,134.8274 204.9522,135.7516 201.55033,135.80083 C 199.36802,135.83241 193.58823,139.5894 188.70635,144.14971 C 183.82446,148.71 177.14673,154.02271 173.86693,155.95573 C 170.58712,157.88875 167.90365,160.16082 167.90365,161.00476 C 167.90365,161.8487 169.76144,165.83259 172.03207,169.85786 L 176.16049,177.17652 L 169.56843,183.28424 C 155.87761,195.96917 126.9335,200.98073 105.76326,194.33186 z"
- style="fill:#edd400"
- sodipodi:nodetypes="cssssssscccsssssssssssssssssssssssssscccc" />
- <path
- id="path4238"
- d="M 105.76326,195.26015 C 91.2682,190.70773 79.926103,178.96138 85.064191,173.82331 C 86.412111,172.47539 90.329525,173.11166 98.078673,175.93715 C 114.43988,181.90274 127.59098,183.59079 140.28535,181.35472 C 153.94689,178.94829 158.14857,176.20124 155.47497,171.42379 C 153.72375,168.29452 151.50157,168.02067 131.82394,168.50911 C 119.87893,168.8056 106.35554,168.19755 101.77196,167.15787 C 89.698721,164.41931 70.093174,152.93068 56.939947,140.88681 C 44.534571,129.52772 29.195171,107.81695 31.238758,104.51038 C 31.937342,103.38006 30.70876,100.53908 28.508587,98.197089 C 25.268931,94.748645 23.184206,94.116538 17.545112,94.872902 C 13.258048,95.447908 10.071549,94.981011 9.2539007,93.658026 C 7.1231945,90.210482 9.7375867,83.729446 14.697767,80.162746 L 19.284499,76.864559 L 32.226699,87.758658 C 47.530117,100.64033 63.263112,109.42753 74.136789,111.1663 C 82.555064,112.51244 85.287914,115.79329 81.646114,120.18138 C 77.940809,124.646 66.533098,123.44089 54.981809,117.36455 C 49.183358,114.31439 44.065729,112.19224 43.609327,112.64866 C 42.195407,114.06256 58.535133,129.40174 68.983105,136.4687 C 82.893943,145.87792 99.314337,150.64583 118.36258,150.80678 C 145.52872,151.03631 162.76551,145.71413 177.25684,132.62207 C 188.34716,122.60263 188.94814,120.5505 182.73878,113.90333 C 175.81472,106.49109 168.70623,106.44964 158.32432,113.76097 C 147.98605,121.04152 132.76454,123.60855 116.61147,120.79561 C 102.20671,118.28713 93.486961,114.8298 92.037334,111.05211 C 91.442016,109.50075 89.277658,108.23147 87.227649,108.23147 C 85.17764,108.23147 83.500363,107.13687 83.500363,105.79902 C 83.500363,100.44846 105.44657,85.088853 110.38429,86.983634 C 112.97609,87.978198 112.0154,89.694925 104.72512,97.096507 L 95.944216,106.01146 L 108.89174,108.95633 C 125.60393,112.75743 132.19327,112.622 141.75698,108.28088 C 150.27283,104.41539 151.12833,102.11981 146.51015,95.52644 C 143.6484,91.440733 143.6695,91.029744 146.86084,88.696177 C 151.48792,85.312779 152.0368,85.452081 158.05294,91.536605 C 160.9479,94.464463 166.37382,97.689862 170.11052,98.704169 C 176.63713,100.47578 177.10469,100.28433 181.99078,93.839493 C 189.2319,84.288343 193.30348,81.242411 203.42538,77.804353 C 214.46761,74.053691 228.66626,75.111117 235.46998,80.190801 C 246.39872,88.350288 247.47071,106.01058 237.63431,115.84696 C 231.52704,121.95423 223.54183,122.71682 215.49179,117.96155 C 204.60894,111.53288 206.6535,105.81232 219.23735,107.48162 C 226.96374,108.50657 228.35458,108.17571 230.11029,104.8951 C 232.76067,99.942824 232.67127,92.999442 229.92172,90.249895 C 226.72145,87.049615 210.78434,87.553668 203.33017,91.0909 C 193.1595,95.917191 192.26182,100.31906 198.85898,113.01565 C 201.94886,118.9623 204.71121,126.71762 204.99756,130.24972 C 205.44391,135.75569 204.9522,136.67989 201.55033,136.72912 C 199.36802,136.7607 193.58823,140.51769 188.70635,145.078 C 183.82446,149.63829 177.14673,154.951 173.86693,156.88402 C 170.58712,158.81704 167.90365,161.08911 167.90365,161.93305 C 167.90365,162.77699 169.76144,166.76088 172.03207,170.78615 L 176.16049,178.10481 L 169.56843,184.21253 C 155.87761,196.89746 126.9335,201.90902 105.76326,195.26015 z M 124.39689,92.286528 C 123.73252,90.555233 124.16318,88.866818 125.37189,88.463902 C 128.82997,87.311229 127.89606,85.131073 122.98588,82.893835 C 115.70755,79.577611 118.94662,74.88732 128.04458,75.568657 C 133.65369,75.988728 136.35232,77.369401 139.27998,81.316906 L 143.13312,86.512278 L 137.98496,90.949892 C 131.98533,96.12141 126.09095,96.701224 124.39689,92.286528 z"
- style="fill:#555753"
- sodipodi:nodetypes="cssssssssssscccsssssssssssssscccsssssssssssssssssssscccccssscccc" />
- <path
- id="path4234"
- d="M 110.50482,194.3016 C 101.29684,192.13337 94.533525,188.48684 89.271383,182.85325 C 82.390918,175.4871 85.936884,174.28107 99.528813,179.36455 C 115.59245,185.37247 143.30992,186.28633 152.7661,181.11982 C 159.03409,177.69523 160.98588,170.45868 156.43581,167.51383 C 155.17435,166.69739 142.9955,165.96174 129.37171,165.87907 C 108.80987,165.75428 102.74285,165.05333 93.663859,161.75352 C 73.025491,154.25244 49.561448,135.01491 39.768427,117.56612 C 35.780389,110.46041 36.411322,110.85564 48.942698,123.31318 C 70.302623,144.54723 92.258893,154.15548 119.15432,154.03838 C 135.83546,153.96576 152.56346,150.85172 163.02604,145.87134 C 172.41161,141.40363 189.9219,125.23231 189.9219,121.03213 C 189.9219,119.19248 187.7843,115.1469 185.17167,112.04198 C 178.58784,104.21754 168.03965,104.18244 155.55484,111.94343 C 150.18536,115.28129 142.95424,117.92581 137.39714,118.58397 C 127.97216,119.70021 104.80591,116.69758 100.01936,113.73933 C 94.450094,110.29735 100.24351,109.86707 113.23644,112.75774 C 127.9361,116.02809 138.20198,114.95313 146.93857,109.22869 C 153.28212,105.07225 154.19121,101.72283 150.50345,96.094621 C 148.24619,92.649609 147.93449,90.769617 149.38072,89.323385 C 150.82695,87.877153 153.0819,88.968084 157.50247,93.252689 C 160.86829,96.51495 166.83523,100.07126 170.76237,101.15561 C 177.28458,102.95648 178.14485,102.76481 180.70126,98.941361 C 190.46478,84.338673 203.44977,77.038962 219.66199,77.038962 C 239.73552,77.038962 249.19265,98.555619 235.51724,113.11244 C 230.28699,118.67977 219.45458,118.99815 214.68225,113.7248 C 210.40882,109.00271 211.87531,107.60004 218.46592,110.10579 C 222.73772,111.72993 224.48175,111.47356 228.23768,108.66934 C 235.27205,103.41743 237.01116,96.063887 232.61714,90.15151 C 228.70991,84.894138 221.3182,83.243302 210.64805,85.245036 C 203.22425,86.637745 191.75676,96.268143 191.75676,101.10994 C 191.75676,103.03903 194.23381,109.00645 197.26132,114.37093 C 203.6019,125.60581 204.5447,133.91945 199.47821,133.91945 C 197.66998,133.91945 192.50945,137.70093 188.01037,142.32275 C 183.51127,146.94454 176.32104,152.80279 172.03207,155.34108 C 163.73389,160.25204 162.48268,163.20921 167.08641,167.02996 C 171.28,170.51035 173.54029,175.47679 172.34649,178.58776 C 170.71762,182.83253 158.4385,190.19925 147.65345,193.40206 C 137.09511,196.53755 121.59442,196.91291 110.50482,194.3016 z M 56.408298,114.61872 C 49.129046,110.97705 38.716927,103.92466 33.270272,98.946719 L 23.367251,89.895915 L 16.969775,92.568949 C 9.3420288,95.756035 8.6495364,95.306148 9.7405408,87.872639 C 10.344685,83.75629 11.031471,82.8609 12.211447,84.651204 C 13.540212,86.667268 14.305567,86.530535 16.306604,83.919666 C 17.660139,82.153618 19.320682,80.708671 19.996697,80.708671 C 20.672694,80.708671 26.554779,85.229385 33.067979,90.7547 C 45.470438,101.27603 59.192323,109.15379 71.573791,112.86101 C 75.610471,114.06964 78.913208,116.20591 78.913208,117.60829 C 78.913208,122.46961 69.63857,121.23756 56.408298,114.61872 z M 87.170053,103.7711 C 87.170053,101.119 98.339717,92.839094 105.19954,90.406132 C 109.67365,88.819295 99.599675,99.261745 92.756946,103.30384 C 87.921829,106.16003 87.170053,106.22289 87.170053,103.7711 z M 129.35231,88.988873 C 132.38564,85.333953 130.37875,80.708671 125.7596,80.708671 C 123.70957,80.708671 122.03229,79.882986 122.03229,78.873816 C 122.03229,76.472212 130.46732,76.514212 134.9969,78.938366 C 141.6449,82.496277 137.51074,91.717796 129.26767,91.717796 C 127.62199,91.717796 127.64274,91.04879 129.35231,88.988873 z"
- style="fill:#000000;fill-opacity:1"
- sodipodi:nodetypes="cssssssssssssssssssssssssssssssssssssscccccsssssssccssccssssc" />
- </g>
-</svg>
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 3270b5d..17c03c0 100644
--- a/library/listbox.tcl
+++ b/library/listbox.tcl
@@ -118,7 +118,7 @@ bind Listbox <Control-Home> {
%W see 0
%W selection clear 0 end
%W selection set 0
- event generate %W <<ListboxSelect>>
+ tk::FireListboxSelectEvent %W
}
bind Listbox <Control-Shift-Home> {
tk::ListboxDataExtend %W 0
@@ -128,7 +128,7 @@ bind Listbox <Control-End> {
%W see end
%W selection clear 0 end
%W selection set end
- event generate %W <<ListboxSelect>>
+ tk::FireListboxSelectEvent %W
}
bind Listbox <Control-Shift-End> {
tk::ListboxDataExtend %W [%W index end]
@@ -163,7 +163,7 @@ bind Listbox <<SelectAll>> {
bind Listbox <<SelectNone>> {
if {[%W cget -selectmode] ne "browse"} {
%W selection clear 0 end
- event generate %W <<ListboxSelect>>
+ tk::FireListboxSelectEvent %W
}
}
@@ -256,7 +256,7 @@ proc ::tk::ListboxBeginSelect {w el {focus 1}} {
set Priv(listboxSelection) {}
set Priv(listboxPrev) $el
}
- event generate $w <<ListboxSelect>>
+ tk::FireListboxSelectEvent $w
# check existence as ListboxSelect may destroy us
if {$focus && [winfo exists $w] && [$w cget -state] eq "normal"} {
focus $w
@@ -284,7 +284,7 @@ proc ::tk::ListboxMotion {w el} {
$w selection clear 0 end
$w selection set $el
set Priv(listboxPrev) $el
- event generate $w <<ListboxSelect>>
+ tk::FireListboxSelectEvent $w
}
extended {
set i $Priv(listboxPrev)
@@ -315,7 +315,7 @@ proc ::tk::ListboxMotion {w el} {
incr i -1
}
set Priv(listboxPrev) $el
- event generate $w <<ListboxSelect>>
+ tk::FireListboxSelectEvent $w
}
}
}
@@ -366,7 +366,7 @@ proc ::tk::ListboxBeginToggle {w el} {
} else {
$w selection set $el
}
- event generate $w <<ListboxSelect>>
+ tk::FireListboxSelectEvent $w
}
}
@@ -418,7 +418,7 @@ proc ::tk::ListboxUpDown {w amount} {
browse {
$w selection clear 0 end
$w selection set active
- event generate $w <<ListboxSelect>>
+ tk::FireListboxSelectEvent $w
}
extended {
$w selection clear 0 end
@@ -426,7 +426,7 @@ proc ::tk::ListboxUpDown {w amount} {
$w selection anchor active
set Priv(listboxPrev) [$w index active]
set Priv(listboxSelection) {}
- event generate $w <<ListboxSelect>>
+ tk::FireListboxSelectEvent $w
}
}
}
@@ -514,7 +514,7 @@ proc ::tk::ListboxCancel w {
}
incr first
}
- event generate $w <<ListboxSelect>>
+ tk::FireListboxSelectEvent $w
}
# ::tk::ListboxSelectAll
@@ -534,5 +534,19 @@ proc ::tk::ListboxSelectAll w {
} else {
$w selection set 0 end
}
- event generate $w <<ListboxSelect>>
+ tk::FireListboxSelectEvent $w
+}
+
+# ::tk::FireListboxSelectEvent
+#
+# Fire the <<ListboxSelect>> event if the listbox is not in disabled
+# state.
+#
+# Arguments:
+# w - The listbox widget.
+
+proc ::tk::FireListboxSelectEvent w {
+ if {[$w cget -state] eq "normal"} {
+ event generate $w <<ListboxSelect>>
+ }
}
diff --git a/library/megawidget.tcl b/library/megawidget.tcl
index 9b9be92..aeb1263 100644
--- a/library/megawidget.tcl
+++ b/library/megawidget.tcl
@@ -29,14 +29,13 @@ package require Tk 8.6
}
::oo::class create ::tk::MegawidgetClass {
- variable w hull OptionSpecification options IdleCallbacks
+ variable w hull options IdleCallbacks
constructor args {
# Extract the "widget name" from the object name
set w [namespace tail [self]]
# Configure things
- set OptionSpecification [my GetSpecs]
- my configure {*}$args
+ tclParseConfigSpec [my varname options] [my GetSpecs] "" $args
# Move the object out of the way of the hull widget
rename [self] _tmp
@@ -46,7 +45,7 @@ package require Tk 8.6
bind $hull <Destroy> [list [namespace which my] destroy]
# Rename things into their final places
- rename ::$w theFrame
+ rename ::$w theWidget
rename [self] ::$w
# Make the contents
@@ -63,28 +62,165 @@ package require Tk 8.6
}
}
+ ####################################################################
+ #
+ # MegawidgetClass::configure --
+ #
+ # Implementation of 'configure' for megawidgets. Emulates the operation
+ # of the standard Tk configure method fairly closely, which makes things
+ # substantially more complex than they otherwise would be.
+ #
+ # This method assumes that the 'GetSpecs' method returns a description
+ # of all the specifications of the options (i.e., as Tk returns except
+ # with the actual values removed). It also assumes that the 'options'
+ # array in the class holds all options; it is up to subclasses to set
+ # traces on that array if they want to respond to configuration changes.
+ #
+ # TODO: allow unambiguous abbreviations.
+ #
method configure args {
- tclParseConfigSpec [my varname options] $OptionSpecification "" $args
+ # Configure behaves differently depending on the number of arguments
+ set argc [llength $args]
+ if {$argc == 0} {
+ return [lmap spec [my GetSpecs] {
+ lappend spec $options([lindex $spec 0])
+ }]
+ } elseif {$argc == 1} {
+ set opt [lindex $args 0]
+ if {[info exists options($opt)]} {
+ set spec [lsearch -inline -index 0 -exact [my GetSpecs] $opt]
+ return [linsert $spec end $options($opt)]
+ }
+ } elseif {$argc == 2} {
+ # Special case for where we're setting a single option. This
+ # avoids some of the costly operations. We still do the [array
+ # get] as this gives a sufficiently-consistent trace.
+ set opt [lindex $args 0]
+ if {[dict exists [array get options] $opt]} {
+ # Actually set the new value of the option. Use a catch to
+ # allow a megawidget user to throw an error from a write trace
+ # on the options array to reject invalid values.
+ try {
+ array set options $args
+ } on error {ret info} {
+ # Rethrow the error to get a clean stack trace
+ return -code error -errorcode [dict get $info -errorcode] $ret
+ }
+ return
+ }
+ } elseif {$argc % 2 == 0} {
+ # Check that all specified options exist. Any unknown option will
+ # cause the merged dictionary to be bigger than the options array
+ set merge [dict merge [array get options] $args]
+ if {[dict size $merge] == [array size options]} {
+ # Actually set the new values of the options. Use a catch to
+ # allow a megawidget user to throw an error from a write trace
+ # on the options array to reject invalid values
+ try {
+ array set options $args
+ } on error {ret info} {
+ # Rethrow the error to get a clean stack trace
+ return -code error -errorcode [dict get $info -errorcode] $ret
+ }
+ return
+ }
+ # Due to the order of the merge, the unknown options will be at
+ # the end of the dict. This makes the first unknown option easy to
+ # find.
+ set opt [lindex [dict keys $merge] [array size options]]
+ } else {
+ set opt [lindex $args end]
+ return -code error -errorcode [list TK VALUE_MISSING] \
+ "value for \"$opt\" missing"
+ }
+ return -code error -errorcode [list TK LOOKUP OPTION $opt] \
+ "bad option \"$opt\": must be [tclListValidFlags options]"
}
+
+ ####################################################################
+ #
+ # MegawidgetClass::cget --
+ #
+ # Implementation of 'cget' for megawidgets. Emulates the operation of
+ # the standard Tk cget method fairly closely.
+ #
+ # This method assumes that the 'options' array in the class holds all
+ # options; it is up to subclasses to set traces on that array if they
+ # want to respond to configuration reads.
+ #
+ # TODO: allow unambiguous abbreviations.
+ #
method cget option {
return $options($option)
}
+ ####################################################################
+ #
+ # MegawidgetClass::TraceOption --
+ #
+ # Sets up the tracing of an element of the options variable.
+ #
+ method TraceOption {option method args} {
+ set callback [list my $method {*}$args]
+ trace add variable options($option) write [namespace code $callback]
+ }
+
+ ####################################################################
+ #
+ # MegawidgetClass::GetSpecs --
+ #
+ # Return a list of descriptions of options supported by this
+ # megawidget. Each option is described by the 4-tuple list, consisting
+ # of the name of the option, the "option database" name, the "option
+ # database" class-name, and the default value of the option. These are
+ # the same values returned by calling the configure method of a widget,
+ # except without the current values of the options.
+ #
method GetSpecs {} {
return {
{-takefocus takeFocus TakeFocus {}}
}
}
+ ####################################################################
+ #
+ # MegawidgetClass::CreateHull --
+ #
+ # Creates the real main widget of the megawidget. This is often a frame
+ # or toplevel widget, but isn't always (lightweight megawidgets might
+ # use a content widget directly).
+ #
+ # The name of the hull widget is given by the 'w' instance variable. The
+ # name should be written into the 'hull' instance variable. The command
+ # created by this method will be renamed.
+ #
method CreateHull {} {
return -code error -errorcode {TCL OO ABSTRACT_METHOD} \
"method must be overridden"
}
+
+ ####################################################################
+ #
+ # MegawidgetClass::Create --
+ #
+ # Creates the content of the megawidget. The name of the widget to
+ # create the content in will be in the 'hull' instance variable.
+ #
method Create {} {
return -code error -errorcode {TCL OO ABSTRACT_METHOD} \
"method must be overridden"
}
+ ####################################################################
+ #
+ # MegawidgetClass::WhenIdle --
+ #
+ # Arrange for a method to be called on the current instance when Tk is
+ # idle. Only one such method call per method will be queued; subsequent
+ # queuing actions before the callback fires will be silently ignored.
+ # The additional args will be passed to the callback, and the callbacks
+ # will be properly cancelled if the widget is destroyed.
+ #
method WhenIdle {method args} {
if {![info exists IdleCallbacks($method)]} {
set IdleCallbacks($method) [after idle [list \
@@ -97,6 +233,15 @@ package require Tk 8.6
}
}
+####################################################################
+#
+# tk::SimpleWidget --
+#
+# Simple megawidget class that makes it easy create widgets that behave
+# like a ttk widget. It creates the hull as a ttk::frame and maps the
+# state manipulation methods of the overall megawidget to the equivalent
+# operations on the ttk::frame.
+#
::tk::Megawidget create ::tk::SimpleWidget {} {
variable w hull options
method GetSpecs {} {
@@ -107,12 +252,12 @@ package require Tk 8.6
}
method CreateHull {} {
set hull [::ttk::frame $w -cursor $options(-cursor)]
- trace add variable options(-cursor) write \
- [namespace code {my UpdateCursorOption}]
+ my TraceOption -cursor UpdateCursorOption
}
method UpdateCursorOption args {
$hull configure -cursor $options(-cursor)
}
+ # Not fixed names, so can't forward
method state args {
tailcall $hull state {*}$args
}
@@ -121,6 +266,13 @@ package require Tk 8.6
}
}
+####################################################################
+#
+# tk::FocusableWidget --
+#
+# Simple megawidget class that makes a ttk-like widget that has a focus
+# ring.
+#
::tk::Megawidget create ::tk::FocusableWidget ::tk::SimpleWidget {
variable w hull options
method GetSpecs {} {
@@ -133,8 +285,7 @@ package require Tk 8.6
ttk::frame $w
set hull [ttk::entry $w.cHull -takefocus 0 -cursor $options(-cursor)]
pack $hull -expand yes -fill both -ipadx 2 -ipady 2
- trace add variable options(-cursor) write \
- [namespace code {my UpdateCursorOption}]
+ my TraceOption -cursor UpdateCursorOption
}
}
diff --git a/library/menu.tcl b/library/menu.tcl
index d05740f..b5dd88e 100644
--- a/library/menu.tcl
+++ b/library/menu.tcl
@@ -248,7 +248,6 @@ proc ::tk::MbLeave w {
proc ::tk::MbPost {w {x {}} {y {}}} {
global errorInfo
variable ::tk::Priv
- global tcl_platform
if {[$w cget -state] eq "disabled" || $w eq $Priv(postedMb)} {
return
@@ -313,6 +312,9 @@ proc ::tk::MbPost {w {x {}} {y {}}} {
set x [expr {[winfo rootx $w] - [winfo reqwidth $menu]}]
set y [expr {(2 * [winfo rooty $w] + [winfo height $w]) / 2}]
set entry [MenuFindName $menu [$w cget -text]]
+ if {$entry eq ""} {
+ set entry 0
+ }
if {[$w cget -indicatoron]} {
if {$entry == [$menu index last]} {
incr y [expr {-([$menu yposition $entry] \
@@ -333,6 +335,9 @@ proc ::tk::MbPost {w {x {}} {y {}}} {
set x [expr {[winfo rootx $w] + [winfo width $w]}]
set y [expr {(2 * [winfo rooty $w] + [winfo height $w]) / 2}]
set entry [MenuFindName $menu [$w cget -text]]
+ if {$entry eq ""} {
+ set entry 0
+ }
if {[$w cget -indicatoron]} {
if {$entry == [$menu index last]} {
incr y [expr {-([$menu yposition $entry] \
@@ -396,7 +401,6 @@ proc ::tk::MbPost {w {x {}} {y {}}} {
# is a posted menubutton.
proc ::tk::MenuUnpost menu {
- global tcl_platform
variable ::tk::Priv
set mb $Priv(postedMb)
@@ -525,7 +529,6 @@ proc ::tk::MbMotion {w upDown rootx rooty} {
proc ::tk::MbButtonUp w {
variable ::tk::Priv
- global tcl_platform
set menu [$w cget -menu]
set tearoff [expr {[tk windowingsystem] eq "x11" || \
@@ -600,11 +603,14 @@ proc ::tk::MenuMotion {menu x y state} {
proc ::tk::MenuButtonDown menu {
variable ::tk::Priv
- global tcl_platform
if {![winfo viewable $menu]} {
return
}
+ if {[$menu index active] eq "none"} {
+ set Priv(window) {}
+ return
+ }
$menu postcascade active
if {$Priv(postedMb) ne "" && [winfo viewable $Priv(postedMb)]} {
grab -global $Priv(postedMb)
@@ -1030,7 +1036,7 @@ proc ::tk::MenuFind {w char} {
proc ::tk::TraverseToMenu {w char} {
variable ::tk::Priv
- if {$char eq ""} {
+ if {![winfo exists $w] || $char eq ""} {
return
}
while {[winfo class $w] eq "Menu"} {
@@ -1212,8 +1218,6 @@ proc ::tk::MenuFindName {menu s} {
# upper-left corner goes at (x,y).
proc ::tk::PostOverPoint {menu x y {entry {}}} {
- global tcl_platform
-
if {$entry ne ""} {
if {$entry == [$menu index last]} {
incr y [expr {-([$menu yposition $entry] \
@@ -1228,8 +1232,8 @@ proc ::tk::PostOverPoint {menu x y {entry {}}} {
if {[tk windowingsystem] eq "win32"} {
# osVersion is not available in safe interps
set ver 5
- if {[info exists tcl_platform(osVersion)]} {
- scan $tcl_platform(osVersion) %d ver
+ if {[info exists ::tcl_platform(osVersion)]} {
+ scan $::tcl_platform(osVersion) %d ver
}
# We need to fix some problems with menu posting on Windows,
@@ -1334,7 +1338,6 @@ proc ::tk::GenerateMenuSelect {menu} {
proc ::tk_popup {menu x y {entry {}}} {
variable ::tk::Priv
- global tcl_platform
if {$Priv(popup) ne "" || $Priv(postedMb) ne ""} {
tk::MenuUnpost {}
}
diff --git a/library/msgbox.tcl b/library/msgbox.tcl
index 939928d..6d329c2 100644
--- a/library/msgbox.tcl
+++ b/library/msgbox.tcl
@@ -129,7 +129,7 @@ static unsigned char w3_bits[] = {
# See the user documentation for details on what tk_messageBox does.
#
proc ::tk::MessageBox {args} {
- global tcl_platform tk_strictMotif
+ global tk_strictMotif
variable ::tk::Priv
set w ::tk::PrivMsgBox
diff --git a/library/msgs/es.msg b/library/msgs/es.msg
index 991711b..578c52c 100644
--- a/library/msgs/es.msg
+++ b/library/msgs/es.msg
@@ -1,7 +1,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 "All Files" "Todos los archivos"
::msgcat::mcset es "Application Error" "Error de la aplicaci\u00f3n"
::msgcat::mcset es "&Blue" "&Azul"
::msgcat::mcset es "Cancel" "Cancelar"
@@ -61,7 +61,7 @@ namespace eval ::tk {
::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\u00ed"
::msgcat::mcset es "abort" "abortar"
::msgcat::mcset es "blue" "azul"
::msgcat::mcset es "cancel" "cancelar"
diff --git a/library/msgs/ru.msg b/library/msgs/ru.msg
index be2b551..2aac5bb 100644
--- a/library/msgs/ru.msg
+++ b/library/msgs/ru.msg
@@ -18,7 +18,7 @@ namespace eval ::tk {
::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 "Error: %1\$s" "\u041e\u0448\u0438\u0431\u043a\u0430: %1\$s"
::msgcat::mcset ru "E&xit" "\u0412\u044b\u0445\u043e\u0434"
::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?"
@@ -34,7 +34,7 @@ namespace eval ::tk {
::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 "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"
diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl
index e17442f..6f1caa2 100644
--- a/library/scrlbar.tcl
+++ b/library/scrlbar.tcl
@@ -152,6 +152,12 @@ switch [tk windowingsystem] {
}
}
"x11" {
+ bind Scrollbar <MouseWheel> {
+ tk::ScrollByUnits %W v [expr {- (%D /120 ) * 4}]
+ }
+ bind Scrollbar <Shift-MouseWheel> {
+ tk::ScrollByUnits %W h [expr {- (%D /120 ) * 4}]
+ }
bind Scrollbar <4> {tk::ScrollByUnits %W v -5}
bind Scrollbar <5> {tk::ScrollByUnits %W v 5}
bind Scrollbar <Shift-4> {tk::ScrollByUnits %W h -5}
@@ -424,6 +430,9 @@ proc ::tk::ScrollTopBottom {w x y} {
proc ::tk::ScrollButton2Down {w x y} {
variable ::tk::Priv
+ if {![winfo exists $w]} {
+ return
+ }
set element [$w identify $x $y]
if {[string match {arrow[12]} $element]} {
ScrollButtonDown $w $x $y
@@ -437,7 +446,9 @@ proc ::tk::ScrollButton2Down {w x y} {
# slider drag.
update idletasks
- $w configure -activerelief sunken
- $w activate slider
- ScrollStartDrag $w $x $y
+ if {[winfo exists $w]} {
+ $w configure -activerelief sunken
+ $w activate slider
+ ScrollStartDrag $w $x $y
+ }
}
diff --git a/library/spinbox.tcl b/library/spinbox.tcl
index 4d94420..1965ed8 100644
--- a/library/spinbox.tcl
+++ b/library/spinbox.tcl
@@ -52,7 +52,6 @@ bind Spinbox <<Copy>> {
}
}
bind Spinbox <<Paste>> {
- global tcl_platform
catch {
if {[tk windowingsystem] ne "x11"} {
catch {
@@ -87,10 +86,12 @@ bind Spinbox <B1-Motion> {
::tk::spinbox::Motion %W %x %y
}
bind Spinbox <Double-1> {
+ ::tk::spinbox::ArrowPress %W %x %y
set tk::Priv(selectMode) word
::tk::spinbox::MouseSelect %W %x sel.first
}
bind Spinbox <Triple-1> {
+ ::tk::spinbox::ArrowPress %W %x %y
set tk::Priv(selectMode) line
::tk::spinbox::MouseSelect %W %x 0
}
@@ -300,6 +301,10 @@ bind Spinbox <B2-Motion> {
proc ::tk::spinbox::Invoke {w elem} {
variable ::tk::Priv
+ if {![winfo exists $w]} {
+ return
+ }
+
if {![info exists Priv(outsideElement)]} {
$w invoke $elem
incr Priv(repeated)
@@ -329,6 +334,35 @@ proc ::tk::spinbox::ClosestGap {w x} {
incr pos
}
+# ::tk::spinbox::ArrowPress --
+# This procedure is invoked to handle button-1 presses in buttonup
+# or buttondown elements of spinbox widgets.
+#
+# Arguments:
+# w - The spinbox window in which the button was pressed.
+# x - The x-coordinate of the button press.
+# y - The y-coordinate of the button press.
+
+proc ::tk::spinbox::ArrowPress {w x y} {
+ variable ::tk::Priv
+
+ if {[$w cget -state] ne "disabled" && \
+ [string match "button*" $Priv(element)]} {
+ $w selection element $Priv(element)
+ set Priv(repeated) 0
+ set Priv(relief) [$w cget -$Priv(element)relief]
+ catch {after cancel $Priv(afterId)}
+ set delay [$w cget -repeatdelay]
+ if {$delay > 0} {
+ set Priv(afterId) [after $delay \
+ [list ::tk::spinbox::Invoke $w $Priv(element)]]
+ }
+ if {[info exists Priv(outsideElement)]} {
+ unset Priv(outsideElement)
+ }
+ }
+}
+
# ::tk::spinbox::ButtonDown --
# This procedure is invoked to handle button-1 presses in spinbox
# widgets. It moves the insertion cursor, sets the selection anchor,
@@ -337,6 +371,7 @@ proc ::tk::spinbox::ClosestGap {w x} {
# Arguments:
# w - The spinbox window in which the button was pressed.
# x - The x-coordinate of the button press.
+# y - The y-coordinate of the button press.
proc ::tk::spinbox::ButtonDown {w x y} {
variable ::tk::Priv
@@ -351,20 +386,7 @@ proc ::tk::spinbox::ButtonDown {w x y} {
switch -exact $Priv(element) {
"buttonup" - "buttondown" {
- if {"disabled" ne [$w cget -state]} {
- $w selection element $Priv(element)
- set Priv(repeated) 0
- set Priv(relief) [$w cget -$Priv(element)relief]
- catch {after cancel $Priv(afterId)}
- set delay [$w cget -repeatdelay]
- if {$delay > 0} {
- set Priv(afterId) [after $delay \
- [list ::tk::spinbox::Invoke $w $Priv(element)]]
- }
- if {[info exists Priv(outsideElement)]} {
- unset Priv(outsideElement)
- }
- }
+ ::tk::spinbox::ArrowPress $w $x $y
}
"entry" {
set Priv(selectMode) char
@@ -389,6 +411,7 @@ proc ::tk::spinbox::ButtonDown {w x y} {
# Arguments:
# w - The spinbox window in which the button was pressed.
# x - The x-coordinate of the button press.
+# y - The y-coordinate of the button press.
proc ::tk::spinbox::ButtonUp {w x y} {
variable ::tk::Priv
@@ -492,6 +515,8 @@ proc ::tk::spinbox::Paste {w x} {
#
# Arguments:
# w - The spinbox window.
+# x - The x-coordinate of the mouse.
+# y - The y-coordinate of the mouse.
proc ::tk::spinbox::Motion {w x y} {
variable ::tk::Priv
diff --git a/library/text.tcl b/library/text.tcl
index 279e2d9..59e395c 100644
--- a/library/text.tcl
+++ b/library/text.tcl
@@ -85,7 +85,16 @@ bind Text <ButtonRelease-1> {
}
bind Text <Control-1> {
%W mark set insert @%x,%y
+ # An operation that moves the insert mark without making it
+ # one end of the selection must insert an autoseparator
+ if {[%W cget -autoseparators]} {
+ %W edit separator
+ }
}
+# stop an accidental double click triggering <Double-Button-1>
+bind Text <Double-Control-1> { # nothing }
+# stop an accidental movement triggering <B1-Motion>
+bind Text <Control-B1-Motion> { # nothing }
bind Text <<PrevChar>> {
tk::TextSetCursor %W insert-1displayindices
}
@@ -245,6 +254,11 @@ bind Text <<SelectAll>> {
}
bind Text <<SelectNone>> {
%W tag remove sel 1.0 end
+ # An operation that clears the selection must insert an autoseparator,
+ # because the selection operation may have moved the insert mark
+ if {[%W cget -autoseparators]} {
+ %W edit separator
+ }
}
bind Text <<Cut>> {
tk_textCut %W
@@ -256,7 +270,15 @@ bind Text <<Paste>> {
tk_textPaste %W
}
bind Text <<Clear>> {
+ # Make <<Clear>> an atomic operation on the Undo stack,
+ # i.e. separate it from other delete operations on either side
+ if {[%W cget -autoseparators]} {
+ %W edit separator
+ }
catch {%W delete sel.first sel.last}
+ if {[%W cget -autoseparators]} {
+ %W edit separator
+ }
}
bind Text <<PasteSelection>> {
if {$tk_strictMotif || ![info exists tk::Priv(mouseMoved)]
@@ -314,7 +336,16 @@ bind Text <Control-t> {
}
bind Text <<Undo>> {
+ # An Undo operation may remove the separator at the top of the Undo stack.
+ # Then the item at the top of the stack gets merged with the subsequent changes.
+ # Place separators before and after Undo to prevent this.
+ if {[%W cget -autoseparators]} {
+ %W edit separator
+ }
catch { %W edit undo }
+ if {[%W cget -autoseparators]} {
+ %W edit separator
+ }
}
bind Text <<Redo>> {
@@ -543,7 +574,6 @@ proc ::tk::TextAnchor {w} {
}
proc ::tk::TextSelectTo {w x y {extend 0}} {
- global tcl_platform
variable ::tk::Priv
set anchorname [tk::TextAnchor $w]
@@ -1022,9 +1052,18 @@ proc ::tk_textCopy w {
proc ::tk_textCut w {
if {![catch {set data [$w get sel.first sel.last]}]} {
+ # make <<Cut>> an atomic operation on the Undo stack,
+ # i.e. separate it from other delete operations on either side
+ set oldSeparator [$w cget -autoseparators]
+ if {$oldSeparator} {
+ $w edit separator
+ }
clipboard clear -displayof $w
clipboard append -displayof $w $data
$w delete sel.first sel.last
+ if {$oldSeparator} {
+ $w edit separator
+ }
}
}
@@ -1036,7 +1075,6 @@ proc ::tk_textCut w {
# w - Name of a text widget.
proc ::tk_textPaste w {
- global tcl_platform
if {![catch {::tk::GetSelection $w CLIPBOARD} sel]} {
set oldSeparator [$w cget -autoseparators]
if {$oldSeparator} {
@@ -1164,3 +1202,99 @@ 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 da619e6..d66ac56 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -10,10 +10,8 @@
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
-# Insist on running with compatible version of Tcl
-package require Tcl 8.6
# Verify that we have Tk binary and script components from the same release
-package require -exact Tk 8.6.4
+package require -exact Tk 8.7a0
# Create a ::tk namespace
namespace eval ::tk {
@@ -253,7 +251,6 @@ proc ::tk::ScreenChanged screen {
uplevel #0 [list upvar #0 ::tk::Priv.$disp ::tk::Priv]
variable ::tk::Priv
- global tcl_platform
if {[info exists Priv]} {
set Priv(screen) $screen
@@ -312,7 +309,6 @@ proc ::tk::EventMotifBindings {n1 dummy dummy} {
event $op <<Cut>> <Control-Key-w> <Control-Lock-Key-W> <Shift-Key-Delete>
event $op <<Copy>> <Meta-Key-w> <Meta-Lock-Key-W> <Control-Key-Insert>
event $op <<Paste>> <Control-Key-y> <Control-Lock-Key-Y> <Shift-Key-Insert>
- event $op <<Undo>> <Control-underscore>
event $op <<PrevChar>> <Control-Key-b> <Control-Lock-Key-B>
event $op <<NextChar>> <Control-Key-f> <Control-Lock-Key-F>
event $op <<PrevLine>> <Control-Key-p> <Control-Lock-Key-P>
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl
index 6604575..a52465a 100644
--- a/library/tkfbox.tcl
+++ b/library/tkfbox.tcl
@@ -1169,6 +1169,10 @@ proc ::tk::dialog::file::GlobFiltered {dir type {overrideFilter 0}} {
if {$f eq "." || $f eq ".."} {
continue
}
+ # See ticket [1641721], $f might be a link pointing to a dir
+ if {$type != "d" && [file isdir [file join $dir $f]]} {
+ continue
+ }
lappend result $f
}
}
@@ -1176,7 +1180,6 @@ proc ::tk::dialog::file::GlobFiltered {dir type {overrideFilter 0}} {
}
proc ::tk::dialog::file::CompleteEnt {w} {
- variable showHiddenVar
upvar ::tk::dialog::file::[winfo name $w] data
set f [$data(ent) get]
if {$data(-multiple)} {
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 f184ea0..1789b8a 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/defaults.tcl b/library/ttk/defaults.tcl
index 05a46bd..4551966 100644
--- a/library/ttk/defaults.tcl
+++ b/library/ttk/defaults.tcl
@@ -40,7 +40,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/entry.tcl b/library/ttk/entry.tcl
index b3ebcbd..647d16e 100644
--- a/library/ttk/entry.tcl
+++ b/library/ttk/entry.tcl
@@ -418,7 +418,7 @@ proc ttk::entry::DragOut {w mode} {
# Suspend autoscroll.
#
proc ttk::entry::DragIn {w} {
- ttk::CancelRepeat
+ ttk::CancelRepeat
}
## <ButtonRelease-1> binding
@@ -432,7 +432,7 @@ proc ttk::entry::Release {w} {
## AutoScroll
# Called repeatedly when the mouse is outside an entry window
# with Button 1 down. Scroll the window left or right,
-# depending on where the mouse left the window, and extend
+# depending on where the mouse left the window, and extend
# the selection according to the current selection mode.
#
# TODO: AutoScroll should repeat faster (50ms) than normal autorepeat.
diff --git a/library/ttk/menubutton.tcl b/library/ttk/menubutton.tcl
index 093bb02..648cdee 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.
@@ -57,11 +57,11 @@ if {[tk windowingsystem] eq "x11"} {
bind TMenubutton <ButtonPress-1> \
{ %W state pressed ; ttk::menubutton::Popdown %W }
bind TMenubutton <ButtonRelease-1> \
- { %W state !pressed }
+ { if {[winfo exists %W]} { %W state !pressed } }
}
# PostPosition --
-# Returns the x and y coordinates where the menu
+# Returns the x and y coordinates where the menu
# should be posted, based on the menubutton and menu size
# and -direction option.
#
@@ -85,7 +85,7 @@ proc ttk::menubutton::PostPosition {mb menu} {
below { if {$y <= $sh} { incr y $bh } { incr y -$mh } }
left { if {$x >= $mw} { incr x -$mw } { incr x $bw } }
right { if {$x <= $sw} { incr x $bw } { incr x -$mw } }
- flush {
+ flush {
# post menu atop menubutton.
# If there's a menu entry whose label matches the
# menubutton -text, assume this is an optionmenu
@@ -113,7 +113,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 4bd5107..17d729d 100644
--- a/library/ttk/scrollbar.tcl
+++ b/library/ttk/scrollbar.tcl
@@ -86,7 +86,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 8772587..c38b5b6 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/vistaTheme.tcl b/library/ttk/vistaTheme.tcl
index 99410cb..9149eae 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.
@@ -133,7 +133,7 @@ namespace eval ttk::theme::vista {
Spinbox.background -sticky news -children {
Spinbox.padding -sticky news -children {
Spinbox.innerbg -sticky news -children {
- Spinbox.textarea -expand 1 -sticky {}
+ Spinbox.textarea -expand 1
}
}
Spinbox.uparrow -side top -sticky ens
@@ -146,7 +146,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} \
@@ -191,7 +191,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} \
@@ -215,10 +215,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/macosx/GNUmakefile b/macosx/GNUmakefile
index 02240ed..57d0206 100644
--- a/macosx/GNUmakefile
+++ b/macosx/GNUmakefile
@@ -35,7 +35,7 @@ MANDIR ?= ${PREFIX}/man
TCL_BUILD_DIR ?= ${BUILD_DIR}/tcl/${BUILD_STYLE}
# location of installed tcl, only used if tcl in TCL_BUILD_DIR can't be found
TCL_FRAMEWORK_DIR ?= /Library/Frameworks
-TCLSH_DIR ?= ${PREFIX}
+TCLSH_DIR ?= ${PREFIX}/bin
# set to non-empty value to install manpages in addition to html help:
INSTALL_MANPAGES ?=
@@ -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}
diff --git a/macosx/README b/macosx/README
index 69be037..b27f9ff 100644
--- a/macosx/README
+++ b/macosx/README
@@ -388,3 +388,64 @@ make overrides to the tk/macosx GNUmakefile, e.g.
sudo make -C tk${ver}/macosx install \
TCL_FRAMEWORK_DIR=$HOME/Library/Frameworks TCLSH_DIR=$HOME/usr/bin
The Makefile variables TCL_FRAMEWORK_DIR and TCLSH_DIR were added with Tk 8.4.3.
+
+4. About the event loop in Tk for Mac OSX
+-----------------------------------------
+
+The main program in a typical OSX application looks like this (see *)
+
+ void NSApplicationMain(int argc, char *argv[]) {
+ [NSApplication sharedApplication];
+ [NSBundle loadNibNamed:@"myMain" owner:NSApp];
+ [NSApp run];
+ }
+
+The run method implements the event loop for the application. There
+are three key steps in the run method. First it calls
+[NSApp finishLaunching], which creates the bouncing application icon
+and does other mysterious things. Second it creates an
+NSAutoreleasePool. Third, it starts an event loop which drains the
+NSAutoreleasePool every time the queue is empty, and replaces the
+drained pool with a new one. This third step is essential to
+preventing memory leaks, since the internal methods of Appkit objects
+all assume that an autorelease pool is in scope and will be drained
+when the event processing cycle ends.
+
+Mac OSX Tk does not call the [NSApp run] method at all. Instead it
+uses the event loop built in to Tk. So we must take care to replicate
+the important features of the method ourselves. Here is how this
+works in outline.
+
+We add a private NSAUtoreleasePool* property to our subclass of
+NSApplication. (The subclass is called TKApplication but can be
+referenced with the global variable NSApp). The TkpInit
+function calls [NSApp _setup] which initializes this property by
+creating an NSAutoreleasePool. A bit later on, TkpInit calls
+[NSAPP _setupEventLoop] which in turn calls the
+[NSApp finishLaunching] method.
+
+Each time that Tcl processes an event in its queue, it calls a
+platform specific function which, in the case of Mac OSX, is named
+TkMacOSXEventsCheckProc. In the unix implementations of Tk, including
+the Mac OSX version, this function collects events from an "event
+source", and transfers them to the Tcl event queue. In Mac OSX the
+event source is the NSApplication event queue. Each NSEvent is
+converted to a Tcl event which is added to the Tcl event queue. The
+NSEvent is also passed to [NSApp sendevent], which sends the event on
+to the application's NSWindows, which send it to their NSViews, etc.
+Since the CheckProc function gets called for every Tk event, it is an
+appropriate place to drain the main NSAutoreleasePool and replace it
+with a new pool. This is done by calling the method
+[NSApp _resetAutoreleasePool], where _resetAutoreleasePool is a method
+which we define for the subclass TKApplication.
+
+One minor caveat is that there are several steps of the Tk
+initialization which precede the call to TkpInit. Notably, the font
+package is initialized first. Since there is no NSAUtoreleasePool in
+scope prior to calling TkpInit, the functions called in these
+preliminary stages need to create and drain their own
+NSAutoreleasePools whenever they call methods of Appkit objects
+(e.g. NSFont).
+
+* https://developer.apple.com/library/mac/documentation/Cocoa/\
+Reference/ApplicationKit/Classes/NSApplication_Class
diff --git a/macosx/Tk-Common.xcconfig b/macosx/Tk-Common.xcconfig
index 0d6e474..d75674a 100644
--- a/macosx/Tk-Common.xcconfig
+++ b/macosx/Tk-Common.xcconfig
@@ -43,4 +43,4 @@ TCL_PACKAGE_PATH = "$(LIBDIR)"
TCL_DEFS = HAVE_TCL_CONFIG_H
TK_LIBRARY = $(LIBDIR)/tk$(VERSION)
TK_DEFS = HAVE_TK_CONFIG_H TCL_NO_DEPRECATED
-VERSION = 8.6
+VERSION = 8.7
diff --git a/macosx/Tk-Info.plist.in b/macosx/Tk-Info.plist.in
index 50b9d24..7b0c305 100644
--- a/macosx/Tk-Info.plist.in
+++ b/macosx/Tk-Info.plist.in
@@ -17,6 +17,10 @@
<string>Tk @TK_WINDOWINGSYSTEM@ @TK_VERSION@@TK_PATCH_LEVEL@,
Copyright © 1989-@TK_YEAR@ Tcl Core Team,
Copyright © 2002-@TK_YEAR@ Daniel A. Steffen,
+ Copyright © 1989-@TK_YEAR@ Contributors,
+ Copyright © 2011-@TK_YEAR@ Kevin Walzer/WordTech
+ Communications LLC,
+ Copyright © 2014-@TK_YEAR@ Marc Culler,
Copyright © 2001-2009 Apple Inc.,
Copyright © 2001-2002 Jim Ingham &amp; Ian Reid</string>
<key>CFBundleIdentifier</key>
diff --git a/macosx/Tk.xcode/project.pbxproj b/macosx/Tk.xcode/project.pbxproj
index 70c2472..eee37a2 100644
--- a/macosx/Tk.xcode/project.pbxproj
+++ b/macosx/Tk.xcode/project.pbxproj
@@ -1172,7 +1172,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,7 +1211,7 @@
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>"; };
F966BC9808F27A3E005CB29B /* makefile.bc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.bc; 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>"; };
@@ -1916,7 +1916,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>"; };
@@ -1941,7 +1941,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>"; };
@@ -1986,7 +1986,7 @@
F96D447208F272BA004A47F5 /* cat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cat.c; sourceTree = "<group>"; };
F96D447308F272BA004A47F5 /* coffbase.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = coffbase.txt; 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>"; };
F96D447608F272BA004A47F5 /* makefile.bc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.bc; 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>"; };
@@ -2743,7 +2743,7 @@
children = (
F966BC6C08F27A3D005CB29B /* aclocal.m4 */,
F966BC6D08F27A3D005CB29B /* configure */,
- F966BC6E08F27A3D005CB29B /* configure.in */,
+ F966BC6E08F27A3D005CB29B /* configure.ac */,
F966BC6F08F27A3D005CB29B /* install-sh */,
F966BC7008F27A3D005CB29B /* installManPage */,
F966BC7108F27A3D005CB29B /* Makefile.in */,
@@ -2790,7 +2790,7 @@
F966BC9408F27A3D005CB29B /* aclocal.m4 */,
F966BC9508F27A3D005CB29B /* buildall.vc.bat */,
F966BC9608F27A3E005CB29B /* configure */,
- F966BC9708F27A3E005CB29B /* configure.in */,
+ F966BC9708F27A3E005CB29B /* configure.ac */,
F966BC9808F27A3E005CB29B /* makefile.bc */,
F966BC9908F27A3E005CB29B /* Makefile.in */,
F966BC9A08F27A3E005CB29B /* makefile.vc */,
@@ -3726,7 +3726,7 @@
children = (
F96D43D108F272B8004A47F5 /* checkLibraryDoc.tcl */,
F96D43D208F272B8004A47F5 /* configure */,
- F96D43D308F272B8004A47F5 /* configure.in */,
+ F96D43D308F272B8004A47F5 /* configure.ac */,
F96D442208F272B8004A47F5 /* eolFix.tcl */,
F96D442408F272B8004A47F5 /* fix_tommath_h.tcl */,
F96D442508F272B8004A47F5 /* genStubs.tcl */,
@@ -3759,7 +3759,7 @@
children = (
F96D444008F272B9004A47F5 /* aclocal.m4 */,
F96D444108F272B9004A47F5 /* configure */,
- F96D444208F272B9004A47F5 /* configure.in */,
+ F96D444208F272B9004A47F5 /* configure.ac */,
F96D444308F272B9004A47F5 /* dltest */,
F96D444D08F272B9004A47F5 /* install-sh */,
F96D444E08F272B9004A47F5 /* installManPage */,
@@ -3821,7 +3821,7 @@
F96D447208F272BA004A47F5 /* cat.c */,
F96D447308F272BA004A47F5 /* coffbase.txt */,
F96D447408F272BA004A47F5 /* configure */,
- F96D447508F272BA004A47F5 /* configure.in */,
+ F96D447508F272BA004A47F5 /* configure.ac */,
F96D447608F272BA004A47F5 /* makefile.bc */,
F96D447708F272BA004A47F5 /* Makefile.in */,
F96D447808F272BA004A47F5 /* makefile.vc */,
@@ -3974,7 +3974,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",
@@ -3987,7 +3987,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 */ = {
@@ -3997,7 +3997,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",
@@ -4008,7 +4008,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 */ = {
@@ -4018,7 +4018,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",
@@ -4031,7 +4031,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 */ = {
@@ -4041,7 +4041,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",
@@ -4052,7 +4052,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 dcfe9fb..2f7edba 100644
--- a/macosx/Tk.xcodeproj/project.pbxproj
+++ b/macosx/Tk.xcodeproj/project.pbxproj
@@ -1172,7 +1172,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,7 +1211,7 @@
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>"; };
F966BC9808F27A3E005CB29B /* makefile.bc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.bc; 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>"; };
@@ -1916,7 +1916,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>"; };
@@ -1941,7 +1941,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>"; };
@@ -1986,7 +1986,7 @@
F96D447208F272BA004A47F5 /* cat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cat.c; sourceTree = "<group>"; };
F96D447308F272BA004A47F5 /* coffbase.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = coffbase.txt; 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>"; };
F96D447608F272BA004A47F5 /* makefile.bc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.bc; 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>"; };
@@ -2743,7 +2743,7 @@
children = (
F966BC6C08F27A3D005CB29B /* aclocal.m4 */,
F966BC6D08F27A3D005CB29B /* configure */,
- F966BC6E08F27A3D005CB29B /* configure.in */,
+ F966BC6E08F27A3D005CB29B /* configure.ac */,
F966BC6F08F27A3D005CB29B /* install-sh */,
F966BC7008F27A3D005CB29B /* installManPage */,
F966BC7108F27A3D005CB29B /* Makefile.in */,
@@ -2790,7 +2790,7 @@
F966BC9408F27A3D005CB29B /* aclocal.m4 */,
F966BC9508F27A3D005CB29B /* buildall.vc.bat */,
F966BC9608F27A3E005CB29B /* configure */,
- F966BC9708F27A3E005CB29B /* configure.in */,
+ F966BC9708F27A3E005CB29B /* configure.ac */,
F966BC9808F27A3E005CB29B /* makefile.bc */,
F966BC9908F27A3E005CB29B /* Makefile.in */,
F966BC9A08F27A3E005CB29B /* makefile.vc */,
@@ -3726,7 +3726,7 @@
children = (
F96D43D108F272B8004A47F5 /* checkLibraryDoc.tcl */,
F96D43D208F272B8004A47F5 /* configure */,
- F96D43D308F272B8004A47F5 /* configure.in */,
+ F96D43D308F272B8004A47F5 /* configure.ac */,
F96D442208F272B8004A47F5 /* eolFix.tcl */,
F96D442408F272B8004A47F5 /* fix_tommath_h.tcl */,
F96D442508F272B8004A47F5 /* genStubs.tcl */,
@@ -3759,7 +3759,7 @@
children = (
F96D444008F272B9004A47F5 /* aclocal.m4 */,
F96D444108F272B9004A47F5 /* configure */,
- F96D444208F272B9004A47F5 /* configure.in */,
+ F96D444208F272B9004A47F5 /* configure.ac */,
F96D444308F272B9004A47F5 /* dltest */,
F96D444D08F272B9004A47F5 /* install-sh */,
F96D444E08F272B9004A47F5 /* installManPage */,
@@ -3821,7 +3821,7 @@
F96D447208F272BA004A47F5 /* cat.c */,
F96D447308F272BA004A47F5 /* coffbase.txt */,
F96D447408F272BA004A47F5 /* configure */,
- F96D447508F272BA004A47F5 /* configure.in */,
+ F96D447508F272BA004A47F5 /* configure.ac */,
F96D447608F272BA004A47F5 /* makefile.bc */,
F96D447708F272BA004A47F5 /* Makefile.in */,
F96D447808F272BA004A47F5 /* makefile.vc */,
@@ -3977,7 +3977,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",
@@ -3990,7 +3990,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 */ = {
@@ -4000,7 +4000,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",
@@ -4011,7 +4011,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 */ = {
@@ -4021,7 +4021,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",
@@ -4034,7 +4034,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 */ = {
@@ -4044,7 +4044,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",
@@ -4055,7 +4055,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/Wish-Info.plist.in b/macosx/Wish-Info.plist.in
index 78170f1..db75cf2 100644
--- a/macosx/Wish-Info.plist.in
+++ b/macosx/Wish-Info.plist.in
@@ -40,10 +40,14 @@
<string>Wish</string>
<key>CFBundleGetInfoString</key>
<string>Wish Shell @TK_VERSION@@TK_PATCH_LEVEL@,
-Copyright © 1989-@TK_YEAR@ Tcl Core Team,
-Copyright © 2002-@TK_YEAR@ Daniel A. Steffen,
-Copyright © 2001-2009 Apple Inc.,
-Copyright © 2001-2002 Jim Ingham &amp; Ian Reid</string>
+ Copyright © 1989-@TK_YEAR@ Tcl Core Team,
+ Copyright © 1989-@TK_YEAR@ Contributors,
+ Copyright © 2011-@TK_YEAR@ Kevin Walzer/WordTech
+ Communications LLC,
+ Copyright © 2014-@TK_YEAR@ Marc Culler,
+ Copyright © 2002-@TK_YEAR@ Daniel A. Steffen,
+ Copyright © 2001-2009 Apple Inc.,
+ Copyright © 2001-2002 Jim Ingham &amp; Ian Reid</string>
<key>CFBundleIconFile</key>
<string>Wish.icns</string>
<key>CFBundleIdentifier</key>
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/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index 5c5aa9e..f4fbc48 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -30,10 +30,10 @@
* Default insets for controls
*/
-#define DEF_INSET_LEFT 2
-#define DEF_INSET_RIGHT 2
-#define DEF_INSET_TOP 2
-#define DEF_INSET_BOTTOM 4
+#define DEF_INSET_LEFT 12
+#define DEF_INSET_RIGHT 12
+#define DEF_INSET_TOP 1
+#define DEF_INSET_BOTTOM 1
/*
* Some defines used to control what type of control is drawn.
@@ -289,10 +289,10 @@ TkpComputeButtonGeometry(
if ( butPtr->indicatorOn ) {
switch (butPtr->type) {
case TYPE_RADIO_BUTTON:
- GetThemeMetric(kThemeMetricRadioButtonWidth, &butPtr->indicatorDiameter);
+ GetThemeMetric(kThemeMetricRadioButtonWidth, (SInt32 *)&butPtr->indicatorDiameter);
break;
case TYPE_CHECK_BUTTON:
- GetThemeMetric(kThemeMetricCheckBoxWidth, &butPtr->indicatorDiameter);
+ GetThemeMetric(kThemeMetricCheckBoxWidth, (SInt32 *)&butPtr->indicatorDiameter);
break;
default:
break;
@@ -318,8 +318,9 @@ TkpComputeButtonGeometry(
Tcl_GetString(butPtr->textPtr), -1, butPtr->wrapLength,
butPtr->justify, 0, &butPtr->textWidth, &butPtr->textHeight);
+ /*Remove extraneous padding around label widgets.*/
txtWidth = butPtr->textWidth;
- txtHeight = butPtr->textHeight;
+ txtHeight = butPtr->textHeight + DEF_INSET_BOTTOM + DEF_INSET_TOP;
charWidth = Tk_TextWidth(butPtr->tkfont, "0", 1);
Tk_GetFontMetrics(butPtr->tkfont, &fm);
haveText = (txtWidth != 0 && txtHeight != 0);
@@ -387,7 +388,7 @@ TkpComputeButtonGeometry(
butPtr->inset = 0;
butPtr->inset += butPtr->highlightWidth;
-
+
if (TkMacOSXComputeButtonDrawParams(butPtr,&drawParams)) {
HIRect tmpRect;
HIRect contBounds;
@@ -519,7 +520,7 @@ DrawButtonImageAndText(
/*
* Image is left or right of text
*/
-
+
if (butPtr->compound == COMPOUND_LEFT) {
textXOffset = width + butPtr->padX;
} else {
@@ -536,7 +537,7 @@ DrawButtonImageAndText(
/*
* Image and text are superimposed
*/
-
+
fullWidth = (width > butPtr->textWidth ? width :
butPtr->textWidth);
fullHeight = (height > butPtr->textHeight ? height :
@@ -593,7 +594,7 @@ DrawButtonImageAndText(
imageXOffset, imageYOffset, 1);
XSetClipOrigin(butPtr->display, dpPtr->gc, 0, 0);
}
-
+
Tk_DrawTextLayout(butPtr->display, pixmap,
dpPtr->gc, butPtr->textLayout,
x + textXOffset, y + textYOffset, 0, -1);
@@ -618,7 +619,7 @@ DrawButtonImageAndText(
imageYOffset += y;
if (butPtr->image != NULL) {
-
+
if ((butPtr->selectImage != NULL) &&
(butPtr->flags & SELECTED)) {
Tk_RedrawImage(butPtr->selectImage, 0, 0, width,
@@ -647,7 +648,7 @@ DrawButtonImageAndText(
butPtr->textHeight, &x, &y);
x += butPtr->indicatorSpace;
Tk_DrawTextLayout(butPtr->display, pixmap, dpPtr->gc, butPtr->textLayout,
- x, y, 0, -1);
+ x, y - DEF_INSET_BOTTOM, 0, -1);
}
/*
@@ -807,9 +808,12 @@ TkMacOSXDrawButton(
hiinfo.animation.time.start = hiinfo.animation.time.current;
}
- HIThemeDrawButton(&cntrRect, &hiinfo, dc.context, kHIThemeOrientationNormal, &contHIRec);
+ HIThemeDrawButton(&cntrRect, &hiinfo, dc.context, kHIThemeOrientationNormal,
+ &contHIRec);
+
TkMacOSXRestoreDrawingContext(&dc);
- ButtonContentDrawCB(&contHIRec, mbPtr->btnkind, &mbPtr->drawinfo, (MacButton *)mbPtr, 32, true);
+ ButtonContentDrawCB(&contHIRec, mbPtr->btnkind, &mbPtr->drawinfo,
+ (MacButton *)mbPtr, 32, true);
} else {
if (!TkMacOSXSetupDrawingContext(pixmap, dpPtr->gc, 1, &dc)) {
diff --git a/macosx/tkMacOSXCursor.c b/macosx/tkMacOSXCursor.c
index 53c2cd2..b6394b7 100644
--- a/macosx/tkMacOSXCursor.c
+++ b/macosx/tkMacOSXCursor.c
@@ -344,7 +344,7 @@ FindCursorByName(
macCursor = [[NSCursor alloc] initWithImage:image hotSpot:hotSpot];
[image release];
}
- macCursorPtr->macCursor = TkMacOSXMakeUncollectable(macCursor);
+ macCursorPtr->macCursor = macCursor;
}
/*
@@ -454,7 +454,8 @@ TkpFreeCursor(
{
TkMacOSXCursor *macCursorPtr = (TkMacOSXCursor *) cursorPtr;
- TkMacOSXMakeCollectableAndRelease(macCursorPtr->macCursor);
+ [macCursorPtr->macCursor release];
+ macCursorPtr->macCursor = NULL;
if (macCursorPtr == gCurrentCursor) {
gCurrentCursor = NULL;
}
diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h
index e95560f..65762b7 100644
--- a/macosx/tkMacOSXDefault.h
+++ b/macosx/tkMacOSXDefault.h
@@ -259,6 +259,7 @@
#define DEF_LISTBOX_HIGHLIGHT_BG NORMAL_BG
#define DEF_LISTBOX_HIGHLIGHT BLACK
#define DEF_LISTBOX_HIGHLIGHT_WIDTH "0"
+#define DEF_LISTBOX_JUSTIFY "left"
#define DEF_LISTBOX_RELIEF "solid"
#define DEF_LISTBOX_SCROLL_COMMAND ""
#define DEF_LISTBOX_LIST_VARIABLE ""
@@ -409,6 +410,7 @@
#define DEF_PANEDWINDOW_HEIGHT ""
#define DEF_PANEDWINDOW_OPAQUERESIZE "1"
#define DEF_PANEDWINDOW_ORIENT "horizontal"
+#define DEF_PANEDWINDOW_PROXYBORDER "2"
#define DEF_PANEDWINDOW_RELIEF "flat"
#define DEF_PANEDWINDOW_SASHCURSOR ""
#define DEF_PANEDWINDOW_SASHPAD "0"
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index a66939a..80a7a11 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -14,6 +14,17 @@
#include "tkMacOSXPrivate.h"
#include "tkFileFilter.h"
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090
+#define modalOK NSOKButton
+#define modalCancel NSCancelButton
+#else
+#define modalOK NSModalResponseOK
+#define modalCancel NSModalResponseCancel
+#endif
+#define modalOther -1
+#define modalError -2
+
+
static const char *const colorOptionStrings[] = {
"-initialcolor", "-parent", "-title", NULL
};
@@ -130,6 +141,23 @@ static const short alertNativeButtonIndexAndTypeToButtonIndex[][3] = {
[TYPE_YESNO] = {5, 6, 0},
[TYPE_YESNOCANCEL] = {5, 6, 4},
};
+
+/*
+ * Construct a file URL from directory and filename. Either may
+ * be nil. If both are nil, returns nil.
+ */
+#if MAC_OS_X_VERSION_MIN_REQUIRED > 1050
+static NSURL *getFileURL(NSString *directory, NSString *filename) {
+ NSURL *url = nil;
+ if (directory) {
+ url = [NSURL fileURLWithPath:directory];
+ }
+ if (filename) {
+ url = [NSURL URLWithString:filename relativeToURL:url];
+ }
+ return url;
+}
+#endif
#pragma mark TKApplication(TKDialog)
@@ -149,12 +177,12 @@ static const short alertNativeButtonIndexAndTypeToButtonIndex[][3] = {
if (callbackInfo->multiple) {
resultObj = Tcl_NewListObj(0, NULL);
- for (NSString *name in [(NSOpenPanel*)panel filenames]) {
+ for (NSURL *url in [(NSOpenPanel*)panel URLs]) {
Tcl_ListObjAppendElement(callbackInfo->interp, resultObj,
- Tcl_NewStringObj([name UTF8String], -1));
+ Tcl_NewStringObj([[url path] UTF8String], -1));
}
} else {
- resultObj = Tcl_NewStringObj([[panel filename] UTF8String], -1);
+ resultObj = Tcl_NewStringObj([[[panel URL]path] UTF8String], -1);
}
if (callbackInfo->cmdObj) {
Tcl_Obj **objv, **tmpv;
@@ -189,7 +217,7 @@ static const short alertNativeButtonIndexAndTypeToButtonIndex[][3] = {
{
AlertCallbackInfo *callbackInfo = contextInfo;
- if (returnCode != NSAlertErrorReturn) {
+ if (returnCode >= NSAlertFirstButtonReturn) {
Tcl_Obj *resultObj = Tcl_NewStringObj(alertButtonStrings[
alertNativeButtonIndexAndTypeToButtonIndex[callbackInfo->
typeIndex][returnCode - NSAlertFirstButtonReturn]], -1);
@@ -309,7 +337,7 @@ Tk_ChooseColorObjCmd(
[colorPanel setColor:initialColor];
}
returnCode = [NSApp runModalForWindow:colorPanel];
- if (returnCode == NSOKButton) {
+ if (returnCode == modalOK) {
color = [[colorPanel color] colorUsingColorSpace:
[NSColorSpace genericRGBColorSpace]];
numberOfComponents = [color numberOfComponents];
@@ -369,7 +397,8 @@ Tk_GetOpenFileObjCmd(
NSWindow *parent;
NSMutableArray *fileTypes = nil;
NSOpenPanel *panel = [NSOpenPanel openPanel];
- NSInteger returnCode = NSAlertErrorReturn;
+ NSInteger modalReturnCode = modalError;
+ BOOL parentIsKey = NO;
TkInitFileFilters(&fl);
for (i = 1; i < objc; i += 2) {
@@ -439,6 +468,7 @@ Tk_GetOpenFileObjCmd(
break;
}
}
+ [panel setAllowsMultipleSelection:multiple];
if (fl.filters) {
fileTypes = [NSMutableArray array];
for (FileFilter *filterPtr = fl.filters; filterPtr;
@@ -471,7 +501,7 @@ Tk_GetOpenFileObjCmd(
}
}
}
- [panel setAllowsMultipleSelection:multiple];
+ [panel setAllowedFileTypes:fileTypes];
if (cmdObj) {
callbackInfo = ckalloc(sizeof(FilePanelCallbackInfo));
if (Tcl_IsShared(cmdObj)) {
@@ -484,19 +514,41 @@ Tk_GetOpenFileObjCmd(
callbackInfo->multiple = multiple;
parent = TkMacOSXDrawableWindow(((TkWindow *) tkwin)->window);
if (haveParentOption && parent && ![parent attachedSheet]) {
- [panel beginSheetForDirectory:directory file:filename types:fileTypes
- modalForWindow:parent modalDelegate:NSApp didEndSelector:
- @selector(tkFilePanelDidEnd:returnCode:contextInfo:)
- contextInfo:callbackInfo];
- returnCode = cmdObj ? NSAlertOtherReturn :
- [NSApp runModalForWindow:panel];
+ parentIsKey = [parent isKeyWindow];
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+ [panel beginSheetForDirectory:directory
+ file:filename
+ types:fileTypes
+ modalForWindow:parent
+ modalDelegate:NSApp
+ didEndSelector:
+ @selector(tkFilePanelDidEnd:returnCode:contextInfo:)
+ contextInfo:callbackInfo];
+#else
+ [panel setAllowedFileTypes:fileTypes];
+ [panel setDirectoryURL:getFileURL(directory, filename)];
+ [panel beginSheetModalForWindow:parent
+ completionHandler:^(NSInteger returnCode)
+ { [NSApp tkFilePanelDidEnd:panel
+ returnCode:returnCode
+ contextInfo:callbackInfo ]; } ];
+#endif
+ modalReturnCode = cmdObj ? modalOther : [NSApp runModalForWindow:panel];
} else {
- returnCode = [panel runModalForDirectory:directory file:filename
- types:fileTypes];
- [NSApp tkFilePanelDidEnd:panel returnCode:returnCode
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+ modalReturnCode = [panel runModalForDirectory:directory
+ file:filename];
+#else
+ [panel setDirectoryURL:getFileURL(directory, filename)];
+ modalReturnCode = [panel runModal];
+#endif
+ [NSApp tkFilePanelDidEnd:panel returnCode:modalReturnCode
contextInfo:callbackInfo];
}
- result = (returnCode != NSAlertErrorReturn) ? TCL_OK : TCL_ERROR;
+ result = (modalReturnCode != modalError) ? TCL_OK : TCL_ERROR;
+ if (parentIsKey) {
+ [parent makeKeyWindow];
+ }
if (typeVariablePtr && result == TCL_OK) {
/*
* The -typevariable option is not really supported.
@@ -548,7 +600,8 @@ Tk_GetSaveFileObjCmd(
NSWindow *parent;
NSMutableArray *fileTypes = nil;
NSSavePanel *panel = [NSSavePanel savePanel];
- NSInteger returnCode = NSAlertErrorReturn;
+ NSInteger modalReturnCode = modalError;
+ BOOL parentIsKey = NO;
TkInitFileFilters(&fl);
for (i = 1; i < objc; i += 2) {
@@ -665,19 +718,38 @@ Tk_GetSaveFileObjCmd(
callbackInfo->multiple = 0;
parent = TkMacOSXDrawableWindow(((TkWindow *) tkwin)->window);
if (haveParentOption && parent && ![parent attachedSheet]) {
- [panel beginSheetForDirectory:directory file:filename
- modalForWindow:parent modalDelegate:NSApp didEndSelector:
- @selector(tkFilePanelDidEnd:returnCode:contextInfo:)
- contextInfo:callbackInfo];
- returnCode = cmdObj ? NSAlertOtherReturn :
- [NSApp runModalForWindow:panel];
+ parentIsKey = [parent isKeyWindow];
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+ [panel beginSheetForDirectory:directory
+ file:filename
+ modalForWindow:parent
+ modalDelegate:NSApp
+ didEndSelector:
+ @selector(tkFilePanelDidEnd:returnCode:contextInfo:)
+ contextInfo:callbackInfo];
+#else
+ [panel setDirectoryURL:getFileURL(directory, filename)];
+ [panel beginSheetModalForWindow:parent
+ completionHandler:^(NSInteger returnCode)
+ { [NSApp tkFilePanelDidEnd:panel
+ returnCode:returnCode
+ contextInfo:callbackInfo ]; } ];
+#endif
+ modalReturnCode = cmdObj ? modalOther : [NSApp runModalForWindow:panel];
} else {
- returnCode = [panel runModalForDirectory:directory file:filename];
- [NSApp tkFilePanelDidEnd:panel returnCode:returnCode
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+ modalReturnCode = [panel runModalForDirectory:directory file:filename];
+#else
+ [panel setDirectoryURL:getFileURL(directory, filename)];
+ modalReturnCode = [panel runModal];
+#endif
+ [NSApp tkFilePanelDidEnd:panel returnCode:modalReturnCode
contextInfo:callbackInfo];
}
- result = (returnCode != NSAlertErrorReturn) ? TCL_OK : TCL_ERROR;
-
+ result = (modalReturnCode != modalError) ? TCL_OK : TCL_ERROR;
+ if (parentIsKey) {
+ [parent makeKeyWindow];
+ }
end:
TkFreeFileFilters(&fl);
return result;
@@ -719,7 +791,8 @@ Tk_ChooseDirectoryObjCmd(
NSString *message, *title;
NSWindow *parent;
NSOpenPanel *panel = [NSOpenPanel openPanel];
- NSInteger returnCode = NSAlertErrorReturn;
+ NSInteger modalReturnCode = modalError;
+ BOOL parentIsKey = NO;
for (i = 1; i < objc; i += 2) {
if (Tcl_GetIndexFromObjStruct(interp, objv[i], chooseOptionStrings,
@@ -787,19 +860,37 @@ Tk_ChooseDirectoryObjCmd(
callbackInfo->multiple = 0;
parent = TkMacOSXDrawableWindow(((TkWindow *) tkwin)->window);
if (haveParentOption && parent && ![parent attachedSheet]) {
- [panel beginSheetForDirectory:directory file:filename
- modalForWindow:parent modalDelegate:NSApp didEndSelector:
- @selector(tkFilePanelDidEnd:returnCode:contextInfo:)
+ parentIsKey = [parent isKeyWindow];
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+ [panel beginSheetForDirectory:directory
+ file:filename
+ modalForWindow:parent
+ modalDelegate:NSApp
+ didEndSelector: @selector(tkFilePanelDidEnd:returnCode:contextInfo:)
contextInfo:callbackInfo];
- returnCode = cmdObj ? NSAlertOtherReturn :
- [NSApp runModalForWindow:panel];
+#else
+ [panel setDirectoryURL:getFileURL(directory, filename)];
+ [panel beginSheetModalForWindow:parent
+ completionHandler:^(NSInteger returnCode)
+ { [NSApp tkFilePanelDidEnd:panel
+ returnCode:returnCode
+ contextInfo:callbackInfo ]; } ];
+#endif
+ modalReturnCode = cmdObj ? modalOther : [NSApp runModalForWindow:panel];
} else {
- returnCode = [panel runModalForDirectory:directory file:filename];
- [NSApp tkFilePanelDidEnd:panel returnCode:returnCode
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+ modalReturnCode = [panel runModalForDirectory:directory file:nil];
+#else
+ [panel setDirectoryURL:getFileURL(directory, filename)];
+ modalReturnCode = [panel runModal];
+#endif
+ [NSApp tkFilePanelDidEnd:panel returnCode:modalReturnCode
contextInfo:callbackInfo];
}
- result = (returnCode != NSAlertErrorReturn) ? TCL_OK : TCL_ERROR;
-
+ result = (modalReturnCode != modalError) ? TCL_OK : TCL_ERROR;
+ if (parentIsKey) {
+ [parent makeKeyWindow];
+ }
end:
return result;
}
@@ -857,6 +948,9 @@ TkAboutDlg(void)
[[[NSAttributedString alloc] initWithString:
[NSString stringWithFormat:
@"%1$C 1987-%2$@ Tcl Core Team." "\n\n"
+ "%1$C 1989-%2$@ Contributors." "\n\n"
+ "%1$C 2011-%2$@ Kevin Walzer/WordTech Communications LLC." "\n\n"
+ "%1$C 2014-%2$@ Marc Culler." "\n\n"
"%1$C 2002-%2$@ Daniel A. Steffen." "\n\n"
"%1$C 2001-2009 Apple Inc." "\n\n"
"%1$C 2001-2002 Jim Ingham & Ian Reid" "\n\n"
@@ -896,7 +990,7 @@ TkMacOSXStandardAboutPanelObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, NULL);
return TCL_ERROR;
}
- [NSApp orderFrontStandardAboutPanelWithOptions:nil];
+ [NSApp orderFrontStandardAboutPanelWithOptions:[NSDictionary dictionary]];
return TCL_OK;
}
@@ -934,7 +1028,8 @@ Tk_MessageBoxObjCmd(
NSWindow *parent;
NSArray *buttons;
NSAlert *alert = [NSAlert new];
- NSInteger returnCode = NSAlertErrorReturn;
+ NSInteger modalReturnCode = 1;
+ BOOL parentIsKey = NO;
iconIndex = ICON_INFO;
typeIndex = TYPE_OK;
@@ -1061,19 +1156,32 @@ Tk_MessageBoxObjCmd(
callbackInfo->typeIndex = typeIndex;
parent = TkMacOSXDrawableWindow(((TkWindow *) tkwin)->window);
if (haveParentOption && parent && ![parent attachedSheet]) {
- [alert beginSheetModalForWindow:parent modalDelegate:NSApp
- didEndSelector:@selector(tkAlertDidEnd:returnCode:contextInfo:)
- contextInfo:callbackInfo];
- returnCode = cmdObj ? NSAlertOtherReturn :
- [NSApp runModalForWindow:[alert window]];
+ parentIsKey = [parent isKeyWindow];
+#if MAC_OS_X_VERSION_MIN_REQUIRED > 1090
+ [alert beginSheetModalForWindow:parent
+ completionHandler:^(NSModalResponse returnCode)
+ { [NSApp tkAlertDidEnd:alert
+ returnCode:returnCode
+ contextInfo:callbackInfo ]; } ];
+#else
+ [alert beginSheetModalForWindow:parent
+ modalDelegate:NSApp
+ didEndSelector:@selector(tkAlertDidEnd:returnCode:contextInfo:)
+ contextInfo:callbackInfo];
+#endif
+ modalReturnCode = cmdObj ? 0 :
+ [NSApp runModalForWindow:[alert window]];
} else {
- returnCode = [alert runModal];
- [NSApp tkAlertDidEnd:alert returnCode:returnCode
+ modalReturnCode = [alert runModal];
+ [NSApp tkAlertDidEnd:alert returnCode:modalReturnCode
contextInfo:callbackInfo];
}
- result = (returnCode != NSAlertErrorReturn) ? TCL_OK : TCL_ERROR;
+ result = (modalReturnCode >= NSAlertFirstButtonReturn) ? TCL_OK : TCL_ERROR;
end:
[alert release];
+ if (parentIsKey) {
+ [parent makeKeyWindow];
+ }
return result;
}
@@ -1212,7 +1320,7 @@ FontchooserEvent(
switch (kind) {
case FontchooserClosed:
if (fcdPtr->parent != None) {
- TkSendVirtualEvent(fcdPtr->parent, "TkFontchooserVisibility");
+ TkSendVirtualEvent(fcdPtr->parent, "TkFontchooserVisibility", NULL);
fontchooserInterp = NULL;
}
break;
@@ -1235,7 +1343,7 @@ FontchooserEvent(
ckfree(tmpv);
}
}
- TkSendVirtualEvent(fcdPtr->parent, "TkFontchooserFontChanged");
+ TkSendVirtualEvent(fcdPtr->parent, "TkFontchooserFontChanged", NULL);
}
break;
}
@@ -1445,7 +1553,7 @@ FontchooserConfigureCmd(
[fm setSelectedAttributes:fontPanelFontAttributes
isMultiple:NO];
if ([fp isVisible]) {
- TkSendVirtualEvent(fcdPtr->parent, "TkFontchooserFontChanged");
+ TkSendVirtualEvent(fcdPtr->parent, "TkFontchooserFontChanged", NULL);
}
break;
case FontchooserCmd:
@@ -1508,7 +1616,7 @@ FontchooserShowCmd(
}
if (![fp isVisible]) {
[fm orderFrontFontPanel:NSApp];
- TkSendVirtualEvent(fcdPtr->parent, "TkFontchooserVisibility");
+ TkSendVirtualEvent(fcdPtr->parent, "TkFontchooserVisibility", NULL);
}
fontchooserInterp = interp;
@@ -1643,9 +1751,7 @@ TkInitFontchooser(
Tcl_SetAssocData(interp, "::tk::fontchooser", DeleteFontchooserData,
fcdPtr);
if (!fontPanelFontAttributes) {
- NSAutoreleasePool *pool = [NSAutoreleasePool new];
fontPanelFontAttributes = [NSMutableDictionary new];
- [pool drain];
}
return TCL_OK;
}
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 328f905..f48538d 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -141,7 +141,7 @@ BitmapRepFromDrawableRect(
if ( mac_drawable->flags & TK_IS_PIXMAP ) {
/*
This means that the MacDrawable is functioning as a Tk Pixmap, so its view
- field is NULL. It's context field should point to a CGImage.
+ field is NULL.
*/
cg_context = GetCGContextForDrawable(drawable);
CGRect image_rect = CGRectMake(x, y, width, height);
@@ -199,10 +199,10 @@ XCopyArea(
Display *display, /* Display. */
Drawable src, /* Source drawable. */
Drawable dst, /* Destination drawable. */
- GC gc, /* GC to use. */
+ GC gc, /* GC to use. */
int src_x, /* X & Y, width & height */
int src_y, /* define the source rectangle */
- unsigned int width, /* that will be copied. */
+ unsigned int width, /* that will be copied. */
unsigned int height,
int dest_x, /* Dest X & Y on dest rect. */
int dest_y)
@@ -222,7 +222,8 @@ XCopyArea(
}
if (!TkMacOSXSetupDrawingContext(dst, gc, 1, &dc)) {
- TkMacOSXDbgMsg("Failed to setup drawing context.");
+ return;
+ /*TkMacOSXDbgMsg("Failed to setup drawing context.");*/
}
if ( dc.context ) {
@@ -243,6 +244,8 @@ XCopyArea(
CGRectMake(src_x, src_y, width, height),
CGRectMake(dest_x, dest_y, width, height));
CFRelease(img);
+
+
} else {
TkMacOSXDbgMsg("Failed to construct CGImage.");
}
@@ -279,10 +282,10 @@ XCopyPlane(
Display *display, /* Display. */
Drawable src, /* Source drawable. */
Drawable dst, /* Destination drawable. */
- GC gc, /* GC to use. */
+ GC gc, /* GC to use. */
int src_x, /* X & Y, width & height */
int src_y, /* define the source rectangle */
- unsigned int width, /* that will be copied. */
+ unsigned int width, /* that will be copied. */
unsigned int height,
int dest_x, /* Dest X & Y on dest rect. */
int dest_y,
@@ -290,6 +293,7 @@ XCopyPlane(
{
TkMacOSXDrawingContext dc;
MacDrawable *srcDraw = (MacDrawable *) src;
+ MacDrawable *dstDraw = (MacDrawable *) dst;
display->request++;
if (!width || !height) {
@@ -303,33 +307,53 @@ XCopyPlane(
if (!TkMacOSXSetupDrawingContext(dst, gc, 1, &dc)) {
return;
}
- if (dc.context) {
+ CGContextRef context = dc.context;
+ if (context) {
CGImageRef img = TkMacOSXCreateCGImageWithDrawable(src);
-
if (img) {
TkpClipMask *clipPtr = (TkpClipMask *) gc->clip_mask;
unsigned long imageBackground = gc->background;
-
- if (clipPtr && clipPtr->type == TKP_CLIP_PIXMAP &&
- clipPtr->value.pixmap == src) {
- imageBackground = TRANSPARENT_PIXEL << 24;
+ if (clipPtr && clipPtr->type == TKP_CLIP_PIXMAP){
+ CGRect srcRect = CGRectMake(src_x, src_y, width, height);
+ CGImageRef mask = TkMacOSXCreateCGImageWithDrawable(clipPtr->value.pixmap);
+ CGImageRef submask = CGImageCreateWithImageInRect(img, srcRect);
+ CGRect rect = CGRectMake(dest_x, dest_y, width, height);
+ rect = CGRectOffset(rect, dstDraw->xOff, dstDraw->yOff);
+ CGContextSaveGState(context);
+ /* Move the origin of the destination to top left. */
+ CGContextTranslateCTM(context, 0, rect.origin.y + CGRectGetMaxY(rect));
+ CGContextScaleCTM(context, 1, -1);
+ /* Fill with the background color, clipping to the mask. */
+ CGContextClipToMask(context, rect, submask);
+ TkMacOSXSetColorInContext(gc, gc->background, dc.context);
+ CGContextFillRect(context, rect);
+ /* Fill with the foreground color, clipping to the
+ intersection of img and mask. */
+ CGImageRef subimage = CGImageCreateWithImageInRect(img, srcRect);
+ CGContextClipToMask(context, rect, subimage);
+ TkMacOSXSetColorInContext(gc, gc->foreground, context);
+ CGContextFillRect(context, rect);
+ CGContextRestoreGState(context);
+ CGImageRelease(img);
+ CGImageRelease(mask);
+ CGImageRelease(submask);
+ CGImageRelease(subimage);
+ } else {
+ DrawCGImage(dst, gc, dc.context, img, gc->foreground, imageBackground,
+ CGRectMake(0, 0, srcDraw->size.width, srcDraw->size.height),
+ CGRectMake(src_x, src_y, width, height),
+ CGRectMake(dest_x, dest_y, width, height));
+ CGImageRelease(img);
}
- DrawCGImage(dst, gc, dc.context, img, gc->foreground,
- imageBackground, CGRectMake(0, 0,
- srcDraw->size.width, srcDraw->size.height),
- CGRectMake(src_x, src_y, width, height),
- CGRectMake(dest_x, dest_y, width, height));
- CFRelease(img);
- } else {
+ } else { /* no image */
TkMacOSXDbgMsg("Invalid source drawable");
}
} else {
- TkMacOSXDbgMsg("Invalid destination drawable");
+ TkMacOSXDbgMsg("Invalid destination drawable - could not get a bitmap context.");
}
TkMacOSXRestoreDrawingContext(&dc);
- } else {
- XCopyArea(display, src, dst, gc, src_x, src_y, width, height, dest_x,
- dest_y);
+ } else { /* source drawable is a window, not a Pixmap */
+ XCopyArea(display, src, dst, gc, src_x, src_y, width, height, dest_x, dest_y);
}
}
@@ -353,16 +377,16 @@ XCopyPlane(
int
TkPutImage(
unsigned long *colors, /* Unused on Macintosh. */
- int ncolors, /* Unused on Macintosh. */
+ int ncolors, /* Unused on Macintosh. */
Display* display, /* Display. */
Drawable d, /* Drawable to place image on. */
- GC gc, /* GC to use. */
+ GC gc, /* GC to use. */
XImage* image, /* Image to place. */
int src_x, /* Source X & Y. */
int src_y,
int dest_x, /* Destination X & Y. */
int dest_y,
- unsigned int width, /* Same width & height for both */
+ unsigned int width, /* Same width & height for both */
unsigned int height) /* distination and source. */
{
TkMacOSXDrawingContext dc;
@@ -375,9 +399,11 @@ TkPutImage(
CGImageRef img = CreateCGImageWithXImage(image);
if (img) {
+ /* If the XImage has big pixels, rescale the source dimensions.*/
+ int pp = image->pixelpower;
DrawCGImage(d, gc, dc.context, img, gc->foreground, gc->background,
- CGRectMake(0, 0, image->width, image->height),
- CGRectMake(src_x, src_y, width, height),
+ CGRectMake(0, 0, image->width<<pp, image->height<<pp),
+ CGRectMake(src_x<<pp, src_y<<pp, width<<pp, height<<pp),
CGRectMake(dest_x, dest_y, width, height));
CFRelease(img);
} else {
@@ -428,11 +454,12 @@ CreateCGImageWithXImage(
* BW image
*/
+ /* Reverses the sense of the bits */
static const CGFloat decodeWB[2] = {1, 0};
+ decode = decodeWB;
bitsPerComponent = 1;
bitsPerPixel = 1;
- decode = decodeWB;
if (image->bitmap_bit_order != MSBFirst) {
char *srcPtr = image->data + image->xoffset;
char *endPtr = srcPtr + len;
@@ -442,16 +469,14 @@ CreateCGImageWithXImage(
*destPtr++ = xBitReverseTable[(unsigned char)(*(srcPtr++))];
}
} else {
- data = memcpy(ckalloc(len), image->data + image->xoffset,
- len);
+ data = memcpy(ckalloc(len), image->data + image->xoffset, len);
}
if (data) {
provider = CGDataProviderCreateWithData(data, data, len, releaseData);
}
if (provider) {
img = CGImageMaskCreate(image->width, image->height, bitsPerComponent,
- bitsPerPixel, image->bytes_per_line,
- provider, decode, 0);
+ bitsPerPixel, image->bytes_per_line, provider, decode, 0);
}
} else if (image->format == ZPixmap && image->bits_per_pixel == 32) {
/*
@@ -473,6 +498,7 @@ CreateCGImageWithXImage(
img = CGImageCreate(image->width, image->height, bitsPerComponent,
bitsPerPixel, image->bytes_per_line, colorspace, bitmapInfo,
provider, decode, 0, kCGRenderingIntentDefault);
+ CFRelease(provider);
}
if (colorspace) {
CFRelease(colorspace);
@@ -480,10 +506,6 @@ CreateCGImageWithXImage(
} else {
TkMacOSXDbgMsg("Unsupported image type");
}
- if (provider) {
- CFRelease(provider);
- }
-
return img;
}
@@ -652,17 +674,16 @@ GetCGContextForDrawable(
CGColorSpaceRef colorspace = NULL;
CGBitmapInfo bitmapInfo =
#ifdef __LITTLE_ENDIAN__
- kCGBitmapByteOrder32Host;
+ kCGBitmapByteOrder32Host;
#else
- kCGBitmapByteOrderDefault;
+ kCGBitmapByteOrderDefault;
#endif
char *data;
- CGRect bounds = CGRectMake(0, 0, macDraw->size.width,
- macDraw->size.height);
+ CGRect bounds = CGRectMake(0, 0, macDraw->size.width, macDraw->size.height);
if (macDraw->flags & TK_IS_BW_PIXMAP) {
bitsPerPixel = 8;
- bitmapInfo = kCGImageAlphaOnly;
+ bitmapInfo = (CGBitmapInfo)kCGImageAlphaOnly;
} else {
colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
bitsPerPixel = 32;
@@ -731,9 +752,11 @@ DrawCGImage(
}
}
dstBounds = CGRectOffset(dstBounds, macDraw->xOff, macDraw->yOff);
+
if (CGImageIsMask(image)) {
/*CGContextSaveGState(context);*/
if (macDraw->flags & TK_IS_BW_PIXMAP) {
+ /* Set fill color to black, background comes from the context, or is transparent. */
if (imageBackground != TRANSPARENT_PIXEL << 24) {
CGContextClearRect(context, dstBounds);
}
@@ -746,6 +769,7 @@ DrawCGImage(
TkMacOSXSetColorInContext(gc, imageForeground, context);
}
}
+
#ifdef TK_MAC_DEBUG_IMAGE_DRAWING
CGContextSaveGState(context);
CGContextSetLineWidth(context, 1.0);
@@ -765,15 +789,11 @@ DrawCGImage(
dstBounds.size.width, dstBounds.size.height);
#else /* TK_MAC_DEBUG_IMAGE_DRAWING */
CGContextSaveGState(context);
- CGContextTranslateCTM(context,
- 0, dstBounds.origin.y + CGRectGetMaxY(dstBounds));
+ CGContextTranslateCTM(context, 0, dstBounds.origin.y + CGRectGetMaxY(dstBounds));
CGContextScaleCTM(context, 1, -1);
CGContextDrawImage(context, dstBounds, image);
CGContextRestoreGState(context);
#endif /* TK_MAC_DEBUG_IMAGE_DRAWING */
- /*if (CGImageIsMask(image)) {
- CGContextRestoreGState(context);
- }*/
if (subImage) {
CFRelease(subImage);
}
@@ -1476,12 +1496,11 @@ TkScrollWindow(
{
Drawable drawable = Tk_WindowId(tkwin);
MacDrawable *macDraw = (MacDrawable *) drawable;
- NSView *view = TkMacOSXDrawableView(macDraw);
+ TKContentView *view = (TKContentView *)TkMacOSXDrawableView(macDraw);
CGRect srcRect, dstRect;
- HIShapeRef dmgRgn = NULL, extraRgn;
+ HIShapeRef dmgRgn = NULL, extraRgn = NULL;
NSRect bounds, visRect, scrollSrc, scrollDst;
- int result;
-
+ int result = 0;
if ( view ) {
/* Get the scroll area in NSView coordinates (origin at bottom left). */
@@ -1491,36 +1510,78 @@ TkScrollWindow(
bounds.size.height - height - (macDraw->yOff + y),
width, height);
scrollDst = NSOffsetRect(scrollSrc, dx, -dy);
+
/* Limit scrolling to the window content area. */
visRect = [view visibleRect];
scrollSrc = NSIntersectionRect(scrollSrc, visRect);
scrollDst = NSIntersectionRect(scrollDst, visRect);
-
if ( !NSIsEmptyRect(scrollSrc) && !NSIsEmptyRect(scrollDst) ) {
/*
* Mark the difference between source and destination as damaged.
- * This region is described in the Tk coordinate system.
+ * This region is described in NSView coordinates (y=0 at the bottom)
+ * and converted to Tk coordinates later.
*/
- srcRect = CGRectMake(x, y, width, height);
- dstRect = CGRectOffset(srcRect, dx, dy);
+ srcRect = CGRectMake(x, y, width, height);
+ dstRect = CGRectOffset(srcRect, dx, dy);
+
+ /* Expand the rectangles slightly to avoid degeneracies. */
+ srcRect.origin.y -= 1;
+ srcRect.size.height += 2;
+ dstRect.origin.y += 1;
+ dstRect.size.height -= 2;
+
+ /* Compute the damage. */
dmgRgn = HIShapeCreateMutableWithRect(&srcRect);
extraRgn = HIShapeCreateWithRect(&dstRect);
ChkErr(HIShapeDifference, dmgRgn, extraRgn, (HIMutableShapeRef) dmgRgn);
- CFRelease(extraRgn);
+ result = HIShapeIsEmpty(dmgRgn) ? 0 : 1;
+
+ /* Convert to Tk coordinates. */
+ TkMacOSXSetWithNativeRegion(damageRgn, dmgRgn);
+ if (extraRgn) {
+ CFRelease(extraRgn);
+ }
/* Scroll the rectangle. */
[view scrollRect:scrollSrc by:NSMakeSize(dx, -dy)];
+
+ /* Shift the Tk children which meet the source rectangle. */
+ TkWindow *winPtr = (TkWindow *)tkwin;
+ TkWindow *childPtr;
+ CGRect childBounds;
+ for (childPtr = winPtr->childList; childPtr != NULL; childPtr = childPtr->nextPtr) {
+ if (Tk_IsMapped(childPtr) && !Tk_IsTopLevel(childPtr)) {
+ TkMacOSXWinCGBounds(childPtr, &childBounds);
+ if (CGRectIntersectsRect(srcRect, childBounds)) {
+ MacDrawable *macChild = childPtr->privatePtr;
+ if (macChild) {
+ macChild->yOff += dy;
+ macChild->xOff += dx;
+ childPtr->changes.y = macChild->yOff;
+ childPtr->changes.x = macChild->xOff;
+ }
+ }
+ }
+ }
+
+ /* Queue up Expose events for the damage region. */
+ int oldMode = Tcl_SetServiceMode(TCL_SERVICE_NONE);
+ [view generateExposeEvents:dmgRgn childrenOnly:1];
+ Tcl_SetServiceMode(oldMode);
+
+ /* Belt and suspenders: make the AppKit request a redraw
+ when it gets control again. */
}
+ } else {
+ dmgRgn = HIShapeCreateEmpty();
+ TkMacOSXSetWithNativeRegion(damageRgn, dmgRgn);
}
- if ( dmgRgn == NULL ) {
- dmgRgn = HIShapeCreateEmpty();
+ if (dmgRgn) {
+ CFRelease(dmgRgn);
}
- TkMacOSXSetWithNativeRegion(damageRgn, dmgRgn);
- result = HIShapeIsEmpty(dmgRgn) ? 0 : 1;
- CFRelease(dmgRgn);
return result;
}
@@ -1797,7 +1858,6 @@ TkMacOSXGetClipRgn(
} else if (macDraw->visRgn) {
clipRgn = HIShapeCreateCopy(macDraw->visRgn);
}
-
return clipRgn;
}
@@ -1855,6 +1915,7 @@ TkpClipDrawableToRect(
CFRelease(macDraw->drawRgn);
macDraw->drawRgn = NULL;
}
+
if (width >= 0 && height >= 0) {
CGRect clipRect = CGRectMake(x + macDraw->xOff, y + macDraw->yOff,
width, height);
@@ -2002,7 +2063,7 @@ TkpDrawHighlightBorder (
* TkpDrawFrame --
*
* This procedure draws the rectangular frame area. If the user
- * has request themeing, it draws with a the background theme.
+ * has requested themeing, it draws with the background theme.
*
* Results:
* None.
@@ -2032,6 +2093,7 @@ TkpDrawFrame(
border = themedBorder;
}
}
+
Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin),
border, highlightWidth, highlightWidth,
Tk_Width(tkwin) - 2 * highlightWidth,
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index 99f7584..5ea7603 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -193,7 +193,7 @@ TkpMakeWindow(
int
TkpScanWindowId(
Tcl_Interp *interp,
- CONST char * string,
+ const char * string,
Window *idPtr)
{
int code;
diff --git a/macosx/tkMacOSXEvent.c b/macosx/tkMacOSXEvent.c
index ea262ff..7f3357f 100644
--- a/macosx/tkMacOSXEvent.c
+++ b/macosx/tkMacOSXEvent.c
@@ -31,18 +31,19 @@ enum {
NSEvent *processedEvent = theEvent;
NSEventType type = [theEvent type];
NSInteger subtype;
- NSUInteger flags;
switch ((NSInteger)type) {
case NSAppKitDefined:
subtype = [theEvent subtype];
switch (subtype) {
+ /* Ignored at the moment. */
case NSApplicationActivatedEventType:
break;
case NSApplicationDeactivatedEventType:
break;
case NSWindowExposedEventType:
+ break;
case NSScreenChangedEventType:
break;
case NSWindowMovedEventType:
@@ -53,13 +54,12 @@ enum {
default:
break;
}
- break;
+ break; /* AppkitEvent. Return theEvent */
case NSKeyUp:
case NSKeyDown:
case NSFlagsChanged:
- flags = [theEvent modifierFlags];
processedEvent = [self tkProcessKeyEvent:theEvent];
- break;
+ break; /* Key event. Return the processed event. */
case NSLeftMouseDown:
case NSLeftMouseUp:
case NSRightMouseDown:
@@ -76,7 +76,7 @@ enum {
case NSTabletPoint:
case NSTabletProximity:
processedEvent = [self tkProcessMouseEvent:theEvent];
- break;
+ break; /* Mouse event. Return the processed event. */
#if 0
case NSSystemDefined:
subtype = [theEvent subtype];
@@ -100,7 +100,7 @@ enum {
#endif
default:
- break;
+ break; /* return theEvent */
}
return processedEvent;
}
@@ -113,14 +113,14 @@ enum {
*
* TkMacOSXFlushWindows --
*
- * This routine flushes all the windows of the application. It is
+ * This routine flushes all the visible windows of the application. It is
* called by XSync().
*
* Results:
* None.
*
* Side effects:
- * Flushes all Carbon windows
+ * Flushes all visible Cocoa windows
*
*----------------------------------------------------------------------
*/
@@ -128,22 +128,15 @@ enum {
MODULE_SCOPE void
TkMacOSXFlushWindows(void)
{
- NSInteger windowCount;
- NSInteger *windowNumbers;
+ NSArray *macWindows = [NSApp orderedWindows];
- NSCountWindows(&windowCount);
- if(windowCount) {
- windowNumbers = ckalloc(windowCount * sizeof(NSInteger));
- NSWindowList(windowCount, windowNumbers);
- for (NSInteger index = 0; index < windowCount; index++) {
- NSWindow *w = [NSApp windowWithWindowNumber:windowNumbers[index]];
- if (TkMacOSXGetXWindow(w)) {
- [w flushWindow];
- }
+ for (NSWindow *w in macWindows) {
+ if (TkMacOSXGetXWindow(w)) {
+ [w flushWindow];
}
- ckfree(windowNumbers);
}
}
+
/*
* Local Variables:
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index 4c8ac30..d3e0e41 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -15,6 +15,19 @@
#include "tkMacOSXPrivate.h"
#include "tkMacOSXFont.h"
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
+#define defaultOrientation kCTFontDefaultOrientation
+#define verticalOrientation kCTFontVerticalOrientation
+#else
+#define defaultOrientation kCTFontOrientationDefault
+#define verticalOrientation kCTFontOrientationVertical
+#endif
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100
+#define fixedPitch kCTFontUserFixedPitchFontType
+#else
+#define fixedPitch kCTFontUIFontUserFixedPitch
+#endif
+
/*
#ifdef TK_MAC_DEBUG
#define TK_MAC_DEBUG_FONTS
@@ -197,6 +210,7 @@ FindNSFont(
nsFont = [fm convertFont:nsFont toSize:size];
nsFont = [fm convertFont:nsFont toHaveTrait:traits];
}
+ [nsFont retain];
#undef defaultFont
return nsFont;
}
@@ -270,7 +284,7 @@ InitFont(
fmPtr->fixed = [nsFont advancementForGlyph:glyphs[0]].width ==
[nsFont advancementForGlyph:glyphs[1]].width;
bounds = NSRectFromCGRect(CTFontGetBoundingRectsForGlyphs((CTFontRef)
- nsFont, kCTFontDefaultOrientation, ch, boundingRects, nCh));
+ nsFont, defaultOrientation, ch, boundingRects, nCh));
kern = [nsFont advancementForGlyph:glyphs[2]].width -
[fontPtr->nsFont advancementForGlyph:glyphs[2]].width;
}
@@ -293,7 +307,7 @@ InitFont(
[NSNumber numberWithInt:fmPtr->fixed ? 0 : 1],
NSLigatureAttributeName,
[NSNumber numberWithDouble:kern], NSKernAttributeName, nil];
- fontPtr->nsAttributes = TkMacOSXMakeUncollectableAndRetain(nsAttributes);
+ fontPtr->nsAttributes = [nsAttributes retain];
#undef nCh
}
@@ -358,6 +372,7 @@ TkpFontPkgInit(
NSFont *nsFont;
TkFontAttributes fa;
NSMutableCharacterSet *cs;
+ /* Since we called before TkpInit, we need our own autorelease pool. */
NSAutoreleasePool *pool = [NSAutoreleasePool new];
/* force this for now */
@@ -382,8 +397,7 @@ TkpFontPkgInit(
systemFont++;
}
TkInitFontAttributes(&fa);
- nsFont = (NSFont*) CTFontCreateUIFontForLanguage(
- kCTFontUserFixedPitchFontType, 11, NULL);
+ nsFont = (NSFont*) CTFontCreateUIFontForLanguage(fixedPitch, 11, NULL);
if (nsFont) {
GetTkFontAttributesForNSFont(nsFont, &fa);
CFRelease(nsFont);
@@ -518,7 +532,7 @@ TkpGetFontFromAttributes(
nsFont = FindNSFont(faPtr->family, traits, weight, points, 1);
}
if (!nsFont) {
- Tcl_Panic("Could not deternmine NSFont from TkFontAttributes");
+ Tcl_Panic("Could not determine NSFont from TkFontAttributes");
}
if (tkFontPtr == NULL) {
fontPtr = ckalloc(sizeof(MacFont));
@@ -557,7 +571,8 @@ TkpDeleteFont(
{
MacFont *fontPtr = (MacFont *) tkFontPtr;
- TkMacOSXMakeCollectableAndRelease(fontPtr->nsAttributes);
+ [fontPtr->nsAttributes release];
+ fontPtr->nsAttributes = NULL;
CFRelease(fontPtr->nsFont); /* Either a CTFontRef or a CFRetained NSFont */
}
@@ -657,15 +672,14 @@ void
TkpGetFontAttrsForChar(
Tk_Window tkwin, /* Window on the font's display */
Tk_Font tkfont, /* Font to query */
- Tcl_UniChar c, /* Character of interest */
+ int c, /* Character of interest */
TkFontAttributes* faPtr) /* Output: Font attributes */
{
MacFont *fontPtr = (MacFont *) tkfont;
NSFont *nsFont = fontPtr->nsFont;
-
*faPtr = fontPtr->font.fa;
if (nsFont && ![[nsFont coveredCharacterSet] characterIsMember:c]) {
- UTF16Char ch = c;
+ UTF16Char ch = (UTF16Char) c;
nsFont = [nsFont bestMatchingFontForCharacters:&ch
length:1 attributes:nil actualCoveredLength:NULL];
diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c
index daf860f..f5aeff0 100644
--- a/macosx/tkMacOSXHLEvents.c
+++ b/macosx/tkMacOSXHLEvents.c
@@ -7,12 +7,15 @@
* Copyright (c) 1995-1997 Sun Microsystems, Inc.
* Copyright 2001-2009, Apple Inc.
* Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright (c) 2015 Marc Culler
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
#include "tkMacOSXPrivate.h"
+#include <sys/param.h>
+#define URL_MAX_LENGTH (17 + MAXPATHLEN)
/*
* This is a Tcl_Event structure that the Quit AppleEvent handler uses to
@@ -30,154 +33,32 @@ typedef struct KillEvent {
* Static functions used only in this file.
*/
-static OSErr QuitHandler(const AppleEvent *event,
- AppleEvent *reply, SRefCon handlerRefcon);
-static OSErr OappHandler(const AppleEvent *event,
- AppleEvent *reply, SRefCon handlerRefcon);
-static OSErr RappHandler(const AppleEvent *event,
- AppleEvent *reply, SRefCon handlerRefcon);
-static OSErr OdocHandler(const AppleEvent *event,
- AppleEvent *reply, SRefCon handlerRefcon);
-static OSErr PrintHandler(const AppleEvent *event,
- AppleEvent *reply, SRefCon handlerRefcon);
-static OSErr ScriptHandler(const AppleEvent *event,
- AppleEvent *reply, SRefCon handlerRefcon);
-static OSErr PrefsHandler(const AppleEvent *event,
- AppleEvent *reply, SRefCon handlerRefcon);
-static int MissedAnyParameters(const AppleEvent *theEvent);
-static int ReallyKillMe(Tcl_Event *eventPtr, int flags);
-static OSStatus FSRefToDString(const FSRef *fsref, Tcl_DString *ds);
+static void tkMacOSXProcessFiles(NSAppleEventDescriptor* event,
+ NSAppleEventDescriptor* replyEvent,
+ Tcl_Interp *interp,
+ char* procedure);
+static int MissedAnyParameters(const AppleEvent *theEvent);
+static int ReallyKillMe(Tcl_Event *eventPtr, int flags);
#pragma mark TKApplication(TKHLEvents)
@implementation TKApplication(TKHLEvents)
- (void) terminate: (id) sender
{
- QuitHandler(NULL, NULL, (SRefCon) _eventInterp);
+ [self handleQuitApplicationEvent:Nil withReplyEvent:Nil];
}
- (void) preferences: (id) sender
{
- PrefsHandler(NULL, NULL, (SRefCon) _eventInterp);
+ [self handleShowPreferencesEvent:Nil withReplyEvent:Nil];
}
-@end
-
-#pragma mark -
-
-/*
- *----------------------------------------------------------------------
- *
- * TkMacOSXInitAppleEvents --
- *
- * Initilize the Apple Events on the Macintosh. This registers the core
- * event handlers.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-void
-TkMacOSXInitAppleEvents(
- Tcl_Interp *interp) /* Interp to handle basic events. */
-{
- AEEventHandlerUPP OappHandlerUPP, RappHandlerUPP, OdocHandlerUPP;
- AEEventHandlerUPP PrintHandlerUPP, QuitHandlerUPP, ScriptHandlerUPP;
- AEEventHandlerUPP PrefsHandlerUPP;
- static Boolean initialized = FALSE;
-
- if (!initialized) {
- initialized = TRUE;
-
- /*
- * Install event handlers for the core apple events.
- */
-
- QuitHandlerUPP = NewAEEventHandlerUPP(QuitHandler);
- ChkErr(AEInstallEventHandler, kCoreEventClass, kAEQuitApplication,
- QuitHandlerUPP, (SRefCon) interp, false);
-
- OappHandlerUPP = NewAEEventHandlerUPP(OappHandler);
- ChkErr(AEInstallEventHandler, kCoreEventClass, kAEOpenApplication,
- OappHandlerUPP, (SRefCon) interp, false);
-
- RappHandlerUPP = NewAEEventHandlerUPP(RappHandler);
- ChkErr(AEInstallEventHandler, kCoreEventClass, kAEReopenApplication,
- RappHandlerUPP, (SRefCon) interp, false);
-
- OdocHandlerUPP = NewAEEventHandlerUPP(OdocHandler);
- ChkErr(AEInstallEventHandler, kCoreEventClass, kAEOpenDocuments,
- OdocHandlerUPP, (SRefCon) interp, false);
-
- PrintHandlerUPP = NewAEEventHandlerUPP(PrintHandler);
- ChkErr(AEInstallEventHandler, kCoreEventClass, kAEPrintDocuments,
- PrintHandlerUPP, (SRefCon) interp, false);
-
- PrefsHandlerUPP = NewAEEventHandlerUPP(PrefsHandler);
- ChkErr(AEInstallEventHandler, kCoreEventClass, kAEShowPreferences,
- PrefsHandlerUPP, (SRefCon) interp, false);
-
- if (interp) {
- ScriptHandlerUPP = NewAEEventHandlerUPP(ScriptHandler);
- ChkErr(AEInstallEventHandler, kAEMiscStandards, kAEDoScript,
- ScriptHandlerUPP, (SRefCon) interp, false);
- }
- }
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * TkMacOSXDoHLEvent --
- *
- * Dispatch incomming highlevel events.
- *
- * Results:
- * None.
- *
- * Side effects:
- * Depends on the incoming event.
- *
- *----------------------------------------------------------------------
- */
-
-int
-TkMacOSXDoHLEvent(
- void *theEvent)
-{
- return AEProcessAppleEvent((EventRecord *)theEvent);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * QuitHandler --
- *
- * This is the 'quit' core Apple event handler.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-static OSErr
-QuitHandler(
- const AppleEvent *event,
- AppleEvent *reply,
- SRefCon handlerRefcon)
+- (void) handleQuitApplicationEvent: (NSAppleEventDescriptor *)event
+ withReplyEvent: (NSAppleEventDescriptor *)replyEvent
{
- Tcl_Interp *interp = (Tcl_Interp *) handlerRefcon;
KillEvent *eventPtr;
- if (interp) {
+ if (_eventInterp) {
/*
* Call the exit command from the event loop, since you are not
* supposed to call ExitToShell in an Apple Event Handler. We put this
@@ -188,233 +69,221 @@ QuitHandler(
eventPtr = ckalloc(sizeof(KillEvent));
eventPtr->header.proc = ReallyKillMe;
- eventPtr->interp = interp;
+ eventPtr->interp = _eventInterp;
Tcl_QueueEvent((Tcl_Event *) eventPtr, TCL_QUEUE_HEAD);
}
- return noErr;
}
-
-/*
- *----------------------------------------------------------------------
- *
- * OappHandler --
- *
- * This is the 'oapp' core Apple event handler.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-static OSErr
-OappHandler(
- const AppleEvent *event,
- AppleEvent *reply,
- SRefCon handlerRefcon)
+- (void) handleOpenApplicationEvent: (NSAppleEventDescriptor *)event
+ withReplyEvent: (NSAppleEventDescriptor *)replyEvent
{
- Tcl_Interp *interp = (Tcl_Interp *) handlerRefcon;
+ Tcl_Interp *interp = _eventInterp;
if (interp &&
- Tcl_FindCommand(interp, "::tk::mac::OpenApplication", NULL, 0)){
- int code = Tcl_EvalEx(interp, "::tk::mac::OpenApplication", -1, TCL_EVAL_GLOBAL);
+ Tcl_FindCommand(_eventInterp, "::tk::mac::OpenApplication", NULL, 0)){
+ int code = Tcl_EvalEx(_eventInterp, "::tk::mac::OpenApplication",
+ -1, TCL_EVAL_GLOBAL);
if (code != TCL_OK) {
- Tcl_BackgroundException(interp, code);
+ Tcl_BackgroundException(_eventInterp, code);
}
}
- return noErr;
}
-
-/*
- *----------------------------------------------------------------------
- *
- * RappHandler --
- *
- * This is the 'rapp' core Apple event handler.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-static OSErr
-RappHandler(
- const AppleEvent *event,
- AppleEvent *reply,
- SRefCon handlerRefcon)
+- (void) handleReopenApplicationEvent: (NSAppleEventDescriptor *)event
+ withReplyEvent: (NSAppleEventDescriptor *)replyEvent
{
- Tcl_Interp *interp = (Tcl_Interp *) handlerRefcon;
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090
ProcessSerialNumber thePSN = {0, kCurrentProcess};
- OSStatus err = ChkErr(SetFrontProcess, &thePSN);
-
- if (interp && Tcl_FindCommand(interp,
+ SetFrontProcess(&thePSN);
+#else
+ [[NSApplication sharedApplication] activateIgnoringOtherApps: YES];
+#endif
+ if (_eventInterp && Tcl_FindCommand(_eventInterp,
"::tk::mac::ReopenApplication", NULL, 0)) {
- int code = Tcl_EvalEx(interp, "::tk::mac::ReopenApplication", -1, TCL_EVAL_GLOBAL);
+ int code = Tcl_EvalEx(_eventInterp, "::tk::mac::ReopenApplication",
+ -1, TCL_EVAL_GLOBAL);
if (code != TCL_OK){
- Tcl_BackgroundException(interp, code);
+ Tcl_BackgroundException(_eventInterp, code);
}
}
- return err;
}
-
-/*
- *----------------------------------------------------------------------
- *
- * PrefsHandler --
- *
- * This is the 'pref' core Apple event handler. Called when the user
- * selects 'Preferences...' in MacOS X
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-static OSErr
-PrefsHandler(
- const AppleEvent *event,
- AppleEvent *reply,
- SRefCon handlerRefcon)
+- (void) handleShowPreferencesEvent: (NSAppleEventDescriptor *)event
+ withReplyEvent: (NSAppleEventDescriptor *)replyEvent
{
- Tcl_Interp *interp = (Tcl_Interp *) handlerRefcon;
-
- if (interp &&
- Tcl_FindCommand(interp, "::tk::mac::ShowPreferences", NULL, 0)){
- int code = Tcl_EvalEx(interp, "::tk::mac::ShowPreferences", -1, TCL_EVAL_GLOBAL);
+ if (_eventInterp &&
+ Tcl_FindCommand(_eventInterp, "::tk::mac::ShowPreferences", NULL, 0)){
+ int code = Tcl_EvalEx(_eventInterp, "::tk::mac::ShowPreferences",
+ -1, TCL_EVAL_GLOBAL);
if (code != TCL_OK) {
- Tcl_BackgroundException(interp, code);
+ Tcl_BackgroundException(_eventInterp, code);
}
}
- return noErr;
}
-
-/*
- *----------------------------------------------------------------------
- *
- * OdocHandler --
- *
- * This is the 'odoc' core Apple event handler.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-static OSErr
-OdocHandler(
- const AppleEvent *event,
- AppleEvent *reply,
- SRefCon handlerRefcon)
+- (void) handleOpenDocumentsEvent: (NSAppleEventDescriptor *)event
+ withReplyEvent: (NSAppleEventDescriptor *)replyEvent
{
- Tcl_Interp *interp = (Tcl_Interp *) handlerRefcon;
- AEDescList fileSpecList;
- FSRef file;
- DescType type;
- Size actual;
- long count, index;
- AEKeyword keyword;
- Tcl_DString command, pathName;
- int code;
+ tkMacOSXProcessFiles(event, replyEvent, _eventInterp, "::tk::mac::OpenDocument");
+}
- /*
- * Don't bother if we don't have an interp or the open document procedure
- * doesn't exist.
- */
+- (void) handlePrintDocumentsEvent: (NSAppleEventDescriptor *)event
+ withReplyEvent: (NSAppleEventDescriptor *)replyEvent
+{
+ tkMacOSXProcessFiles(event, replyEvent, _eventInterp, "::tk::mac::PrintDocument");
+}
- if (!interp ||
- !Tcl_FindCommand(interp, "::tk::mac::OpenDocument", NULL, 0)) {
- return noErr;
- }
+- (void) handleDoScriptEvent: (NSAppleEventDescriptor *)event
+ withReplyEvent: (NSAppleEventDescriptor *)replyEvent
+{
+ OSStatus err;
+ const AEDesc *theDesc = nil;
+ DescType type = 0, initialType = 0;
+ Size actual;
+ int tclErr = -1;
+ char URLBuffer[1 + URL_MAX_LENGTH];
+ char errString[128];
+ char typeString[5];
/*
- * If we get any errors while retrieving our parameters we just return with
- * no error.
+ * The DoScript event receives one parameter that should be text data or a
+ * fileURL.
*/
- if (ChkErr(AEGetParamDesc, event, keyDirectObject, typeAEList,
- &fileSpecList) != noErr) {
- return noErr;
+ theDesc = [event aeDesc];
+ if (theDesc == nil) {
+ return;
}
- if (MissedAnyParameters(event) != noErr) {
- return noErr;
- }
- if (ChkErr(AECountItems, &fileSpecList, &count) != noErr) {
- return noErr;
+
+ err = AEGetParamPtr(theDesc, keyDirectObject, typeWildCard, &initialType,
+ NULL, 0, NULL);
+ if (err != noErr) {
+ sprintf(errString, "AEDoScriptHandler: GetParamDesc error %d", (int)err);
+ AEPutParamPtr((AppleEvent*)[replyEvent aeDesc], keyErrorString, typeChar,
+ errString, strlen(errString));
+ return;
}
- /*
- * Convert our parameters into a script to evaluate, skipping things that
- * we can't handle right.
- */
+ if (MissedAnyParameters((AppleEvent*)theDesc)) {
+ sprintf(errString, "AEDoScriptHandler: extra parameters");
+ AEPutParamPtr((AppleEvent*)[replyEvent aeDesc], keyErrorString, typeChar,
+ errString, strlen(errString));
+ return;
+ }
- Tcl_DStringInit(&command);
- Tcl_DStringAppend(&command, "::tk::mac::OpenDocument", -1);
- for (index = 1; index <= count; index++) {
- if (ChkErr(AEGetNthPtr, &fileSpecList, index, typeFSRef, &keyword,
- &type, (Ptr) &file, sizeof(FSRef), &actual) != noErr) {
- continue;
+ if (initialType == typeFileURL || initialType == typeAlias) {
+ /*
+ * The descriptor can be coerced to a file url. Source the file, or
+ * pass the path as a string argument to ::tk::mac::DoScriptFile if
+ * that procedure exists.
+ */
+ err = AEGetParamPtr(theDesc, keyDirectObject, typeFileURL, &type,
+ (Ptr) URLBuffer, URL_MAX_LENGTH, &actual);
+ if (err == noErr && actual > 0){
+ URLBuffer[actual] = '\0';
+ NSString *urlString = [NSString stringWithUTF8String:(char*)URLBuffer];
+ NSURL *fileURL = [NSURL URLWithString:urlString];
+ Tcl_DString command;
+ Tcl_DStringInit(&command);
+ if (Tcl_FindCommand(_eventInterp, "::tk::mac::DoScriptFile", NULL, 0)){
+ Tcl_DStringAppend(&command, "::tk::mac::DoScriptFile", -1);
+ } else {
+ Tcl_DStringAppend(&command, "source", -1);
+ }
+ Tcl_DStringAppendElement(&command, [[fileURL path] UTF8String]);
+ tclErr = Tcl_EvalEx(_eventInterp, Tcl_DStringValue(&command),
+ Tcl_DStringLength(&command), TCL_EVAL_GLOBAL);
}
-
- if (ChkErr(FSRefToDString, &file, &pathName) == noErr) {
- Tcl_DStringAppendElement(&command, Tcl_DStringValue(&pathName));
- Tcl_DStringFree(&pathName);
+ } else if (noErr == AEGetParamPtr(theDesc, keyDirectObject, typeUTF8Text, &type,
+ NULL, 0, &actual)) {
+ if (actual > 0) {
+ /*
+ * The descriptor can be coerced to UTF8 text. Evaluate as Tcl, or
+ * or pass the text as a string argument to ::tk::mac::DoScriptText
+ * if that procedure exists.
+ */
+ char *data = ckalloc(actual + 1);
+ if (noErr == AEGetParamPtr(theDesc, keyDirectObject, typeUTF8Text, &type,
+ data, actual, NULL)) {
+ if (Tcl_FindCommand(_eventInterp, "::tk::mac::DoScriptText", NULL, 0)){
+ Tcl_DString command;
+ Tcl_DStringInit(&command);
+ Tcl_DStringAppend(&command, "::tk::mac::DoScriptText", -1);
+ Tcl_DStringAppendElement(&command, data);
+ tclErr = Tcl_EvalEx(_eventInterp, Tcl_DStringValue(&command),
+ Tcl_DStringLength(&command), TCL_EVAL_GLOBAL);
+ } else {
+ tclErr = Tcl_EvalEx(_eventInterp, data, actual, TCL_EVAL_GLOBAL);
+ }
+ }
+ ckfree(data);
+ }
+ } else {
+ /*
+ * The descriptor can not be coerced to a fileURL or UTF8 text.
+ */
+ for (int i = 0; i < 4; i++) {
+ typeString[i] = ((char*)&initialType)[3-i];
}
+ typeString[4] = '\0';
+ sprintf(errString, "AEDoScriptHandler: invalid script type '%s', "
+ "must be coercable to 'furl' or 'utf8'", typeString);
+ AEPutParamPtr((AppleEvent*)[replyEvent aeDesc], keyErrorString, typeChar, errString,
+ strlen(errString));
}
-
/*
- * Now handle the event by evaluating a script.
+ * If we ran some Tcl code, put the result in the reply.
*/
-
- code = Tcl_EvalEx(interp, Tcl_DStringValue(&command),
- Tcl_DStringLength(&command), TCL_EVAL_GLOBAL);
- if (code != TCL_OK) {
- Tcl_BackgroundException(interp, code);
+ if (tclErr >= 0) {
+ int reslen;
+ const char *result =
+ Tcl_GetStringFromObj(Tcl_GetObjResult(_eventInterp), &reslen);
+ if (tclErr == TCL_OK) {
+ AEPutParamPtr((AppleEvent*)[replyEvent aeDesc], keyDirectObject, typeChar,
+ result, reslen);
+ } else {
+ AEPutParamPtr((AppleEvent*)[replyEvent aeDesc], keyErrorString, typeChar,
+ result, reslen);
+ AEPutParamPtr((AppleEvent*)[replyEvent aeDesc], keyErrorNumber, typeSInt32,
+ (Ptr) &tclErr,sizeof(int));
+ }
}
- Tcl_DStringFree(&command);
- return noErr;
+ return;
}
-
+@end
+
+#pragma mark -
+
/*
*----------------------------------------------------------------------
*
- * PrintHandler --
+ * TkMacOSXProcessFiles --
*
- * This is the 'pdoc' core Apple event handler.
+ * Extract a list of fileURLs from an AppleEvent and call the specified
+ * procedure with the file paths as arguments.
*
* Results:
* None.
*
* Side effects:
- * None.
+ * The event is handled by running the procedure.
*
*----------------------------------------------------------------------
*/
-static OSErr
-PrintHandler(
- const AppleEvent * event,
- AppleEvent * reply,
- SRefCon handlerRefcon)
+static void
+tkMacOSXProcessFiles(
+ NSAppleEventDescriptor* event,
+ NSAppleEventDescriptor* replyEvent,
+ Tcl_Interp *interp,
+ char* procedure)
{
- Tcl_Interp *interp = (Tcl_Interp *) handlerRefcon;
- AEDescList fileSpecList;
- FSRef file;
+ Tcl_Encoding utf8 = Tcl_GetEncoding(NULL, "utf-8");
+ const AEDesc *fileSpecDesc = nil;
+ AEDesc contents;
+ char URLString[1 + URL_MAX_LENGTH];
+ NSURL *fileURL;
DescType type;
Size actual;
long count, index;
@@ -423,47 +292,67 @@ PrintHandler(
int code;
/*
- * Don't bother if we don't have an interp or the print document procedure
- * doesn't exist.
+ * Do nothing if we don't have an interpreter or the procedure doesn't exist.
*/
- if (!interp ||
- !Tcl_FindCommand(interp, "::tk::mac::PrintDocument", NULL, 0)) {
- return noErr;
+ if (!interp || !Tcl_FindCommand(interp, procedure, NULL, 0)) {
+ return;
+ }
+
+ fileSpecDesc = [event aeDesc];
+ if (fileSpecDesc == nil ) {
+ return;
}
/*
- * If we get any errors while retrieving our parameters we just return with
- * no error.
+ * The AppleEvent's descriptor should either contain a value of
+ * typeObjectSpecifier or typeAEList. In the first case, the descriptor
+ * can be treated as a list of size 1 containing a value which can be
+ * coerced into a fileURL. In the second case we want to work with the list
+ * itself. Values in the list will be coerced into fileURL's if possible;
+ * otherwise they will be ignored.
*/
- if (ChkErr(AEGetParamDesc, event, keyDirectObject, typeAEList,
- &fileSpecList) != noErr) {
- return noErr;
- }
- if (ChkErr(MissedAnyParameters, event) != noErr) {
- return noErr;
+ /* Get a copy of the AppleEvent's descriptor. */
+ AEGetParamDesc(fileSpecDesc, keyDirectObject, typeWildCard, &contents);
+ if (contents.descriptorType == typeAEList) {
+ fileSpecDesc = &contents;
}
- if (ChkErr(AECountItems, &fileSpecList, &count) != noErr) {
- return noErr;
+
+ if (AECountItems(fileSpecDesc, &count) != noErr) {
+ AEDisposeDesc(&contents);
+ return;
}
+ /*
+ * Construct a Tcl command which calls the procedure, passing the
+ * paths contained in the AppleEvent as arguments.
+ */
+
Tcl_DStringInit(&command);
- Tcl_DStringAppend(&command, "::tk::mac::PrintDocument", -1);
+ Tcl_DStringAppend(&command, procedure, -1);
+
for (index = 1; index <= count; index++) {
- if (ChkErr(AEGetNthPtr, &fileSpecList, index, typeFSRef, &keyword,
- &type, (Ptr) &file, sizeof(FSRef), &actual) != noErr) {
+ if (noErr != AEGetNthPtr(fileSpecDesc, index, typeFileURL, &keyword,
+ &type, (Ptr) URLString, URL_MAX_LENGTH, &actual)) {
continue;
}
-
- if (ChkErr(FSRefToDString, &file, &pathName) == noErr) {
- Tcl_DStringAppendElement(&command, Tcl_DStringValue(&pathName));
- Tcl_DStringFree(&pathName);
+ if (type != typeFileURL) {
+ continue;
+ }
+ URLString[actual] = '\0';
+ fileURL = [NSURL URLWithString:[NSString stringWithUTF8String:(char*)URLString]];
+ if (fileURL == nil) {
+ continue;
}
+ Tcl_ExternalToUtfDString(utf8, [[fileURL path] UTF8String], -1, &pathName);
+ Tcl_DStringAppendElement(&command, Tcl_DStringValue(&pathName));
+ Tcl_DStringFree(&pathName);
}
+ AEDisposeDesc(&contents);
/*
- * Now handle the event by evaluating a script.
+ * Handle the event by evaluating the Tcl expression we constructed.
*/
code = Tcl_EvalEx(interp, Tcl_DStringValue(&command),
@@ -472,18 +361,19 @@ PrintHandler(
Tcl_BackgroundException(interp, code);
}
Tcl_DStringFree(&command);
- return noErr;
+ return;
}
/*
*----------------------------------------------------------------------
*
- * ScriptHandler --
+ * TkMacOSXInitAppleEvents --
*
- * This handler process the script event.
+ * Register AppleEvent handlers with the NSAppleEventManager for
+ * this NSApplication.
*
* Results:
- * Schedules the given event to be processed.
+ * None.
*
* Side effects:
* None.
@@ -491,112 +381,91 @@ PrintHandler(
*----------------------------------------------------------------------
*/
-static OSErr
-ScriptHandler(
- const AppleEvent *event,
- AppleEvent *reply,
- SRefCon handlerRefcon)
+void
+TkMacOSXInitAppleEvents(
+ Tcl_Interp *interp) /* not used */
{
- OSStatus theErr;
- AEDescList theDesc;
- Size size;
- int tclErr = -1;
- Tcl_Interp *interp = (Tcl_Interp *) handlerRefcon;
- char errString[128];
+ NSAppleEventManager *aeManager = [NSAppleEventManager sharedAppleEventManager];
+ static Boolean initialized = FALSE;
- /*
- * The do script event receives one parameter that should be data or a
- * file.
- */
+ if (!initialized) {
+ initialized = TRUE;
- theErr = AEGetParamDesc(event, keyDirectObject, typeWildCard,
- &theDesc);
- if (theErr != noErr) {
- sprintf(errString, "AEDoScriptHandler: GetParamDesc error %d",
- (int)theErr);
- theErr = AEPutParamPtr(reply, keyErrorString, typeChar, errString,
- strlen(errString));
- } else if (MissedAnyParameters(event)) {
- /*
- * Return error if parameter is missing.
- */
+ [aeManager setEventHandler:NSApp
+ andSelector:@selector(handleQuitApplicationEvent:withReplyEvent:)
+ forEventClass:kCoreEventClass andEventID:kAEQuitApplication];
- sprintf(errString, "AEDoScriptHandler: extra parameters");
- AEPutParamPtr(reply, keyErrorString, typeChar, errString,
- strlen(errString));
- theErr = -1771;
- } else if (theDesc.descriptorType == (DescType) typeAlias &&
- AEGetParamPtr(event, keyDirectObject, typeFSRef, NULL, NULL,
- 0, &size) == noErr && size == sizeof(FSRef)) {
- /*
- * We've had a file sent to us. Source it.
- */
+ [aeManager setEventHandler:NSApp
+ andSelector:@selector(handleOpenApplicationEvent:withReplyEvent:)
+ forEventClass:kCoreEventClass andEventID:kAEOpenApplication];
- FSRef file;
- theErr = AEGetParamPtr(event, keyDirectObject, typeFSRef, NULL, &file,
- size, NULL);
- if (theErr == noErr) {
- Tcl_DString scriptName;
+ [aeManager setEventHandler:NSApp
+ andSelector:@selector(handleReopenApplicationEvent:withReplyEvent:)
+ forEventClass:kCoreEventClass andEventID:kAEReopenApplication];
- theErr = FSRefToDString(&file, &scriptName);
- if (theErr == noErr) {
- Tcl_Obj *pathName =
- Tcl_NewStringObj(Tcl_DStringValue(&scriptName), -1);
- Tcl_DStringFree(&scriptName);
+ [aeManager setEventHandler:NSApp
+ andSelector:@selector(handleShowPreferencesEvent:withReplyEvent:)
+ forEventClass:kCoreEventClass andEventID:kAEShowPreferences];
- tclErr = Tcl_FSEvalFile(interp, pathName);
- Tcl_DecrRefCount(pathName);
- } else {
- sprintf(errString, "AEDoScriptHandler: file not found");
- AEPutParamPtr(reply, keyErrorString, typeChar, errString,
- strlen(errString));
- }
- }
- } else if (AEGetParamPtr(event, keyDirectObject, typeUTF8Text, NULL, NULL,
- 0, &size) == noErr && size) {
- /*
- * We've had some data sent to us. Evaluate it.
- */
+ [aeManager setEventHandler:NSApp
+ andSelector:@selector(handleOpenDocumentsEvent:withReplyEvent:)
+ forEventClass:kCoreEventClass andEventID:kAEOpenDocuments];
- char *data = ckalloc(size + 1);
- theErr = AEGetParamPtr(event, keyDirectObject, typeUTF8Text, NULL, data,
- size, NULL);
- if (theErr == noErr) {
- tclErr = Tcl_EvalEx(interp, data, size, TCL_EVAL_GLOBAL);
- }
- } else {
- /*
- * Umm, don't recognize what we've got...
- */
+ [aeManager setEventHandler:NSApp
+ andSelector:@selector(handleOpenDocumentsEvent:withReplyEvent:)
+ forEventClass:kCoreEventClass andEventID:kAEPrintDocuments];
- sprintf(errString, "AEDoScriptHandler: invalid script type '%-4.4s', "
- "must be 'alis' or coercable to 'utf8'",
- (char*) &theDesc.descriptorType);
- AEPutParamPtr(reply, keyErrorString, typeChar, errString,
- strlen(errString));
- theErr = -1770;
+ [aeManager setEventHandler:NSApp
+ andSelector:@selector(handleDoScriptEvent:withReplyEvent:)
+ forEventClass:kAEMiscStandards andEventID:kAEDoScript];
}
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TkMacOSXDoHLEvent --
+ *
+ * Dispatch an AppleEvent.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Depend on the AppleEvent.
+ *
+ *----------------------------------------------------------------------
+ */
- /*
- * If we actually go to run Tcl code - put the result in the reply.
+int
+TkMacOSXDoHLEvent(
+ void *theEvent)
+{
+ /* According to the NSAppleEventManager reference:
+ * "The theReply parameter always specifies a reply Apple event, never
+ * nil. However, the handler should not fill out the reply if the
+ * descriptor type for the reply event is typeNull, indicating the sender
+ * does not want a reply."
+ * The specified way to build such a non-nil descriptor is used here. But
+ * on OSX 10.11, the compiler nonetheless generates a warning. I am
+ * supressing the warning here -- maybe the warnings will stop in a future
+ * compiler release.
*/
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnonnull"
+#endif
- if (tclErr >= 0) {
- int reslen;
- const char *result =
- Tcl_GetStringFromObj(Tcl_GetObjResult(interp), &reslen);
+ NSAppleEventDescriptor* theReply = [NSAppleEventDescriptor nullDescriptor];
+ NSAppleEventManager *aeManager = [NSAppleEventManager sharedAppleEventManager];
- if (tclErr == TCL_OK) {
- AEPutParamPtr(reply, keyDirectObject, typeChar, result, reslen);
- } else {
- AEPutParamPtr(reply, keyErrorString, typeChar, result, reslen);
- AEPutParamPtr(reply, keyErrorNumber, typeSInt32, (Ptr) &tclErr,
- sizeof(int));
- }
- }
+ return [aeManager dispatchRawAppleEvent:(const AppleEvent*)theEvent
+ withRawReply: (AppleEvent *)theReply
+ handlerRefCon: (SRefCon)0];
- AEDisposeDesc(&theDesc);
- return theErr;
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
}
/*
@@ -604,8 +473,8 @@ ScriptHandler(
*
* ReallyKillMe --
*
- * This proc tries to kill the shell by running exit, called from an
- * event scheduled by the "Quit" AppleEvent handler.
+ * This procedure tries to kill the shell by running exit, called from
+ * an event scheduled by the "Quit" AppleEvent handler.
*
* Results:
* Runs the "exit" command which might kill the shell.
@@ -665,37 +534,7 @@ MissedAnyParameters(
return (err != errAEDescNotFound);
}
-/*
- *----------------------------------------------------------------------
- *
- * FSRefToDString --
- *
- * Get a POSIX path from an FSRef.
- *
- * Results:
- * In the parameter ds.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-static OSStatus
-FSRefToDString(
- const FSRef *fsref,
- Tcl_DString *ds)
-{
- UInt8 fileName[PATH_MAX+1];
- OSStatus err;
- err = ChkErr(FSRefMakePath, fsref, fileName, sizeof(fileName));
- if (err == noErr) {
- Tcl_ExternalToUtfDString(NULL, (char*) fileName, -1, ds);
- }
- return err;
-}
-
/*
* Local Variables:
* mode: objc
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index 6a881d3..33a60f2 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.c
@@ -28,7 +28,6 @@ static char tkLibPath[PATH_MAX + 1] = "";
static char scriptPath[PATH_MAX + 1] = "";
-int tkMacOSXGCEnabled = 0;
long tkMacOSXMacOSXVersion = 0;
#pragma mark TKApplication(TKInit)
@@ -58,9 +57,17 @@ static void keyboardChanged(CFNotificationCenterRef center, void *observer, CFSt
@end
@implementation TKApplication
+@synthesize poolProtected = _poolProtected;
@end
@implementation TKApplication(TKInit)
+- (void) _resetAutoreleasePool
+{
+ if(![self poolProtected]) {
+ [_mainPool drain];
+ _mainPool = [NSAutoreleasePool new];
+ }
+}
#ifdef TK_MAC_DEBUG_NOTIFICATIONS
- (void) _postedNotification: (NSNotification *) notification
{
@@ -87,15 +94,17 @@ static void keyboardChanged(CFNotificationCenterRef center, void *observer, CFSt
- (void) _setupEventLoop
{
-
- /*Remove private API flags here.*/
+ NSAutoreleasePool *pool = [NSAutoreleasePool new];
[self finishLaunching];
[self setWindowsNeedUpdate:YES];
+ [pool drain];
}
- (void) _setup: (Tcl_Interp *) interp
{
_eventInterp = interp;
+ _mainPool = [NSAutoreleasePool new];
+ [NSApp setPoolProtected:NO];
_defaultMainMenu = nil;
[self _setupMenus];
[self setDelegate:self];
@@ -110,7 +119,7 @@ static void keyboardChanged(CFNotificationCenterRef center, void *observer, CFSt
- (NSString *) tkFrameworkImagePath: (NSString *) image
{
NSString *path = nil;
-
+ NSAutoreleasePool *pool = [NSAutoreleasePool new];
if (tkLibPath[0] != '\0') {
path = [[NSBundle bundleWithPath:[[NSString stringWithUTF8String:
tkLibPath] stringByAppendingString:@"/../.."]]
@@ -143,6 +152,8 @@ static void keyboardChanged(CFNotificationCenterRef center, void *observer, CFSt
}
}
#endif
+ [path retain];
+ [pool drain];
return path;
}
@end
@@ -169,6 +180,7 @@ static void
SetApplicationIcon(
ClientData clientData)
{
+ NSAutoreleasePool *pool = [NSAutoreleasePool new];
NSString *path = [NSApp tkFrameworkImagePath:@"Tk.icns"];
if (path) {
NSImage *image = [[NSImage alloc] initWithContentsOfFile:path];
@@ -177,6 +189,7 @@ SetApplicationIcon(
[image release];
}
}
+ [pool drain];
}
/*
@@ -254,20 +267,19 @@ TkpInit(
}
#endif
- static NSAutoreleasePool *pool = nil;
- if (!pool) {
- pool = [NSAutoreleasePool new];
+ {
+ NSAutoreleasePool *pool = [NSAutoreleasePool new];
+ [[NSUserDefaults standardUserDefaults] registerDefaults:
+ [NSDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithBool:YES],
+ @"_NSCanWrapButtonTitles",
+ [NSNumber numberWithInt:-1],
+ @"NSStringDrawingTypesetterBehavior",
+ nil]];
+ [TKApplication sharedApplication];
+ [pool drain];
+ [NSApp _setup:interp];
}
- tkMacOSXGCEnabled = ([NSGarbageCollector defaultCollector] != nil);
- [[NSUserDefaults standardUserDefaults] registerDefaults:
- [NSDictionary dictionaryWithObjectsAndKeys:
- [NSNumber numberWithBool:YES],
- @"_NSCanWrapButtonTitles",
- [NSNumber numberWithInt:-1],
- @"NSStringDrawingTypesetterBehavior",
- nil]];
- [TKApplication sharedApplication];
- [NSApp _setup:interp];
/* Check whether we are a bundled executable: */
bundleRef = CFBundleGetMainBundle();
@@ -324,12 +336,14 @@ TkpInit(
Tcl_DoWhenIdle(SetApplicationIcon, NULL);
}
- [NSApp _setupEventLoop];
- TkMacOSXInitAppleEvents(interp);
- TkMacOSXUseAntialiasedText(interp, -1);
- TkMacOSXInitCGDrawing(interp, TRUE, 0);
- [pool drain];
- pool = [NSAutoreleasePool new];
+ {
+ NSAutoreleasePool *pool = [NSAutoreleasePool new];
+ [NSApp _setupEventLoop];
+ TkMacOSXInitAppleEvents(interp);
+ TkMacOSXUseAntialiasedText(interp, -1);
+ TkMacOSXInitCGDrawing(interp, TRUE, 0);
+ [pool drain];
+ }
/*
* FIXME: Close stdin & stdout for remote debugging otherwise we will
@@ -486,9 +500,8 @@ TkpDisplayWarning(
MODULE_SCOPE void
TkMacOSXDefaultStartupScript(void)
{
- CFBundleRef bundleRef;
-
- bundleRef = CFBundleGetMainBundle();
+ NSAutoreleasePool *pool = [NSAutoreleasePool new];
+ CFBundleRef bundleRef = CFBundleGetMainBundle();
if (bundleRef != NULL) {
CFURLRef appMainURL = CFBundleCopyResourceURL(bundleRef,
@@ -512,6 +525,7 @@ TkMacOSXDefaultStartupScript(void)
CFRelease(appMainURL);
}
}
+ [pool drain];
}
/*
diff --git a/macosx/tkMacOSXInt.h b/macosx/tkMacOSXInt.h
index 249d5cf..6971e26 100644
--- a/macosx/tkMacOSXInt.h
+++ b/macosx/tkMacOSXInt.h
@@ -86,7 +86,7 @@ typedef struct TkWindowPrivate MacDrawable;
#define TK_FOCUSED_VIEW 0x10
#define TK_IS_PIXMAP 0x20
#define TK_IS_BW_PIXMAP 0x40
-
+#define TK_DO_NOT_DRAW 0x80
/*
* I am reserving TK_EMBEDDED = 0x100 in the MacDrawable flags
* This is defined in tk.h. We need to duplicate the TK_EMBEDDED flag in the
diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c
index c9ad9f1..151b4f2 100644
--- a/macosx/tkMacOSXKeyEvent.c
+++ b/macosx/tkMacOSXKeyEvent.c
@@ -7,6 +7,7 @@
* Copyright 2001-2009, Apple Inc.
* Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
* Copyright (c) 2012 Adrian Robert.
+ * Copyright 2015 Marc Culler.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -27,7 +28,9 @@ static Tk_Window grabWinPtr = NULL;
/* Current grab window, NULL if no grab. */
static Tk_Window keyboardGrabWinPtr = NULL;
/* Current keyboard grab window. */
-static NSModalSession modalSession = NULL;
+static NSWindow *keyboardGrabNSWindow = nil;
+ /* NSWindow for the current keyboard grab window. */
+static NSModalSession modalSession = nil;
static BOOL processingCompose = NO;
static BOOL finishedCompose = NO;
@@ -78,16 +81,18 @@ static unsigned isFunctionKey(unsigned int code);
case NSFlagsChanged:
modifiers = [theEvent modifierFlags];
keyCode = [theEvent keyCode];
- w = [self windowWithWindowNumber:[theEvent windowNumber]];
+ // w = [self windowWithWindowNumber:[theEvent windowNumber]];
+ w = [theEvent window];
#if defined(TK_MAC_DEBUG_EVENTS) || NS_KEYLOG == 1
NSLog(@"-[%@(%p) %s] r=%d mods=%u '%@' '%@' code=%u c=%d %@ %d", [self class], self, _cmd, repeat, modifiers, characters, charactersIgnoringModifiers, keyCode,([charactersIgnoringModifiers length] == 0) ? 0 : [charactersIgnoringModifiers characterAtIndex: 0], w, type);
#endif
break;
default:
- return theEvent;
+ return theEvent; /* Unrecognized key event. */
}
+ /* Create an Xevent to add to the Tk queue. */
if (!processingCompose) {
unsigned int state = 0;
@@ -128,7 +133,7 @@ static unsigned isFunctionKey(unsigned int code);
tkwin = (Tk_Window) winPtr->dispPtr->focusPtr;
if (!tkwin) {
TkMacOSXDbgMsg("tkwin == NULL");
- return theEvent;
+ return theEvent; /* Give up. No window for this event. */
}
/*
@@ -222,7 +227,7 @@ static unsigned isFunctionKey(unsigned int code);
-@implementation TKContentView(TKKeyEvent)
+@implementation TKContentView
/* <NSTextInput> implementation (called through interpretKeyEvents:]). */
/* <NSTextInput>: called when done composing;
@@ -288,22 +293,6 @@ static unsigned isFunctionKey(unsigned int code);
}
-/* delete display of composing characters [not in <NSTextInput>] */
-- (void)deleteWorkingText
-{
- if (privateWorkingText == nil)
- return;
- if (NS_KEYLOG)
- NSLog(@"deleteWorkingText len = %lu\n",
- (unsigned long)[privateWorkingText length]);
- [privateWorkingText release];
- privateWorkingText = nil;
- processingCompose = NO;
-
- //PENDING: delete working text
-}
-
-
- (BOOL)hasMarkedText
{
return privateWorkingText != nil;
@@ -339,7 +328,7 @@ static unsigned isFunctionKey(unsigned int code);
pt.y = caret_y;
pt = [self convertPoint: pt toView: nil];
- pt = [[self window] convertBaseToScreen: pt];
+ pt = [[self window] convertPointToScreen: pt];
pt.y -= caret_height;
rect.origin = pt;
@@ -413,6 +402,24 @@ static unsigned isFunctionKey(unsigned int code);
@end
+@implementation TKContentView(TKKeyEvent)
+/* delete display of composing characters [not in <NSTextInput>] */
+- (void)deleteWorkingText
+{
+ if (privateWorkingText == nil)
+ return;
+ if (NS_KEYLOG)
+ NSLog(@"deleteWorkingText len = %lu\n",
+ (unsigned long)[privateWorkingText length]);
+ [privateWorkingText release];
+ privateWorkingText = nil;
+ processingCompose = NO;
+
+ //PENDING: delete working text
+}
+@end
+
+
/*
* Set up basic fields in xevent for keyboard input.
@@ -474,7 +481,9 @@ XGrabKeyboard(
if (modalSession) {
Tcl_Panic("XGrabKeyboard: already grabbed");
}
- modalSession = [NSApp beginModalSessionForWindow:[w retain]];
+ keyboardGrabNSWindow = w;
+ [w retain];
+ modalSession = [NSApp beginModalSessionForWindow:w];
}
}
return GrabSuccess;
@@ -502,11 +511,12 @@ XUngrabKeyboard(
Time time)
{
if (modalSession) {
- NSWindow *w = keyboardGrabWinPtr ? TkMacOSXDrawableWindow(
- ((TkWindow *) keyboardGrabWinPtr)->window) : nil;
[NSApp endModalSession:modalSession];
- [w release];
- modalSession = NULL;
+ modalSession = nil;
+ }
+ if (keyboardGrabNSWindow) {
+ [keyboardGrabNSWindow release];
+ keyboardGrabNSWindow = nil;
}
keyboardGrabWinPtr = NULL;
}
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index 85e1d6c..c7e3a78 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -258,9 +258,10 @@ static int ModifierCharWidth(Tk_Font tkfont);
if (menuPtr && mePtr) {
Tcl_Interp *interp = menuPtr->interp;
- /*Add time for errors to fire if necessary. This is sub-optimal but avoids issues with Tcl/Cocoa event loop integration.*/
+ /*Add time for errors to fire if necessary. This is sub-optimal
+ *but avoids issues with Tcl/Cocoa event loop integration.
+ */
Tcl_Sleep(100);
-
Tcl_Preserve(interp);
Tcl_Preserve(menuPtr);
@@ -411,7 +412,7 @@ static int ModifierCharWidth(Tk_Font tkfont);
if (!mePtr || !(mePtr->entryFlags & ENTRY_APPLE_MENU)) {
applicationMenuItem = [NSMenuItem itemWithSubmenu:
- [[_defaultApplicationMenu copy] autorelease]];
+ [_defaultApplicationMenu copy]];
[menu insertItem:applicationMenuItem atIndex:0];
}
[menu setSpecial:tkMainMenu];
@@ -419,7 +420,7 @@ static int ModifierCharWidth(Tk_Font tkfont);
applicationMenu = (TKMenu *)[applicationMenuItem submenu];
if (![applicationMenu isSpecial:tkApplicationMenu]) {
for (NSMenuItem *item in _defaultApplicationMenuItems) {
- [applicationMenu addItem:[[item copy] autorelease]];
+ [applicationMenu addItem:[item copy]];
}
[applicationMenu setSpecial:tkApplicationMenu];
}
@@ -429,15 +430,13 @@ static int ModifierCharWidth(Tk_Font tkfont);
for (NSMenuItem *item in itemArray) {
TkMenuEntry *mePtr = (TkMenuEntry *)[item tag];
TKMenu *submenu = (TKMenu *)[item submenu];
-
if (mePtr && submenu) {
if ((mePtr->entryFlags & ENTRY_WINDOWS_MENU) &&
![submenu isSpecial:tkWindowsMenu]) {
NSInteger index = 0;
for (NSMenuItem *i in _defaultWindowsMenuItems) {
- [submenu insertItem:[[i copy] autorelease] atIndex:
- index++];
+ [submenu insertItem:[i copy] atIndex:index++];
}
[self setWindowsMenu:submenu];
[submenu setSpecial:tkWindowsMenu];
@@ -446,8 +445,7 @@ static int ModifierCharWidth(Tk_Font tkfont);
NSInteger index = 0;
for (NSMenuItem *i in _defaultHelpMenuItems) {
- [submenu insertItem:[[i copy] autorelease] atIndex:
- index++];
+ [submenu insertItem:[i copy] atIndex:index++];
}
[submenu setSpecial:tkHelpMenu];
}
@@ -496,8 +494,7 @@ TkpNewMenu(
* platform structure for. */
{
TKMenu *menu = [[TKMenu alloc] initWithTkMenu:menuPtr];
- menuPtr->platformData = (TkMenuPlatformData)
- TkMacOSXMakeUncollectable(menu);
+ menuPtr->platformData = (TkMenuPlatformData) menu;
CheckForSpecialMenu(menuPtr);
return TCL_OK;
}
@@ -522,7 +519,10 @@ void
TkpDestroyMenu(
TkMenu *menuPtr) /* The common menu structure */
{
- TkMacOSXMakeCollectableAndRelease(menuPtr->platformData);
+ NSMenu* nsmenu = (NSMenu*)(menuPtr->platformData);
+
+ [nsmenu release];
+ menuPtr->platformData = NULL;
}
/*
@@ -555,8 +555,7 @@ TkpMenuNewEntry(
} else {
menuItem = [menu newTkMenuItem:mePtr];
}
- mePtr->platformEntryData = (TkMenuPlatformEntryData)
- TkMacOSXMakeUncollectable(menuItem);
+ mePtr->platformEntryData = (TkMenuPlatformEntryData) menuItem;
/*
* Caller TkMenuEntry() already did this same insertion into the generic
@@ -720,16 +719,21 @@ void
TkpDestroyMenuEntry(
TkMenuEntry *mePtr)
{
+ NSMenuItem *menuItem;
+ TKMenu *menu;
+ NSInteger index;
+
if (mePtr->platformEntryData && mePtr->menuPtr->platformData) {
- TKMenu *menu = (TKMenu *) mePtr->menuPtr->platformData;
- NSMenuItem *menuItem = (NSMenuItem *) mePtr->platformEntryData;
- NSInteger index = [menu indexOfItem:menuItem];
+ menu = (TKMenu *) mePtr->menuPtr->platformData;
+ menuItem = (NSMenuItem *) mePtr->platformEntryData;
+ index = [menu indexOfItem:menuItem];
if (index > -1) {
[menu removeItemAtIndex:index];
}
+ [menuItem release];
+ mePtr->platformEntryData = NULL;
}
- TkMacOSXMakeCollectableAndRelease(mePtr->platformEntryData);
}
/*
@@ -777,7 +781,7 @@ TkpPostMenu(
NSRect frame = NSMakeRect(x + 9, tkMacOSXZeroScreenHeight - y - 9, 1, 1);
frame.origin = [view convertPoint:
- [win convertScreenToBase:frame.origin] fromView:nil];
+ [win convertPointFromScreen:frame.origin] fromView:nil];
NSMenu *menu = (NSMenu *) menuPtr->platformData;
NSPopUpButtonCell *popUpButtonCell = [[NSPopUpButtonCell alloc]
@@ -830,11 +834,16 @@ TkpSetWindowMenuBar(
* Puts the menu associated with a window into the menubar. Should only
* be called when the window is in front.
*
+ * This is a no-op on all other platforms. On OS X it is a no-op when
+ * passed a NULL menuName or a nonexistent menuName, with an exception
+ * for the first call in a new interpreter. In that special case, passing a
+ * NULL menuName installs the default menu.
+ *
* Results:
* None.
*
* Side effects:
- * The menubar is changed.
+ * The menubar may be changed.
*
*----------------------------------------------------------------------
*/
@@ -843,8 +852,7 @@ void
TkpSetMainMenubar(
Tcl_Interp *interp, /* The interpreter of the application */
Tk_Window tkwin, /* The frame we are setting up */
- const char *menuName) /* The name of the menu to put in front. If
- * NULL, use the default menu bar. */
+ const char *menuName) /* The name of the menu to put in front. */
{
static Tcl_Interp *currentInterp = NULL;
TKMenu *menu = nil;
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c
index 90d2d00..c4197f7 100644
--- a/macosx/tkMacOSXMouseEvent.c
+++ b/macosx/tkMacOSXMouseEvent.c
@@ -26,13 +26,22 @@ typedef struct {
static int GenerateButtonEvent(MouseEventData *medPtr);
static unsigned int ButtonModifiers2State(UInt32 buttonState,
- UInt32 keyModifiers);
+ UInt32 keyModifiers);
#pragma mark TKApplication(TKMouseEvent)
enum {
NSWindowWillMoveEventType = 20
};
+/*
+ * In OS X 10.6 an NSEvent of type NSMouseMoved would always have a non-Nil
+ * window attribute pointing to the active window. As of 10.8 this behavior
+ * had changed. The new behavior was that if the mouse were ever moved outside
+ * of a window, all subsequent NSMouseMoved NSEvents would have a Nil window
+ * attribute. To work around this the TKApplication remembers the last non-Nil
+ * window that it received in a mouse event. If it receives an NSEvent with a
+ * Nil window attribute then the saved window is used.
+ */
@implementation TKApplication(TKMouseEvent)
- (NSEvent *) tkProcessMouseEvent: (NSEvent *) theEvent
@@ -40,80 +49,72 @@ enum {
#ifdef TK_MAC_DEBUG_EVENTS
TKLog(@"-[%@(%p) %s] %@", [self class], self, _cmd, theEvent);
#endif
- id win;
- NSEventType type = [theEvent type];
+ NSWindow* eventWindow = [theEvent window];
+ NSEventType eventType = [theEvent type];
#if 0
NSTrackingArea *trackingArea = nil;
NSInteger eventNumber, clickCount, buttonNumber;
#endif
-
- switch (type) {
+ switch (eventType) {
case NSMouseEntered:
case NSMouseExited:
case NSCursorUpdate:
-#if 0
- trackingArea = [theEvent trackingArea];
-#endif
- /* fall through */
case NSLeftMouseDown:
case NSLeftMouseUp:
case NSRightMouseDown:
case NSRightMouseUp:
case NSOtherMouseDown:
case NSOtherMouseUp:
-
case NSLeftMouseDragged:
case NSRightMouseDragged:
case NSOtherMouseDragged:
-
case NSMouseMoved:
-#if 0
- eventNumber = [theEvent eventNumber];
- if (!trackingArea) {
- clickCount = [theEvent clickCount];
- buttonNumber = [theEvent buttonNumber];
- }
-#endif
-
case NSTabletPoint:
case NSTabletProximity:
-
case NSScrollWheel:
- win = [self windowWithWindowNumber:[theEvent windowNumber]];
break;
-
- default:
+ default: /* Unrecognized mouse event. */
return theEvent;
- break;
}
- NSPoint global, local = [theEvent locationInWindow];
+ /* Remember the window in case we need it next time. */
+ if (eventWindow && eventWindow != _windowWithMouse) {
+ if (_windowWithMouse) {
+ [_windowWithMouse release];
+ }
+ _windowWithMouse = eventWindow;
+ [_windowWithMouse retain];
+ }
- if (win) {
- global = [win convertBaseToScreen:local];
- local.y = [win frame].size.height - local.y;
+ /* Create an Xevent to add to the Tk queue. */
+ NSPoint global, local = [theEvent locationInWindow];
+ if (eventWindow) { /* local will be in window coordinates. */
+ global = [eventWindow convertPointToScreen: local];
+ local.y = [eventWindow frame].size.height - local.y;
global.y = tkMacOSXZeroScreenHeight - global.y;
- } else {
- local.y = tkMacOSXZeroScreenHeight - local.y;
- global = local;
+ } else { /* local will be in screen coordinates. */
+ if (_windowWithMouse ) {
+ eventWindow = _windowWithMouse;
+ global = local;
+ local = [eventWindow convertPointFromScreen: local];
+ local.y = [eventWindow frame].size.height - local.y;
+ global.y = tkMacOSXZeroScreenHeight - global.y;
+ } else { /* We have no window. Use the screen???*/
+ local.y = tkMacOSXZeroScreenHeight - local.y;
+ global = local;
+ }
}
- Window window = TkMacOSXGetXWindow(win);
+ Window window = TkMacOSXGetXWindow(eventWindow);
Tk_Window tkwin = window ? Tk_IdToWindow(TkGetDisplayList()->display,
window) : NULL;
if (!tkwin) {
tkwin = TkMacOSXGetCapture();
}
if (!tkwin) {
- return theEvent;
+ return theEvent; /* Give up. No window for this event. */
}
- /*
- MacDrawable *macWin = (MacDrawable *) window;
- NSView *view = TkMacOSXDrawableView(macWin);
- local = [view convertPoint:local fromView:nil];
- local.y = NSHeight([view bounds]) - local.y;
- */
TkWindow *winPtr = (TkWindow *) tkwin;
local.x -= winPtr->wmInfoPtr->xInParent;
local.y -= winPtr->wmInfoPtr->yInParent;
@@ -127,12 +128,12 @@ enum {
EventRef eventRef = (EventRef)[theEvent eventRef];
UInt32 buttons;
OSStatus err = GetEventParameter(eventRef, kEventParamMouseChord,
- typeUInt32, NULL, sizeof(UInt32), NULL, &buttons);
+ typeUInt32, NULL, sizeof(UInt32), NULL, &buttons);
if (err == noErr) {
- state |= (buttons & ((1<<5) - 1)) << 8;
+ state |= (buttons & ((1<<5) - 1)) << 8;
} else if (button < 5) {
- switch (type) {
+ switch (eventType) {
case NSLeftMouseDown:
case NSRightMouseDown:
case NSLeftMouseDragged:
@@ -169,12 +170,12 @@ enum {
state |= Mod4Mask;
}
- if (type != NSScrollWheel) {
+ if (eventType != NSScrollWheel) {
#ifdef TK_MAC_DEBUG_EVENTS
TKLog(@"UpdatePointer %p x %f.0 y %f.0 %d", tkwin, global.x, global.y, state);
#endif
Tk_UpdatePointer(tkwin, global.x, global.y, state);
- } else {
+ } else { /* handle scroll wheel event */
CGFloat delta;
int coarseDelta;
XEvent xEvent;
@@ -190,7 +191,8 @@ enum {
delta = [theEvent deltaY];
if (delta != 0.0) {
- coarseDelta = (delta > -1.0 && delta < 1.0) ? (signbit(delta) ? -1 : 1) : lround(delta);
+ coarseDelta = (delta > -1.0 && delta < 1.0) ?
+ (signbit(delta) ? -1 : 1) : lround(delta);
xEvent.xbutton.state = state;
xEvent.xkey.keycode = coarseDelta;
xEvent.xany.serial = LastKnownRequestProcessed(Tk_Display(tkwin));
@@ -198,14 +200,14 @@ enum {
}
delta = [theEvent deltaX];
if (delta != 0.0) {
- coarseDelta = (delta > -1.0 && delta < 1.0) ? (signbit(delta) ? -1 : 1) : lround(delta);
+ coarseDelta = (delta > -1.0 && delta < 1.0) ?
+ (signbit(delta) ? -1 : 1) : lround(delta);
xEvent.xbutton.state = state | ShiftMask;
xEvent.xkey.keycode = coarseDelta;
xEvent.xany.serial = LastKnownRequestProcessed(Tk_Display(tkwin));
Tk_QueueWindowEvent(&xEvent, TCL_QUEUE_TAIL);
}
}
-
return theEvent;
}
@end
@@ -370,7 +372,7 @@ XQueryPointer(
if (win) {
NSPoint local;
- local = [win convertScreenToBase:global];
+ local = [win convertPointFromScreen:global];
local.y = [win frame].size.height - local.y;
if (macWin->winPtr && macWin->winPtr->wmInfoPtr) {
local.x -= macWin->winPtr->wmInfoPtr->xInParent;
@@ -468,7 +470,7 @@ TkGenerateButtonEvent(
if (win) {
NSPoint local = NSMakePoint(x, tkMacOSXZeroScreenHeight - y);
- local = [win convertScreenToBase:local];
+ local = [win convertPointFromScreen:local];
local.y = [win frame].size.height - local.y;
if (macWin->winPtr && macWin->winPtr->wmInfoPtr) {
local.x -= macWin->winPtr->wmInfoPtr->xInParent;
@@ -554,19 +556,18 @@ TkpWarpPointer(
}
/*
- * Tell the OSX core to generate the events to make it happen. This is
- * fairly ugly, but means that under most circumstances we'll register all
- * the events that would normally be generated correctly. If we use
- * CGWarpMouseCursorPosition instead, strange things happen.
+ * Tell the OSX core to generate the events to make it happen.
*/
- buttonState = (GetCurrentEvent() && Tk_MacOSXIsAppInFront())
- ? GetCurrentEventButtonState() : GetCurrentButtonState();
-
- CGPostMouseEvent(pt, 1 /* generate motion events */, 5,
- buttonState&1 ? 1 : 0, buttonState&2 ? 1 : 0,
- buttonState&4 ? 1 : 0, buttonState&8 ? 1 : 0,
- buttonState&16 ? 1 : 0);
+ buttonState = [NSEvent pressedMouseButtons];
+ CGEventType type = kCGEventMouseMoved;
+ CGEventRef theEvent = CGEventCreateMouseEvent(NULL,
+ type,
+ pt,
+ buttonState);
+ CGWarpMouseCursorPosition(pt);
+ CGEventPost(kCGHIDEventTap, theEvent);
+ CFRelease(theEvent);
}
/*
diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c
index 3e0dfde..f14e1b8 100644
--- a/macosx/tkMacOSXNotify.c
+++ b/macosx/tkMacOSXNotify.c
@@ -7,6 +7,7 @@
* Copyright (c) 1995-1997 Sun Microsystems, Inc.
* Copyright 2001-2009, Apple Inc.
* Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright 2015 Marc Culler.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -18,9 +19,9 @@
#include <pthread.h>
#import <objc/objc-auto.h>
+/* This is not used for anything at the moment. */
typedef struct ThreadSpecificData {
- int initialized, sendEventNestingLevel;
- NSEvent *currentEvent;
+ int initialized;
} ThreadSpecificData;
static Tcl_ThreadDataKey dataKey;
@@ -34,6 +35,7 @@ static void TkMacOSXEventsCheckProc(ClientData clientData, int flags);
#pragma mark TKApplication(TKNotify)
@interface NSApplication(TKNotify)
+/* We need to declare this hidden method. */
- (void) _modalSession: (NSModalSession) session sendEvent: (NSEvent *) event;
@end
@@ -48,41 +50,27 @@ static void TkMacOSXEventsCheckProc(ClientData clientData, int flags);
@end
@implementation TKApplication(TKNotify)
+/* Display all windows each time an event is removed from the queue.*/
- (NSEvent *) nextEventMatchingMask: (NSUInteger) mask
untilDate: (NSDate *) expiration inMode: (NSString *) mode
dequeue: (BOOL) deqFlag
{
- NSAutoreleasePool *pool = [NSAutoreleasePool new];
-
+ NSEvent *event = [super nextEventMatchingMask:mask
+ untilDate:expiration
+ inMode:mode
+ dequeue:deqFlag];
+ /* Retain this event for later use. Must be released.*/
+ [event retain];
[NSApp makeWindowsPerform:@selector(tkDisplayIfNeeded) inOrder:NO];
-
- int oldMode = Tcl_SetServiceMode(TCL_SERVICE_ALL);
- NSEvent *event = [[super nextEventMatchingMask:mask untilDate:expiration
- inMode:mode dequeue:deqFlag] retain];
-
- Tcl_SetServiceMode(oldMode);
- if (event) {
- TSD_INIT();
- if (tsdPtr->sendEventNestingLevel) {
- if (![NSApp tkProcessEvent:event]) {
- [event release];
- event = nil;
- }
- }
- }
- [pool drain];
- return [event autorelease];
+ return event;
}
+/*
+ * Call super then check the pasteboard.
+ */
- (void) sendEvent: (NSEvent *) theEvent
{
- TSD_INIT();
- int oldMode = Tcl_SetServiceMode(TCL_SERVICE_ALL);
-
- tsdPtr->sendEventNestingLevel++;
[super sendEvent:theEvent];
- tsdPtr->sendEventNestingLevel--;
- Tcl_SetServiceMode(oldMode);
[NSApp tkCheckPasteboard];
}
@end
@@ -161,7 +149,8 @@ Tk_MacOSXSetupTkNotifier(void)
"first [load] of TkAqua has to occur in the main thread!");
}
Tcl_CreateEventSource(TkMacOSXEventsSetupProc,
- TkMacOSXEventsCheckProc, GetMainEventQueue());
+ TkMacOSXEventsCheckProc,
+ GetMainEventQueue());
TkCreateExitHandler(TkMacOSXNotifyExitHandler, NULL);
Tcl_SetServiceMode(TCL_SERVICE_ALL);
TclMacOSXNotifierAddRunLoopMode(NSEventTrackingRunLoopMode);
@@ -194,7 +183,8 @@ TkMacOSXNotifyExitHandler(
TSD_INIT();
Tcl_DeleteEventSource(TkMacOSXEventsSetupProc,
- TkMacOSXEventsCheckProc, GetMainEventQueue());
+ TkMacOSXEventsCheckProc,
+ GetMainEventQueue());
tsdPtr->initialized = 0;
}
@@ -203,16 +193,19 @@ TkMacOSXNotifyExitHandler(
*
* TkMacOSXEventsSetupProc --
*
- * This procedure implements the setup part of the TkAqua Events event
- * source. It is invoked by Tcl_DoOneEvent before entering the notifier
- * to check for events.
+ * This procedure implements the setup part of the MacOSX event
+ * source. It is invoked by Tcl_DoOneEvent before calling
+ * TkMacOSXEventsProc to process all queued NSEvents. In our
+ * case, all we need to do is to set the Tcl MaxBlockTime to
+ * 0 before starting the loop to process all queued NSEvents.
*
* Results:
* None.
*
* Side effects:
- * If TkAqua events are queued, then the maximum block time will be set
- * to 0 to ensure that the notifier returns control to Tcl.
+ *
+ * If NSEvents are queued, then the maximum block time will be set
+ * to 0 to ensure that control returns immediately to Tcl.
*
*----------------------------------------------------------------------
*/
@@ -222,24 +215,20 @@ TkMacOSXEventsSetupProc(
ClientData clientData,
int flags)
{
- if (flags & TCL_WINDOW_EVENTS &&
- ![[NSRunLoop currentRunLoop] currentMode]) {
+ NSString *runloopMode = [[NSRunLoop currentRunLoop] currentMode];
+ /* runloopMode will be nil if we are in the Tcl event loop. */
+ if (flags & TCL_WINDOW_EVENTS && !runloopMode) {
static const Tcl_Time zeroBlockTime = { 0, 0 };
- TSD_INIT();
-
- if (!tsdPtr->currentEvent) {
- NSEvent *currentEvent = [NSApp nextEventMatchingMask:NSAnyEventMask
- untilDate:[NSDate distantPast]
- inMode:GetRunLoopMode(TkMacOSXGetModalSession())
- dequeue:YES];
-
- if (currentEvent) {
- tsdPtr->currentEvent =
- TkMacOSXMakeUncollectableAndRetain(currentEvent);
+ /* Call this with dequeue=NO -- just checking if the queue is empty. */
+ NSEvent *currentEvent = [NSApp nextEventMatchingMask:NSAnyEventMask
+ untilDate:[NSDate distantPast]
+ inMode:GetRunLoopMode(TkMacOSXGetModalSession())
+ dequeue:NO];
+ if (currentEvent) {
+ if (currentEvent.type > 0) {
+ Tcl_SetMaxBlockTime(&zeroBlockTime);
}
- }
- if (tsdPtr->currentEvent) {
- Tcl_SetMaxBlockTime(&zeroBlockTime);
+ [currentEvent release];
}
}
}
@@ -249,69 +238,74 @@ TkMacOSXEventsSetupProc(
*
* TkMacOSXEventsCheckProc --
*
- * This procedure processes events sitting in the TkAqua event queue.
+ * This procedure loops through all NSEvents waiting in the
+ * TKApplication event queue, generating X events from them.
*
* Results:
* None.
*
* Side effects:
- * Moves applicable queued TkAqua events onto the Tcl event queue.
+ * NSevents are used to generate X events, which are added to the
+ * Tcl event queue.
*
*----------------------------------------------------------------------
*/
-
static void
TkMacOSXEventsCheckProc(
ClientData clientData,
int flags)
{
- if (flags & TCL_WINDOW_EVENTS &&
- ![[NSRunLoop currentRunLoop] currentMode]) {
+ NSString *runloopMode = [[NSRunLoop currentRunLoop] currentMode];
+ /* runloopMode will be nil if we are in the Tcl event loop. */
+ if (flags & TCL_WINDOW_EVENTS && !runloopMode) {
NSEvent *currentEvent = nil;
- NSAutoreleasePool *pool = nil;
+ NSEvent *testEvent = nil;
NSModalSession modalSession;
- TSD_INIT();
- if (tsdPtr->currentEvent) {
- currentEvent = TkMacOSXMakeCollectableAndAutorelease(
- tsdPtr->currentEvent);
- }
do {
+ [NSApp _resetAutoreleasePool];
modalSession = TkMacOSXGetModalSession();
- if (!currentEvent) {
- currentEvent = [NSApp nextEventMatchingMask:NSAnyEventMask
- untilDate:[NSDate distantPast]
- inMode:GetRunLoopMode(modalSession) dequeue:YES];
- }
- if (!currentEvent) {
+ testEvent = [NSApp nextEventMatchingMask:NSAnyEventMask
+ untilDate:[NSDate distantPast]
+ inMode:GetRunLoopMode(modalSession)
+ dequeue:NO];
+ /* We must not steal any events during LiveResize. */
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
+ if (testEvent && [[testEvent window] inLiveResize]) {
break;
}
- [currentEvent retain];
- pool = [NSAutoreleasePool new];
- if (tkMacOSXGCEnabled) {
- objc_clear_stack(0);
- }
- if (![NSApp tkProcessEvent:currentEvent]) {
- [currentEvent release];
- currentEvent = nil;
+#else
+ if (testEvent && [[[testEvent window] contentView] inLiveResize]) {
+ break;
}
+#endif
+ currentEvent = [NSApp nextEventMatchingMask:NSAnyEventMask
+ untilDate:[NSDate distantPast]
+ inMode:GetRunLoopMode(modalSession)
+ dequeue:YES];
if (currentEvent) {
+ /* Generate Xevents. */
+ int oldServiceMode = Tcl_SetServiceMode(TCL_SERVICE_ALL);
+ NSEvent *processedEvent = [NSApp tkProcessEvent:currentEvent];
+ Tcl_SetServiceMode(oldServiceMode);
+ if (processedEvent) { /* Should always be non-NULL. */
#ifdef TK_MAC_DEBUG_EVENTS
- TKLog(@" event: %@", currentEvent);
+ TKLog(@" event: %@", currentEvent);
#endif
- if (modalSession) {
- [NSApp _modalSession:modalSession sendEvent:currentEvent];
- } else {
- [NSApp sendEvent:currentEvent];
+ if (modalSession) {
+ [NSApp _modalSession:modalSession sendEvent:currentEvent];
+ } else {
+ [NSApp sendEvent:currentEvent];
+ }
}
[currentEvent release];
- currentEvent = nil;
+ } else {
+ break;
}
- [pool drain];
- pool = nil;
} while (1);
}
}
+
/*
* Local Variables:
diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h
index 3664850..65d60ce 100644
--- a/macosx/tkMacOSXPrivate.h
+++ b/macosx/tkMacOSXPrivate.h
@@ -144,23 +144,6 @@
}
/*
- * Macros for GC
- */
-
-#define TkMacOSXMakeUncollectable(x) ({ id o = (id)(x); \
- if (o) { if(tkMacOSXGCEnabled) CFRetain(o); } o; })
-#define TkMacOSXMakeUncollectableAndRetain(x) ({ id o = (id)(x); \
- if (o) { if(tkMacOSXGCEnabled) CFRetain(o); else [o retain]; } o; })
-#define TkMacOSXMakeCollectable(x) ({ id o = (id)(x); \
- if (o) { x = nil; if (tkMacOSXGCEnabled) CFRelease(o); } o; })
-#define TkMacOSXMakeCollectableAndRelease(x) ({ id o = (id)(x); \
- if (o) { x = nil; if (tkMacOSXGCEnabled) CFRelease(o); \
- else [o release]; } o; })
-#define TkMacOSXMakeCollectableAndAutorelease(x) ({ id o = (id)(x); \
- if (o) { x = nil; if (tkMacOSXGCEnabled) CFRelease(o); \
- else [o autorelease]; } o; })
-
-/*
* Structure encapsulating current drawing environment.
*/
@@ -178,7 +161,6 @@ typedef struct TkMacOSXDrawingContext {
MODULE_SCOPE CGFloat tkMacOSXZeroScreenHeight;
MODULE_SCOPE CGFloat tkMacOSXZeroScreenTop;
-MODULE_SCOPE int tkMacOSXGCEnabled;
MODULE_SCOPE long tkMacOSXMacOSXVersion;
/*
@@ -292,10 +274,18 @@ VISIBILITY_HIDDEN
TKMenu *_defaultMainMenu, *_defaultApplicationMenu;
NSArray *_defaultApplicationMenuItems, *_defaultWindowsMenuItems;
NSArray *_defaultHelpMenuItems;
+ NSWindow *_windowWithMouse;
+ NSAutoreleasePool *_mainPool;
+#ifdef __i386__
+ /* The Objective C runtime used on i386 requires this. */
+ BOOL _poolProtected;
+#endif
}
+@property BOOL poolProtected;
@end
@interface TKApplication(TKInit)
- (NSString *)tkFrameworkImagePath:(NSString*)image;
+- (void)_resetAutoreleasePool;
@end
@interface TKApplication(TKEvent)
- (NSEvent *)tkProcessEvent:(NSEvent *)theEvent;
@@ -313,15 +303,33 @@ VISIBILITY_HIDDEN
- (void)tkProvidePasteboard:(TkDisplay *)dispPtr;
- (void)tkCheckPasteboard;
@end
+@interface TKApplication(TKHLEvents)
+- (void) terminate: (id) sender;
+- (void) preferences: (id) sender;
+- (void) handleQuitApplicationEvent: (NSAppleEventDescriptor *)event
+ withReplyEvent: (NSAppleEventDescriptor *)replyEvent;
+- (void) handleOpenApplicationEvent: (NSAppleEventDescriptor *)event
+ withReplyEvent: (NSAppleEventDescriptor *)replyEvent;
+- (void) handleReopenApplicationEvent: (NSAppleEventDescriptor *)event
+ withReplyEvent: (NSAppleEventDescriptor *)replyEvent;
+- (void) handleShowPreferencesEvent: (NSAppleEventDescriptor *)event
+ withReplyEvent: (NSAppleEventDescriptor *)replyEvent;
+- (void) handleOpenDocumentsEvent: (NSAppleEventDescriptor *)event
+ withReplyEvent: (NSAppleEventDescriptor *)replyEvent;
+- (void) handlePrintDocumentsEvent: (NSAppleEventDescriptor *)event
+ withReplyEvent: (NSAppleEventDescriptor *)replyEvent;
+- (void) handleDoScriptEvent: (NSAppleEventDescriptor *)event
+ withReplyEvent: (NSAppleEventDescriptor *)replyEvent;
+@end
VISIBILITY_HIDDEN
@interface TKContentView : NSView <NSTextInput> {
@private
/*Remove private API calls.*/
- #if 0
+#if 0
id _savedSubviews;
BOOL _subviewsSetAside;
- #endif
+#endif
NSString *privateWorkingText;
}
@end
@@ -330,10 +338,27 @@ VISIBILITY_HIDDEN
- (void) deleteWorkingText;
@end
+@interface TKContentView(TKWindowEvent)
+- (void) drawRect: (NSRect) rect;
+- (void) generateExposeEvents: (HIShapeRef) shape;
+- (void) generateExposeEvents: (HIShapeRef) shape childrenOnly: (int) childrenOnly;
+- (void) viewDidEndLiveResize;
+- (void) tkToolbarButton: (id) sender;
+- (BOOL) isOpaque;
+- (BOOL) wantsDefaultClipping;
+- (BOOL) acceptsFirstResponder;
+- (void) keyDown: (NSEvent *) theEvent;
+@end
+
VISIBILITY_HIDDEN
@interface TKWindow : NSWindow
@end
+@interface NSWindow(TKWm)
+- (NSPoint) convertPointToScreen:(NSPoint)point;
+- (NSPoint) convertPointFromScreen:(NSPoint)point;
+@end
+
#pragma mark NSMenu & NSMenuItem Utilities
@interface NSMenu(TKUtils)
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index 7370ff5..91cf112 100644
--- a/macosx/tkMacOSXScrlbr.c
+++ b/macosx/tkMacOSXScrlbr.c
@@ -26,6 +26,7 @@
#define RangeToFactor(maximum) (((double) (LONG_MAX >> 1)) / (maximum))
#endif /* __LP64__ */
+#define MOUNTAIN_LION_STYLE (NSAppKitVersionNumber < 1138)
/*
* Declaration of Mac specific scrollbar structure.
@@ -80,7 +81,6 @@ static void ScrollbarEventProc(ClientData clientData, XEvent *eventPtr);
static int ScrollbarPress(TkScrollbar *scrollPtr, XEvent *eventPtr);
static void UpdateControlValues(TkScrollbar *scrollPtr);
-
/*
*----------------------------------------------------------------------
*
@@ -136,27 +136,26 @@ TkpDisplayScrollbar(
{
register TkScrollbar *scrollPtr = (TkScrollbar *) clientData;
register Tk_Window tkwin = scrollPtr->tkwin;
+ TkWindow *winPtr = (TkWindow *) tkwin;
+ TkMacOSXDrawingContext dc;
+ scrollPtr->flags &= ~REDRAW_PENDING;
- if ((scrollPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) {
+ if (tkwin == NULL || !Tk_IsMapped(tkwin)) {
return;
}
- TkWindow *winPtr = (TkWindow *) tkwin;
MacDrawable *macWin = (MacDrawable *) winPtr->window;
- TkMacOSXDrawingContext dc;
NSView *view = TkMacOSXDrawableView(macWin);
+ if (!view ||
+ macWin->flags & TK_DO_NOT_DRAW ||
+ !TkMacOSXSetupDrawingContext((Drawable) macWin, NULL, 1, &dc)) {
+ return;
+ }
+
CGFloat viewHeight = [view bounds].size.height;
CGAffineTransform t = { .a = 1, .b = 0, .c = 0, .d = -1, .tx = 0,
.ty = viewHeight};
-
-
- scrollPtr->flags &= ~REDRAW_PENDING;
- if (!scrollPtr->tkwin || !Tk_IsMapped(tkwin) || !view ||
- !TkMacOSXSetupDrawingContext((Drawable) macWin, NULL, 1, &dc)) {
- return;
- }
-
CGContextConcatCTM(dc.context, t);
/*Draw Unix-style scroll trough to provide rect for native scrollbar.*/
@@ -173,7 +172,6 @@ TkpDisplayScrollbar(
(Pixmap) macWin);
}
-
Tk_Draw3DRectangle(tkwin, (Pixmap) macWin, scrollPtr->bgBorder,
scrollPtr->highlightWidth, scrollPtr->highlightWidth,
Tk_Width(tkwin) - 2*scrollPtr->highlightWidth,
@@ -186,15 +184,11 @@ TkpDisplayScrollbar(
/*Update values and draw in native rect.*/
UpdateControlValues(scrollPtr);
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
- if (scrollPtr->vertical) {
- HIThemeDrawTrack (&info, 0, dc.context, kHIThemeOrientationNormal);
- } else {
+ if (MOUNTAIN_LION_STYLE) {
HIThemeDrawTrack (&info, 0, dc.context, kHIThemeOrientationInverted);
+ } else {
+ HIThemeDrawTrack (&info, 0, dc.context, kHIThemeOrientationNormal);
}
-#else
- HIThemeDrawTrack (&info, 0, dc.context, kHIThemeOrientationNormal);
-#endif
TkMacOSXRestoreDrawingContext(&dc);
scrollPtr->flags &= ~REDRAW_PENDING;
@@ -265,11 +259,12 @@ TkpComputeScrollbarGeometry(
if (scrollPtr->sliderLast > fieldLength) {
scrollPtr->sliderLast = fieldLength;
}
- scrollPtr->sliderFirst += scrollPtr->inset +
+ if (!(MOUNTAIN_LION_STYLE)) {
+ scrollPtr->sliderFirst += scrollPtr->inset +
metrics[variant].topArrowHeight;
- scrollPtr->sliderLast += scrollPtr->inset +
+ scrollPtr->sliderLast += scrollPtr->inset +
metrics[variant].bottomArrowHeight;
-
+ }
/*
* Register the desired geometry for the window (leave enough space
* for the two arrows plus a minimum-size slider, plus border around
@@ -370,21 +365,29 @@ TkpScrollbarPosition(
int x, int y) /* Coordinates within scrollPtr's window. */
{
- /*Using code from tkUnixScrlbr.c because Unix scroll bindings are driving the display at the script level. All the Mac scrollbar has to do is re-draw itself.*/
+ /*
+ * Using code from tkUnixScrlbr.c because Unix scroll bindings are
+ * driving the display at the script level. All the Mac scrollbar
+ * has to do is re-draw itself.
+ */
- int length, width, tmp;
+ int length, fieldlength, width, tmp;
register const int inset = scrollPtr->inset;
+ register const int arrowSize = scrollPtr->arrowLength + inset;
if (scrollPtr->vertical) {
length = Tk_Height(scrollPtr->tkwin);
+ fieldlength = length - 2 * arrowSize;
width = Tk_Width(scrollPtr->tkwin);
} else {
tmp = x;
x = y;
y = tmp;
length = Tk_Width(scrollPtr->tkwin);
+ fieldlength = length - 2 * arrowSize;
width = Tk_Height(scrollPtr->tkwin);
}
+ fieldlength = fieldlength < 0 ? 0 : fieldlength;
if (x<inset || x>=width-inset || y<inset || y>=length-inset) {
return OUTSIDE;
@@ -395,19 +398,19 @@ TkpScrollbarPosition(
* TkpDisplayScrollbar. Be sure to keep the two consistent.
*/
- if (y < inset + scrollPtr->arrowLength) {
- return TOP_ARROW;
- }
if (y < scrollPtr->sliderFirst) {
return TOP_GAP;
}
if (y < scrollPtr->sliderLast) {
return SLIDER;
}
- if (y >= length - (scrollPtr->arrowLength + inset)) {
- return BOTTOM_ARROW;
+ if (y < fieldlength){
+ return BOTTOM_GAP;
+ }
+ if (y < fieldlength + arrowSize) {
+ return TOP_ARROW;
}
- return BOTTOM_GAP;
+ return BOTTOM_ARROW;
}
/*
@@ -415,9 +418,11 @@ TkpScrollbarPosition(
*
* UpdateControlValues --
*
- * This procedure updates the Macintosh scrollbar control to display the
- * values defined by the Tk scrollbar. This is the key interface to the Mac-native * scrollbar; the Unix bindings drive scrolling in the Tk window and all the Mac
- * scrollbar has to do is redraw itself.
+ * This procedure updates the Macintosh scrollbar control to
+ * display the values defined by the Tk scrollbar. This is the
+ * key interface to the Mac-native * scrollbar; the Unix bindings
+ * drive scrolling in the Tk window and all the Mac scrollbar has
+ * to do is redraw itself.
*
* Results:
* None.
@@ -432,12 +437,11 @@ static void
UpdateControlValues(
TkScrollbar *scrollPtr) /* Scrollbar data struct. */
{
-
Tk_Window tkwin = scrollPtr->tkwin;
MacDrawable *macWin = (MacDrawable *) Tk_WindowId(scrollPtr->tkwin);
double dViewSize;
HIRect contrlRect;
- int variant;
+ int variant;
short width, height;
NSView *view = TkMacOSXDrawableView(macWin);
@@ -462,8 +466,10 @@ UpdateControlValues(
*/
info.bounds = contrlRect;
- if (!scrollPtr->vertical) {
- info.attributes |= kThemeTrackHorizontal;
+ if (scrollPtr->vertical) {
+ info.attributes &= ~kThemeTrackHorizontal;
+ } else {
+ info.attributes |= kThemeTrackHorizontal;
}
/*
@@ -484,7 +490,11 @@ UpdateControlValues(
factor - dViewSize;
info.trackInfo.scrollbar.viewsize = dViewSize;
if (scrollPtr->vertical) {
+ if (MOUNTAIN_LION_STYLE) {
+ info.value = factor * scrollPtr->firstFraction;
+ } else {
info.value = info.max - factor * scrollPtr->firstFraction;
+ }
} else {
info.value = MIN_SCROLLBAR_VALUE + factor * scrollPtr->firstFraction;
}
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index 1a71746..f92d260 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -149,9 +149,10 @@ XMapWindow(
if (Tk_IsTopLevel(macWin->winPtr)) {
if (!Tk_IsEmbedded(macWin->winPtr)) {
NSWindow *win = TkMacOSXDrawableWindow(window);
-
- [win makeKeyAndOrderFront:NSApp];
- [win windowRef];
+ [NSApp activateIgnoringOtherApps:YES];
+ if ( [win canBecomeKeyWindow] ) {
+ [win makeKeyAndOrderFront:NSApp];
+ }
TkMacOSXApplyWindowAttributes(macWin->winPtr, win);
}
TkMacOSXInvalClipRgns((Tk_Window) macWin->winPtr);
@@ -310,11 +311,9 @@ XResizeWindow(
unsigned int height)
{
MacDrawable *macWin = (MacDrawable *) window;
-
display->request++;
if (Tk_IsTopLevel(macWin->winPtr) && !Tk_IsEmbedded(macWin->winPtr)) {
NSWindow *w = macWin->winPtr->wmInfoPtr->window;
-
if (w) {
NSRect r = [w contentRectForFrameRect:[w frame]];
r.origin.y += r.size.height - height;
@@ -357,12 +356,20 @@ XMoveResizeWindow(
display->request++;
if (Tk_IsTopLevel(macWin->winPtr) && !Tk_IsEmbedded(macWin->winPtr)) {
NSWindow *w = macWin->winPtr->wmInfoPtr->window;
-
if (w) {
- NSRect r = NSMakeRect(x + macWin->winPtr->wmInfoPtr->xInParent,
- tkMacOSXZeroScreenHeight - (y +
- macWin->winPtr->wmInfoPtr->yInParent + height),
- width, height);
+ /* We explicitly convert everything to doubles so we don't get
+ * surprised (again) by what happens when you do arithmetic with
+ * unsigned ints.
+ */
+ CGFloat X = (CGFloat)x;
+ CGFloat Y = (CGFloat)y;
+ CGFloat Width = (CGFloat)width;
+ CGFloat Height = (CGFloat)height;
+ CGFloat XOff = (CGFloat)macWin->winPtr->wmInfoPtr->xInParent;
+ CGFloat YOff = (CGFloat)macWin->winPtr->wmInfoPtr->yInParent;
+ NSRect r = NSMakeRect(X + XOff,
+ tkMacOSXZeroScreenHeight - Y - YOff - Height,
+ Width, Height);
[w setFrame:[w frameRectForContentRect:r] display:YES];
}
} else {
@@ -398,7 +405,6 @@ XMoveWindow(
display->request++;
if (Tk_IsTopLevel(macWin->winPtr) && !Tk_IsEmbedded(macWin->winPtr)) {
NSWindow *w = macWin->winPtr->wmInfoPtr->window;
-
if (w) {
[w setFrameTopLeftPoint:NSMakePoint(x, tkMacOSXZeroScreenHeight - y)];
}
@@ -649,6 +655,65 @@ XConfigureWindow(
/*
*----------------------------------------------------------------------
*
+ * TkMacOSXSetDrawingEnabled --
+ *
+ * This function sets the TK_DO_NOT_DRAW flag for a given window and
+ * all of its children.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The clipping regions for the window and its children are cleared.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TkMacOSXSetDrawingEnabled(
+ TkWindow *winPtr,
+ int flag)
+{
+ TkWindow *childPtr;
+ MacDrawable *macWin = winPtr->privatePtr;
+
+ if (macWin) {
+ if (flag ) {
+ macWin->flags &= ~TK_DO_NOT_DRAW;
+ } else {
+ macWin->flags |= TK_DO_NOT_DRAW;
+ }
+ }
+
+ /*
+ * Set the flag for all children & their descendants, excluding
+ * Toplevels. (??? Do we need to exclude Toplevels?)
+ */
+
+ childPtr = winPtr->childList;
+ while (childPtr) {
+ if (!Tk_IsTopLevel(childPtr)) {
+ TkMacOSXSetDrawingEnabled(childPtr, flag);
+ }
+ childPtr = childPtr->nextPtr;
+ }
+
+ /*
+ * If the window is a container, set the flag for its embedded window.
+ */
+
+ if (Tk_IsContainer(winPtr)) {
+ childPtr = TkpGetOtherWindow(winPtr);
+
+ if (childPtr) {
+ TkMacOSXSetDrawingEnabled(childPtr, flag);
+ }
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
* TkMacOSXUpdateClipRgn --
*
* This function updates the clipping regions for a given window and all of
@@ -738,10 +803,6 @@ TkMacOSXUpdateClipRgn(
/*
* TODO: Here we should handle out of process embedding.
*/
- } else if (winPtr->wmInfoPtr->attributes &
- kWindowResizableAttribute) {
- NSWindow *w = TkMacOSXDrawableWindow(winPtr->window);
-
}
macWin->aboveVisRgn = HIShapeCreateCopy(rgn);
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index 5f782c5..461a94c 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -29,7 +29,7 @@
* Declaration of functions used only in this file
*/
-static int GenerateUpdates(HIMutableShapeRef updateRgn,
+static int GenerateUpdates(HIShapeRef updateRgn,
CGRect *updateBounds, TkWindow *winPtr);
static int GenerateActivateEvents(TkWindow *winPtr,
int activeFlag);
@@ -48,7 +48,7 @@ extern NSString *NSWindowDidOrderOffScreenNotification;
#endif
#endif
-extern NSString *opaqueTag;
+extern BOOL opaqueTag;
@implementation TKApplication(TKWindowEvent)
@@ -165,6 +165,10 @@ extern NSString *opaqueTag;
if (winPtr) {
TkGenWMDestroyEvent((Tk_Window) winPtr);
+ if (_windowWithMouse == w) {
+ _windowWithMouse = nil;
+ [w release];
+ }
}
/*
@@ -315,7 +319,7 @@ extern NSString *opaqueTag;
static int
GenerateUpdates(
- HIMutableShapeRef updateRgn,
+ HIShapeRef updateRgn,
CGRect *updateBounds,
TkWindow *winPtr)
{
@@ -745,15 +749,16 @@ TkWmProtocolEventProc(
int
Tk_MacOSXIsAppInFront(void)
{
- OSStatus err;
- ProcessSerialNumber frontPsn, ourPsn = {0, kCurrentProcess};
Boolean isFrontProcess = true;
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+ ProcessSerialNumber frontPsn, ourPsn = {0, kCurrentProcess};
- err = ChkErr(GetFrontProcess, &frontPsn);
- if (err == noErr) {
- ChkErr(SameProcess, &frontPsn, &ourPsn, &isFrontProcess);
+ if (noErr == GetFrontProcess(&frontPsn)){
+ SameProcess(&frontPsn, &ourPsn, &isFrontProcess);
}
-
+#else
+ isFrontProcess = [NSRunningApplication currentApplication].active;
+#endif
return (isFrontProcess == true);
}
@@ -763,7 +768,7 @@ Tk_MacOSXIsAppInFront(void)
/*
* Custom content view for use in Tk NSWindows.
- *
+ *
* Since Tk handles all drawing of widgets, we only use the AppKit event loop
* as a source of input events. To do this, we overload the NSView drawRect
* method with a method which generates Expose events for Tk but does no
@@ -780,21 +785,6 @@ Tk_MacOSXIsAppInFront(void)
*
*/
-@interface TKContentView(TKWindowEvent)
-- (void) drawRect: (NSRect) rect;
-- (void) generateExposeEvents: (HIMutableShapeRef) shape;
-- (void) viewDidEndLiveResize;
-- (void) tkToolbarButton: (id) sender;
-- (BOOL) isOpaque;
-- (BOOL) wantsDefaultClipping;
-- (BOOL) acceptsFirstResponder;
-- (void) keyDown: (NSEvent *) theEvent;
-@end
-
-@implementation TKContentView
-@end
-
-
/*Restrict event processing to Expose events.*/
static Tk_RestrictAction
ExposeRestrictProc(
@@ -805,6 +795,15 @@ ExposeRestrictProc(
? TK_PROCESS_EVENT : TK_DEFER_EVENT);
}
+/*Restrict event processing to ConfigureNotify events.*/
+static Tk_RestrictAction
+ConfigureRestrictProc(
+ ClientData arg,
+ XEvent *eventPtr)
+{
+ return (eventPtr->type==ConfigureNotify ? TK_PROCESS_EVENT : TK_DEFER_EVENT);
+}
+
@implementation TKContentView(TKWindowEvent)
- (void) drawRect: (NSRect) rect
@@ -830,11 +829,12 @@ ExposeRestrictProc(
HIShapeUnionWithRect(drawShape, &r);
}
if (CFRunLoopGetMain() == CFRunLoopGetCurrent()) {
- [self generateExposeEvents:drawShape];
+ [self generateExposeEvents:(HIShapeRef)drawShape];
} else {
[self performSelectorOnMainThread:@selector(generateExposeEvents:)
withObject:(id)drawShape waitUntilDone:NO
modes:[NSArray arrayWithObjects:NSRunLoopCommonModes,
+
NSEventTrackingRunLoopMode, NSModalPanelRunLoopMode,
nil]];
}
@@ -842,62 +842,107 @@ ExposeRestrictProc(
CFRelease(drawShape);
}
+-(void) setFrameSize: (NSSize)newsize
+{
+ [super setFrameSize: newsize];
+ if ([self inLiveResize]) {
+ NSWindow *w = [self window];
+ TkWindow *winPtr = TkMacOSXGetTkWindow(w);
+ Tk_Window tkwin = (Tk_Window) winPtr;
+ unsigned int width = (unsigned int)newsize.width;
+ unsigned int height=(unsigned int)newsize.height;
+ ClientData oldArg;
+ Tk_RestrictProc *oldProc;
+
+ /* This can be called from outside the Tk event loop.
+ * Since it calls Tcl_DoOneEvent, we need to make sure we
+ * don't clobber the AutoreleasePool set up by the caller.
+ */
+ [NSApp setPoolProtected:YES];
+
+ /*
+ * Try to prevent flickers and flashes.
+ */
+ [w disableFlushWindow];
+ NSDisableScreenUpdates();
+
+ /* Disable Tk drawing until the window has been completely configured.*/
+ TkMacOSXSetDrawingEnabled(winPtr, 0);
+
+ /* Generate and handle a ConfigureNotify event for the new size.*/
+ TkGenWMConfigureEvent(tkwin, Tk_X(tkwin), Tk_Y(tkwin), width, height,
+ TK_SIZE_CHANGED | TK_MACOSX_HANDLE_EVENT_IMMEDIATELY);
+ oldProc = Tk_RestrictEvents(ConfigureRestrictProc, NULL, &oldArg);
+ while (Tk_DoOneEvent(TK_X_EVENTS|TK_DONT_WAIT)) {}
+ Tk_RestrictEvents(oldProc, oldArg, &oldArg);
+
+ /* Now that Tk has configured all subwindows we can create the clip regions. */
+ TkMacOSXSetDrawingEnabled(winPtr, 1);
+ TkMacOSXInvalClipRgns(tkwin);
+ TkMacOSXUpdateClipRgn(winPtr);
+
+ /* Finally, generate and process expose events to redraw the window. */
+ HIRect bounds = NSRectToCGRect([self bounds]);
+ HIShapeRef shape = HIShapeCreateWithRect(&bounds);
+ [self generateExposeEvents: shape];
+ while (Tk_DoOneEvent(TK_ALL_EVENTS|TK_DONT_WAIT)) {}
+ [w enableFlushWindow];
+ [w flushWindowIfNeeded];
+ NSEnableScreenUpdates();
+ [NSApp setPoolProtected:NO];
+ }
+}
+
/*
* As insurance against bugs that might cause layout glitches during a live
- * resize, we redraw the window at the end of the resize operation.
+ * resize, we redraw the window one more time at the end of the resize
+ * operation.
*/
- (void)viewDidEndLiveResize
{
HIRect bounds = NSRectToCGRect([self bounds]);
HIShapeRef shape = HIShapeCreateWithRect(&bounds);
+ [super viewDidEndLiveResize];
[self generateExposeEvents: shape];
-
}
-/*Core function of this class, generates expose events for redrawing.*/
-- (void) generateExposeEvents: (HIMutableShapeRef) shape
+/* Core method of this class: generates expose events for redrawing. If the
+ * Tcl_ServiceMode is set to TCL_SERVICE_ALL then the expose events will be
+ * immediately removed from the Tcl event loop and processed. Typically, they
+ * should be queued, however.
+ */
+- (void) generateExposeEvents: (HIShapeRef) shape
{
+ [self generateExposeEvents:shape childrenOnly:0];
+}
+- (void) generateExposeEvents: (HIShapeRef) shape
+ childrenOnly: (int) childrenOnly
+{
TkWindow *winPtr = TkMacOSXGetTkWindow([self window]);
unsigned long serial;
CGRect updateBounds;
+ int updatesNeeded;
if (!winPtr) {
return;
}
-
+ /* Generate Tk Expose events. */
HIShapeGetBounds(shape, &updateBounds);
+ /* All of these events will share the same serial number. */
serial = LastKnownRequestProcessed(Tk_Display(winPtr));
- if (GenerateUpdates(shape, &updateBounds, winPtr) &&
- ![[NSRunLoop currentRunLoop] currentMode] &&
- Tcl_GetServiceMode() != TCL_SERVICE_NONE) {
- /*
- * Ensure there are no pending idle-time redraws that could
- * prevent the just posted Expose events from generating
- * new redraws.
- */
-
- while (Tcl_DoOneEvent(TCL_IDLE_EVENTS|TCL_DONT_WAIT)) {}
-
- /*
- * For smoother drawing, process Expose events and resulting
- * redraws immediately instead of at idle time.
- */
-
- ClientData oldArg;
+ updatesNeeded = GenerateUpdates(shape, &updateBounds, winPtr);
+
+ /* Process the Expose events if the service mode is TCL_SERVICE_ALL */
+ if (updatesNeeded && Tcl_GetServiceMode() == TCL_SERVICE_ALL) {
+ ClientData oldArg;
Tk_RestrictProc *oldProc = Tk_RestrictEvents(ExposeRestrictProc,
UINT2PTR(serial), &oldArg);
-
while (Tcl_ServiceEvent(TCL_WINDOW_EVENTS)) {}
-
Tk_RestrictEvents(oldProc, oldArg, &oldArg);
-
- while (Tcl_DoOneEvent(TCL_IDLE_EVENTS|TCL_DONT_WAIT)) {}
-
}
-
}
/*
@@ -913,7 +958,6 @@ ExposeRestrictProc(
int x, y;
TkWindow *winPtr = TkMacOSXGetTkWindow([self window]);
Tk_Window tkwin = (Tk_Window) winPtr;
-
bzero(&event, sizeof(XVirtualEvent));
event.type = VirtualEvent;
event.serial = LastKnownRequestProcessed(Tk_Display(tkwin));
@@ -935,7 +979,7 @@ ExposeRestrictProc(
{
NSWindow *w = [self window];
- if (opaqueTag != NULL) {
+ if (opaqueTag) {
return YES;
} else {
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 4f7b066..39990e6 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -21,6 +21,8 @@
#include "tkMacOSXEvent.h"
#include "tkMacOSXDebug.h"
+#define DEBUG_ZOMBIES 0
+
/*
#ifdef TK_MAC_DEBUG
#define TK_MAC_DEBUG_WINDOWS
@@ -53,7 +55,7 @@
/*Objects for use in setting background color and opacity of window.*/
NSColor *colorName = NULL;
-NSString *opaqueTag = NULL;
+BOOL opaqueTag = FALSE;
static const struct {
const UInt64 validAttrs, defaultAttrs, forceOnAttrs, forceOffAttrs;
@@ -194,6 +196,48 @@ static int tkMacOSXWmAttrNotifyVal = 0;
static Tcl_HashTable windowTable;
static int windowHashInit = false;
+
+
+#pragma mark NSWindow(TKWm)
+
+/*
+ * Conversion of coordinates between window and screen.
+ */
+
+@implementation NSWindow(TKWm)
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
+- (NSPoint) convertPointToScreen: (NSPoint) point
+{
+ return [self convertBaseToScreen:point];
+}
+- (NSPoint) convertPointFromScreen: (NSPoint)point
+{
+ return [self convertScreenToBase:point];
+}
+@end
+#else
+- (NSPoint) convertPointToScreen: (NSPoint) point
+{
+ NSRect pointrect;
+ pointrect.origin = point;
+ pointrect.size.width = 0;
+ pointrect.size.height = 0;
+ return [self convertRectToScreen:pointrect].origin;
+}
+- (NSPoint) convertPointFromScreen: (NSPoint)point
+{
+ NSRect pointrect;
+ pointrect.origin = point;
+ pointrect.size.width = 0;
+ pointrect.size.height = 0;
+ return [self convertRectFromScreen:pointrect].origin;
+}
+@end
+#endif
+
+#pragma mark -
+
+
/*
* Forward declarations for procedures defined in this file:
*/
@@ -342,6 +386,7 @@ static void RemapWindows(TkWindow *winPtr,
@end
@implementation TKWindow(TKWm)
+
- (BOOL) canBecomeKeyWindow
{
TkWindow *winPtr = TkMacOSXGetTkWindow(self);
@@ -350,6 +395,59 @@ static void RemapWindows(TkWindow *winPtr,
kHelpWindowClass || winPtr->wmInfoPtr->attributes &
kWindowNoActivatesAttribute)) ? NO : YES;
}
+
+#if DEBUG_ZOMBIES
+- (id) retain
+{
+ id result = [super retain];
+ const char *title = [[self title] UTF8String];
+ if (title == nil) {
+ title = "unnamed window";
+ }
+ if (DEBUG_ZOMBIES > 1){
+ printf("Retained <%s>. Count is: %lu\n", title, [self retainCount]);
+ }
+ return result;
+}
+
+- (id) autorelease
+{
+ static int xcount = 0;
+ id result = [super autorelease];
+ const char *title = [[self title] UTF8String];
+ if (title == nil) {
+ title = "unnamed window";
+ }
+ if (DEBUG_ZOMBIES > 1){
+ printf("Autoreleased <%s>. Count is %lu\n", title, [self retainCount]);
+ }
+ return result;
+}
+
+- (oneway void) release {
+ const char *title = [[self title] UTF8String];
+ if (title == nil) {
+ title = "unnamed window";
+ }
+ if (DEBUG_ZOMBIES > 1){
+ printf("Releasing <%s>. Count is %lu\n", title, [self retainCount]);
+ }
+ [super release];
+}
+
+- (void) dealloc {
+ const char *title = [[self title] UTF8String];
+ if (title == nil) {
+ title = "unnamed window";
+ }
+ if (DEBUG_ZOMBIES > 0){
+ printf(">>>> Freeing <%s>. Count is %lu\n", title, [self retainCount]);
+ }
+ [super dealloc];
+}
+
+
+#endif
@end
#pragma mark -
@@ -463,25 +561,16 @@ FrontWindowAtPoint(
int x, int y)
{
NSPoint p = NSMakePoint(x, tkMacOSXZeroScreenHeight - y);
- NSWindow *win = nil;
- NSInteger windowCount;
- NSInteger *windowNumbers;
-
- NSCountWindows(&windowCount);
- if (windowCount) {
- windowNumbers = ckalloc(windowCount * sizeof(NSInteger));
- NSWindowList(windowCount, windowNumbers);
- for (NSInteger index = 0; index < windowCount; index++) {
- NSWindow *w = [NSApp windowWithWindowNumber:windowNumbers[index]];
+ NSArray *windows = [NSApp orderedWindows];
+ TkWindow *front = NULL;
+ for (NSWindow *w in windows) {
if (w && NSMouseInRect(p, [w frame], NO)) {
- win = w;
+ front = TkMacOSXGetTkWindow(w);
break;
}
}
- ckfree(windowNumbers);
- }
- return (win ? TkMacOSXGetTkWindow(win) : NULL);
+ return front;
}
/*
@@ -677,6 +766,7 @@ TkWmMapWindow(
*/
XMapWindow(winPtr->display, winPtr->window);
+
}
/*
@@ -699,7 +789,7 @@ TkWmMapWindow(
void
TkWmUnmapWindow(
TkWindow *winPtr) /* Top-level window that's about to be
- * mapped. */
+ * unmapped. */
{
XUnmapWindow(winPtr->display, winPtr->window);
}
@@ -783,16 +873,42 @@ TkWmDeadWindow(
NSWindow *window = wmPtr->window;
if (window && !Tk_IsEmbedded(winPtr) ) {
- [[window parentWindow] removeChildWindow:window];
- [window setExcludedFromWindowsMenu:YES];
+ NSWindow *parent = [window parentWindow];
+ if (parent) {
+ [parent removeChildWindow:window];
+ }
[window close];
TkMacOSXUnregisterMacWindow(window);
- if (winPtr->window) {
- ((MacDrawable *) winPtr->window)->view = nil;
+ if (winPtr->window) {
+ ((MacDrawable *) winPtr->window)->view = nil;
+ }
+#if DEBUG_ZOMBIES > 0
+ {
+ const char *title = [[window title] UTF8String];
+ if (title == nil) {
+ title = "unnamed window";
+ }
+ printf(">>>> Closing <%s>. Count is: %lu\n", title, [window retainCount]);
}
- TkMacOSXMakeCollectableAndRelease(wmPtr->window);
- }
+#endif
+ [window release];
+ wmPtr->window = NULL;
+
+ /* Activate the highest window left on the screen. */
+ NSArray *windows = [NSApp orderedWindows];
+ if ( [windows count] > 0 ) {
+ NSWindow *front = [windows objectAtIndex:0];
+ if ( front && [front canBecomeKeyWindow] ) {
+ [front makeKeyAndOrderFront:NSApp];
+ }
+ }
+ [NSApp _resetAutoreleasePool];
+#if DEBUG_ZOMBIES > 0
+ fprintf(stderr, "================= Pool dump ===================\n");
+ [NSAutoreleasePool showPools];
+#endif
+ }
ckfree(wmPtr);
winPtr->wmInfoPtr = NULL;
}
@@ -1672,6 +1788,11 @@ WmForgetCmd(
TkWmDeadWindow(winPtr);
RemapWindows(winPtr, (MacDrawable *) winPtr->parentPtr->window);
+ /*
+ * Make sure wm no longer manages this window
+ */
+ Tk_ManageGeometry(frameWin, NULL, NULL);
+
winPtr->flags &= ~(TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED);
/*
@@ -5117,7 +5238,7 @@ TkUnsupported1ObjCmd(
colorName = [NSColor clearColor]; //use systemTransparent in Tk scripts to match
}
if (Tcl_StringMatch(Tcl_GetString(objv[i]), "*opacity*")) {
- opaqueTag = @"YES";
+ opaqueTag = YES;
}
}
@@ -5445,7 +5566,6 @@ TkMacOSXMakeRealWindowExist(
* TODO: Here we should handle out of process embedding.
*/
}
-
WindowClass macClass = wmPtr->macClass;
wmPtr->attributes &= (tkAlwaysValidAttributes |
macClassAttrs[macClass].validAttrs);
@@ -5479,11 +5599,10 @@ TkMacOSXMakeRealWindowExist(
NSWindow *window = [[winClass alloc] initWithContentRect:contentRect
styleMask:styleMask backing:NSBackingStoreBuffered defer:YES];
if (!window) {
- Tcl_Panic("couldn't allocate new Mac window");
+ Tcl_Panic("couldn't allocate new Mac window");
}
- TkMacOSXMakeUncollectable(window);
TKContentView *contentView = [[TKContentView alloc]
- initWithFrame:NSZeroRect];
+ initWithFrame:NSZeroRect];
[window setContentView:contentView];
[contentView release];
[window setDelegate:NSApp];
@@ -5508,7 +5627,7 @@ TkMacOSXMakeRealWindowExist(
[window setBackgroundColor: colorName];
}
- if (opaqueTag != NULL) {
+ if (opaqueTag) {
#ifdef TK_GOT_AT_LEAST_SNOW_LEOPARD
[window setOpaque: opaqueTag];
#else
@@ -5518,7 +5637,7 @@ TkMacOSXMakeRealWindowExist(
[window setDocumentEdited:NO];
wmPtr->window = window;
- macWin->view = contentView;
+ macWin->view = window.contentView;
TkMacOSXApplyWindowAttributes(winPtr, window);
NSRect geometry = InitialWindowBounds(winPtr, window);
@@ -5527,7 +5646,6 @@ TkMacOSXMakeRealWindowExist(
geometry.origin.y = tkMacOSXZeroScreenHeight - (geometry.origin.y +
geometry.size.height);
[window setFrame:geometry display:NO];
-
TkMacOSXRegisterOffScreenWindow((Window) macWin, window);
macWin->flags |= TK_HOST_EXISTS;
}
@@ -5916,15 +6034,21 @@ TkpChangeFocus(
* didn't originally belong to topLevelPtr's
* application. */
{
- /*
- * We don't really need to do anything on the Mac. Tk will keep all this
- * state for us.
- */
-
if (winPtr->atts.override_redirect) {
return 0;
}
+ if (Tk_IsTopLevel(winPtr) && !Tk_IsEmbedded(winPtr) ){
+ NSWindow *win = TkMacOSXDrawableWindow(winPtr->window);
+ TkWmRestackToplevel(winPtr, Above, NULL);
+ if (force ) {
+ [NSApp activateIgnoringOtherApps:YES];
+ }
+ if ( win && [win canBecomeKeyWindow] ) {
+ [win makeKeyAndOrderFront:NSApp];
+ }
+ }
+
/*
* Remember the current serial number for the X server and issue a dummy
* server request. This marks the position at which we changed the focus,
@@ -5941,7 +6065,7 @@ TkpChangeFocus(
* WmStackorderToplevelWrapperMap --
*
* This procedure will create a table that maps the reparent wrapper X id
- * for a toplevel to the TkWindow structure that is wraps. Tk keeps track
+ * for a toplevel to the TkWindow structure that it wraps. Tk keeps track
* of a mapping from the window X id to the TkWindow structure but that
* does us no good here since we only get the X id of the wrapper window.
* Only those toplevel windows that are mapped have a position in the
@@ -6004,8 +6128,6 @@ TkWmStackorderToplevel(
Tcl_HashTable table;
Tcl_HashEntry *hPtr;
Tcl_HashSearch search;
- NSInteger windowCount;
- NSInteger *windowNumbers;
/*
* Map mac windows to a TkWindow of the wrapped toplevel.
@@ -6032,31 +6154,26 @@ TkWmStackorderToplevel(
goto done;
}
- NSCountWindows(&windowCount);
+ NSArray *macWindows = [NSApp orderedWindows];
+ NSInteger windowCount = [macWindows count];
+
if (!windowCount) {
ckfree(windows);
windows = NULL;
} else {
windowPtr = windows + table.numEntries;
*windowPtr-- = NULL;
- windowNumbers = ckalloc(windowCount * sizeof(NSInteger));
- NSWindowList(windowCount, windowNumbers);
- for (NSInteger index = 0; index < windowCount; index++) {
- NSWindow *w = [NSApp windowWithWindowNumber:windowNumbers[index]];
-
- if (w) {
- hPtr = Tcl_FindHashEntry(&table, (char*) w);
- if (hPtr != NULL) {
- childWinPtr = Tcl_GetHashValue(hPtr);
- *windowPtr-- = childWinPtr;
- }
+ for (NSWindow *w in macWindows) {
+ hPtr = Tcl_FindHashEntry(&table, (char*) w);
+ if (hPtr != NULL) {
+ childWinPtr = Tcl_GetHashValue(hPtr);
+ *windowPtr-- = childWinPtr;
}
}
if (windowPtr != windows-1) {
Tcl_Panic("num matched toplevel windows does not equal num "
- "children");
+ "children");
}
- ckfree(windowNumbers);
}
done:
@@ -6615,7 +6732,6 @@ RemapWindows(
MacDrawable *parentWin)
{
TkWindow *childPtr;
-
/*
* Remove the OS specific window. It will get rebuilt when the window gets
* Mapped.
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index b16b582..1313c9f 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -142,7 +142,7 @@ TkpOpenDisplay(
static NSRect maxBounds = {{0, 0}, {0, 0}};
static char vendor[25] = "";
NSArray *cgVers;
- NSAutoreleasePool *pool;
+ NSAutoreleasePool *pool = [NSAutoreleasePool new];
if (gMacDisplay != NULL) {
if (strcmp(gMacDisplay->display->display_name, display_name) == 0) {
@@ -166,7 +166,6 @@ TkpOpenDisplay(
display->default_screen = 0;
display->display_name = (char *) macScreenName;
- pool = [NSAutoreleasePool new];
cgVers = [[[NSBundle bundleWithIdentifier:@"com.apple.CoreGraphics"]
objectForInfoDictionaryKey:@"CFBundleShortVersionString"]
componentsSeparatedByString:@"."];
@@ -177,12 +176,25 @@ TkpOpenDisplay(
display->proto_minor_version = [[cgVers objectAtIndex:2] integerValue];
}
if (!vendor[0]) {
- snprintf(vendor, sizeof(vendor), "Apple AppKit %s %g",
- ([NSGarbageCollector defaultCollector] ? "GC" : "RR"),
+ snprintf(vendor, sizeof(vendor), "Apple AppKit %g",
NSAppKitVersionNumber);
}
display->vendor = vendor;
- Gestalt(gestaltSystemVersion, (SInt32 *) &display->release);
+ {
+ int major, minor, patch;
+
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 10100
+ Gestalt(gestaltSystemVersionMajor, (SInt32*)&major);
+ Gestalt(gestaltSystemVersionMinor, (SInt32*)&minor);
+ Gestalt(gestaltSystemVersionBugFix, (SInt32*)&patch);
+#else
+ NSOperatingSystemVersion systemVersion = [[NSProcessInfo processInfo] operatingSystemVersion];
+ major = systemVersion.majorVersion;
+ minor = systemVersion.minorVersion;
+ patch = systemVersion.patchVersion;
+#endif
+ display->release = major << 16 | minor << 8 | patch;
+ }
/*
* These screen bits never change
@@ -669,14 +681,6 @@ XForceScreenSaver(
display->request++;
}
-void
-Tk_FreeXId(
- Display *display,
- XID xid)
-{
- /* no-op function needed for stubs implementation. */
-}
-
int
XSync(
Display *display,
@@ -793,6 +797,10 @@ XCreateImage(
ximage->format = format;
ximage->data = data;
ximage->obdata = NULL;
+ /* The default pixelpower is 0. This must be explicitly set to 1 in the
+ * case of an XImage extracted from a Retina display.
+ */
+ ximage->pixelpower = 0;
if (format == ZPixmap) {
ximage->bits_per_pixel = 32;
@@ -844,7 +852,8 @@ XCreateImage(
* Results:
* Returns a newly allocated XImage containing the data from the given
* rectangle of the given drawable, or NULL if the XImage could not be
- * constructed.
+ * constructed. NOTE: If we are copying from a window on a Retina
+ * display, the dimensions of the XImage will be 2*width x 2*height.
*
* Side effects:
* None.
@@ -864,6 +873,7 @@ XGetImage(
int format)
{
NSBitmapImageRep *bitmap_rep;
+ NSUInteger bitmap_fmt;
XImage * imagePtr = NULL;
char * bitmap = NULL;
char * image_data=NULL;
@@ -872,7 +882,19 @@ XGetImage(
int bitmap_pad = 0;
int bytes_per_row = 4*width;
int size;
- TkMacOSXDbgMsg("XGetImage");
+ MacDrawable *macDraw = (MacDrawable *) d;
+ NSWindow *win = TkMacOSXDrawableWindow(d);
+ /* This code assumes that backing scale factors are integers. Currently
+ * Retina displays use a scale factor of 2.0 and normal displays use 1.0.
+ * We do not support any other values here.
+ */
+ int scalefactor = 1;
+ if (win && [win respondsToSelector:@selector(backingScaleFactor)]) {
+ scalefactor = ([win backingScaleFactor] == 2.0) ? 2 : 1;
+ }
+ int scaled_height = height * scalefactor;
+ int scaled_width = width * scalefactor;
+
if (format == ZPixmap) {
if (width == 0 || height == 0) {
/* This happens all the time.
@@ -881,10 +903,11 @@ XGetImage(
return NULL;
}
- bitmap_rep = BitmapRepFromDrawableRect(d, x, y,width, height);
+ bitmap_rep = BitmapRepFromDrawableRect(d, x, y, width, height);
+ bitmap_fmt = [bitmap_rep bitmapFormat];
if ( bitmap_rep == Nil ||
- [bitmap_rep bitmapFormat] != 0 ||
+ (bitmap_fmt != 0 && bitmap_fmt != 1) ||
[bitmap_rep samplesPerPixel] != 4 ||
[bitmap_rep isPlanar] != 0 ) {
TkMacOSXDbgMsg("XGetImage: Failed to construct NSBitmapRep");
@@ -895,33 +918,51 @@ XGetImage(
NSImage* ns_image = [[NSImage alloc]initWithSize:image_size];
[ns_image addRepresentation:bitmap_rep];
- /* Assume premultiplied nonplanar data with 4 bytes per pixel and alpha last.*/
- if ( [bitmap_rep bitmapFormat] == 0 &&
- [bitmap_rep isPlanar ] == 0 &&
+ /* Assume premultiplied nonplanar data with 4 bytes per pixel.*/
+ if ( [bitmap_rep isPlanar ] == 0 &&
[bitmap_rep samplesPerPixel] == 4 ) {
bytes_per_row = [bitmap_rep bytesPerRow];
- size = bytes_per_row*height;
+ assert(bytes_per_row == 4 * scaled_width);
+ assert([bitmap_rep bytesPerPlane] == bytes_per_row * scaled_height);
+ size = bytes_per_row*scaled_height;
image_data = (char*)[bitmap_rep bitmapData];
if ( image_data ) {
int row, n, m;
bitmap = ckalloc(size);
/*
Oddly enough, the bitmap has the top row at the beginning,
- and the pixels are in BGRA format.
+ and the pixels are in BGRA or ABGR format.
*/
- for (row=0, n=0; row<height; row++, n+=bytes_per_row) {
- for (m=n; m<n+bytes_per_row; m+=4) {
- *(bitmap+m) = *(image_data+m+2);
- *(bitmap+m+1) = *(image_data+m+1);
- *(bitmap+m+2) = *(image_data+m);
- *(bitmap+m+3) = *(image_data+m+3);
+ if (bitmap_fmt == 0) {
+ /* BGRA */
+ for (row=0, n=0; row<scaled_height; row++, n+=bytes_per_row) {
+ for (m=n; m<n+bytes_per_row; m+=4) {
+ *(bitmap+m) = *(image_data+m+2);
+ *(bitmap+m+1) = *(image_data+m+1);
+ *(bitmap+m+2) = *(image_data+m);
+ *(bitmap+m+3) = *(image_data+m+3);
+ }
+ }
+ } else {
+ /* ABGR */
+ for (row=0, n=0; row<scaled_height; row++, n+=bytes_per_row) {
+ for (m=n; m<n+bytes_per_row; m+=4) {
+ *(bitmap+m) = *(image_data+m+3);
+ *(bitmap+m+1) = *(image_data+m+2);
+ *(bitmap+m+2) = *(image_data+m+1);
+ *(bitmap+m+3) = *(image_data+m);
+ }
}
}
}
}
if (bitmap) {
imagePtr = XCreateImage(display, NULL, depth, format, offset,
- (char*)bitmap, width, height, bitmap_pad, bytes_per_row);
+ (char*)bitmap, scaled_width, scaled_height,
+ bitmap_pad, bytes_per_row);
+ if (scalefactor == 2) {
+ imagePtr->pixelpower = 1;
+ }
[ns_image removeRepresentation:bitmap_rep]; /*releases the rep*/
[ns_image release];
}
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index 4753a40..f9611c5 100644
--- a/macosx/ttkMacOSXTheme.c
+++ b/macosx/ttkMacOSXTheme.c
@@ -298,7 +298,7 @@ static void TabElementSize(
void *clientData, void *elementRecord, Tk_Window tkwin,
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
- *heightPtr = GetThemeMetric(kThemeMetricLargeTabHeight, heightPtr);
+ GetThemeMetric(kThemeMetricLargeTabHeight, (SInt32 *)heightPtr);
*paddingPtr = Ttk_MakePadding(0, 0, 0, 2);
}
diff --git a/tests/all.tcl b/tests/all.tcl
index 7f57dc2..d15e5ca 100644
--- a/tests/all.tcl
+++ b/tests/all.tcl
@@ -9,9 +9,8 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require Tcl 8.5
-package require tcltest 2.2
package require Tk ;# This is the Tk test suite; fail early if no Tk!
+package require tcltest 2.2
tcltest::configure {*}$argv
tcltest::configure -testdir [file normalize [file dirname [info script]]]
tcltest::configure -loadfile \
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/bevel.tcl b/tests/bevel.tcl
index 950b714..4af60f3 100644
--- a/tests/bevel.tcl
+++ b/tests/bevel.tcl
@@ -42,6 +42,7 @@ significance:
r - should appear raised
u - should appear raised and also slightly offset vertically
s - should appear sunken
+S - should appear solid
n - preceding relief should extend right to end of line.
* - should appear "normal"
x - extra long lines to allow horizontal scrolling.
@@ -125,15 +126,33 @@ foreach i {1 2 3} {
.t.t insert end *****
.t.t insert end rrr r1
-
-
-
-
-
-
-
-
-
-
-
+font configure TkFixedFont -size 20
+.t.t tag configure sol100 -relief solid -borderwidth 100 \
+ -foreground red -font TkFixedFont
+.t.t tag configure sol12 -relief solid -borderwidth 12 \
+ -foreground red -font TkFixedFont
+.t.t tag configure big -font TkFixedFont
+set ind [.t.t index end]
+
+.t.t insert end "\n\nBorders do not leak on the neighbour chars"
+.t.t insert end "\nOnly \"S\" is on dark background"
+.t.t insert end {
+ xxx
+ x} {} S sol100 {x
+ xxx}
+
+.t.t insert end "\n\nA very thick border grows toward the inside of the tagged area only"
+.t.t insert end "\nOnly \"S\" is on dark background"
+.t.t insert end {
+ xxxx} {} SSSSS sol100 {xxxx
+ x} {} SSSSSSSSSSSSSSSSSS sol100 {x
+ xxx} {} SSSSSSSSS sol100 xxxx {}
+
+.t.t insert end "\n\nA thinner border is continuous"
+.t.t insert end {
+ xxxx} {} SSSSS sol12 {xxxx
+ x} {} SSSSSSSSSSSSSSSSSS sol12 {x
+ xxx} {} SSSSSSSSS sol12 xxxx {}
+
+.t.t tag add big $ind end
diff --git a/tests/bind.test b/tests/bind.test
index 474771d..374ef9b 100644
--- a/tests/bind.test
+++ b/tests/bind.test
@@ -34,6 +34,14 @@ proc unsetBindings {} {
bind .t <Enter> {}
}
+# move the mouse pointer away of the testing area
+# otherwise some spurious events may pollute the tests
+toplevel .top
+wm geometry .top 50x50-50-50
+update
+event generate .top <Button-1> -warp 1
+update
+destroy .top
test bind-1.1 {bind command} -body {
bind
@@ -69,10 +77,10 @@ test bind-1.7 {bind command} -body {
} -result {test script
more text}
test bind-1.8 {bind command} -body {
- bind .t <gorp-> {test script}
+ bind .t <gorp-> {test script}
} -returnCodes error -result {bad event type or keysym "gorp"}
test bind-1.9 {bind command} -body {
- catch {bind .t <gorp-> {test script}}
+ catch {bind .t <gorp-> {test script}}
bind .t
} -result {}
test bind-1.10 {bind command} -body {
@@ -133,10 +141,10 @@ test bind-2.8 {bindtags command} -body {
test bind-2.9 {bindtags command} -body {
frame .t.f
bindtags .t.f {a b c}
- bindtags .t.f "\{"
+ bindtags .t.f "\{"
} -cleanup {
destroy .t.f
-} -returnCodes error -result {unmatched open brace in list}
+} -returnCodes error -result {unmatched open brace in list}
test bind-2.10 {bindtags command} -body {
frame .t.f
bindtags .t.f {a b c}
@@ -148,10 +156,10 @@ test bind-2.10 {bindtags command} -body {
test bind-2.11 {bindtags command} -body {
frame .t.f
bindtags .t.f {a b c}
- bindtags .t.f "a .gorp b"
+ bindtags .t.f "a .gorp b"
} -cleanup {
destroy .t.f
-} -returnCodes ok
+} -returnCodes ok
test bind-2.12 {bindtags command} -body {
frame .t.f
bindtags .t.f {a b c}
@@ -191,7 +199,7 @@ test bind-4.1 {TkBindEventProc procedure} -setup {
bind {a b} <Enter> {lappend x "%W enter {a b}"}
bind .t <Enter> {lappend x "%W enter .t"}
bind .t.f <Enter> {lappend x "%W enter .t.f"}
-
+
event generate .t.f <Enter>
return $x
} -cleanup {
@@ -211,9 +219,9 @@ test bind-4.2 {TkBindEventProc procedure} -setup {
bind {a b} <Enter> {lappend x "%W enter {a b}"}
bind .t <Enter> {lappend x "%W enter .t"}
bind .t.f <Enter> {lappend x "%W enter .t.f"}
-
+
bindtags .t.f {.t.f {a b} xyz}
- event generate .t.f <Enter>
+ event generate .t.f <Enter>
return $x
} -cleanup {
destroy .t.f
@@ -227,7 +235,7 @@ test bind-4.3 {TkBindEventProc procedure} -body {
bind xyz <Enter> {lappend x "%W enter xyz"}
bind {a b} <Enter> {lappend x "%W enter {a b}"}
bind .t <Enter> {lappend x "%W enter .t"}
-
+
event generate .t <Enter>
return $x
} -cleanup {
@@ -247,7 +255,7 @@ test bind-4.4 {TkBindEventProc procedure} -setup {
bind xyz <Enter> {lappend x "%W enter xyz"}
bind {a b} <Enter> {lappend x "%W enter {a b}"}
bind .t <Enter> {lappend x "%W enter .t"}
-
+
bindtags .t.f {.t.f .t.f2 .t.f3}
bind .t.f <Enter> {lappend x "%W enter .t.f"}
bind .t.f3 <Enter> {lappend x "%W enter .t.f3"}
@@ -271,7 +279,7 @@ test bind-4.5 {TkBindEventProc procedure} -setup {
bind {a b} <Enter> {lappend x "%W enter {a b}"}
bind .t <Enter> {lappend x "%W enter .t"}
bindtags .t.f {a b c d e f g h i j k l m n o p q r s t u v w x y z}
-
+
event generate .t.f <Enter>
} -cleanup {
destroy .t.f
@@ -375,7 +383,7 @@ test bind-10.2 {Tk_GetBinding procedure} -body {
} -result {Test}
test bind-11.1 {Tk_GetAllBindings procedure} -body {
- frame .t.f
+ frame .t.f
foreach i "! a \\\{ ~ <Delete> <space> <<Paste>> <Tab> <Linefeed> <less> <Meta-a> <Acircumflex>" {
bind .t.f $i Test
}
@@ -384,7 +392,7 @@ test bind-11.1 {Tk_GetAllBindings procedure} -body {
destroy .t.f
} -result {! <<Paste>> <Key-Acircumflex> <Key-Delete> <Key-Linefeed> <Key-Tab> <Key-less> <Key-space> <Meta-Key-a> a \{ ~}
test bind-11.2 {Tk_GetAllBindings procedure} -body {
- frame .t.f
+ frame .t.f
foreach i "<Double-1> <Triple-1> <Meta-Control-a> <Double-Alt-Enter> <1>" {
bind .t.f $i Test
}
@@ -393,7 +401,7 @@ test bind-11.2 {Tk_GetAllBindings procedure} -body {
destroy .t.f
} -result {<Button-1> <Control-Meta-Key-a> <Double-Alt-Enter> <Double-Button-1> <Triple-Button-1>}
test bind-11.3 {Tk_GetAllBindings procedure} -body {
- frame .t.f
+ frame .t.f
foreach i "<Double-Triple-1> abcd a<Leave>b" {
bind .t.f $i Test
}
@@ -427,7 +435,7 @@ test bind-13.1 {Tk_BindEvent procedure} -setup {
bind Test : {lappend x "%W %K Test :"}
bind all _ {lappend x "%W %K all _"}
bind .t.f : {lappend x "%W %K .t.f :"}
-
+
event generate .t.f <Key-colon>
event generate .t.f <Key-plus>
event generate .t.f <Key-underscore>
@@ -450,7 +458,7 @@ test bind-13.2 {Tk_BindEvent procedure} -setup {
bind Test <KeyPress> {lappend x "%W %K Test press any"; break}
bind all <KeyPress> {continue; lappend x "%W %K all press any"}
bind .t.f : {lappend x "%W %K .t.f pressed colon"}
-
+
event generate .t.f <Key-colon>
return $x
} -cleanup {
@@ -506,11 +514,11 @@ test bind-13.5 {Tk_BindEvent procedure} -body {
frame .t.g -gorp foo
} -cleanup {
bind all <Destroy> {}
-} -returnCodes error -result {unknown option "-gorp"}
+} -returnCodes error -result {unknown option "-gorp"}
test bind-13.6 {Tk_BindEvent procedure} -body {
bind all <Destroy> {lappend x "%W destroyed"}
set x {}
- catch {frame .t.g -gorp foo}
+ catch {frame .t.g -gorp foo}
return $x
} -cleanup {
bind all <Destroy> {}
@@ -591,10 +599,10 @@ test bind-13.11 {Tk_BindEvent procedure: collapse Motions} -setup {
set x {}
} -body {
bind .t.f <Motion> "lappend x Motion%#(%x,%y)"
- event generate .t.f <Motion> -serial 100 -x 100 -y 200 -when tail
+ event generate .t.f <Motion> -serial 100 -x 100 -y 200 -when tail
update
event generate .t.f <Motion> -serial 101 -x 200 -y 300 -when tail
- event generate .t.f <Motion> -serial 102 -x 300 -y 400 -when tail
+ event generate .t.f <Motion> -serial 102 -x 300 -y 400 -when tail
update
return $x
} -cleanup {
@@ -608,10 +616,10 @@ test bind-13.12 {Tk_BindEvent procedure: collapse repeating modifiers} -setup {
} -body {
bind .t.f <Key> "lappend x %K%#"
bind .t.f <KeyRelease> "lappend x %K%#"
- event generate .t.f <Key-Shift_L> -serial 100 -when tail
- event generate .t.f <KeyRelease-Shift_L> -serial 101 -when tail
- event generate .t.f <Key-Shift_L> -serial 102 -when tail
- event generate .t.f <KeyRelease-Shift_L> -serial 103 -when tail
+ event generate .t.f <Key-Shift_L> -serial 100 -when tail
+ event generate .t.f <KeyRelease-Shift_L> -serial 101 -when tail
+ event generate .t.f <Key-Shift_L> -serial 102 -when tail
+ event generate .t.f <KeyRelease-Shift_L> -serial 103 -when tail
update
} -cleanup {
destroy .t.f
@@ -847,7 +855,7 @@ test bind-13.27 {Tk_BindEvent procedure: no detail virtual pattern list} -setup
set x {}
} -body {
bind .t.f <Button-2> {set x Button-2}
- event generate .t.f <Button-2>
+ event generate .t.f <Button-2>
return $x
} -cleanup {
destroy .t.f
@@ -1011,7 +1019,7 @@ test bind-13.43 {Tk_BindEvent procedure: break in script} -setup {
} -result {b1}
test bind-13.45 {Tk_BindEvent procedure: error in script} -setup {
proc bgerror msg {
- global x
+ global x
lappend x $msg
}
frame .t.f -class Test -width 150 -height 100
@@ -1200,7 +1208,7 @@ test bind-15.11 {MatchPatterns procedure, modifier checks} -setup {
} -cleanup {
destroy .t.f
} -result {0}
-test bind-15.12 {MatchPatterns procedure, ignore modifier presses and releases} -constraints {
+test bind-15.12 {MatchPatterns procedure, ignore modifier presses and releases} -constraints {
nonPortable
} -setup {
frame .t.f -class Test -width 150 -height 100
@@ -1241,7 +1249,7 @@ test bind-15.14 {MatchPatterns procedure, checking "nearby"} -setup {
} -body {
bind .t.f <Double-1> {set x 1}
set x 0
- event generate .t.f <Button-2>
+ event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Button-1> -x 30 -y 40
event generate .t.f <Button-1> -x 31 -y 39
@@ -1258,7 +1266,7 @@ test bind-15.15 {MatchPatterns procedure, checking "nearby"} -setup {
} -body {
bind .t.f <Double-1> {set x 1}
set x 0
- event generate .t.f <Button-2>
+ event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Button-1> -x 30 -y 40
event generate .t.f <Button-1> -x 29 -y 41
@@ -1275,7 +1283,7 @@ test bind-15.16 {MatchPatterns procedure, checking "nearby"} -setup {
} -body {
bind .t.f <Double-1> {set x 1}
set x 0
- event generate .t.f <Button-2>
+ event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Button-1> -x 30 -y 40
event generate .t.f <Button-1> -x 40 -y 40
@@ -1292,7 +1300,7 @@ test bind-15.17 {MatchPatterns procedure, checking "nearby"} -setup {
} -body {
bind .t.f <Double-1> {set x 1}
set x 0
- event generate .t.f <Button-2>
+ event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Button-1> -x 30 -y 40
event generate .t.f <Button-1> -x 20 -y 40
@@ -1309,7 +1317,7 @@ test bind-15.18 {MatchPatterns procedure, checking "nearby"} -setup {
} -body {
bind .t.f <Double-1> {set x 1}
set x 0
- event generate .t.f <Button-2>
+ event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Button-1> -x 30 -y 40
event generate .t.f <Button-1> -x 30 -y 30
@@ -1326,7 +1334,7 @@ test bind-15.19 {MatchPatterns procedure, checking "nearby"} -setup {
} -body {
bind .t.f <Double-1> {set x 1}
set x 0
- event generate .t.f <Button-2>
+ event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Button-1> -x 30 -y 40
event generate .t.f <Button-1> -x 30 -y 50
@@ -1343,7 +1351,7 @@ test bind-15.20 {MatchPatterns procedure, checking "nearby"} -setup {
} -body {
bind .t.f <Double-1> {set x 1}
set x 0
- event generate .t.f <Button-2>
+ event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Button-1> -time 300
event generate .t.f <Button-1> -time 700
@@ -1360,7 +1368,7 @@ test bind-15.21 {MatchPatterns procedure, checking "nearby"} -setup {
} -body {
bind .t.f <Double-1> {set x 1}
set x 0
- event generate .t.f <Button-2>
+ event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Button-1> -time 300
event generate .t.f <Button-1> -time 900
@@ -2017,7 +2025,7 @@ test bind-16.34 {ExpandPercents procedure} -setup {
destroy .t.f
} -result {781 632}
test bind-16.35 {ExpandPercents procedure} -constraints {
- nonPortable
+ nonPortable
} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
@@ -2242,7 +2250,7 @@ test bind-17.6 {event command: add with error} -body {
event add <<Paste>> <Control-v> <Button-2> abc <xyz> <1>
} -cleanup {
event delete <<Paste>>
-} -returnCodes error -result {bad event type or keysym "xyz"}
+} -returnCodes error -result {bad event type or keysym "xyz"}
test bind-17.7 {event command: add with error} -body {
event delete <<Paste>>
catch {event add <<Paste>> <Control-v> <Button-2> abc <xyz> <1>}
@@ -2335,7 +2343,7 @@ test bind-18.1 {CreateVirtualEvent procedure: GetVirtualEventUid} -body {
test bind-18.2 {CreateVirtualEvent procedure: FindSequence} -body {
event add <<asd>> <Ctrl-v>
} -returnCodes error -result {bad event type or keysym "Ctrl"}
-test bind-18.3 {CreateVirtualEvent procedure: new physical} -body {
+test bind-18.3 {CreateVirtualEvent procedure: new physical} -body {
event delete <<xyz>>
event add <<xyz>> <Control-v>
event info <<xyz>>
@@ -2344,7 +2352,7 @@ test bind-18.3 {CreateVirtualEvent procedure: new physical} -body {
} -result {<Control-Key-v>}
test bind-18.4 {CreateVirtualEvent procedure: duplicate physical} -body {
event delete <<xyz>>
- event add <<xyz>> <Control-v>
+ event add <<xyz>> <Control-v>
event add <<xyz>> <Control-v>
event info <<xyz>>
} -cleanup {
@@ -2415,13 +2423,13 @@ test bind-19.7 {DeleteVirtualEvent procedure: owns 1, delete all} -body {
foreach p [event info] {event delete $p}
event add <<xyz>> <Control-v>
event delete <<xyz>>
- event info
+ event info
} -result {}
test bind-19.8 {DeleteVirtualEvent procedure: owns 1, delete 1} -body {
foreach p [event info] {event delete $p}
event add <<xyz>> <Control-v>
event delete <<xyz>> <Control-v>
- event info
+ event info
} -result {}
test bind-19.9 {DeleteVirtualEvent procedure: owns many, delete all} -body {
foreach p [event info] {event delete $p}
@@ -2473,7 +2481,7 @@ test bind-19.12 {DeleteVirtualEvent procedure: owned by 1, first in chain} -setu
event generate .t.f <ButtonRelease-2>
event generate .t.f <Control-Button-2>
event generate .t.f <Control-ButtonRelease-2>
- event delete <<xyz>>
+ event delete <<xyz>>
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Control-Button-2>
@@ -2540,7 +2548,7 @@ test bind-19.14 {DeleteVirtualEvent procedure: owned by 1, last in chain} -setup
event generate .t.f <Control-ButtonRelease-2>
event generate .t.f <Shift-Button-2>
event generate .t.f <Shift-ButtonRelease-2>
- event delete <<xyz>>
+ event delete <<xyz>>
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.f <Control-Button-2>
@@ -2576,7 +2584,7 @@ test bind-19.15 {DeleteVirtualEvent procedure: owned by many, first} -setup {
event generate .t.g <ButtonRelease-2>
event generate .t.h <Button-2>
event generate .t.h <ButtonRelease-2>
- event delete <<xyz>>
+ event delete <<xyz>>
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.g <Button-2>
@@ -2648,7 +2656,7 @@ test bind-19.17 {DeleteVirtualEvent procedure: owned by many, last} -setup {
event generate .t.g <ButtonRelease-2>
event generate .t.h <Button-2>
event generate .t.h <ButtonRelease-2>
- event delete <<def>>
+ event delete <<def>>
event generate .t.f <Button-2>
event generate .t.f <ButtonRelease-2>
event generate .t.g <Button-2>
@@ -3385,7 +3393,7 @@ test bind-22.55 {HandleEventGenerate: options <Map> -override xyz} -setup {
set x {}
} -body {
bind .t.f <Map> "lappend x %o"
- event generate .t.f <Map> -override xyz
+ event generate .t.f <Map> -override xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {expected boolean value but got "xyz"}
@@ -3398,7 +3406,7 @@ test bind-22.56 {HandleEventGenerate: options <Map> -override 1} -setup {
set x {}
} -body {
bind .t.f <Map> "lappend x %o"
- event generate .t.f <Map> -override 1
+ event generate .t.f <Map> -override 1
return $x
} -cleanup {
destroy .t.f
@@ -3412,7 +3420,7 @@ test bind-22.57 {HandleEventGenerate: options <Reparent> -override 1} -setup {
set x {}
} -body {
bind .t.f <Reparent> "lappend x %o"
- event generate .t.f <Reparent> -override 1
+ event generate .t.f <Reparent> -override 1
return $x
} -cleanup {
destroy .t.f
@@ -3426,7 +3434,7 @@ test bind-22.58 {HandleEventGenerate: options <Configure> -override 1} -setup {
set x {}
} -body {
bind .t.f <Configure> "lappend x %o"
- event generate .t.f <Configure> -override 1
+ event generate .t.f <Configure> -override 1
return $x
} -cleanup {
destroy .t.f
@@ -3440,7 +3448,7 @@ test bind-22.59 {HandleEventGenerate: options <Key> -override 1} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %k"
- event generate .t.f <Key> -override 1
+ event generate .t.f <Key> -override 1
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Key> event doesn't accept "-override" option}
@@ -3453,7 +3461,7 @@ test bind-22.60 {HandleEventGenerate: options <Circulate> -place xyz} -setup {
set x {}
} -body {
bind .t.f <Circulate> "lappend x %p"
- event generate .t.f <Circulate> -place xyz
+ event generate .t.f <Circulate> -place xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad -place value "xyz": must be PlaceOnTop, or PlaceOnBottom}
@@ -3466,7 +3474,7 @@ test bind-22.61 {HandleEventGenerate: options <Circulate> -place PlaceOnTop} -se
set x {}
} -body {
bind .t.f <Circulate> "lappend x %p"
- event generate .t.f <Circulate> -place PlaceOnTop
+ event generate .t.f <Circulate> -place PlaceOnTop
return $x
} -cleanup {
destroy .t.f
@@ -3480,7 +3488,7 @@ test bind-22.62 {HandleEventGenerate: options <Key> -place PlaceOnTop} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %k"
- event generate .t.f <Key> -place PlaceOnTop
+ event generate .t.f <Key> -place PlaceOnTop
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Key> event doesn't accept "-place" option}
@@ -3493,7 +3501,7 @@ test bind-22.63 {HandleEventGenerate: options <Key> -root .xyz} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %R"
- event generate .t.f <Key> -root .xyz
+ event generate .t.f <Key> -root .xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad window path name ".xyz"}
@@ -3506,7 +3514,7 @@ test bind-22.64 {HandleEventGenerate: options <Key> -root .t} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %R"
- event generate .t.f <Key> -root .t
+ event generate .t.f <Key> -root .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
@@ -3520,7 +3528,7 @@ test bind-22.65 {HandleEventGenerate: options <Key> -root xyz} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %R"
- event generate .t.f <Key> -root xyz
+ event generate .t.f <Key> -root xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad window name/identifier "xyz"}
@@ -3533,7 +3541,7 @@ test bind-22.66 {HandleEventGenerate: options <Key> -root [winfo id .t]} -setup
set x {}
} -body {
bind .t.f <Key> "lappend x %R"
- event generate .t.f <Key> -root [winfo id .t]
+ event generate .t.f <Key> -root [winfo id .t]
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
@@ -3547,7 +3555,7 @@ test bind-22.67 {HandleEventGenerate: options <Button> -root .t} -setup {
set x {}
} -body {
bind .t.f <Button> "lappend x %R"
- event generate .t.f <Button> -root .t
+ event generate .t.f <Button> -root .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
@@ -3561,7 +3569,7 @@ test bind-22.68 {HandleEventGenerate: options <ButtonRelease> -root .t} -setup {
set x {}
} -body {
bind .t.f <ButtonRelease> "lappend x %R"
- event generate .t.f <ButtonRelease> -root .t
+ event generate .t.f <ButtonRelease> -root .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
@@ -3575,7 +3583,7 @@ test bind-22.69 {HandleEventGenerate: options <Motion> -root .t} -setup {
set x {}
} -body {
bind .t.f <Motion> "lappend x %R"
- event generate .t.f <Motion> -root .t
+ event generate .t.f <Motion> -root .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
@@ -3589,7 +3597,7 @@ test bind-22.70 {HandleEventGenerate: options <<Paste>> -root .t} -setup {
set x {}
} -body {
bind .t.f <<Paste>> "lappend x %R"
- event generate .t.f <<Paste>> -root .t
+ event generate .t.f <<Paste>> -root .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
@@ -3603,7 +3611,7 @@ test bind-22.71 {HandleEventGenerate: options <Enter> -root .t} -setup {
set x {}
} -body {
bind .t.f <Enter> "lappend x %R"
- event generate .t.f <Enter> -root .t
+ event generate .t.f <Enter> -root .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
@@ -3617,7 +3625,7 @@ test bind-22.72 {HandleEventGenerate: options <Configure> -root .t} -setup {
set x {}
} -body {
bind .t.f <Configure> "lappend x %R"
- event generate .t.f <Configure> -root .t
+ event generate .t.f <Configure> -root .t
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Configure> event doesn't accept "-root" option}
@@ -3630,7 +3638,7 @@ test bind-22.73 {HandleEventGenerate: options <Key> -rootx xyz} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %X"
- event generate .t.f <Key> -rootx xyz
+ event generate .t.f <Key> -rootx xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad screen distance "xyz"}
@@ -3643,7 +3651,7 @@ test bind-22.74 {HandleEventGenerate: options <Key> -rootx 2i} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %X"
- event generate .t.f <Key> -rootx 2i
+ event generate .t.f <Key> -rootx 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -3657,7 +3665,7 @@ test bind-22.75 {HandleEventGenerate: options <Button> -rootx 2i} -setup {
set x {}
} -body {
bind .t.f <Button> "lappend x %X"
- event generate .t.f <Button> -rootx 2i
+ event generate .t.f <Button> -rootx 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -3671,7 +3679,7 @@ test bind-22.76 {HandleEventGenerate: options <ButtonRelease> -rootx 2i} -setup
set x {}
} -body {
bind .t.f <ButtonRelease> "lappend x %X"
- event generate .t.f <ButtonRelease> -rootx 2i
+ event generate .t.f <ButtonRelease> -rootx 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -3685,7 +3693,7 @@ test bind-22.77 {HandleEventGenerate: options <Motion> -rootx 2i} -setup {
set x {}
} -body {
bind .t.f <Motion> "lappend x %X"
- event generate .t.f <Motion> -rootx 2i
+ event generate .t.f <Motion> -rootx 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -3699,7 +3707,7 @@ test bind-22.78 {HandleEventGenerate: options <<Paste>> -rootx 2i} -setup {
set x {}
} -body {
bind .t.f <<Paste>> "lappend x %X"
- event generate .t.f <<Paste>> -rootx 2i
+ event generate .t.f <<Paste>> -rootx 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -3713,7 +3721,7 @@ test bind-22.79 {HandleEventGenerate: options <Enter> -rootx 2i} -setup {
set x {}
} -body {
bind .t.f <Enter> "lappend x %X"
- event generate .t.f <Enter> -rootx 2i
+ event generate .t.f <Enter> -rootx 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -3727,7 +3735,7 @@ test bind-22.80 {HandleEventGenerate: options <Configure> -rootx 2i} -setup {
set x {}
} -body {
bind .t.f <Configure> "lappend x %X"
- event generate .t.f <Configure> -rootx 2i
+ event generate .t.f <Configure> -rootx 2i
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Configure> event doesn't accept "-rootx" option}
@@ -3740,7 +3748,7 @@ test bind-22.81 {HandleEventGenerate: options <Key> -rooty xyz} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %Y"
- event generate .t.f <Key> -rooty xyz
+ event generate .t.f <Key> -rooty xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad screen distance "xyz"}
@@ -3753,7 +3761,7 @@ test bind-22.82 {HandleEventGenerate: options <Key> -rooty 2i} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %Y"
- event generate .t.f <Key> -rooty 2i
+ event generate .t.f <Key> -rooty 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -3767,7 +3775,7 @@ test bind-22.83 {HandleEventGenerate: options <Button> -rooty 2i} -setup {
set x {}
} -body {
bind .t.f <Button> "lappend x %Y"
- event generate .t.f <Button> -rooty 2i
+ event generate .t.f <Button> -rooty 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -3781,7 +3789,7 @@ test bind-22.84 {HandleEventGenerate: options <ButtonRelease> -rooty 2i} -setup
set x {}
} -body {
bind .t.f <ButtonRelease> "lappend x %Y"
- event generate .t.f <ButtonRelease> -rooty 2i
+ event generate .t.f <ButtonRelease> -rooty 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -3795,7 +3803,7 @@ test bind-22.85 {HandleEventGenerate: options <Motion> -rooty 2i} -setup {
set x {}
} -body {
bind .t.f <Motion> "lappend x %Y"
- event generate .t.f <Motion> -rooty 2i
+ event generate .t.f <Motion> -rooty 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -3809,7 +3817,7 @@ test bind-22.86 {HandleEventGenerate: options <<Paste>> -rooty 2i} -setup {
set x {}
} -body {
bind .t.f <<Paste>> "lappend x %Y"
- event generate .t.f <<Paste>> -rooty 2i
+ event generate .t.f <<Paste>> -rooty 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -3823,7 +3831,7 @@ test bind-22.87 {HandleEventGenerate: options <Enter> -rooty 2i} -setup {
set x {}
} -body {
bind .t.f <Enter> "lappend x %Y"
- event generate .t.f <Enter> -rooty 2i
+ event generate .t.f <Enter> -rooty 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -3837,7 +3845,7 @@ test bind-22.88 {HandleEventGenerate: options <Configure> -rooty 2i} -setup {
set x {}
} -body {
bind .t.f <Configure> "lappend x %Y"
- event generate .t.f <Configure> -rooty 2i
+ event generate .t.f <Configure> -rooty 2i
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Configure> event doesn't accept "-rooty" option}
@@ -3850,7 +3858,7 @@ test bind-22.89 {HandleEventGenerate: options <Key> -sendevent xyz} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %E"
- event generate .t.f <Key> -sendevent xyz
+ event generate .t.f <Key> -sendevent xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {expected boolean value but got "xyz"}
@@ -3863,7 +3871,7 @@ test bind-22.90 {HandleEventGenerate: options <Key> -sendevent 1} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %E"
- event generate .t.f <Key> -sendevent 1
+ event generate .t.f <Key> -sendevent 1
return $x
} -cleanup {
destroy .t.f
@@ -3877,7 +3885,7 @@ test bind-22.91 {HandleEventGenerate: options <Key> -sendevent yes} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %E"
- event generate .t.f <Key> -sendevent yes
+ event generate .t.f <Key> -sendevent yes
return $x
} -cleanup {
destroy .t.f
@@ -3891,7 +3899,7 @@ test bind-22.92 {HandleEventGenerate: options <Key> -sendevent 43} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %E"
- event generate .t.f <Key> -sendevent 43
+ event generate .t.f <Key> -sendevent 43
return $x
} -cleanup {
destroy .t.f
@@ -3905,7 +3913,7 @@ test bind-22.93 {HandleEventGenerate: options <Key> -serial xyz} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %#"
- event generate .t.f <Key> -serial xyz
+ event generate .t.f <Key> -serial xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {expected integer but got "xyz"}
@@ -3918,7 +3926,7 @@ test bind-22.94 {HandleEventGenerate: options <Key> -serial 100} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %#"
- event generate .t.f <Key> -serial 100
+ event generate .t.f <Key> -serial 100
return $x
} -cleanup {
destroy .t.f
@@ -3932,7 +3940,7 @@ test bind-22.95 {HandleEventGenerate: options <Key> -state xyz} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %s"
- event generate .t.f <Key> -state xyz
+ event generate .t.f <Key> -state xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {expected integer but got "xyz"}
@@ -3945,7 +3953,7 @@ test bind-22.96 {HandleEventGenerate: options <Key> -state 1} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %s"
- event generate .t.f <Key> -state 1
+ event generate .t.f <Key> -state 1
return $x
} -cleanup {
destroy .t.f
@@ -3959,7 +3967,7 @@ test bind-22.97 {HandleEventGenerate: options <Button> -state 1025} -setup {
set x {}
} -body {
bind .t.f <Button> "lappend x %s"
- event generate .t.f <Button> -state 1025
+ event generate .t.f <Button> -state 1025
return $x
} -cleanup {
destroy .t.f
@@ -3973,7 +3981,7 @@ test bind-22.98 {HandleEventGenerate: options <ButtonRelease> -state 1025} -setu
set x {}
} -body {
bind .t.f <ButtonRelease> "lappend x %s"
- event generate .t.f <ButtonRelease> -state 1025
+ event generate .t.f <ButtonRelease> -state 1025
return $x
} -cleanup {
destroy .t.f
@@ -3987,7 +3995,7 @@ test bind-22.99 {HandleEventGenerate: options <Motion> -state 1} -setup {
set x {}
} -body {
bind .t.f <Motion> "lappend x %s"
- event generate .t.f <Motion> -state 1
+ event generate .t.f <Motion> -state 1
return $x
} -cleanup {
destroy .t.f
@@ -4001,7 +4009,7 @@ test bind-22.100 {HandleEventGenerate: options <<Paste>> -state 1} -setup {
set x {}
} -body {
bind .t.f <<Paste>> "lappend x %s"
- event generate .t.f <<Paste>> -state 1
+ event generate .t.f <<Paste>> -state 1
return $x
} -cleanup {
destroy .t.f
@@ -4015,7 +4023,7 @@ test bind-22.101 {HandleEventGenerate: options <Enter> -state 1} -setup {
set x {}
} -body {
bind .t.f <Enter> "lappend x %s"
- event generate .t.f <Enter> -state 1
+ event generate .t.f <Enter> -state 1
return $x
} -cleanup {
destroy .t.f
@@ -4029,7 +4037,7 @@ test bind-22.102 {HandleEventGenerate: options <Visibility> -state xyz} -setup {
set x {}
} -body {
bind .t.f <Visibility> "lappend x %s"
- event generate .t.f <Visibility> -state xyz
+ event generate .t.f <Visibility> -state xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad -state value "xyz": must be VisibilityUnobscured, VisibilityPartiallyObscured, or VisibilityFullyObscured}
@@ -4042,7 +4050,7 @@ test bind-22.103 {HandleEventGenerate: options <Visibility> -state VisibilityUno
set x {}
} -body {
bind .t.f <Visibility> "lappend x %s"
- event generate .t.f <Visibility> -state VisibilityUnobscured
+ event generate .t.f <Visibility> -state VisibilityUnobscured
return $x
} -cleanup {
destroy .t.f
@@ -4056,7 +4064,7 @@ test bind-22.104 {HandleEventGenerate: options <Configure> -state xyz} -setup {
set x {}
} -body {
bind .t.f <Configure> "lappend x %s"
- event generate .t.f <Configure> -state xyz
+ event generate .t.f <Configure> -state xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Configure> event doesn't accept "-state" option}
@@ -4069,7 +4077,7 @@ test bind-22.105 {HandleEventGenerate: options <Key> -subwindow .xyz} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %S"
- event generate .t.f <Key> -subwindow .xyz
+ event generate .t.f <Key> -subwindow .xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad window path name ".xyz"}
@@ -4082,7 +4090,7 @@ test bind-22.106 {HandleEventGenerate: options <Key> -subwindow .t} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %S"
- event generate .t.f <Key> -subwindow .t
+ event generate .t.f <Key> -subwindow .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
@@ -4096,7 +4104,7 @@ test bind-22.107 {HandleEventGenerate: options <Key> -subwindow xyz} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %S"
- event generate .t.f <Key> -subwindow xyz
+ event generate .t.f <Key> -subwindow xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad window name/identifier "xyz"}
@@ -4109,7 +4117,7 @@ test bind-22.108 {HandleEventGenerate: options <Key> -subwindow [winfo id .t]} -
set x {}
} -body {
bind .t.f <Key> "lappend x %S"
- event generate .t.f <Key> -subwindow [winfo id .t]
+ event generate .t.f <Key> -subwindow [winfo id .t]
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
@@ -4123,7 +4131,7 @@ test bind-22.109 {HandleEventGenerate: options <Button> -subwindow .t} -setup {
set x {}
} -body {
bind .t.f <Button> "lappend x %S"
- event generate .t.f <Button> -subwindow .t
+ event generate .t.f <Button> -subwindow .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
@@ -4137,7 +4145,7 @@ test bind-22.110 {HandleEventGenerate: options <ButtonRelease> -subwindow .t} -s
set x {}
} -body {
bind .t.f <ButtonRelease> "lappend x %S"
- event generate .t.f <ButtonRelease> -subwindow .t
+ event generate .t.f <ButtonRelease> -subwindow .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
@@ -4151,7 +4159,7 @@ test bind-22.111 {HandleEventGenerate: options <Motion> -subwindow .t} -setup {
set x {}
} -body {
bind .t.f <Motion> "lappend x %S"
- event generate .t.f <Motion> -subwindow .t
+ event generate .t.f <Motion> -subwindow .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
@@ -4165,7 +4173,7 @@ test bind-22.112 {HandleEventGenerate: options <<Paste>> -subwindow .t} -setup {
set x {}
} -body {
bind .t.f <<Paste>> "lappend x %S"
- event generate .t.f <<Paste>> -subwindow .t
+ event generate .t.f <<Paste>> -subwindow .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
@@ -4179,7 +4187,7 @@ test bind-22.113 {HandleEventGenerate: options <Enter> -subwindow .t} -setup {
set x {}
} -body {
bind .t.f <Enter> "lappend x %S"
- event generate .t.f <Enter> -subwindow .t
+ event generate .t.f <Enter> -subwindow .t
expr {[winfo id .t] eq $x}
} -cleanup {
destroy .t.f
@@ -4193,7 +4201,7 @@ test bind-22.114 {HandleEventGenerate: options <Configure> -subwindow .t} -setup
set x {}
} -body {
bind .t.f <Configure> "lappend x %S"
- event generate .t.f <Configure> -subwindow .t
+ event generate .t.f <Configure> -subwindow .t
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Configure> event doesn't accept "-subwindow" option}
@@ -4206,7 +4214,7 @@ test bind-22.115 {HandleEventGenerate: options <Key> -time xyz} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %t"
- event generate .t.f <Key> -time xyz
+ event generate .t.f <Key> -time xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {expected integer but got "xyz"}
@@ -4219,7 +4227,7 @@ test bind-22.116 {HandleEventGenerate: options <Key> -time 100} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %t"
- event generate .t.f <Key> -time 100
+ event generate .t.f <Key> -time 100
return $x
} -cleanup {
destroy .t.f
@@ -4233,7 +4241,7 @@ test bind-22.117 {HandleEventGenerate: options <Button> -time 100} -setup {
set x {}
} -body {
bind .t.f <Button> "lappend x %t"
- event generate .t.f <Button> -time 100
+ event generate .t.f <Button> -time 100
return $x
} -cleanup {
destroy .t.f
@@ -4247,7 +4255,7 @@ test bind-22.118 {HandleEventGenerate: options <ButtonRelease> -time 100} -setup
set x {}
} -body {
bind .t.f <ButtonRelease> "lappend x %t"
- event generate .t.f <ButtonRelease> -time 100
+ event generate .t.f <ButtonRelease> -time 100
return $x
} -cleanup {
destroy .t.f
@@ -4261,7 +4269,7 @@ test bind-22.119 {HandleEventGenerate: options <Motion> -time 100} -setup {
set x {}
} -body {
bind .t.f <Motion> "lappend x %t"
- event generate .t.f <Motion> -time 100
+ event generate .t.f <Motion> -time 100
return $x
} -cleanup {
destroy .t.f
@@ -4275,7 +4283,7 @@ test bind-22.120 {HandleEventGenerate: options <<Paste>> -time 100} -setup {
set x {}
} -body {
bind .t.f <<Paste>> "lappend x %t"
- event generate .t.f <<Paste>> -time 100
+ event generate .t.f <<Paste>> -time 100
return $x
} -cleanup {
destroy .t.f
@@ -4289,7 +4297,7 @@ test bind-22.121 {HandleEventGenerate: options <Enter> -time 100} -setup {
set x {}
} -body {
bind .t.f <Enter> "lappend x %t"
- event generate .t.f <Enter> -time 100
+ event generate .t.f <Enter> -time 100
return $x
} -cleanup {
destroy .t.f
@@ -4303,7 +4311,7 @@ test bind-22.122 {HandleEventGenerate: options <Property> -time 100} -setup {
set x {}
} -body {
bind .t.f <Property> "lappend x %t"
- event generate .t.f <Property> -time 100
+ event generate .t.f <Property> -time 100
return $x
} -cleanup {
destroy .t.f
@@ -4317,7 +4325,7 @@ test bind-22.123 {HandleEventGenerate: options <Configure> -time 100} -setup {
set x {}
} -body {
bind .t.f <Configure> "lappend x %t"
- event generate .t.f <Configure> -time 100
+ event generate .t.f <Configure> -time 100
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Configure> event doesn't accept "-time" option}
@@ -4330,7 +4338,7 @@ test bind-22.124 {HandleEventGenerate: options <Expose> -width xyz} -setup {
set x {}
} -body {
bind .t.f <Expose> "lappend x %w"
- event generate .t.f <Expose> -width xyz
+ event generate .t.f <Expose> -width xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad screen distance "xyz"}
@@ -4343,7 +4351,7 @@ test bind-22.125 {HandleEventGenerate: options <Expose> -width 2i} -setup {
set x {}
} -body {
bind .t.f <Expose> "lappend x %w"
- event generate .t.f <Expose> -width 2i
+ event generate .t.f <Expose> -width 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4357,7 +4365,7 @@ test bind-22.126 {HandleEventGenerate: options <Configure> -width 2i} -setup {
set x {}
} -body {
bind .t.f <Configure> "lappend x %w"
- event generate .t.f <Configure> -width 2i
+ event generate .t.f <Configure> -width 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4371,7 +4379,7 @@ test bind-22.127 {HandleEventGenerate: options <Key> -width 2i} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %k"
- event generate .t.f <Key> -width 2i
+ event generate .t.f <Key> -width 2i
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Key> event doesn't accept "-width" option}
@@ -4384,7 +4392,7 @@ test bind-22.128 {HandleEventGenerate: options <Unmap> -window .xyz} -setup {
set x {}
} -body {
bind .t.f <Unmap> "lappend x %W"
- event generate .t.f <Unmap> -window .xyz
+ event generate .t.f <Unmap> -window .xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad window path name ".xyz"}
@@ -4397,7 +4405,7 @@ test bind-22.129 {HandleEventGenerate: options <Unmap> -window .t.f} -setup {
set x {}
} -body {
bind .t.f <Unmap> "lappend x %W"
- event generate .t.f <Unmap> -window .t.f
+ event generate .t.f <Unmap> -window .t.f
return $x
} -cleanup {
destroy .t.f
@@ -4411,7 +4419,7 @@ test bind-22.130 {HandleEventGenerate: options <Unmap> -window xyz} -setup {
set x {}
} -body {
bind .t.f <Unmap> "lappend x %W"
- event generate .t.f <Unmap> -window xyz
+ event generate .t.f <Unmap> -window xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad window name/identifier "xyz"}
@@ -4424,7 +4432,7 @@ test bind-22.131 {HandleEventGenerate: options <Unmap> -window [winfo id .t.f]}
set x {}
} -body {
bind .t.f <Unmap> "lappend x %W"
- event generate .t.f <Unmap> -window [winfo id .t.f]
+ event generate .t.f <Unmap> -window [winfo id .t.f]
return $x
} -cleanup {
destroy .t.f
@@ -4438,7 +4446,7 @@ test bind-22.132 {HandleEventGenerate: options <Unmap> -window .t.f} -setup {
set x {}
} -body {
bind .t.f <Unmap> "lappend x %W"
- event generate .t.f <Unmap> -window .t.f
+ event generate .t.f <Unmap> -window .t.f
return $x
} -cleanup {
destroy .t.f
@@ -4452,7 +4460,7 @@ test bind-22.133 {HandleEventGenerate: options <Map> -window .t.f} -setup {
set x {}
} -body {
bind .t.f <Map> "lappend x %W"
- event generate .t.f <Map> -window .t.f
+ event generate .t.f <Map> -window .t.f
return $x
} -cleanup {
destroy .t.f
@@ -4466,7 +4474,7 @@ test bind-22.134 {HandleEventGenerate: options <Reparent> -window .t.f} -setup {
set x {}
} -body {
bind .t.f <Reparent> "lappend x %W"
- event generate .t.f <Reparent> -window .t.f
+ event generate .t.f <Reparent> -window .t.f
return $x
} -cleanup {
destroy .t.f
@@ -4480,7 +4488,7 @@ test bind-22.135 {HandleEventGenerate: options <Configure> -window .t.f} -setup
set x {}
} -body {
bind .t.f <Configure> "lappend x %W"
- event generate .t.f <Configure> -window .t.f
+ event generate .t.f <Configure> -window .t.f
return $x
} -cleanup {
destroy .t.f
@@ -4494,7 +4502,7 @@ test bind-22.136 {HandleEventGenerate: options <Gravity> -window .t.f} -setup {
set x {}
} -body {
bind .t.f <Gravity> "lappend x %W"
- event generate .t.f <Gravity> -window .t.f
+ event generate .t.f <Gravity> -window .t.f
return $x
} -cleanup {
destroy .t.f
@@ -4508,7 +4516,7 @@ test bind-22.137 {HandleEventGenerate: options <Circulate> -window .t.f} -setup
set x {}
} -body {
bind .t.f <Circulate> "lappend x %W"
- event generate .t.f <Circulate> -window .t.f
+ event generate .t.f <Circulate> -window .t.f
return $x
} -cleanup {
destroy .t.f
@@ -4522,7 +4530,7 @@ test bind-22.138 {HandleEventGenerate: options <Key> -window .t.f} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %W"
- event generate .t.f <Key> -window .t.f
+ event generate .t.f <Key> -window .t.f
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Key> event doesn't accept "-window" option}
@@ -4535,7 +4543,7 @@ test bind-22.139 {HandleEventGenerate: options <Key> -x xyz} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %x"
- event generate .t.f <Key> -x xyz
+ event generate .t.f <Key> -x xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad screen distance "xyz"}
@@ -4548,7 +4556,7 @@ test bind-22.140 {HandleEventGenerate: options <Key> -x 2i} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %x"
- event generate .t.f <Key> -x 2i
+ event generate .t.f <Key> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4562,7 +4570,7 @@ test bind-22.141 {HandleEventGenerate: options <Button> -x 2i} -setup {
set x {}
} -body {
bind .t.f <Button> "lappend x %x"
- event generate .t.f <Button> -x 2i
+ event generate .t.f <Button> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4576,7 +4584,7 @@ test bind-22.142 {HandleEventGenerate: options <ButtonRelease> -x 2i} -setup {
set x {}
} -body {
bind .t.f <ButtonRelease> "lappend x %x"
- event generate .t.f <ButtonRelease> -x 2i
+ event generate .t.f <ButtonRelease> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4590,7 +4598,7 @@ test bind-22.143 {HandleEventGenerate: options <Motion> -x 2i} -setup {
set x {}
} -body {
bind .t.f <Motion> "lappend x %x"
- event generate .t.f <Motion> -x 2i
+ event generate .t.f <Motion> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4604,7 +4612,7 @@ test bind-22.144 {HandleEventGenerate: options <<Paste>> -x 2i} -setup {
set x {}
} -body {
bind .t.f <<Paste>> "lappend x %x"
- event generate .t.f <<Paste>> -x 2i
+ event generate .t.f <<Paste>> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4618,7 +4626,7 @@ test bind-22.145 {HandleEventGenerate: options <Enter> -x 2i} -setup {
set x {}
} -body {
bind .t.f <Enter> "lappend x %x"
- event generate .t.f <Enter> -x 2i
+ event generate .t.f <Enter> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4632,7 +4640,7 @@ test bind-22.146 {HandleEventGenerate: options <Expose> -x 2i} -setup {
set x {}
} -body {
bind .t.f <Expose> "lappend x %x"
- event generate .t.f <Expose> -x 2i
+ event generate .t.f <Expose> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4646,7 +4654,7 @@ test bind-22.147 {HandleEventGenerate: options <Configure> -x 2i} -setup {
set x {}
} -body {
bind .t.f <Configure> "lappend x %x"
- event generate .t.f <Configure> -x 2i
+ event generate .t.f <Configure> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4660,7 +4668,7 @@ test bind-22.148 {HandleEventGenerate: options <Gravity> -x 2i} -setup {
set x {}
} -body {
bind .t.f <Gravity> "lappend x %x"
- event generate .t.f <Gravity> -x 2i
+ event generate .t.f <Gravity> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4674,7 +4682,7 @@ test bind-22.149 {HandleEventGenerate: options <Reparent> -x 2i} -setup {
set x {}
} -body {
bind .t.f <Reparent> "lappend x %x"
- event generate .t.f <Reparent> -x 2i
+ event generate .t.f <Reparent> -x 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4688,7 +4696,7 @@ test bind-22.150 {HandleEventGenerate: options <Map> -x 2i} -setup {
set x {}
} -body {
bind .t.f <Map> "lappend x %x"
- event generate .t.f <Map> -x 2i
+ event generate .t.f <Map> -x 2i
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Map> event doesn't accept "-x" option}
@@ -4701,7 +4709,7 @@ test bind-22.151 {HandleEventGenerate: options <Key> -y xyz} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %y"
- event generate .t.f <Key> -y xyz
+ event generate .t.f <Key> -y xyz
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad screen distance "xyz"}
@@ -4714,7 +4722,7 @@ test bind-22.152 {HandleEventGenerate: options <Key> -y 2i} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %y"
- event generate .t.f <Key> -y 2i
+ event generate .t.f <Key> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4728,7 +4736,7 @@ test bind-22.153 {HandleEventGenerate: options <Button> -y 2i} -setup {
set x {}
} -body {
bind .t.f <Button> "lappend x %y"
- event generate .t.f <Button> -y 2i
+ event generate .t.f <Button> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4742,7 +4750,7 @@ test bind-22.154 {HandleEventGenerate: options <ButtonRelease> -y 2i} -setup {
set x {}
} -body {
bind .t.f <ButtonRelease> "lappend x %y"
- event generate .t.f <ButtonRelease> -y 2i
+ event generate .t.f <ButtonRelease> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4756,7 +4764,7 @@ test bind-22.155 {HandleEventGenerate: options <Motion> -y 2i} -setup {
set x {}
} -body {
bind .t.f <Motion> "lappend x %y"
- event generate .t.f <Motion> -y 2i
+ event generate .t.f <Motion> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4770,7 +4778,7 @@ test bind-22.156 {HandleEventGenerate: options <<Paste>> -y 2i} -setup {
set x {}
} -body {
bind .t.f <<Paste>> "lappend x %y"
- event generate .t.f <<Paste>> -y 2i
+ event generate .t.f <<Paste>> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4784,7 +4792,7 @@ test bind-22.157 {HandleEventGenerate: options <Enter> -y 2i} -setup {
set x {}
} -body {
bind .t.f <Enter> "lappend x %y"
- event generate .t.f <Enter> -y 2i
+ event generate .t.f <Enter> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4798,7 +4806,7 @@ test bind-22.158 {HandleEventGenerate: options <Expose> -y 2i} -setup {
set x {}
} -body {
bind .t.f <Expose> "lappend x %y"
- event generate .t.f <Expose> -y 2i
+ event generate .t.f <Expose> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4812,7 +4820,7 @@ test bind-22.159 {HandleEventGenerate: options <Configure> -y 2i} -setup {
set x {}
} -body {
bind .t.f <Configure> "lappend x %y"
- event generate .t.f <Configure> -y 2i
+ event generate .t.f <Configure> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4826,7 +4834,7 @@ test bind-22.160 {HandleEventGenerate: options <Gravity> -y 2i} -setup {
set x {}
} -body {
bind .t.f <Gravity> "lappend x %y"
- event generate .t.f <Gravity> -y 2i
+ event generate .t.f <Gravity> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4840,7 +4848,7 @@ test bind-22.161 {HandleEventGenerate: options <Reparent> -y 2i} -setup {
set x {}
} -body {
bind .t.f <Reparent> "lappend x %y"
- event generate .t.f <Reparent> -y 2i
+ event generate .t.f <Reparent> -y 2i
expr {[winfo pixels .t.f 2i] eq $x}
} -cleanup {
destroy .t.f
@@ -4854,7 +4862,7 @@ test bind-22.162 {HandleEventGenerate: options <Map> -y 2i} -setup {
set x {}
} -body {
bind .t.f <Map> "lappend x %y"
- event generate .t.f <Map> -y 2i
+ event generate .t.f <Map> -y 2i
} -cleanup {
destroy .t.f
} -returnCodes error -result {<Map> event doesn't accept "-y" option}
@@ -4867,7 +4875,7 @@ test bind-22.163 {HandleEventGenerate: options <Key> -xyz 1} -setup {
set x {}
} -body {
bind .t.f <Key> "lappend x %k"
- event generate .t.f <Key> -xyz 1
+ event generate .t.f <Key> -xyz 1
} -cleanup {
destroy .t.f
} -returnCodes error -result {bad option "-xyz": must be -when, -above, -borderwidth, -button, -count, -data, -delta, -detail, -focus, -height, -keycode, -keysym, -mode, -override, -place, -root, -rootx, -rooty, -sendevent, -serial, -state, -subwindow, -time, -warp, -width, -window, -x, or -y}
@@ -5757,8 +5765,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 {specified keysym "6" for non-key event}
+ bind .t <Button-10> foo
+} -returnCodes error -result {bad event type or keysym "10"}
test bind-27.3 {button names} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
@@ -5829,6 +5837,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
@@ -5928,7 +5992,7 @@ test bind-29.1 {Tk_BackgroundError procedure} -setup {
while executing
"error "This is a test""
(command bound to event)}}
-
+
test bind-29.2 {Tk_BackgroundError procedure} -setup {
proc do {} {
event generate .t.f <Button>
@@ -6093,6 +6157,19 @@ test bind-31.7 {virtual event user_data field - unshared, asynch} -setup {
destroy .t.f
} -result {{} {} {TestUserData >b<}}
+test bind-32 {-warp, window was destroyed before the idle callback DoWarp} -setup {
+ frame .t.f
+ pack .t.f
+ focus -force .t.f
+ update
+} -body {
+ event generate .t.f <Button-1> -warp 1
+ event generate .t.f <ButtonRelease-1>
+ destroy .t.f
+ update ; # shall simply not crash
+} -cleanup {
+} -result {}
+
# cleanup
cleanupTests
diff --git a/tests/bitmap.test b/tests/bitmap.test
index 6e2573f..bd9c47f 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 981e640..2ca64c1 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,8 @@ 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 {}
} -body {
diff --git a/tests/button.test b/tests/button.test
index 984fd43..47d4296 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
@@ -3435,15 +3435,47 @@ test button-5.23 {ConfigureButton - -height option} -constraints {
test button-5.24 {ConfigureButton - computing geometry} -constraints {
fonts
} -body {
- button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- .b configure -text "Sample text" -width 10 -height 2
+ button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \
+ -padx 30 -pady 20
+ # 1. button with text
+ .b configure -text "Sample text"
pack .b
- set result "[winfo reqwidth .b] [winfo reqheight .b]"
- .b configure -bitmap questhead
- lappend result [winfo reqwidth .b] [winfo reqheight .b]
-} -cleanup {
- destroy .b
-} -result {104 46 20 12}
+ set textwidth [font measure [.b cget -font] -displayof .b [.b cget -text]]
+ set expectedwidth [expr {$textwidth + 2*[.b cget -borderwidth] \
+ + 2*[.b cget -highlightthickness] + 2*[.b cget -padx]}]
+ incr expectedwidth 2 ; # added (hardcoded) in tkUnixButton.c
+ set result [expr $expectedwidth == [winfo reqwidth .b]]
+ set linespace [lindex [font metrics [.b cget -font] -displayof .b] 5]
+ set expectedheight [expr {$linespace + 2*[.b cget -borderwidth] \
+ + 2*[.b cget -highlightthickness] + 2*[.b cget -pady]}]
+ incr expectedheight 2 ; # added (hardcoded) in tkUnixButton.c
+ lappend result [expr $expectedheight == [winfo reqheight .b]]
+ # 2. button with a bitmap image
+ # there is no access to characteristics the predefined bitmaps,
+ # so define one as an image (copied from questhead.xbm)
+ set myquesthead [image create bitmap -data {
+ #define myquesthead_width 20
+ #define myquesthead_height 22
+ static unsigned char myquesthead_bits[] = {
+ 0xf8, 0x1f, 0x00, 0xac, 0x2a, 0x00, 0x56, 0x55, 0x00, 0xeb, 0xaf, 0x00,
+ 0xf5, 0x5f, 0x01, 0xfb, 0xbf, 0x00, 0x75, 0x5d, 0x01, 0xfb, 0xbe, 0x02,
+ 0x75, 0x5d, 0x05, 0xab, 0xbe, 0x0a, 0x55, 0x5f, 0x07, 0xab, 0xaf, 0x00,
+ 0xd6, 0x57, 0x01, 0xac, 0xab, 0x00, 0xd8, 0x57, 0x00, 0xb0, 0xaa, 0x00,
+ 0x50, 0x55, 0x00, 0xb0, 0x0b, 0x00, 0xd0, 0x17, 0x00, 0xb0, 0x0b, 0x00,
+ 0x58, 0x15, 0x00, 0xa8, 0x2a, 0x00};
+ }]
+ .b configure -image $myquesthead
+ set expectedwidth [expr {[image width $myquesthead] + 2*[.b cget -borderwidth] \
+ + 2*[.b cget -highlightthickness]}]
+ incr expectedwidth 2 ; # added (hardcoded) in tkUnixButton.c
+ lappend result [expr $expectedwidth == [winfo reqwidth .b]]
+ set expectedheight [expr {[image height $myquesthead] + 2*[.b cget -borderwidth] \
+ + 2*[.b cget -highlightthickness]}]
+ incr expectedheight 2 ; # added (hardcoded) in tkUnixButton.c
+ lappend result [expr $expectedheight == [winfo reqheight .b]]
+} -cleanup {
+ destroy .b
+} -result {1 1 1 1}
test button-5.25 {ConfigureButton - computing geometry} -setup {
button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
@@ -3491,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
@@ -3502,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
@@ -3514,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}
@@ -3523,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
@@ -3535,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}
@@ -3547,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
@@ -3558,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
@@ -3567,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
@@ -3722,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
@@ -3750,13 +3782,13 @@ test button-12.1 {button widget vs hidden commands} -body {
destroy .b
} -result {1}
-test button-13.1 {size behaviouor: label} -setup {
+test button-13.1 {size behavior: label} -setup {
label .a -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
label .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
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
@@ -3768,14 +3800,14 @@ test button-13.1 {size behaviouor: label} -setup {
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
-} -result {1 1 1}
-test button-13.2 {size behaviouor: label} -setup {
+} -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
@@ -3787,15 +3819,15 @@ test button-13.2 {size behaviouor: 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 behaviouor: button} -setup {
+test button-13.3 {size behavior: button} -setup {
button .a -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
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
@@ -3807,14 +3839,14 @@ test button-13.3 {size behaviouor: button} -setup {
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
-} -result {1 1 1}
-test button-13.4 {size behaviouor: button} -setup {
+} -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
@@ -3826,15 +3858,15 @@ test button-13.4 {size behaviouor: 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 behaviouor: radiobutton} -setup {
+test button-13.5 {size behavior: radiobutton} -setup {
radiobutton .a -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
radiobutton .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
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
@@ -3846,15 +3878,15 @@ test button-13.5 {size behaviouor: 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 behaviouor: radiobutton} -setup {
+test button-13.6 {size behavior: radiobutton} -setup {
radiobutton .a -borderwidth 2 -highlightthickness 2 -font {Arial 20}
radiobutton .b -borderwidth 2 -highlightthickness 2 -font {Arial 20}
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
@@ -3866,15 +3898,15 @@ test button-13.6 {size behaviouor: 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 behaviouor: checkbutton} -setup {
+test button-13.7 {size behavior: checkbutton} -setup {
checkbutton .a -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
checkbutton .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
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
@@ -3886,15 +3918,15 @@ test button-13.7 {size behaviouor: 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 behaviouor: checkbutton} -setup {
+test button-13.8 {size behavior: checkbutton} -setup {
checkbutton .a -borderwidth 2 -highlightthickness 2 -font {Arial 20}
checkbutton .b -borderwidth 2 -highlightthickness 2 -font {Arial 20}
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
@@ -3906,7 +3938,25 @@ test button-13.8 {size behaviouor: 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 {} {
+ if {[winfo exists .top.b]} {
+ destroy .top.b
+ }
+ }
+ toplevel .top
+ button .top.b -text Foo -command destroy_button
+ bind .top.b <space> destroy_button
+ pack .top.b
+ focus -force .top.b
+ update
+ event generate .top.b <space>
+ update ; # shall not trigger error invalid command name ".top.b"
+} -cleanup {
+ destroy .top.b .top
+} -result {}
imageFinish
cleanupTests
diff --git a/tests/canvImg.test b/tests/canvImg.test
index 776d268..433dfac 100644
--- a/tests/canvImg.test
+++ b/tests/canvImg.test
@@ -315,7 +315,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
@@ -328,7 +328,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
@@ -341,7 +341,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
@@ -750,7 +750,7 @@ test canvImg-11.1 {TranslateImage procedure} -constraints testImageType -setup {
image delete foo
} -result {{foo display 0 0 40 50 30 30}}
test canvImg-11.2 {ImageChangedProc procedure} -constraints {
- testImageType
+ testImageType
} -setup {
.c delete all
} -body {
@@ -765,7 +765,7 @@ test canvImg-11.2 {ImageChangedProc procedure} -constraints {
image delete foo
} -result {30 75 70 125}
test canvImg-11.3 {ImageChangedProc procedure} -constraints {
- testImageType
+ testImageType
} -setup {
.c delete all
} -body {
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 2b0da48..ae95751 100644
--- a/tests/canvas.test
+++ b/tests/canvas.test
@@ -537,10 +537,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 +549,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 +727,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
diff --git a/tests/clipboard.test b/tests/clipboard.test
index 6077940..8d47d62 100644
--- a/tests/clipboard.test
+++ b/tests/clipboard.test
@@ -176,7 +176,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/clrpick.test b/tests/clrpick.test
index 5f1b8b5..c15308b 100644
--- a/tests/clrpick.test
+++ b/tests/clrpick.test
@@ -78,7 +78,7 @@ test clrpick-1.7 {tk_chooseColor command} -body {
# tests 3.1 and 3.2 fail when individually run
# if there is no catch {tk_chooseColor -foo 1} msg
# before settin isNative
-catch {tk_chooseColor -foo 1} msg
+catch {tk_chooseColor -foo 1} msg
set isNative [expr {[info commands tk::dialog::color::] eq ""}]
proc ToPressButton {parent btn} {
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/color.test b/tests/color.test
index a7ed1f8..237ec01 100644
--- a/tests/color.test
+++ b/tests/color.test
@@ -158,7 +158,7 @@ test color-1.5 {Color table} nonPortable {
if {$rgb != [lrange $line 0 2] } {
append result $line\n
}
-
+
}
return $result
} {}
diff --git a/tests/config.test b/tests/config.test
index a0c1921..8c23595 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/constraints.tcl b/tests/constraints.tcl
index 6402753..e0486ff 100644
--- a/tests/constraints.tcl
+++ b/tests/constraints.tcl
@@ -5,8 +5,6 @@ if {[namespace exists tk::test]} {
return
}
-package require Tcl 8.4
-
package require Tk 8.4
tk appname tktest
wm title . tktest
diff --git a/tests/cursor.test b/tests/cursor.test
index ab7949e..95c7b99 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 11408ac..eeebe5d 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 {
@@ -662,7 +662,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 +671,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 +680,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 +689,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 +698,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 +707,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 +726,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 +739,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 +750,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 +762,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 +772,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,7 +801,7 @@ 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 {
@@ -810,14 +810,14 @@ test entry-3.15 {EntryWidgetCmd procedure, "configure" widget command} -setup {
destroy .e
} -result {36}
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 +826,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 +856,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 +865,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 +876,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 +897,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 +908,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 +921,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 +932,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 +962,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 +985,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 +994,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 +1003,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 +1026,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 +1037,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 +1050,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 +1061,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 +1079,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 +1088,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 +1097,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 +1108,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 +1121,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 +1136,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 +1171,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 +1180,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 +1192,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 +1205,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 +1344,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 +1356,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 +1365,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 +1379,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 +1388,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 +1397,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 +1409,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 {
@@ -1420,7 +1420,7 @@ test entry-3.71 {EntryWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e xview scroll number units|pages"}
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 +1431,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 +1444,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 +1458,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 +1466,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 +1480,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 "
@@ -1497,7 +1497,7 @@ test entry-3.77 {EntryWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -returnCodes error -result {bad argument "foobars": must be units or pages}
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 +1508,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 +1522,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 +1534,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 +1556,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 +1615,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 +1640,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 +1659,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
@@ -1682,7 +1682,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}
@@ -1737,7 +1737,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 \
@@ -1751,7 +1751,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 \
@@ -1765,7 +1765,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 \
@@ -1777,7 +1777,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
@@ -1792,7 +1792,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
@@ -1806,7 +1806,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
@@ -1846,14 +1846,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
@@ -1892,10 +1892,23 @@ test entry-6.11 {EntryComputeGeometry procedure} -constraints {
} -cleanup {
destroy .e
} -result {1 1 1}
+test entry-6.12 {EntryComputeGeometry procedure} -constraints {
+ fonts
+} -setup {
+ catch {destroy .e}
+ entry .e -font {Courier -12} -bd 2 -relief raised -width 20
+ pack .e
+} -body {
+ .e insert end "012\t456\t"
+ update
+ list [.e index @80] [.e index @81] [.e index @115] [.e index @116]
+} -cleanup {
+ destroy .e
+} -result {6 7 7 8}
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
@@ -1910,8 +1923,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 {
@@ -1980,7 +1993,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
@@ -1992,7 +2005,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
@@ -2003,7 +2016,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"
@@ -2015,7 +2028,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"
@@ -2030,7 +2043,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"
@@ -2043,7 +2056,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 {
@@ -2057,7 +2070,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 {
@@ -2071,7 +2084,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 {
@@ -2084,7 +2097,7 @@ test entry-8.3 {DeleteChars procedure} -setup {
destroy .e
} -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 {
@@ -2100,7 +2113,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 {
@@ -2116,7 +2129,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 {
@@ -2132,7 +2145,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 {
@@ -2146,7 +2159,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 {
@@ -2162,7 +2175,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
@@ -2175,7 +2188,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 {
@@ -2191,7 +2204,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 {
@@ -2207,7 +2220,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 {
@@ -2220,7 +2233,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 {
@@ -2233,7 +2246,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 {
@@ -2246,7 +2259,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 {
@@ -2259,7 +2272,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 {
@@ -2272,7 +2285,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 {
@@ -2285,7 +2298,7 @@ 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 {
@@ -2316,7 +2329,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]
@@ -2325,7 +2338,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
@@ -2338,7 +2351,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
@@ -2351,7 +2364,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
@@ -2364,7 +2377,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
@@ -2379,7 +2392,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
@@ -2395,7 +2408,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 {
@@ -2410,7 +2423,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
@@ -2467,7 +2480,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
@@ -2558,7 +2571,7 @@ test entry-13.9 {GetEntryIndex procedure} -setup {
test entry-13.10 {GetEntryIndex procedure} -constraints unix -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
@@ -2578,7 +2591,7 @@ test entry-13.10 {GetEntryIndex procedure} -constraints unix -body {
test entry-13.11 {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
@@ -2595,7 +2608,7 @@ test entry-13.11 {GetEntryIndex procedure} -constraints win -body {
.e index sel.first
} -cleanup {
destroy .e
-} -result {1}
+} -result {1}
test entry-13.12 {GetEntryIndex procedure} -constraints unix -body {
# Previous settings:
@@ -2614,7 +2627,7 @@ test entry-13.12 {GetEntryIndex procedure} -constraints unix -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:
@@ -2652,7 +2665,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
@@ -2665,14 +2678,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
@@ -2684,9 +2697,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 {*}
@@ -2701,7 +2714,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
@@ -2734,7 +2747,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
@@ -2766,7 +2779,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 {
@@ -2776,7 +2789,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
@@ -2787,7 +2800,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
@@ -2798,7 +2811,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
@@ -2847,7 +2860,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
@@ -2874,7 +2887,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
@@ -2967,7 +2980,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
@@ -3321,7 +3334,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
@@ -3346,7 +3359,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
@@ -3447,8 +3460,6 @@ test entry-22.1 {lost namespaced textvar} -body {
namespace eval test { variable foo {a b} }
entry .e -textvariable ::test::foo
namespace delete test
- .e insert end "more stuff"
- .e delete 5 end
set ::test::foo
} -cleanup {
destroy .e
@@ -3457,13 +3468,39 @@ test entry-22.2 {lost namespaced textvar} -body {
namespace eval test { variable foo {a b} }
entry .e -textvariable ::test::foo
namespace delete test
- .e insert end "more stuff"
- .e delete 5 end
- catch {set ::test::foo}
- list [.e get] [.e cget -textvar]
+ catch {.e insert end "more stuff"} result1
+ catch {.e delete 5 end } result2
+ catch {set ::test::foo} result3
+ list [.e get] [.e cget -textvar] $result1 $result2 $result3
} -cleanup {
destroy .e
-} -result [list "a bmo" ::test::foo]
+} -result [list "a bmo" ::test::foo \
+ {can't set "::test::foo": parent namespace doesn't exist} \
+ {can't set "::test::foo": parent namespace doesn't exist} \
+ {can't read "::test::foo": no such variable}]
+
+test entry-23.1 {error in trace proc attached to the textvariable} -setup {
+ destroy .e
+} -body {
+ trace variable myvar w traceit
+ proc traceit args {error "Intentional error here!"}
+ entry .e -textvariable myvar
+ catch {.e insert end mystring} result1
+ catch {.e delete 0} result2
+ list $result1 $result2
+} -cleanup {
+ destroy .e
+} -result [list {can't set "myvar": Intentional error here!} \
+ {can't set "myvar": Intentional error here!}]
+
+test entry-24.1 {textvariable lives in a non-existing namespace} -setup {
+ destroy .e
+} -body {
+ catch {entry .e -textvariable thisnsdoesntexist::myvar} result1
+ set result1
+} -cleanup {
+ destroy .e
+} -result {can't trace "thisnsdoesntexist::myvar": parent namespace doesn't exist}
# Gathered comments about lacks
# XXX Still need to write tests for EntryBlinkProc, EntryFocusProc,
diff --git a/tests/event.test b/tests/event.test
index 1548467..1691868 100644
--- a/tests/event.test
+++ b/tests/event.test
@@ -357,7 +357,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
@@ -424,7 +424,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
@@ -610,7 +610,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 {
@@ -756,9 +756,7 @@ test event-7.1(double-click) {A double click on a lone character
deleteWindows
} -result {1.3 A 1.3 A}
test event-7.2(double-click) {A double click on a lone character
- in an entry widget should select that character} -constraints {
- knownBug
-} -setup {
+ in an entry widget should select that character} -setup {
deleteWindows
} -body {
set t [toplevel .t]
@@ -797,7 +795,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
@@ -822,7 +820,7 @@ test event-7.2(double-click) {A double click on a lone character
return $result
} -cleanup {
deleteWindows
-} -result {3 A 4 A}
+} -result {4 A 4 A}
# cleanup
unset -nocomplain keypress_lookup
diff --git a/tests/filebox.test b/tests/filebox.test
index 7b9fa2c..864d215 100644
--- a/tests/filebox.test
+++ b/tests/filebox.test
@@ -162,7 +162,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 abe6ebf..7e37698 100644
--- a/tests/font.test
+++ b/tests/font.test
@@ -109,7 +109,7 @@ test font-4.1 {font command: actual: arguments} -body {
font actual xyz -displayof
} -returnCodes error -result {value for "-displayof" missing}
test font-4.2 {font command: actual: arguments} -body {
- # (objc < 3)
+ # (objc < 3)
font actual
} -returnCodes error -result {wrong # args: should be "font actual font ?-displayof window? ?option? ?--? ?char?"}
test font-4.3 {font command: actual: arguments} -body {
@@ -145,10 +145,22 @@ test font-4.10 {font command: actual} -constraints win -body {
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}
+test font-4.12 {font command: actual} -body {
+ font actual {-family times} -- \ud800
+} -match glob -result {*}
+test font-4.13 {font command: actual} -body {
+ font actual {-family times} -- \udc00
+} -match glob -result {*}
+test font-4.14 {font command: actual} -constraints win -body {
+ font actual {-family times} -family -- \ud800\udc00
+} -result {Times New Roman}
+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 "*"}
test font-5.1 {font command: configure} -body {
- # (objc < 3)
+ # (objc < 3)
font configure
} -returnCodes error -result {wrong # args: should be "font configure fontname ?-option value ...?"}
test font-5.2 {font command: configure: non-existent font} -body {
@@ -161,7 +173,7 @@ test font-5.3 {font command: configure: "deleted" font} -setup {
pack [label .t.f]
update
} -body {
- # (nfPtr->deletePending != 0)
+ # (nfPtr->deletePending != 0)
font create xyz
.t.f configure -font xyz
font delete xyz
@@ -251,13 +263,13 @@ test font-6.4 {font command: create: generate name} -setup {
test font-6.5 {font command: create: bad option creating new font} -setup {
catch {font delete xyz}
} -body {
- # name was specified so skip = 3
+ # name was specified so skip = 3
font create xyz -xyz times
} -returnCodes error -result {bad option "-xyz": must be -family, -size, -weight, -slant, -underline, or -overstrike}
test font-6.6 {font command: create: bad option creating new font} -setup {
clearnondefaultfonts
} -body {
- # name was not specified so skip = 2
+ # name was not specified so skip = 2
font create -xyz times
} -returnCodes error -result {bad option "-xyz": must be -family, -size, -weight, -slant, -underline, or -overstrike}
test font-6.7 {font command: create: already exists} -setup {
@@ -271,14 +283,14 @@ test font-6.7 {font command: create: already exists} -setup {
} -returnCodes error -result {named font "xyz" already exists}
test font-7.1 {font command: delete: arguments} -body {
- # (objc < 3)
+ # (objc < 3)
font delete
} -returnCodes error -result {wrong # args: should be "font delete fontname ?fontname ...?"}
test font-7.2 {font command: delete: loop test} -setup {
clearnondefaultfonts
set x {}
} -body {
- # for (i = 2; i < objc; i++)
+ # for (i = 2; i < objc; i++)
font create a -underline 1
font create b -underline 1
font create c -underline 1
@@ -309,7 +321,7 @@ test font-7.3 {font command: delete: loop test} -setup {
test font-7.4 {font command: delete: non-existent} -setup {
catch {font delete xyz}
} -body {
- # (namedHashPtr == NULL)
+ # (namedHashPtr == NULL)
font delete xyz
} -returnCodes error -result {named font "xyz" doesn't exist}
test font-7.5 {font command: delete: mark for later deletion} -setup {
@@ -376,11 +388,11 @@ test font-9.1 {font command: measure: arguments} -body {
expr {[font measure xyz -displayof] > 0}
} -returnCodes ok -result 1
test font-9.2 {font command: measure: arguments} -body {
- # (objc - skip != 4)
+ # (objc - skip != 4)
font measure
} -returnCodes error -result {wrong # args: should be "font measure font ?-displayof window? text"}
test font-9.3 {font command: measure: arguments} -body {
- # (objc - skip != 4)
+ # (objc - skip != 4)
font measure xyz abc def
} -returnCodes error -result {wrong # args: should be "font measure font ?-displayof window? text"}
test font-9.4 {font command: measure: arguments} -constraints noExceed -body {
@@ -410,7 +422,7 @@ test font-10.2 {font command: metrics: arguments} -body {
font metrics xyz -displayof
} -returnCodes error -result {value for "-displayof" missing}
test font-10.3 {font command: metrics: arguments} -body {
- # (objc < 3)
+ # (objc < 3)
font metrics
} -returnCodes error -result {wrong # args: should be "font metrics font ?-displayof window? ?option?"}
test font-10.4 {font command: metrics: arguments} -body {
@@ -573,7 +585,7 @@ test font-14.1 {Tk_GetFont procedure} -body {
test font-15.1 {Tk_AllocFontFromObj - converting internal reps} -constraints {
- testfont
+ testfont
} -setup {
destroy .b1 .b2
} -body {
@@ -586,7 +598,7 @@ test font-15.1 {Tk_AllocFontFromObj - converting internal reps} -constraints {
destroy .b1 .b2
} -result {{1 0}}
test font-15.2 {Tk_AllocFontFromObj - discard stale font} -constraints {
- testfont
+ testfont
} -setup {
destroy .b1 .b2
set result {}
@@ -601,7 +613,7 @@ test font-15.2 {Tk_AllocFontFromObj - discard stale font} -constraints {
destroy .b2
} -result {{} {{1 1}}}
test font-15.3 {Tk_AllocFontFromObj - reuse existing font} -constraints {
- testfont
+ testfont
} -setup {
destroy .b1 .b2
set result {}
@@ -632,9 +644,9 @@ test font-15.5 {Tk_AllocFontFromObj procedure: get named font} -setup {
pack [label .t.f]
update
} -body {
- # (namedHashPtr != NULL)
- font create xyz
- .t.f config -font xyz
+ # (namedHashPtr != NULL)
+ font create xyz
+ .t.f config -font xyz
} -cleanup {
destroy .t.f
font delete xyz
@@ -650,24 +662,24 @@ test font-15.6 {Tk_AllocFontFromObj procedure: not a named font} -setup {
destroy .t.f
} -result {-family} -result {}
test font-15.7 {Tk_AllocFontFromObj procedure: get native font} -constraints {
- unix
+ unix
} -setup {
destroy .t.f
pack [label .t.f]
update
} -body {
- # not (fontPtr == NULL)
+ # not (fontPtr == NULL)
.t.f config -font fixed
} -result {}
test font-15.8 {Tk_AllocFontFromObj procedure: get native font} -constraints {
- win
+ win
} -setup {
destroy .t.f
clearnondefaultfonts
pack [label .t.f]
update
} -body {
- # not (fontPtr == NULL)
+ # not (fontPtr == NULL)
.t.f config -font oemfixed
} -cleanup {
destroy .t.f
@@ -677,7 +689,7 @@ test font-15.9 {Tk_AllocFontFromObj procedure: get attribute font} -setup {
pack [label .t.f]
update
} -body {
- # (fontPtr == NULL)
+ # (fontPtr == NULL)
.t.f config -font {xxx yyy zzz}
} -cleanup {
destroy .t.f
@@ -712,7 +724,7 @@ test font-15.13 {Tk_AllocFontFromObj procedure: underline position} -setup {
update
} -cleanup {
destroy .t.f
-} -result {}
+} -result {}
test font-16.1 {Tk_NameOfFont procedure} -setup {
@@ -728,7 +740,7 @@ test font-16.1 {Tk_NameOfFont procedure} -setup {
test font-17.1 {Tk_FreeFontFromObj - reference counts} -constraints {
- testfont
+ testfont
} -setup {
destroy .b1 .b2 .b3
set result {}
@@ -773,7 +785,7 @@ test font-17.4 {Tk_FreeFont procedure: named font} -setup {
pack [label .t.f]
update
} -body {
- # (fontPtr->namedHashPtr != NULL)
+ # (fontPtr->namedHashPtr != NULL)
font create xyz
.t.f config -font xyz
destroy .t.f
@@ -785,7 +797,7 @@ test font-17.5 {Tk_FreeFont procedure: named font} -setup {
pack [label .t.f]
update
} -body {
- # not (fontPtr->refCount == 0)
+ # not (fontPtr->refCount == 0)
font create xyz -underline 1
.t.f config -font xyz
font delete xyz
@@ -799,7 +811,7 @@ test font-17.6 {Tk_FreeFont procedure: named font not deleted yet} -setup {
pack [label .t.f]
update
} -body {
- font create xyz
+ font create xyz
.t.f config -font xyz
button .t.b -font xyz
font delete xyz
@@ -858,7 +870,7 @@ test font-20.1 {Tk_GetFontMetrics procedure} -setup {
# Procedure used in 21.* tests
proc psfontname {name} {
destroy .t.c
- canvas .t.c -closeenough 0
+ canvas .t.c -closeenough 0
.t.c create text 0 0 -tags text -anchor nw -just left -font "Courier -12"
pack .t.c
update
@@ -884,22 +896,22 @@ test font-21.1 {Tk_PostscriptFontName procedure: native} -constraints {
}
} -result {AvantGarde-Book}
test font-21.2 {Tk_PostscriptFontName procedure: native} -constraints {
- win
+ win
} -body {
psfontname "arial 10"
} -result {Helvetica}
test font-21.3 {Tk_PostscriptFontName procedure: native} -constraints {
- win
+ win
} -body {
psfontname "{times new roman} 10"
} -result {Times-Roman}
test font-21.4 {Tk_PostscriptFontName procedure: native} -constraints {
- win
+ win
} -body {
psfontname "{courier new} 10"
} -result {Courier}
test font-21.5 {Tk_PostscriptFontName procedure: spaces} -constraints {
- unix
+ unix
} -body {
set x [font actual {{lucida bright} 10} -family]
if {[string match lucida*bright $x]} {
@@ -909,13 +921,13 @@ test font-21.5 {Tk_PostscriptFontName procedure: spaces} -constraints {
}
} -result {LucidaBright}
test font-21.6 {Tk_PostscriptFontName procedure: spaces} -constraints {
- unix
+ unix
} -body {
psfontname "{new century schoolbook} 10"
} -result {NewCenturySchlbk-Roman}
test font-21.7 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {avantgarde 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "avantgarde"} {
@@ -925,7 +937,7 @@ test font-21.7 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {AvantGarde-Book}
test font-21.8 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {avantgarde 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "avantgarde"} {
@@ -935,7 +947,7 @@ test font-21.8 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {AvantGarde-Demi}
test font-21.9 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {avantgarde 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "avantgarde"} {
@@ -945,7 +957,7 @@ test font-21.9 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {AvantGarde-BookOblique}
test font-21.10 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {avantgarde 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "avantgarde"} {
@@ -956,7 +968,7 @@ test font-21.10 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
} -result {AvantGarde-DemiOblique}
test font-21.11 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {bookman 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "bookman"} {
@@ -966,7 +978,7 @@ test font-21.11 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {Bookman-Light}
test font-21.12 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {bookman 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "bookman"} {
@@ -976,7 +988,7 @@ test font-21.12 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {Bookman-Demi}
test font-21.13 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {bookman 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "bookman"} {
@@ -986,7 +998,7 @@ test font-21.13 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {Bookman-LightItalic}
test font-21.14 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {bookman 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "bookman"} {
@@ -997,7 +1009,7 @@ test font-21.14 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
} -result {Bookman-DemiItalic}
test font-21.15 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {courier 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "courier"} {
@@ -1007,7 +1019,7 @@ test font-21.15 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {Courier}
test font-21.16 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {courier 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "courier"} {
@@ -1017,7 +1029,7 @@ test font-21.16 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {Courier-Bold}
test font-21.17 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {courier 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "courier"} {
@@ -1027,7 +1039,7 @@ test font-21.17 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {Courier-Oblique}
test font-21.18 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {courier 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "courier"} {
@@ -1038,7 +1050,7 @@ test font-21.18 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
} -result {Courier-BoldOblique}
test font-21.19 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {helvetica 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "helvetica"} {
@@ -1048,7 +1060,7 @@ test font-21.19 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {Helvetica}
test font-21.20 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {helvetica 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "helvetica"} {
@@ -1058,7 +1070,7 @@ test font-21.20 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {Helvetica-Bold}
test font-21.21 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {helvetica 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "helvetica"} {
@@ -1068,7 +1080,7 @@ test font-21.21 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {Helvetica-Oblique}
test font-21.22 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {helvetica 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "helvetica"} {
@@ -1079,7 +1091,7 @@ test font-21.22 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
} -result {Helvetica-BoldOblique}
test font-21.23 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {{new century schoolbook} 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "new century schoolbook"} {
@@ -1089,7 +1101,7 @@ test font-21.23 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {NewCenturySchlbk-Roman}
test font-21.24 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {{new century schoolbook} 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "new century schoolbook"} {
@@ -1099,7 +1111,7 @@ test font-21.24 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {NewCenturySchlbk-Bold}
test font-21.25 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {{new century schoolbook} 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "new century schoolbook"} {
@@ -1109,7 +1121,7 @@ test font-21.25 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {NewCenturySchlbk-Italic}
test font-21.26 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {{new century schoolbook} 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "new century schoolbook"} {
@@ -1120,7 +1132,7 @@ test font-21.26 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
} -result {NewCenturySchlbk-BoldItalic}
test font-21.27 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {palatino 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "palatino"} {
@@ -1130,7 +1142,7 @@ test font-21.27 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {Palatino-Roman}
test font-21.28 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {palatino 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "palatino"} {
@@ -1140,7 +1152,7 @@ test font-21.28 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {Palatino-Bold}
test font-21.29 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {palatino 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "palatino"} {
@@ -1150,7 +1162,7 @@ test font-21.29 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {Palatino-Italic}
test font-21.30 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {palatino 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "palatino"} {
@@ -1161,7 +1173,7 @@ test font-21.30 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
} -result {Palatino-BoldItalic}
test font-21.31 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {symbol 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "symbol"} {
@@ -1171,7 +1183,7 @@ test font-21.31 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {Symbol}
test font-21.32 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {symbol 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "symbol"} {
@@ -1181,7 +1193,7 @@ test font-21.32 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {Symbol}
test font-21.33 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {symbol 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "symbol"} {
@@ -1191,7 +1203,7 @@ test font-21.33 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {Symbol}
test font-21.34 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {symbol 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "symbol"} {
@@ -1202,7 +1214,7 @@ test font-21.34 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
} -result {Symbol}
test font-21.35 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {times 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "times"} {
@@ -1212,7 +1224,7 @@ test font-21.35 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {Times-Roman}
test font-21.36 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {times 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "times"} {
@@ -1222,7 +1234,7 @@ test font-21.36 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {Times-Bold}
test font-21.37 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {times 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "times"} {
@@ -1232,7 +1244,7 @@ test font-21.37 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {Times-Italic}
test font-21.38 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {times 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "times"} {
@@ -1243,7 +1255,7 @@ test font-21.38 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
} -result {Times-BoldItalic}
test font-21.39 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {zapfchancery 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "zapfchancery"} {
@@ -1253,7 +1265,7 @@ test font-21.39 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {ZapfChancery-MediumItalic}
test font-21.40 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {zapfchancery 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "zapfchancery"} {
@@ -1263,7 +1275,7 @@ test font-21.40 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {ZapfChancery-MediumItalic}
test font-21.41 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {zapfchancery 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "zapfchancery"} {
@@ -1273,7 +1285,7 @@ test font-21.41 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {ZapfChancery-MediumItalic}
test font-21.42 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {zapfchancery 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "zapfchancery"} {
@@ -1284,7 +1296,7 @@ test font-21.42 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
} -result {ZapfChancery-MediumItalic}
test font-21.43 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {zapfdingbats 12 roman normal}
if {[font actual {avantgarde 12 roman normal} -family] == "zapfdingbats"} {
@@ -1294,7 +1306,7 @@ test font-21.43 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {ZapfDingbats}
test font-21.44 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {zapfdingbats 12 roman bold}
if {[font actual {avantgarde 12 roman normal} -family] == "zapfdingbats"} {
@@ -1304,7 +1316,7 @@ test font-21.44 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {ZapfDingbats}
test font-21.45 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {zapfdingbats 12 italic normal}
if {[font actual {avantgarde 12 roman normal} -family] == "zapfdingbats"} {
@@ -1314,7 +1326,7 @@ test font-21.45 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
}
} -result {ZapfDingbats}
test font-21.46 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
- unix
+ unix
} -body {
set name {zapfdingbats 12 italic bold}
if {[font actual {avantgarde 12 roman normal} -family] == "zapfdingbats"} {
@@ -1431,7 +1443,7 @@ test font-21.66 {Tk_PostscriptFontName procedure: exhaustive} -constraints {
test font-22.1 {Tk_TextWidth procedure} -setup {
- destroy .t.l
+ destroy .t.l
} -body {
label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \
-text "0" -font "Courier -12"
@@ -1457,7 +1469,7 @@ test font-23.1 {Tk_UnderlineChars procedure} -setup {
# Data used in 24.* tests
-destroy .t.l
+destroy .t.l
label .t.l -padx 0 -pady 0 -bd 0 -highlightthickness 0 -justify left \
-text "0" -font "Courier -12"
pack .t.l
@@ -1526,11 +1538,11 @@ test font-24.10 {Tk_ComputeTextLayout: tab caused break} -body {
set x {}
.t.l config -text "000\t"
update
- lappend x [expr {[winfo reqwidth .t.l] eq [expr {$ax * 3}]}]
+ lappend x [expr {[winfo reqwidth .t.l] eq [expr {$ax * 8}]}]
lappend x [expr {[winfo reqheight .t.l] eq $ay}]
.t.l config -text "000\t00" -wrap [expr $ax * 6]
update
- lappend x [expr {[winfo reqwidth .t.l] eq [expr {$ax * 3}]}]
+ lappend x [expr {[winfo reqwidth .t.l] eq [expr {$ax * 8}]}]
lappend x [expr {[winfo reqheight .t.l] eq [expr {$ay * 2}]}]
return $x
} -cleanup {
@@ -1582,12 +1594,12 @@ test font-24.14 {Tk_ComputeTextLayout: text ended with \n} -body {
lappend x [expr {[winfo reqheight .t.l] eq [expr {$ay * 2}]}]
return $x
} -result {1 1 1 1}
-destroy .t.l
+destroy .t.l
test font-24.15 {Tk_ComputeTextLayout: justification} -setup {
set x {}
destroy .t.c
- canvas .t.c -closeenough 0
+ canvas .t.c -closeenough 0
.t.c create text 0 0 -tags text -anchor nw -just left -font "Courier -12"
pack .t.c
update
@@ -1616,11 +1628,11 @@ test font-25.1 {Tk_FreeTextLayout procedure} -setup {
} -cleanup {
destroy .t.f
} -result {}
-
+
# Canvas created for tests: 26.*
destroy .t.c
-canvas .t.c -closeenough 0
+canvas .t.c -closeenough 0
.t.c create text 0 0 -tags text -anchor nw -just left -font "Courier -12"
pack .t.c
update
@@ -1678,7 +1690,7 @@ destroy .t.f
# Canvas created for tests: 28.*
destroy .t.c
-canvas .t.c -closeenough 0
+canvas .t.c -closeenough 0
.t.c create text 0 0 -tags text -anchor nw -just left -font "Courier -12"
pack .t.c
update
@@ -1770,7 +1782,7 @@ destroy .t.f
# Canvas created for tests: 30.*
destroy .t.c
-canvas .t.c -closeenough 0
+canvas .t.c -closeenough 0
.t.c create text 0 0 -tags text -anchor nw -just left -font "Courier -12"
pack .t.c
update
@@ -1913,7 +1925,7 @@ destroy .t.c
# Canvas created for tests 31.*
destroy .t.c
-canvas .t.c -closeenough 0
+canvas .t.c -closeenough 0
.t.c create text 0 0 -tags text -anchor nw -just left -font "Courier -12"
pack .t.c
update
@@ -1949,7 +1961,7 @@ destroy .t.c
test font-32.1 {Tk_TextLayoutToPostscript: ensure buffer doesn't overflow} -setup {
destroy .t.c
- canvas .t.c -closeenough 0
+ canvas .t.c -closeenough 0
.t.c create text 0 0 -tags text -anchor nw -just left -font "Courier -12"
pack .t.c
update
@@ -1962,7 +1974,7 @@ test font-32.1 {Tk_TextLayoutToPostscript: ensure buffer doesn't overflow} -setu
.t.c insert text end "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
.t.c insert text end "end"
set x [.t.c postscript]
- set i [string first "(qwerty" $x]
+ set i [string first "(qwerty" $x]
string range $x $i [expr {$i + 278}]
} -cleanup {
destroy .t.c
@@ -2178,7 +2190,7 @@ test font-37.6 {GetAttributeInfo procedure: underline} -setup {
set x {}
} -body {
font create xyz -underline yes
- font config xyz -underline
+ font config xyz -underline
} -cleanup {
font delete xyz
} -result {1}
@@ -2187,7 +2199,7 @@ test font-37.7 {GetAttributeInfo procedure: overstrike} -setup {
set x {}
} -body {
font create xyz -overstrike no
- font config xyz -overstrike
+ font config xyz -overstrike
} -cleanup {
font delete xyz
} -result {0}
diff --git a/tests/frame.test b/tests/frame.test
index c7b0ed8..e1eb5e4 100644
--- a/tests/frame.test
+++ b/tests/frame.test
@@ -60,7 +60,7 @@ test frame-1.1 {frame configuration options} -setup {
.f configure -class
} -cleanup {
deleteWindows
-} -result {-class class Class Frame NewFrame}
+} -result {-class class Class Frame NewFrame}
test frame-1.2 {frame configuration options} -setup {
deleteWindows
} -body {
@@ -792,7 +792,7 @@ test frame-3.18 {TkCreateFrame procedure} -constraints {
} -setup {
deleteWindows
} -body {
- toplevel .t -visual {grayscale 8} -width 300 -height 200 -bg #434343
+ toplevel .t -visual {grayscale 8} -width 300 -height 200 -bg #434343
wm geometry .t +0+0
update
colorsFree .t 131 131 131
@@ -836,7 +836,7 @@ test frame-3.21 {TkCreateFrame procedure} -constraints {
deleteWindows
} -body {
set x ok
- toplevel .t -visual {grayscale 8} -width 300 -height 200 -bg #434343
+ toplevel .t -visual {grayscale 8} -width 300 -height 200 -bg #434343
wm geometry .t +0+0
update
colorsFree .t 131 131 131
@@ -1132,7 +1132,7 @@ test frame-12.2 {FrameWorldChanged procedure} -setup {
place .f -x 0 -y 0 -width 100 -height 100
pack [frame .f.f] -fill both -expand 1
- set result {}
+ set result {}
foreach lp {nw n ne en e es se s sw ws w wn} {
.f configure -labelanchor $lp
update
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/image.test b/tests/image.test
index 3134ee8..52701fb 100644
--- a/tests/image.test
+++ b/tests/image.test
@@ -33,14 +33,14 @@ test image-1.4 {Tk_ImageCmd procedure, "create" option} -body {
image c bad_type
} -returnCodes error -result {image type "bad_type" doesn't exist}
test image-1.5 {Tk_ImageCmd procedure, "create" option} -constraints {
- testImageType
+ testImageType
} -body {
list [image create test myimage] [imageNames]
} -cleanup {
imageCleanup
} -result {myimage myimage}
test image-1.6 {Tk_ImageCmd procedure, "create" option} -constraints {
- testImageType
+ testImageType
} -setup {
imageCleanup
} -body {
@@ -53,7 +53,7 @@ test image-1.6 {Tk_ImageCmd procedure, "create" option} -constraints {
} -result {1}
test image-1.7 {Tk_ImageCmd procedure, "create" option} -constraints {
- testImageType
+ testImageType
} -setup {
imageCleanup
} -body {
@@ -69,7 +69,7 @@ test image-1.7 {Tk_ImageCmd procedure, "create" option} -constraints {
imageCleanup
} -result {{myimage free} {myimage free} {myimage delete} {myimage get} {myimage get} {myimage display 0 0 30 15 30 30} {myimage display 0 0 30 15 30 130}}
test image-1.8 {Tk_ImageCmd procedure, "create" option} -constraints {
- testImageType
+ testImageType
} -setup {
.c delete all
imageCleanup
@@ -88,12 +88,12 @@ test image-1.8 {Tk_ImageCmd procedure, "create" option} -constraints {
imageCleanup
} -result {{myimage get} {myimage get} {myimage display 0 0 30 15 30 30} {myimage display 0 0 30 15 30 130}}
test image-1.9 {Tk_ImageCmd procedure, "create" option} -constraints {
- testImageType
+ testImageType
} -body {
image create test -badName foo
} -returnCodes error -result {bad option name "-badName"}
test image-1.10 {Tk_ImageCmd procedure, "create" option} -constraints {
- testImageType
+ testImageType
} -body {
catch {image create test -badName foo}
imageNames
@@ -142,7 +142,7 @@ test image-2.1 {Tk_ImageCmd procedure, "delete" option} -body {
image delete
} -result {}
test image-2.2 {Tk_ImageCmd procedure, "delete" option} -constraints {
- testImageType
+ testImageType
} -setup {
imageCleanup
set result {}
@@ -156,7 +156,7 @@ test image-2.2 {Tk_ImageCmd procedure, "delete" option} -constraints {
imageCleanup
} -result {{img2 myimage} {}}
test image-2.3 {Tk_ImageCmd procedure, "delete" option} -constraints {
- testImageType
+ testImageType
} -setup {
imageCleanup
} -body {
@@ -167,7 +167,7 @@ test image-2.3 {Tk_ImageCmd procedure, "delete" option} -constraints {
imageCleanup
} -returnCodes error -result {image "gorp" doesn't exist}
test image-2.4 {Tk_ImageCmd procedure, "delete" option} -constraints {
- testImageType
+ testImageType
} -setup {
imageCleanup
} -body {
@@ -190,7 +190,7 @@ test image-3.3 {Tk_ImageCmd procedure, "height" option} -body {
image height foo
} -returnCodes error -result {image "foo" doesn't exist}
test image-3.4 {Tk_ImageCmd procedure, "height" option} -constraints {
- testImageType
+ testImageType
} -setup {
imageCleanup
} -body {
@@ -207,7 +207,7 @@ test image-4.1 {Tk_ImageCmd procedure, "names" option} -body {
image names x
} -returnCodes error -result {wrong # args: should be "image names"}
test image-4.2 {Tk_ImageCmd procedure, "names" option} -constraints {
- testImageType
+ testImageType
} -setup {
catch {interp delete testinterp}
} -body {
@@ -249,7 +249,7 @@ test image-5.3 {Tk_ImageCmd procedure, "type" option} -body {
} -returnCodes error -result {image "foo" doesn't exist}
test image-5.4 {Tk_ImageCmd procedure, "type" option} -constraints {
- testImageType
+ testImageType
} -setup {
imageCleanup
} -body {
@@ -259,7 +259,7 @@ test image-5.4 {Tk_ImageCmd procedure, "type" option} -constraints {
imageCleanup
} -result {test}
test image-5.5 {Tk_ImageCmd procedure, "type" option} -constraints {
- testImageType
+ testImageType
} -setup {
imageCleanup
} -body {
@@ -271,7 +271,7 @@ test image-5.5 {Tk_ImageCmd procedure, "type" option} -constraints {
imageCleanup
} -returnCodes error -result {image "myimage" doesn't exist}
test image-5.6 {Tk_ImageCmd procedure, "type" option} -constraints {
- testOldImageType
+ testOldImageType
} -setup {
imageCleanup
} -body {
@@ -281,7 +281,7 @@ test image-5.6 {Tk_ImageCmd procedure, "type" option} -constraints {
imageCleanup
} -result {oldtest}
test image-5.7 {Tk_ImageCmd procedure, "type" option} -constraints {
- testOldImageType
+ testOldImageType
} -setup {
.c delete all
imageCleanup
@@ -300,7 +300,7 @@ test image-6.1 {Tk_ImageCmd procedure, "types" option} -body {
image types x
} -returnCodes error -result {wrong # args: should be "image types"}
test image-6.2 {Tk_ImageCmd procedure, "types" option} -constraints {
- testImageType
+ testImageType
} -body {
lsort [image types]
} -result {bitmap oldtest photo test}
@@ -316,7 +316,7 @@ test image-7.3 {Tk_ImageCmd procedure, "width" option} -body {
image width foo
} -returnCodes error -result {image "foo" doesn't exist}
test image-7.4 {Tk_ImageCmd procedure, "width" option} -constraints {
- testImageType
+ testImageType
} -setup {
imageCleanup
} -body {
@@ -330,7 +330,7 @@ test image-7.4 {Tk_ImageCmd procedure, "width" option} -constraints {
test image-8.1 {Tk_ImageCmd procedure, "inuse" option} -constraints {
- testImageType
+ testImageType
} -setup {
imageCleanup
set res {}
@@ -344,7 +344,7 @@ test image-8.1 {Tk_ImageCmd procedure, "inuse" option} -constraints {
imageCleanup
catch {destroy .b}
} -result [list 0 1]
-
+
test image-9.1 {Tk_ImageChanged procedure} -constraints testImageType -setup {
.c delete all
@@ -613,7 +613,7 @@ test image-15.1 {deleting image does not make widgets forget about it} -setup {
.c delete all
imageCleanup
} -result {10 10 20 20 foo {} {10 10 30 30} foo}
-
+
destroy .c
imageFinish
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test
index e85f512..e566176 100644
--- a/tests/imgPhoto.test
+++ b/tests/imgPhoto.test
@@ -134,7 +134,7 @@ test imgPhoto-2.2 {ImgPhotoCreate procedure} -setup {
# } {couldn't open "bogus.img": no such file or directory}
test imgPhoto-3.1 {ImgPhotoConfigureMaster procedure} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -body {
image create photo photo1 -file $teapotPhotoFile
photo1 configure -file $teapotPhotoFile
@@ -142,7 +142,7 @@ test imgPhoto-3.1 {ImgPhotoConfigureMaster procedure} -constraints {
image delete photo1
} -result {}
test imgPhoto-3.2 {ImgPhotoConfigureMaster procedure} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -body {
image create photo photo1 -file $teapotPhotoFile
list [catch {photo1 configure -file bogus} err] [string tolower $err] \
@@ -151,7 +151,7 @@ test imgPhoto-3.2 {ImgPhotoConfigureMaster procedure} -constraints {
image delete photo1
} -result {1 {couldn't open "bogus": no such file or directory} 256 256}
test imgPhoto-3.3 {ImgPhotoConfigureMaster procedure} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
destroy .c
pack [canvas .c]
@@ -235,7 +235,7 @@ test imgPhoto-4.9 {ImgPhotoCmd procedure: configure option} -setup {
image delete photo1
} -returnCodes error -result {value for "-gamma" missing}
test imgPhoto-4.10 {ImgPhotoCmd procedure: copy option} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
image create photo photo1
image create photo photo2 -width 25 -height 30
@@ -278,7 +278,7 @@ test imgPhoto-4.14 {ImgPhotoCmd procedure: copy option} -setup {
image delete photo1 photo2
} -result {the "-from" option requires one to four integer values}
test imgPhoto-4.15 {ImgPhotoCmd procedure: copy option} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
image create photo photo1
image create photo photo2 -file $teapotPhotoFile
@@ -290,7 +290,7 @@ test imgPhoto-4.15 {ImgPhotoCmd procedure: copy option} -constraints {
image delete photo1 photo2
} -result {60 50 {215 154 120}}
test imgPhoto-4.16 {ImgPhotoCmd procedure: copy option} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
image create photo photo1
image create photo photo2 -file $teapotPhotoFile
@@ -301,7 +301,7 @@ test imgPhoto-4.16 {ImgPhotoCmd procedure: copy option} -constraints {
image delete photo1 photo2
} -result {80 100 {19 92 192}}
test imgPhoto-4.17 {ImgPhotoCmd procedure: copy option} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
image create photo photo1
image create photo photo2 -file $teapotPhotoFile
@@ -312,7 +312,7 @@ test imgPhoto-4.17 {ImgPhotoCmd procedure: copy option} -constraints {
image delete photo1 photo2
} -result {100 100 {215 154 120}}
test imgPhoto-4.18 {ImgPhotoCmd procedure: copy option} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
image create photo photo1
image create photo photo2 -file $teapotPhotoFile
@@ -334,7 +334,7 @@ test imgPhoto-4.19 {ImgPhotoCmd procedure: copy option} -constraints {
image delete photo1 photo2
} -result {120 100 {169 99 47}}
test imgPhoto-4.20 {ImgPhotoCmd procedure: copy option} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
image create photo photo1
image create photo photo2 -file $teapotPhotoFile
@@ -345,7 +345,7 @@ test imgPhoto-4.20 {ImgPhotoCmd procedure: copy option} -constraints {
image delete photo1 photo2
} -result {90 80 {207 146 112}}
test imgPhoto-4.21 {ImgPhotoCmd procedure: copy option} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
image create photo photo1
image create photo photo2 -file $teapotPhotoFile
@@ -368,7 +368,7 @@ test imgPhoto-4.21 {ImgPhotoCmd procedure: copy option} -constraints {
image delete photo1 photo2
} -result {256 256 49 51 49 51 49 51 10 51 10 10}
test imgPhoto-4.22 {ImgPhotoCmd procedure: get option} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
image create photo photo1
} -body {
@@ -435,7 +435,7 @@ test imgPhoto-4.30 {ImgPhotoCmd procedure: read option} -setup {
image delete photo1
} -result {wrong # args: should be "photo1 read fileName ?-option value ...?"}
test imgPhoto-4.31 {ImgPhotoCmd procedure: read option} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
image create photo photo1
} -body {
@@ -451,7 +451,7 @@ test imgPhoto-4.32 {ImgPhotoCmd procedure: read option} -setup {
image delete photo1
} -result {1 {couldn't open "bogus": no such file or directory}}
test imgPhoto-4.33 {ImgPhotoCmd procedure: read option} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
image create photo photo1
} -body {
@@ -467,7 +467,7 @@ test imgPhoto-4.34 {ImgPhotoCmd procedure: read option} -setup {
image delete photo1
} -result [subst {couldn't recognize data in image file "$README"}]
test imgPhoto-4.35 {ImgPhotoCmd procedure: read option} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
image create photo photo1
} -body {
@@ -477,7 +477,7 @@ test imgPhoto-4.35 {ImgPhotoCmd procedure: read option} -constraints {
image delete photo1
} -result {256 256 {161 109 82}}
test imgPhoto-4.36 {ImgPhotoCmd procedure: read option} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
image create photo photo1
} -body {
@@ -799,7 +799,7 @@ test imgPhoto-4.73 {ImgPhotoCmd procedure: copy with -compositingrule} -setup {
} -result {0,2 1,1 2,0}
test imgPhoto-5.1 {ImgPhotoGet/Free procedures, shared instances} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
destroy .c
pack [canvas .c]
@@ -836,7 +836,7 @@ test imgPhoto-6.1 {ImgPhotoDisplay procedure, blank display} -setup {
} -result {}
test imgPhoto-7.1 {ImgPhotoFree procedure, resource freeing} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
destroy .c
pack [canvas .c]
@@ -851,7 +851,7 @@ test imgPhoto-7.1 {ImgPhotoFree procedure, resource freeing} -constraints {
destroy .c
} -result {}
test imgPhoto-7.2 {ImgPhotoFree procedures, unlinking} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
deleteWindows
imageCleanup
@@ -876,7 +876,7 @@ test imgPhoto-7.2 {ImgPhotoFree procedures, unlinking} -constraints {
image delete photo1
} -result {}
test imgPhoto-7.3 {ImgPhotoFree procedures, multiple visuals} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
deleteWindows
imageCleanup
@@ -901,7 +901,7 @@ test imgPhoto-8.1 {ImgPhotoDelete procedure} -constraints hasTeapotPhoto -body {
image delete photo2
} -result {}
test imgPhoto-8.2 {ImgPhotoDelete procedure} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
set x {}
} -body {
@@ -921,7 +921,7 @@ test imgPhoto-8.3 {ImgPhotoDelete procedure, name cleanup} -body {
} -result {image "photo2" doesn't exist or is not a photo image}
test imgPhoto-9.1 {ImgPhotoCmdDeletedProc procedure} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -body {
image create photo photo2 -file $teapotPhotoFile
rename photo2 {}
diff --git a/tests/listbox.test b/tests/listbox.test
index e05d574..92029de 100644
--- a/tests/listbox.test
+++ b/tests/listbox.test
@@ -57,6 +57,7 @@ proc mkPartial {{w .partial}} {
# like border width have predictable values.
option add *Listbox.borderWidth 2
+option add *Listbox.selectBorderWidth 1
option add *Listbox.highlightThickness 2
option add *Listbox.font {Helvetica -12 bold}
@@ -203,6 +204,21 @@ test listbox-1.31 {configuration options} -body {
} -cleanup {
.l configure -highlightthickness [lindex [.l configure -highlightthickness] 3]
} -result {0 0}
+test listbox-1.32.1 {configuration options} -setup {
+ set res {}
+} -body {
+ .l configure -justify left
+ set res [list [lindex [.l configure -justify] 4] [.l cget -justify]]
+ .l configure -justify center
+ lappend res [lindex [.l configure -justify] 4] [.l cget -justify]
+ .l configure -justify right
+ lappend res [lindex [.l configure -justify] 4] [.l cget -justify]
+} -cleanup {
+ .l configure -justify [lindex [.l configure -justify] 3]
+} -result {left left center center right right}
+test listbox-1.32.2 {configuration options} -body {
+ .l configure -justify bogus
+} -returnCodes error -result {bad justification "bogus": must be left, right, or center}
test listbox-1.33 {configuration options} -body {
.l configure -relief groove
list [lindex [.l configure -relief] 4] [.l cget -relief]
@@ -441,6 +457,58 @@ test listbox-3.18 {ListboxWidgetCmd procedure, "bbox" option, partial last line}
mkPartial
list [.partial.l bbox 3] [.partial.l bbox 4]
} -result {{5 56 24 14} {5 73 23 14}}
+test listbox-3.18a {ListboxWidgetCmd procedure, "bbox" option, justified} -constraints {
+ fonts
+} -setup {
+ destroy .top.l .top
+ unset -nocomplain res
+} -body {
+ toplevel .top
+ listbox .top.l -justify left
+ .top.l insert end Item1 LongerItem2 MuchLongerItem3
+ pack .top.l
+ update
+ lappend res [.top.l bbox 0] [.top.l bbox 1] [.top.l bbox 2]
+ .top.l configure -justify center
+ lappend res [.top.l bbox 0] [.top.l bbox 1] [.top.l bbox 2]
+ .top.l configure -justify right
+ lappend res [.top.l bbox 0] [.top.l bbox 1] [.top.l bbox 2]
+} -cleanup {
+ destroy .top.l .top
+ unset -nocomplain res
+} -result [list \
+ {5 5 34 14} {5 22 74 14} {5 39 106 14} \
+ {58 5 34 14} {38 22 74 14} {22 39 106 14} \
+ {111 5 34 14} {71 22 74 14} {39 39 106 14} \
+]
+test listbox-3.18b {ListboxWidgetCmd procedure, "bbox" option, justified, non-default borderwidth} -setup {
+ destroy .top.l .top
+ unset -nocomplain lres res
+} -body {
+ # This test checks whether all "x" values from bbox for different size
+ # items with different justification settings are all positive or zero
+ # This checks a bit the calculation of this x value with non-default
+ # borders widths of the listbox
+ toplevel .top
+ listbox .top.l -justify left -borderwidth 17 -highlightthickness 19 -selectborderwidth 22
+ .top.l insert end Item1 LongerItem2 MuchLongerItem3
+ .top.l selection set 1
+ pack .top.l
+ update
+ lappend lres [.top.l bbox 0] [.top.l bbox 1] [.top.l bbox 2]
+ .top.l configure -justify center
+ lappend lres [.top.l bbox 0] [.top.l bbox 1] [.top.l bbox 2]
+ .top.l configure -justify right
+ lappend lres [.top.l bbox 0] [.top.l bbox 1] [.top.l bbox 2]
+ set res 1
+ for {set i 0} {$i < [llength $lres]} {incr i 4} {
+ set res [expr {$res * [expr {[lindex $lres $i] >= 0}] }]
+ }
+ set res
+} -cleanup {
+ destroy .top.l .top
+ unset -nocomplain lres res
+} -result {1}
test listbox-3.19 {ListboxWidgetCmd procedure, "cget" option} -body {
.l cget
} -returnCodes error -result {wrong # args: should be ".l cget option"}
@@ -455,7 +523,7 @@ test listbox-3.22 {ListboxWidgetCmd procedure, "cget" option} -body {
} -result {0}
test listbox-3.23 {ListboxWidgetCmd procedure, "configure" option} -body {
llength [.l configure]
-} -result {27}
+} -result {28}
test listbox-3.24 {ListboxWidgetCmd procedure, "configure" option} -body {
.l configure -gorp
} -returnCodes error -result {unknown option "-gorp"}
@@ -1154,6 +1222,7 @@ test listbox-4.1 {ConfigureListbox procedure} -constraints {
pack .l
update
} -body {
+ update
set x [getsize .]
.l configure -setgrid 0
update
@@ -1335,7 +1404,7 @@ test listbox-4.12 {ConfigureListbox procedure, listvar -> different listvar} -se
} -body {
set x [list a b c d]
set y [list 1 2 3 4]
- listbox .l2
+ listbox .l2
.l2 configure -listvar x
.l2 configure -listvar y
.l2 insert end 5 6 7 8
@@ -1483,7 +1552,7 @@ test listbox-5.6 {ListboxComputeGeometry procedure} -setup {
} -cleanup {
destroy .l
} -result {}
-
+
# Listbox used in 6.*, 7.* tests
destroy .l
@@ -1844,7 +1913,7 @@ test listbox-9.1 {ListboxCmdDeletedProc procedure} -setup {
deleteWindows
} -result {{} {}}
test listbox-9.2 {ListboxCmdDeletedProc procedure, disabling -setgrid} -constraints {
- fonts
+ fonts
} -setup {
destroy .top
} -body {
@@ -2238,7 +2307,7 @@ test listbox-13.3 {ListboxScanTo procedure} -constraints {
.l scan dragto [expr 5+$width] [expr 10+$height]
update
lappend x [format {%.6g %.6g} {*}[.l xview]] [format {%.6g %.6g} {*}[.l yview]]
-} -result {{0.8 1} {0.75 1} {0.64 0.84} {0.25 0.5}}
+} -result {{0.8 1} {0.75 1} {0.6 0.8} {0.25 0.5}}
test listbox-14.1 {NearestListboxElement procedure, partial last line} -body {
@@ -2925,7 +2994,7 @@ test listbox-25.2 {listbox item configurations and widget based inserts} -setup
} -cleanup {
destroy .l
} -result {{} red}
-
+
# state issues
test listbox-26.1 {listbox disabled state disallows inserts} -setup {
@@ -3068,6 +3137,46 @@ test listbox-30.1 {Bug 3607326} -setup {
unset -nocomplain a
} -result * -match glob -returnCodes error
+test listbox-31.1 {<<ListboxSelect>> event} -setup {
+ destroy .l
+ unset -nocomplain res
+} -body {
+ pack [listbox .l -state normal]
+ update
+ bind .l <<ListboxSelect>> {lappend res [%W curselection]}
+ .l insert end a b c
+ focus -force .l
+ event generate .l <1> -x 5 -y 5 ; # <<ListboxSelect>> fires
+ .l configure -state disabled
+ focus -force .l
+ event generate .l <Control-Home> ; # <<ListboxSelect>> does NOT fire
+ .l configure -state normal
+ focus -force .l
+ event generate .l <Control-End> ; # <<ListboxSelect>> fires
+ .l selection clear 0 end ; # <<ListboxSelect>> does NOT fire
+ .l selection set 1 1 ; # <<ListboxSelect>> does NOT fire
+ lappend res [.l curselection]
+} -cleanup {
+ destroy .l
+ unset -nocomplain res
+} -result {0 2 1}
+
+test listbox-31.2 {<<ListboxSelect>> event on lost selection} -setup {
+ destroy .l
+} -body {
+ pack [listbox .l -exportselection true]
+ update
+ bind .l <<ListboxSelect>> {lappend res [list [selection own] [%W curselection]]}
+ .l insert end a b c
+ focus -force .l
+ event generate .l <1> -x 5 -y 5 ; # <<ListboxSelect>> fires
+ selection clear ; # <<ListboxSelect>> fires again
+ update
+ set res
+} -cleanup {
+ destroy .l
+} -result {{.l 0} {{} {}}}
+
resetGridInfo
deleteWindows
option clear
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 595a21b..479978e 100644
--- a/tests/menu.test
+++ b/tests/menu.test
@@ -276,7 +276,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
@@ -771,34 +771,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 +1052,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 +1225,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 +1237,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
@@ -1414,7 +1414,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 {}
@@ -1548,10 +1548,15 @@ test menu-3.41 {MenuWidgetCmd procedure, "index" option} -setup {
} -body {
menu .m1
.m1 add command -label "test"
- .m1 index "test"
+ .m1 add command -label "3"
+ .m1 add command -label "another label"
+ .m1 add command -label "end"
+ .m1 add command -label "3a"
+ .m1 add command -label "final entry"
+ list [.m1 index "test"] [.m1 index "3"] [.m1 index "3a"] [.m1 index "end"]
} -cleanup {
destroy .m1
-} -result {1}
+} -result {1 3 5 6}
test menu-3.42 {MenuWidgetCmd procedure, "insert" option} -setup {
destroy .m1
} -body {
@@ -1622,7 +1627,7 @@ 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 post 40 40
@@ -1649,7 +1654,7 @@ 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"
menu .m2
@@ -1751,10 +1756,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 post 40 40
.m1 unpost
} -cleanup {
destroy .m1
@@ -1869,7 +1874,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
@@ -1937,7 +1942,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 {}}
@@ -2094,7 +2099,7 @@ test menu-6.4 {TkDestroyMenu - reentrancy - clones} -setup {
destroy .m1
} -cleanup {
deleteWindows
-} -returnCodes ok
+} -returnCodes ok
test menu-6.5 {TkDestroyMenu} -setup {
destroy .m1 .m2
} -body {
@@ -2321,7 +2326,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 {
@@ -2353,7 +2358,7 @@ 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
} -result {{} beep}
@@ -2486,7 +2491,7 @@ test menu-11.3 {ConfigureMenuEntry} -setup {
test menu-11.4 {ConfigureMenuEntry} -setup {
deleteWindows
} -body {
- menu .m1
+ menu .m1
.m1 add command
list [.m1 entryconfigure 1 -accel "S"] [.m1 entrycget 1 -accel]
} -cleanup {
@@ -2560,13 +2565,13 @@ test menu-11.12 {ConfigureMenuEntry} -setup {
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 {
@@ -2576,11 +2581,11 @@ test menu-11.13 {ConfigureMenuEntry} -setup {
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 {
@@ -3179,7 +3184,7 @@ test menu-18.4 {TkActivateMenuEntry} -setup {
test menu-19.1 {TkPostCommand} -constraints nonUnixUserInteraction -setup {
deleteWindows
-} -body {
+} -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]
@@ -3188,7 +3193,7 @@ test menu-19.1 {TkPostCommand} -constraints nonUnixUserInteraction -setup {
} -result {menu-19.1 {} menu-19.1}
test menu-19.2 {TkPostCommand} -constraints nonUnixUserInteraction -setup {
deleteWindows
-} -body {
+} -body {
menu .m1
.m1 add command -label "menu-19.2 - hit Escape"
list [.m1 post 40 40] [.m1 unpost]
@@ -3709,7 +3714,7 @@ test menu-32.1 {DeleteMenuCloneEntries} -setup {
test menu-32.2 {DeleteMenuCloneEntries} -setup {
deleteWindows
} -body {
-
+
menu .m1
.m1 add command -label one
.m1 add command -label two
@@ -3862,6 +3867,47 @@ test menu-35.1 {menu -underline string overruns Bug 1599877} -setup {
deleteWindows
} -result {}
+test menu-37.1 {menubar menues cannot be posted - bug 2160206} -setup {
+ catch {destroy .m}
+} -body {
+ # On Linux the following used to panic
+ # It now returns an error (on all platforms)
+ menu .m -type menubar
+ list [catch ".m post 1 1" msg] $msg
+} -cleanup {
+ destroy .m
+} -result {1 {a menubar menu cannot be posted}}
+
+test menu-38.1 {Can't dismiss ttk::menubutton menu until mouse has hovered over it - bug fa32290898} -setup {
+} -constraints {macOrUnix} -body {
+ toplevel .top
+ ttk::menubutton .top.mb -text "Some menu";
+ menu .top.mb.m;
+ .top.mb.m add command -label "Item 1";
+ .top.mb.m add command -label "Item 2";
+ .top.mb configure -menu .top.mb.m;
+ pack .top.mb
+ update
+ # simulate mouse click on the menubutton, which posts its menu
+ event generate .top.mb <ButtonPress-1> -warp 1
+ update
+ after 50
+ event generate .top.mb <ButtonRelease-1>
+ update
+ # simulate mouse click on the menu again, i.e. without
+ # entering/leaving the posted menu
+ event generate .top.mb <ButtonPress-1>
+ update
+ after 50
+ event generate .top.mb <ButtonRelease-1>
+ update
+ # the menu shall have been unposted by the second click
+ winfo ismapped .top.mb.m
+} -cleanup {
+ destroy .top.mb.m .top.m .top
+} -result {0}
+
+
# cleanup
imageFinish
deleteWindows
diff --git a/tests/menuDraw.test b/tests/menuDraw.test
index bb632c6..cfd88d5 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 6efdb0f..d7ff2e3 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}
@@ -544,7 +544,7 @@ test menubutton-6.1 {MenuButtonCmdDeletedProc procedure} -setup {
test menubutton-7.1 {ComputeMenuButtonGeometry procedure} -constraints {
- testImageType
+ testImageType
} -setup {
deleteWindows
image create test image1
@@ -557,7 +557,7 @@ test menubutton-7.1 {ComputeMenuButtonGeometry procedure} -constraints {
imageCleanup
} -result {38 23}
test menubutton-7.2 {ComputeMenuButtonGeometry procedure} -constraints {
- testImageType
+ testImageType
} -setup {
deleteWindows
image create test image1
@@ -570,7 +570,7 @@ test menubutton-7.2 {ComputeMenuButtonGeometry procedure} -constraints {
imageCleanup
} -result {36 21}
test menubutton-7.3 {ComputeMenuButtonGeometry procedure} -constraints {
- testImageType
+ testImageType
} -setup {
deleteWindows
image create test image1
@@ -583,7 +583,7 @@ test menubutton-7.3 {ComputeMenuButtonGeometry procedure} -constraints {
imageCleanup
} -result {34 19}
test menubutton-7.4 {ComputeMenuButtonGeometry procedure} -constraints {
- testImageType
+ testImageType
} -setup {
deleteWindows
image create test image1
@@ -597,7 +597,7 @@ test menubutton-7.4 {ComputeMenuButtonGeometry procedure} -constraints {
imageCleanup
} -result {48 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 dcffc72..e25bbee 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 643ae2c..4790b88 100644
--- a/tests/msgbox.test
+++ b/tests/msgbox.test
@@ -123,295 +123,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" \
@@ -421,7 +421,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"
@@ -432,7 +432,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
new file mode 100755
index 0000000..f0b7e11
--- /dev/null
+++ b/tests/option.file3
@@ -0,0 +1,18 @@
+! This file is a sample option (resource) database used to test
+! Tk's option-handling capabilities.
+
+! Comment line \
+ with a backslash-newline sequence embedded in it.
+
+*x1: blue
+ tktest.x2 : green
+*\
+x3 \
+ : pur\
+ple
+*x 4: brówn
+# More comments, this time delimited by hash-marks.
+ # Comment-line with space.
+*x6:
+*x9: \ \ \\\101\n
+# comment line as last line of file.
diff --git a/tests/option.test b/tests/option.test
index 23866d7..1d6094b 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
@@ -399,18 +399,20 @@ test option-15.10 {database files} -body {
set option2 [file join [testsDirectory] option.file2]
option read $option2
} -returnCodes error -result {missing colon on line 2}
-
+set option3 [file join [testsDirectory] option.file3]
+option read $option3
+test option-15.11 {database files} {option get . {x 4} color} br\xf3wn
test option-16.1 {ReadOptionFile} -body {
- set option3 [makeFile {} option.file3]
- set file [open $option3 w]
+ set option4 [makeFile {} option.file3]
+ set file [open $option4 w]
fconfigure $file -translation crlf
puts $file "*x7: true\n*x8: false"
close $file
- option read $option3 userDefault
+ option read $option4 userDefault
list [option get . x7 color] [option get . x8 color]
} -cleanup {
- removeFile $option3
+ removeFile $option4
} -result {true false}
deleteWindows
diff --git a/tests/pack.test b/tests/pack.test
index eac1562..cf62f7b 100644
--- a/tests/pack.test
+++ b/tests/pack.test
@@ -1541,7 +1541,7 @@ test pack-18.1 {unmap slaves when master unmapped} -constraints {
wm geometry .pack +100+100
- # On the PC, when the width/height is configured while the window is
+ # On the PC, when the width/height is configured while the window is
# unmapped, the changes don't take effect until the window is remapped.
# Who knows why?
diff --git a/tests/panedwindow.test b/tests/panedwindow.test
index f2e01e8..ea407a0 100644
--- a/tests/panedwindow.test
+++ b/tests/panedwindow.test
@@ -98,168 +98,195 @@ test panedwindow-1.17 {configuration options: -orient (good)} -body {
test panedwindow-1.18 {configuration options: -orient (bad)} -body {
.p configure -orient badValue
} -returnCodes error -result {bad orient "badValue": must be horizontal or vertical}
-test panedwindow-1.19 {configuration options: -relief (good)} -body {
+test panedwindow-1.19 {configuration options: -proxybackground (good)} -body {
+ .p configure -proxybackground "#f0a0a0"
+ list [lindex [.p configure -proxybackground] 4] [.p cget -proxybackground]
+} -cleanup {
+ .p configure -proxybackground [lindex [.p configure -proxybackground] 3]
+} -result {{#f0a0a0} #f0a0a0}
+test panedwindow-1.20 {configuration options: -proxybackground (bad)} -body {
+ .p configure -proxybackground badValue
+} -returnCodes error -result {unknown color name "badValue"}
+test panedwindow-1.21 {configuration options: -proxyborderwidth (good)} -body {
+ .p configure -proxyborderwidth 1.3
+ list [lindex [.p configure -proxyborderwidth] 4] [.p cget -proxyborderwidth]
+} -cleanup {
+ .p configure -proxyborderwidth [lindex [.p configure -proxyborderwidth] 3]
+} -result {1.3 1.3}
+test panedwindow-1.22 {configuration options: -proxyborderwidth (bad)} -body {
+ .p configure -proxyborderwidth badValue
+} -returnCodes error -result {bad screen distance "badValue"}
+test panedwindow-1.23 {configuration options: -proxyrelief (good)} -body {
+ .p configure -proxyrelief groove
+ list [lindex [.p configure -proxyrelief] 4] [.p cget -proxyrelief]
+} -cleanup {
+ .p configure -proxyrelief [lindex [.p configure -proxyrelief] 3]
+} -result {groove groove}
+test panedwindow-1.24 {configuration options: -proxyrelief (bad)} -body {
+ .p configure -proxyrelief 1.5
+} -returnCodes error -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}
+test panedwindow-1.25 {configuration options: -relief (good)} -body {
.p configure -relief groove
list [lindex [.p configure -relief] 4] [.p cget -relief]
} -cleanup {
.p configure -relief [lindex [.p configure -relief] 3]
} -result {groove groove}
-test panedwindow-1.20 {configuration options: -relief (bad)} -body {
+test panedwindow-1.26 {configuration options: -relief (bad)} -body {
.p configure -relief 1.5
} -returnCodes error -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}
-test panedwindow-1.21 {configuration options: -sashcursor (good)} -body {
+test panedwindow-1.27 {configuration options: -sashcursor (good)} -body {
.p configure -sashcursor arrow
list [lindex [.p configure -sashcursor] 4] [.p cget -sashcursor]
} -cleanup {
.p configure -sashcursor [lindex [.p configure -sashcursor] 3]
} -result {arrow arrow}
-test panedwindow-1.22 {configuration options: -sashcursor (bad)} -body {
+test panedwindow-1.28 {configuration options: -sashcursor (bad)} -body {
.p configure -sashcursor badValue
} -returnCodes error -result {bad cursor spec "badValue"}
-test panedwindow-1.23 {configuration options: -sashpad (good)} -body {
+test panedwindow-1.29 {configuration options: -sashpad (good)} -body {
.p configure -sashpad 1.3
list [lindex [.p configure -sashpad] 4] [.p cget -sashpad]
} -cleanup {
.p configure -sashpad [lindex [.p configure -sashpad] 3]
} -result {1 1}
-test panedwindow-1.24 {configuration options: -sashpad (bad)} -body {
+test panedwindow-1.30 {configuration options: -sashpad (bad)} -body {
.p configure -sashpad badValue
} -returnCodes error -result {bad screen distance "badValue"}
-test panedwindow-1.25 {configuration options: -sashrelief (good)} -body {
+test panedwindow-1.31 {configuration options: -sashrelief (good)} -body {
.p configure -sashrelief groove
list [lindex [.p configure -sashrelief] 4] [.p cget -sashrelief]
} -cleanup {
.p configure -sashrelief [lindex [.p configure -sashrelief] 3]
} -result {groove groove}
-test panedwindow-1.26 {configuration options: -sashrelief (bad)} -body {
+test panedwindow-1.32 {configuration options: -sashrelief (bad)} -body {
.p configure -sashrelief 1.5
} -returnCodes error -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}
-test panedwindow-1.27 {configuration options: -sashwidth (good)} -body {
+test panedwindow-1.33 {configuration options: -sashwidth (good)} -body {
.p configure -sashwidth 10
list [lindex [.p configure -sashwidth] 4] [.p cget -sashwidth]
} -cleanup {
.p configure -sashwidth [lindex [.p configure -sashwidth] 3]
} -result {10 10}
-test panedwindow-1.28 {configuration options: -sashwidth (bad)} -body {
+test panedwindow-1.34 {configuration options: -sashwidth (bad)} -body {
.p configure -sashwidth badValue
} -returnCodes error -result {bad screen distance "badValue"}
-test panedwindow-1.29 {configuration options: -showhandle (good)} -body {
+test panedwindow-1.35 {configuration options: -showhandle (good)} -body {
.p configure -showhandle true
list [lindex [.p configure -showhandle] 4] [.p cget -showhandle]
} -cleanup {
.p configure -showhandle [lindex [.p configure -showhandle] 3]
} -result {1 1}
-test panedwindow-1.30 {configuration options: -showhandle (bad)} -body {
+test panedwindow-1.36 {configuration options: -showhandle (bad)} -body {
.p configure -showhandle foo
} -returnCodes error -result {expected boolean value but got "foo"}
-test panedwindow-1.31 {configuration options: -width (good)} -body {
+test panedwindow-1.37 {configuration options: -width (good)} -body {
.p configure -width 402
list [lindex [.p configure -width] 4] [.p cget -width]
} -cleanup {
.p configure -width [lindex [.p configure -width] 3]
} -result {402 402}
-test panedwindow-1.32 {configuration options: -width (bad)} -body {
+test panedwindow-1.38 {configuration options: -width (bad)} -body {
.p configure -width badValue
} -returnCodes error -result {bad screen distance "badValue"}
-test panedwindow-1.33 {configuration options: -after (good)} -body {
+test panedwindow-1.39 {configuration options: -after (good)} -body {
.p paneconfigure .b -after .c
list [lindex [.p paneconfigure .b -after] 4] \
[.p panecget .b -after]
} -cleanup {
.p paneconfig .b -after [lindex [.p paneconfig .b -after] 3]
} -result {.c .c}
-test panedwindow-1.34 {configuration options: -after (bad)} -body {
+test panedwindow-1.40 {configuration options: -after (bad)} -body {
.p paneconfigure .b -after badValue
} -returnCodes error -result {bad window path name "badValue"}
-test panedwindow-1.35 {configuration options: -before (good)} -body {
+test panedwindow-1.41 {configuration options: -before (good)} -body {
.p paneconfigure .b -before .c
list [lindex [.p paneconfigure .b -before] 4] \
[.p panecget .b -before]
} -cleanup {
.p paneconfig .b -before [lindex [.p paneconfig .b -before] 3]
} -result {.c .c}
-test panedwindow-1.36 {configuration options: -before (bad)} -body {
+test panedwindow-1.42 {configuration options: -before (bad)} -body {
.p paneconfigure .b -before badValue
} -returnCodes error -result {bad window path name "badValue"}
-test panedwindow-1.37 {configuration options: -height (good)} -body {
+test panedwindow-1.43 {configuration options: -height (good)} -body {
.p paneconfigure .b -height 10
list [lindex [.p paneconfigure .b -height] 4] \
[.p panecget .b -height]
} -cleanup {
.p paneconfig .b -height [lindex [.p paneconfig .b -height] 3]
} -result {10 10}
-test panedwindow-1.38 {configuration options: -height (bad)} -body {
+test panedwindow-1.44 {configuration options: -height (bad)} -body {
.p paneconfigure .b -height badValue
} -returnCodes error -result {bad screen distance "badValue"}
-test panedwindow-1.39 {configuration options: -hide (good)} -body {
+test panedwindow-1.45 {configuration options: -hide (good)} -body {
.p paneconfigure .b -hide false
list [lindex [.p paneconfigure .b -hide] 4] \
[.p panecget .b -hide]
} -cleanup {
.p paneconfig .b -hide [lindex [.p paneconfig .b -hide] 3]
} -result {0 0}
-test panedwindow-1.40 {configuration options: -hide (bad)} -body {
+test panedwindow-1.46 {configuration options: -hide (bad)} -body {
.p paneconfigure .b -hide foo
} -returnCodes error -result {expected boolean value but got "foo"}
-test panedwindow-1.41 {configuration options: -minsize (good)} -body {
+test panedwindow-1.47 {configuration options: -minsize (good)} -body {
.p paneconfigure .b -minsize 10
list [lindex [.p paneconfigure .b -minsize] 4] \
[.p panecget .b -minsize]
} -cleanup {
.p paneconfig .b -minsize [lindex [.p paneconfig .b -minsize] 3]
} -result {10 10}
-test panedwindow-1.42 {configuration options: -minsize (bad)} -body {
+test panedwindow-1.48 {configuration options: -minsize (bad)} -body {
.p paneconfigure .b -minsize badValue
} -returnCodes error -result {bad screen distance "badValue"}
-test panedwindow-1.43 {configuration options: -padx (good)} -body {
+test panedwindow-1.49 {configuration options: -padx (good)} -body {
.p paneconfigure .b -padx 1.3
list [lindex [.p paneconfigure .b -padx] 4] \
[.p panecget .b -padx]
} -cleanup {
.p paneconfig .b -padx [lindex [.p paneconfig .b -padx] 3]
} -result {1 1}
-test panedwindow-1.44 {configuration options: -padx (bad)} -body {
+test panedwindow-1.50 {configuration options: -padx (bad)} -body {
.p paneconfigure .b -padx badValue
} -returnCodes error -result {bad screen distance "badValue"}
-test panedwindow-1.45 {configuration options: -pady (good)} -body {
+test panedwindow-1.51 {configuration options: -pady (good)} -body {
.p paneconfigure .b -pady 1.3
list [lindex [.p paneconfigure .b -pady] 4] \
[.p panecget .b -pady]
} -cleanup {
.p paneconfig .b -pady [lindex [.p paneconfig .b -pady] 3]
} -result {1 1}
-test panedwindow-1.46 {configuration options: -pady (bad)} -body {
+test panedwindow-1.52 {configuration options: -pady (bad)} -body {
.p paneconfigure .b -pady badValue
} -returnCodes error -result {bad screen distance "badValue"}
-test panedwindow-1.47 {configuration options: -sticky (good)} -body {
+test panedwindow-1.53 {configuration options: -sticky (good)} -body {
.p paneconfigure .b -sticky nsew
list [lindex [.p paneconfigure .b -sticky] 4] \
[.p panecget .b -sticky]
} -cleanup {
.p paneconfig .b -sticky [lindex [.p paneconfig .b -sticky] 3]
} -result {nesw nesw}
-test panedwindow-1.48 {configuration options: -sticky (bad)} -body {
+test panedwindow-1.54 {configuration options: -sticky (bad)} -body {
.p paneconfigure .b -sticky abcd
} -returnCodes error -result {bad stickyness value "abcd": must be a string containing zero or more of n, e, s, and w}
-test panedwindow-1.49 {configuration options: -stretch (good)} -body {
+test panedwindow-1.55 {configuration options: -stretch (good)} -body {
.p paneconfigure .b -stretch alw
list [lindex [.p paneconfigure .b -stretch] 4] \
[.p panecget .b -stretch]
} -cleanup {
.p paneconfig .b -stretch [lindex [.p paneconfig .b -stretch] 3]
} -result {always always}
-test panedwindow-1.50 {configuration options: -stretch (bad)} -body {
+test panedwindow-1.56 {configuration options: -stretch (bad)} -body {
.p paneconfigure .b -stretch foo
} -returnCodes error -result {bad stretch "foo": must be always, first, last, middle, or never}
-test panedwindow-1.51 {configuration options: -width (good)} -body {
+test panedwindow-1.57 {configuration options: -width (good)} -body {
.p paneconfigure .b -width 10
list [lindex [.p paneconfigure .b -width] 4] \
[.p panecget .b -width]
} -cleanup {
.p paneconfig .b -width [lindex [.p paneconfig .b -width] 3]
} -result {10 10}
-test panedwindow-1.52 {configuration options: -width (bad)} -body {
+test panedwindow-1.58 {configuration options: -width (bad)} -body {
.p paneconfigure .b -width badValue
} -returnCodes error -result {bad screen distance "badValue"}
deleteWindows
@@ -471,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"]
@@ -484,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"]
@@ -595,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
@@ -898,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
@@ -1122,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
@@ -1491,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]
@@ -1511,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
@@ -1525,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
@@ -1545,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
@@ -1567,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
@@ -1583,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 {
@@ -1598,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
@@ -1614,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
@@ -1631,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 {
@@ -1648,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 {
@@ -1666,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]
@@ -1686,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
@@ -1702,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
@@ -1718,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 {
@@ -1733,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
@@ -1749,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
@@ -1766,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 {
@@ -1783,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 {
@@ -1804,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]
@@ -1825,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
@@ -1840,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
@@ -1861,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
@@ -1884,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
@@ -1901,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
@@ -1918,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
@@ -1935,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
@@ -1953,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 {
@@ -1971,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 {
@@ -1990,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]
@@ -2011,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
@@ -2028,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
@@ -2045,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 {
@@ -2061,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
@@ -2078,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
@@ -2096,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 {
@@ -2114,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 {
@@ -4301,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
@@ -4928,6 +4955,38 @@ test panedwindow-23.30 {ConfigurePanes, -hide works} -setup {
} -cleanup {
deleteWindows
} -result {1 1 1 0 39 40 40 1 130 1 0 1 1 40 40 40 42 130}
+test panedwindow-23.30a {ConfigurePanes, hidden panes are unmapped} -setup {
+ deleteWindows
+} -body {
+ panedwindow .p1 -sashrelief raised
+ panedwindow .p2 -sashrelief raised
+ label .l1 -text Label1
+ label .l2 -text Label2
+ label .l3 -text Label3
+ .p2 add .l2 -sticky nsew
+ .p2 add .l3 -sticky nsew
+ .p1 add .p2 -sticky nsew
+ .p1 add .l1 -sticky nsew
+ pack .p1 -side top -expand 1 -fill both
+ update
+ set result [list]
+ lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \
+ [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]]
+ .p2 paneconfigure .l1 -hide 1
+ update
+ lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \
+ [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]]
+ .p1 paneconfigure .p2 -hide 1
+ update
+ lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \
+ [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]]
+ .p1 paneconfigure .p2 -hide 0
+ update
+ lappend result [list [winfo ismapped .p1] [winfo ismapped .p2] \
+ [winfo ismapped .l1] [winfo ismapped .l2] [winfo ismapped .l3]]
+} -cleanup {
+ deleteWindows
+} -result {{1 1 1 1 1} {1 1 0 1 1} {1 0 0 0 0} {1 1 0 1 1}}
test panedwindow-23.31 {ConfigurePanes, -hide works, last pane stretches} -setup {
deleteWindows
} -body {
@@ -5087,6 +5146,27 @@ test panedwindow-25.1 {DestroyPanedWindow} -setup {
}
set result {}
} -result {}
+test panedwindow-25.2 {UnmapNotify and MapNotify events are propagated to slaves} -setup {
+ deleteWindows
+} -body {
+ panedwindow .pw
+ .pw add [button .pw.b]
+ pack .pw
+ update
+ set result [winfo ismapped .pw.b]
+ pack forget .pw
+ update
+ lappend result [winfo ismapped .pw.b]
+ lappend result [winfo ismapped .pw]
+ pack .pw
+ update
+ lappend result [winfo ismapped .pw]
+ lappend result [winfo ismapped .pw.b]
+ destroy .pw .pw.b
+ set result
+} -cleanup {
+ deleteWindows
+} -result {1 0 0 1 1}
test panedwindow-26.1 {PanedWindowIdentifyCoords} -setup {
diff --git a/tests/place.test b/tests/place.test
index ddfa64c..6a00192 100644
--- a/tests/place.test
+++ b/tests/place.test
@@ -396,7 +396,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/raise.test b/tests/raise.test
index 461ccbf..f8674fc 100644
--- a/tests/raise.test
+++ b/tests/raise.test
@@ -131,7 +131,7 @@ test raise-3.1 {raise internal windows after creation} -body {
raise_getOrder
} -result {a d d a c e e e}
test raise-3.2 {raise internal windows after creation} -constraints {
- testmakeexist
+ testmakeexist
} -body {
raise_setup
testmakeexist .raise.a .raise.b
@@ -140,7 +140,7 @@ test raise-3.2 {raise internal windows after creation} -constraints {
raise_getOrder
} -result {d d d a c e e e}
test raise-3.3 {raise internal windows after creation} -constraints {
- testmakeexist
+ testmakeexist
} -body {
raise_setup
testmakeexist .raise.a .raise.d
@@ -149,7 +149,7 @@ test raise-3.3 {raise internal windows after creation} -constraints {
raise_getOrder
} -result {d d d a c e e e}
test raise-3.4 {raise internal windows after creation} -constraints {
- testmakeexist
+ testmakeexist
} -body {
raise_setup
testmakeexist .raise.a .raise.c .raise.d
diff --git a/tests/safe.test b/tests/safe.test
index e7ed6c7..9a3bcfc 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -15,7 +15,7 @@ namespace import -force tcltest::test
# Can't find a usable tk.tcl in the following directories:
# {$p(:26:)}
-#
+#
# $p(:26:)/tk.tcl: script error
# script error
# invoked from within
@@ -23,8 +23,8 @@ namespace import -force tcltest::test
# ("uplevel" body line 1)
# invoked from within
# "uplevel #0 [list source $file]"
-#
-#
+#
+#
# This probably means that tk wasn't installed properly.
## it indicates that something went wrong sourcing tk.tcl.
@@ -187,7 +187,7 @@ test safe-5.1 {loading Tk in safe interps without master's clearance} -body {
interp eval $i {load {} Tk}
} -cleanup {
safe::interpDelete $i
-} -returnCodes error -result {not allowed to start Tk by master's safe::TkInit}
+} -returnCodes error -result {not allowed}
test safe-5.2 {multi-level Tk loading with clearance} -setup {
set safeParent [safe::interpCreate]
} -body {
diff --git a/tests/scale.test b/tests/scale.test
index a8d08a8..96e3cec 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}
@@ -1396,6 +1396,114 @@ test scale-19 {Bug [3529885fff] - Click in through goes in wrong direction} \
} \
-result {1.0 1.0 1.0 1.0}
+test scale-20.1 {Bug [2262543fff] - Scale widget unexpectedly fires command callback, case 1} -setup {
+ catch {destroy .s}
+ set res {}
+ set commandedVar -1
+} -body {
+ scale .s -from 1 -to 50 -command {set commandedVar}
+ pack .s
+ update ; # -command callback shall NOT fire
+ set res [list [.s get] $commandedVar]
+} -cleanup {
+ destroy .s
+} -result {1 -1}
+test scale-20.2 {Bug [2262543fff] - Scale widget unexpectedly fires command callback, case 2} -setup {
+ catch {destroy .s}
+ set res {}
+ set commandedVar -1
+ set scaleVar 7
+} -body {
+ scale .s -from 1 -to 50 -variable scaleVar -command {set commandedVar}
+ pack .s
+ update ; # -command callback shall NOT fire
+ set res [list [.s get] $commandedVar]
+} -cleanup {
+ destroy .s
+} -result {7 -1}
+test scale-20.3 {Bug [2262543fff] - Scale widget unexpectedly fires command callback, case 3} -setup {
+ catch {destroy .s}
+ set res {}
+ set commandedVar -1
+} -body {
+ scale .s -from 1 -to 50
+ .s set 10
+ .s configure -command {set commandedVar}
+ pack .s
+ update ; # -command callback shall NOT fire
+ set res [list [.s get] $commandedVar]
+} -cleanup {
+ destroy .s
+} -result {10 -1}
+test scale-20.4 {Bug [2262543fff] - Scale widget unexpectedly fires command callback, case 4} -setup {
+ catch {destroy .s}
+ set res {}
+ set commandedVar -1
+} -body {
+ scale .s -from 1 -to 50 -command {set commandedVar}
+ .s set 10
+ pack .s
+ update ; # -command callback shall fire
+ set res [list [.s get] $commandedVar]
+} -cleanup {
+ destroy .s
+} -result {10 10}
+test scale-20.5 {Bug [2262543fff] - Scale widget unexpectedly fires command callback, case 5} -setup {
+ catch {destroy .s}
+ set res {}
+ set commandedVar -1
+} -body {
+ scale .s -from 1 -to 50
+ pack .s
+ .s set 10
+ .s configure -command {set commandedVar}
+ update ; # -command callback shall NOT fire
+ set res [list [.s get] $commandedVar]
+} -cleanup {
+ destroy .s
+} -result {10 -1}
+test scale-20.6 {Bug [2262543fff] - Scale widget unexpectedly fires command callback, case 6} -setup {
+ catch {destroy .s}
+ set res {}
+ set commandedVar -1
+} -body {
+ scale .s -from 1 -to 50
+ pack .s
+ .s configure -command {set commandedVar}
+ .s set 10
+ update ; # -command callback shall fire
+ set res [list [.s get] $commandedVar]
+} -cleanup {
+ destroy .s
+} -result {10 10}
+test scale-20.7 {Bug [2262543fff] - Scale widget unexpectedly fires command callback, case 7} -setup {
+ catch {destroy .s}
+ set res {}
+ set commandedVar -1
+} -body {
+ scale .s -from 1 -to 50 -command {set commandedVar}
+ pack .s
+ .s set 10
+ update ; # -command callback shall fire
+ set res [list [.s get] $commandedVar]
+} -cleanup {
+ destroy .s
+} -result {10 10}
+test scale-20.8 {Bug [2262543fff] - Scale widget unexpectedly fires command callback, case 8} -setup {
+ catch {destroy .s}
+ set res {}
+ set commandedVar -1
+ set scaleVar 7
+} -body {
+ scale .s -from 1 -to 50 -variable scaleVar -command {set commandedVar}
+ pack .s
+ .s set 10
+ update ; # -command callback shall fire
+ set res [list [.s get] $commandedVar]
+} -cleanup {
+ destroy .s
+} -result {10 10}
+
option clear
# cleanup
diff --git a/tests/scrollbar.test b/tests/scrollbar.test
index c6a5a90..6d811dc 100644
--- a/tests/scrollbar.test
+++ b/tests/scrollbar.test
@@ -22,7 +22,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 [string match v* [$w cget -orient]] {
return [expr [winfo height $w] \
@@ -45,7 +45,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
@@ -351,15 +351,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} {
@@ -383,15 +383,15 @@ 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} {
@@ -462,7 +462,7 @@ test scrollbar-6.12 {ScrollbarPosition procedure} unix {
.s identify 8 19
} {arrow1}
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]
@@ -561,7 +561,7 @@ test scrollbar-6.41 {ScrollbarPosition procedure} unix {
} {slider}
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
@@ -632,6 +632,73 @@ test scrollbar-9.1 {scrollbar widget vs hidden commands} {
list [winfo children .] [interp hidden]
} [list {} $l]
+test scrollbar-10.1 {<MouseWheel> event on scrollbar} -constraints {win|unix} -setup {
+ destroy .t .s
+} -body {
+ pack [text .t -yscrollcommand {.s set}] -side left
+ for {set i 1} {$i < 100} {incr i} {.t insert end "Line $i\n"}
+ pack [scrollbar .s -command {.t yview}] -fill y -expand 1 -side left
+ update
+ focus -force .s
+ event generate .s <MouseWheel> -delta -120
+ after 200 {set eventprocessed 1} ; vwait eventprocessed
+ .t index @0,0
+} -cleanup {
+ destroy .t .s
+} -result {5.0}
+
+test scrollbar-10.2 {<MouseWheel> event on scrollbar} -constraints {win|unix} -setup {
+ destroy .t .s
+} -body {
+ pack [text .t -xscrollcommand {.s set} -wrap none] -side top
+ for {set i 1} {$i < 100} {incr i} {.t insert end "Char $i "}
+ pack [scrollbar .s -command {.t xview} -orient horizontal] -fill x -expand 1 -side top
+ update
+ focus -force .s
+ event generate .s <Shift-MouseWheel> -delta -120
+ after 200 {set eventprocessed 1} ; vwait eventprocessed
+ .t index @0,0
+} -cleanup {
+ destroy .t .s
+} -result {1.4}
+
+test scrollbar-11.1 {bug fix: [011706ec42] Scrollbar unsafe wrt widget destruction} -body {
+ proc destroy_scrollbar {} {
+ if {[winfo exists .top.s]} {
+ destroy .top.s
+ }
+ }
+ toplevel .top
+ scrollbar .top.s
+ bind .top.s <2> {destroy_scrollbar}
+ pack .top.s
+ focus -force .top.s
+ update
+ event generate .top.s <2>
+ update ; # shall not trigger error invalid command name ".top.s"
+} -cleanup {
+ destroy .top.s .top
+} -result {}
+test scrollbar-11.2 {bug fix: [011706ec42] Scrollbar unsafe wrt widget destruction} -body {
+ proc destroy_scrollbar {{y 0}} {
+ if {[winfo exists .top.s]} {
+ destroy .top.s
+ }
+ }
+ toplevel .top
+ wm minsize .top 50 400
+ update
+ scrollbar .top.s
+ bind .top.s <2> {after idle destroy_scrollbar}
+ pack .top.s -expand true -fill y
+ focus -force .top.s
+ update
+ event generate .top.s <2> -x 2 -y [expr {[winfo height .top.s] / 2}]
+ update ; # shall not trigger error invalid command name ".top.s"
+} -cleanup {
+ destroy .top.s .top
+} -result {}
+
catch {destroy .s}
catch {destroy .t}
diff --git a/tests/select.test b/tests/select.test
index 77bfb2e..f9f3e38 100644
--- a/tests/select.test
+++ b/tests/select.test
@@ -944,7 +944,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 {
- unix
+ unix
} -setup {
setup
} -body {
@@ -1013,7 +1013,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 {
- unix
+ unix
} -setup {
setup
setupbg
@@ -1028,7 +1028,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 {
- unix
+ unix
} -setup {
setup
setupbg
@@ -1121,7 +1121,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 {
- unix
+ unix
} -setup {
setup
setupbg
diff --git a/tests/spinbox.test b/tests/spinbox.test
index b8170c5..206a61d 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,7 +1156,7 @@ 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 {
@@ -1165,14 +1165,14 @@ test spinbox-3.15 {SpinboxWidgetCmd procedure, "configure" widget command} -setu
destroy .e
} -result {49}
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 {
@@ -1775,7 +1775,7 @@ test spinbox-3.71 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e xview scroll number units|pages"}
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 "
@@ -1852,7 +1852,7 @@ test spinbox-3.77 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -returnCodes error -result {bad argument "foobars": must be units or pages}
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
@@ -2023,7 +2023,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}
@@ -2072,13 +2072,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
@@ -2091,7 +2106,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 \
@@ -2105,7 +2120,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 \
@@ -2117,7 +2132,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
@@ -2132,7 +2147,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
@@ -2146,7 +2161,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
@@ -2186,7 +2201,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 {
@@ -2195,7 +2210,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
@@ -2210,8 +2225,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 {
@@ -2280,7 +2295,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
@@ -2292,7 +2307,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
@@ -2303,7 +2318,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"
@@ -2315,7 +2330,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"
@@ -2330,7 +2345,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"
@@ -2342,8 +2357,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 {
@@ -2356,8 +2371,8 @@ test spinbox-8.1 {DeleteChars procedure} -setup {
destroy .e
} -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 {
@@ -2370,8 +2385,8 @@ test spinbox-8.2 {DeleteChars procedure} -setup {
destroy .e
} -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 {
@@ -2384,7 +2399,7 @@ test spinbox-8.3 {DeleteChars procedure} -setup {
destroy .e
} -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 {
@@ -2400,7 +2415,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 {
@@ -2416,7 +2431,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 {
@@ -2432,7 +2447,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 {
@@ -2446,7 +2461,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 {
@@ -2462,7 +2477,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
@@ -2475,7 +2490,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 {
@@ -2491,7 +2506,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 {
@@ -2507,7 +2522,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 {
@@ -2520,7 +2535,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 {
@@ -2533,7 +2548,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 {
@@ -2546,7 +2561,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 {
@@ -2559,7 +2574,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 {
@@ -2572,7 +2587,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 {
@@ -2585,7 +2600,7 @@ 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 {
@@ -2615,7 +2630,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]
@@ -2624,7 +2639,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
@@ -2637,7 +2652,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
@@ -2650,7 +2665,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
@@ -2663,7 +2678,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
@@ -2678,7 +2693,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
@@ -2694,7 +2709,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 {
@@ -2709,7 +2724,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
@@ -2766,7 +2781,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
@@ -2852,7 +2867,7 @@ test spinbox-13.9 {GetSpinboxIndex procedure} -setup {
} -result {1 6}
test spinbox-13.10 {GetSpinboxIndex procedure} -constraints unix -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
@@ -2872,7 +2887,7 @@ test spinbox-13.10 {GetSpinboxIndex procedure} -constraints unix -body {
test spinbox-13.11 {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
@@ -2889,7 +2904,7 @@ test spinbox-13.11 {GetSpinboxIndex procedure} -constraints win -body {
.e index sel.first
} -cleanup {
destroy .e
-} -result {1}
+} -result {1}
test spinbox-13.12 {GetSpinboxIndex procedure} -constraints unix -body {
# Previous settings:
@@ -2944,7 +2959,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
@@ -2957,14 +2972,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
@@ -2976,9 +2991,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 {*}
@@ -2993,7 +3008,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
@@ -3004,7 +3019,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
@@ -3015,7 +3030,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
@@ -3026,7 +3041,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
@@ -3037,7 +3052,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
@@ -3048,7 +3063,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
@@ -3058,7 +3073,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 {
@@ -3068,7 +3083,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
@@ -3079,7 +3094,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
@@ -3090,7 +3105,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
@@ -3118,7 +3133,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
@@ -3145,7 +3160,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
@@ -3216,7 +3231,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
@@ -3570,7 +3585,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
@@ -3595,7 +3610,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
@@ -3790,6 +3805,32 @@ test spinbox-23.1 {selection present while disabled, bug 637828} -body {
destroy .e
} -result {1 1 345}
+test spinbox-24.1 {error in trace proc attached to the textvariable} -setup {
+ destroy .s
+} -body {
+ trace variable myvar w traceit
+ proc traceit args {error "Intentional error here!"}
+ spinbox .s -textvariable myvar -from 1 -to 10
+ catch {.s set mystring} result1
+ catch {.s insert 0 mystring} result2
+ catch {.s delete 0} result3
+ catch {.s invoke buttonup} result4
+ list $result1 $result2 $result3 $result4
+} -cleanup {
+ destroy .s
+} -result [list {can't set "myvar": Intentional error here!} \
+ {can't set "myvar": Intentional error here!} \
+ {can't set "myvar": Intentional error here!} \
+ {can't set "myvar": Intentional error here!}]
+
+test spinbox-25.1 {textvariable lives in a non-existing namespace} -setup {
+ destroy .s
+} -body {
+ catch {spinbox .s -textvariable thisnsdoesntexist::myvar} result1
+ set result1
+} -cleanup {
+ destroy .s
+} -result {can't trace "thisnsdoesntexist::myvar": parent namespace doesn't exist}
# Collected comments about lacks from the test
# XXX Still need to write tests for SpinboxBlinkProc, SpinboxFocusProc,
diff --git a/tests/text.test b/tests/text.test
index d8d01a0..79703e7 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -29,6 +29,15 @@ test text-1.1 {configuration option: "autoseparators"} -setup {
} -cleanup {
destroy .t
} -result {1}
+test text-1.1b {configuration option: "autoseparators", default} -setup {
+ text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold}
+ pack .t
+ update
+} -body {
+ .t cget -autoseparators
+} -cleanup {
+ destroy .t
+} -result {1}
test text-1.2 {configuration option: "autoseparators"} -setup {
text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold}
pack .t
@@ -428,6 +437,15 @@ test text-1.43 {configuration option: "maxundo"} -setup {
} -cleanup {
destroy .t
} -result {5}
+test text-1.43b {configuration option: "maxundo", default} -setup {
+ text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold}
+ pack .t
+ update
+} -body {
+ .t cget -maxundo
+} -cleanup {
+ destroy .t
+} -result {0}
test text-1.44 {configuration option: "maxundo"} -setup {
text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold}
pack .t
@@ -732,6 +750,15 @@ test text-1.75 {configuration option: "undo"} -setup {
} -cleanup {
destroy .t
} -result {1}
+test text-1.75b {configuration option: "undo", default} -setup {
+ text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold}
+ pack .t
+ update
+} -body {
+ .t cget -undo
+} -cleanup {
+ destroy .t
+} -result {0}
test text-1.76 {configuration option: "undo"} -setup {
text .t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold}
pack .t
@@ -883,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}
@@ -892,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 {solid}
@@ -901,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}
@@ -925,7 +952,7 @@ test text-3.2 {TextWidgetCmd procedure} -setup {
.t gorp 1.0 z 1.2
} -cleanup {
destroy .t
-} -returnCodes {error} -result {bad option "gorp": must be bbox, cget, compare, configure, count, debug, delete, dlineinfo, dump, edit, get, image, index, insert, mark, peer, replace, scan, search, see, tag, window, xview, or yview}
+} -returnCodes {error} -result {bad option "gorp": must be bbox, cget, compare, configure, count, debug, delete, dlineinfo, dump, edit, get, image, index, insert, mark, peer, pendingsync, replace, scan, search, see, sync, tag, window, xview, or yview}
test text-4.1 {TextWidgetCmd procedure, "bbox" option} -setup {
text .t
@@ -1147,7 +1174,7 @@ Line 7"
.t co 1.0 z 1.2
} -cleanup {
destroy .t
-} -returnCodes {error} -result {ambiguous option "co": must be bbox, cget, compare, configure, count, debug, delete, dlineinfo, dump, edit, get, image, index, insert, mark, peer, replace, scan, search, see, tag, window, xview, or yview}
+} -returnCodes {error} -result {ambiguous option "co": must be bbox, cget, compare, configure, count, debug, delete, dlineinfo, dump, edit, get, image, index, insert, mark, peer, pendingsync, replace, scan, search, see, sync, tag, window, xview, or yview}
# "configure" option is already covered above
test text-7.1 {TextWidgetCmd procedure, "debug" option} -setup {
@@ -1163,7 +1190,7 @@ test text-7.2 {TextWidgetCmd procedure, "debug" option} -setup {
.t de 0 1
} -cleanup {
destroy .t
-} -returnCodes {error} -result {ambiguous option "de": must be bbox, cget, compare, configure, count, debug, delete, dlineinfo, dump, edit, get, image, index, insert, mark, peer, replace, scan, search, see, tag, window, xview, or yview}
+} -returnCodes {error} -result {ambiguous option "de": must be bbox, cget, compare, configure, count, debug, delete, dlineinfo, dump, edit, get, image, index, insert, mark, peer, pendingsync, replace, scan, search, see, sync, tag, window, xview, or yview}
test text-7.3 {TextWidgetCmd procedure, "debug" option} -setup {
text .t
} -body {
@@ -1458,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 {
@@ -1989,7 +2028,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 {
@@ -2651,22 +2690,23 @@ test text-9.2.45 {TextWidgetCmd procedure, "count" option} -setup {
} -result {0}
test text-9.2.46 {TextWidgetCmd procedure, "count" option} -setup {
toplevel .mytop
- pack [text .mytop.t]
- wm geometry .mytop 100x300+0+0
+ pack [text .mytop.t -font TkFixedFont -bd 0 -padx 0 -wrap char]
+ set spec [font measure TkFixedFont "Line 1+++Line 1---Li"] ; # 20 chars
+ append spec x300+0+0
+ wm geometry .mytop $spec
.mytop.t delete 1.0 end
update
set res {}
} -body {
for {set i 1} {$i < 5} {incr i} {
- # 0 1 2 3 4
- # 012345 678901234 567890123 456789012 34567890123456789
+ # 0 1 2 3 4
+ # 012345 678901234 567890123 456789012 34567890123456789
.mytop.t insert end "Line $i+++Line $i---Line $i///Line $i - This is Line [format %c [expr 64+$i]]\n"
}
.mytop.t tag configure hidden -elide true
- .mytop.t tag add hidden 2.15 3.10
- .mytop.t configure -wrap char
+ .mytop.t tag add hidden 2.30 3.10
lappend res [.mytop.t count -displaylines 2.0 3.0]
- lappend res [.mytop.t count -displaylines 2.0 3.40]
+ lappend res [.mytop.t count -displaylines 2.0 3.50]
} -cleanup {
destroy .mytop
} -result {1 3}
@@ -2682,6 +2722,10 @@ test text-9.2.47 {TextWidgetCmd procedure, "count" option} -setup {
.t tag configure hidden -elide true
.t tag add hidden 5.7 11.0
update
+ # next line to be fully sure that asynchronous line heights calculation is
+ # up-to-date otherwise this test may fail (depending on the computer
+ # performance), especially when the . toplevel has small height
+ .t sync
set y1 [lindex [.t yview] 1]
.t count -displaylines 5.0 11.0
set y2 [lindex [.t yview] 1]
@@ -2866,7 +2910,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"]
@@ -2877,6 +2921,195 @@ test text-11.9 {counting with tag priority eliding} -setup {
destroy .t
} -result {1 0 0 1 0 2.0 4.0 4.0 4.0 3.0 3.0 3.0 2.0 1.0 1.0}
+test text-11a.1 {TextWidgetCmd procedure, "pendingsync" option} -setup {
+ destroy .yt
+} -body {
+ text .yt
+ list [catch {.yt pendingsync mytext} msg] $msg
+} -cleanup {
+ destroy .yt
+} -result {1 {wrong # args: should be ".yt pendingsync"}}
+test text-11a.2 {TextWidgetCmd procedure, "pendingsync" option} -setup {
+ destroy .top.yt .top
+} -body {
+ toplevel .top
+ pack [text .top.yt]
+ set content {}
+ for {set i 1} {$i < 300} {incr i} {
+ append content [string repeat "$i " 15] \n
+ }
+ .top.yt insert 1.0 $content
+ # wait for end of line metrics calculation to get correct $fraction1
+ # as a reference
+ while {[.top.yt pendingsync]} {update}
+ .top.yt yview moveto 1
+ set fraction1 [lindex [.top.yt yview] 0]
+ set res [expr {$fraction1 > 0}]
+ .top.yt delete 1.0 end
+ .top.yt insert 1.0 $content
+ # ensure the test is relevant
+ lappend res [.top.yt pendingsync]
+ # asynchronously wait for completion of line metrics calculation
+ while {[.top.yt pendingsync]} {update}
+ .top.yt yview moveto $fraction1
+ set fraction2 [lindex [.top.yt yview] 0]
+ lappend res [expr {$fraction1 == $fraction2}]
+} -cleanup {
+ destroy .top.yt .top
+} -result {1 1 1}
+
+test text-11a.11 {TextWidgetCmd procedure, "sync" option} -setup {
+ destroy .yt
+} -body {
+ text .yt
+ list [catch {.yt sync mytext} msg] $msg
+} -cleanup {
+ destroy .yt
+} -result {1 {wrong # args: should be ".yt sync ?-command command?"}}
+test text-11a.12 {TextWidgetCmd procedure, "sync" option} -setup {
+ destroy .top.yt .top
+} -body {
+ toplevel .top
+ pack [text .top.yt]
+ set content {}
+ for {set i 1} {$i < 30} {incr i} {
+ append content [string repeat "$i " 15] \n
+ }
+ .top.yt insert 1.0 $content
+ # wait for end of line metrics calculation to get correct $fraction1
+ # as a reference
+ .top.yt sync
+ .top.yt yview moveto 1
+ set fraction1 [lindex [.top.yt yview] 0]
+ set res [expr {$fraction1 > 0}]
+ # first case: do not wait for completion of line metrics calculation
+ .top.yt delete 1.0 end
+ .top.yt insert 1.0 $content
+ .top.yt yview moveto $fraction1
+ set fraction2 [lindex [.top.yt yview] 0]
+ lappend res [expr {$fraction1 == $fraction2}]
+ # second case: wait for completion of line metrics calculation
+ .top.yt delete 1.0 end
+ .top.yt insert 1.0 $content
+ .top.yt sync
+ .top.yt yview moveto $fraction1
+ set fraction2 [lindex [.top.yt yview] 0]
+ lappend res [expr {$fraction1 == $fraction2}]
+} -cleanup {
+ destroy .top.yt .top
+} -result {1 0 1}
+
+test text-11a.21 {TextWidgetCmd procedure, "sync" option with -command} -setup {
+ destroy .yt
+} -body {
+ text .yt
+ list [catch {.yt sync -comx foo} msg] $msg
+} -cleanup {
+ destroy .yt
+} -result {1 {wrong option "-comx": should be "-command"}}
+test text-11a.22 {TextWidgetCmd procedure, "sync" option with -command} -setup {
+ destroy .top.yt .top
+} -body {
+ set res {}
+ set ::x 0
+ toplevel .top
+ pack [text .top.yt]
+ set content {}
+ for {set i 1} {$i < 30} {incr i} {
+ append content [string repeat "$i " 15] \n
+ }
+ .top.yt insert 1.0 $content
+ # first case: line metrics calculation still running when launching 'sync -command'
+ lappend res [.top.yt pendingsync]
+ .top.yt sync -command [list set ::x 1]
+ lappend res $::x
+ # now finish line metrics calculations
+ while {[.top.yt pendingsync]} {update}
+ lappend res [.top.yt pendingsync] $::x
+ # second case: line metrics calculation completed when launching 'sync -command'
+ .top.yt sync -command [list set ::x 2]
+ lappend res $::x
+ vwait ::x
+ lappend res $::x
+} -cleanup {
+ destroy .top.yt .top
+} -result {1 0 0 1 1 2}
+
+test text-11a.31 {"<<WidgetViewSync>>" event} -setup {
+ destroy .top.yt .top
+} -body {
+ toplevel .top
+ pack [text .top.yt]
+ set content {}
+ for {set i 1} {$i < 300} {incr i} {
+ append content [string repeat "$i " 15] \n
+ }
+ .top.yt insert 1.0 $content
+ update
+ bind .top.yt <<WidgetViewSync>> { if {%d} {set yud(%W) 1} }
+ # wait for end of line metrics calculation to get correct $fraction1
+ # as a reference
+ if {[.top.yt pendingsync]} {vwait yud(.top.yt)}
+ .top.yt yview moveto 1
+ set fraction1 [lindex [.top.yt yview] 0]
+ set res [expr {$fraction1 > 0}]
+ .top.yt delete 1.0 end
+ .top.yt insert 1.0 $content
+ # synchronously wait for completion of line metrics calculation
+ # and ensure the test is relevant
+ set waited 0
+ if {[.top.yt pendingsync]} {set waited 1 ; vwait yud(.top.yt)}
+ lappend res $waited
+ .top.yt yview moveto $fraction1
+ set fraction2 [lindex [.top.yt yview] 0]
+ lappend res [expr {$fraction1 == $fraction2}]
+} -cleanup {
+ destroy .top.yt .top
+} -result {1 1 1}
+
+test text-11a.41 {"sync" "pendingsync" and <<WidgetViewSync>>} -setup {
+ destroy .top.yt .top
+} -body {
+ set res {}
+ toplevel .top
+ pack [text .top.yt]
+ set content {}
+ for {set i 1} {$i < 300} {incr i} {
+ append content [string repeat "$i " 50] \n
+ }
+ bind .top.yt <<WidgetViewSync>> {lappend res Sync:%d}
+ .top.yt insert 1.0 $content
+ vwait res ; # event dealt with by the event loop, with %d==0 i.e. we're out of sync
+ # ensure the test is relevant
+ lappend res "Pending:[.top.yt pendingsync]"
+ # - <<WidgetViewSync>> fires when sync returns if there was pending syncs
+ # - there is no more any pending sync after running 'sync'
+ .top.yt sync
+ vwait res ; # event dealt with by the event loop, with %d==1 i.e. we're in sync again
+ lappend res "Pending:[.top.yt pendingsync]"
+ set res
+} -cleanup {
+ destroy .top.yt .top
+} -result {Sync:0 Pending:1 Sync:1 Pending:0}
+
+test text-11a.51 {<<WidgetViewSync>> calls TkSendVirtualEvent(),
+ NOT Tk_HandleEvent().
+ Bug [b362182e45704dd7bbd6aed91e48122035ea3d16]} -setup {
+ destroy .top.t .top
+} -body {
+ set res {}
+ toplevel .top
+ pack [text .top.t]
+ for {set i 1} {$i < 10000} {incr i} {
+ .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
+ update
+ set res "Still doing fine!"
+} -cleanup {
+ destroy .top.t .top
+} -result {Still doing fine!}
test text-12.1 {TextWidgetCmd procedure, "index" option} -setup {
text .t
@@ -2898,7 +3131,7 @@ test text-12.3 {TextWidgetCmd procedure, "index" option} -setup {
.t in a b
} -cleanup {
destroy .t
-} -returnCodes {error} -result {ambiguous option "in": must be bbox, cget, compare, configure, count, debug, delete, dlineinfo, dump, edit, get, image, index, insert, mark, peer, replace, scan, search, see, tag, window, xview, or yview}
+} -returnCodes {error} -result {ambiguous option "in": must be bbox, cget, compare, configure, count, debug, delete, dlineinfo, dump, edit, get, image, index, insert, mark, peer, pendingsync, replace, scan, search, see, sync, tag, window, xview, or yview}
test text-12.4 {TextWidgetCmd procedure, "index" option} -setup {
text .t
} -body {
@@ -3071,11 +3304,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 {
@@ -3094,7 +3327,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 {
@@ -3120,7 +3353,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 {
@@ -3210,7 +3443,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 append .top .top.t top
update
set geom [wm geometry .top]
@@ -3299,7 +3532,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
@@ -4691,7 +4924,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~_\]+)"
@@ -4708,7 +4941,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~_\]+)"
@@ -4722,7 +4955,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~_\]+)"
@@ -5556,6 +5789,27 @@ test text-22.217 {TextSearchCmd, elide up to match} -setup {
} -cleanup {
destroy .t
} -result {{} {} 1.0 2.1 2.0 3.1 2.0 3.0}
+test text-22.217.1 {elide up to match, with UTF-8 chars before the match} -setup {
+ pack [text .t]
+ set res {}
+} -body {
+ .t tag configure e -elide 0
+ .t insert end A {} xyz e bb\n
+ .t insert end \u00c4 {} xyz e bb
+ set res {}
+ lappend res [.t search bb 1.0 "1.0 lineend"]
+ lappend res [.t search bb 2.0 "2.0 lineend"]
+ lappend res [.t search -regexp bb 1.0 "1.0 lineend"]
+ lappend res [.t search -regexp bb 2.0 "2.0 lineend"]
+ .t tag configure e -elide 1
+ lappend res [.t search bb 1.0 "1.0 lineend"]
+ lappend res [.t search bb 2.0 "2.0 lineend"]
+ lappend res [.t search -regexp bb 1.0 "1.0 lineend"]
+ lappend res [.t search -regexp -elide bb 2.0 "2.0 lineend"]
+ lappend res [.t search -regexp bb 2.0 "2.0 lineend"]
+} -cleanup {
+ destroy .t
+} -result {1.4 2.4 1.4 2.4 1.4 2.4 1.4 2.4 2.4}
test text-22.218 {TextSearchCmd, strict limits} -body {
pack [text .t]
.t insert 1.0 "Hello world!\nThis is a test\n"
@@ -5694,7 +5948,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
@@ -5702,7 +5956,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
@@ -5710,7 +5964,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
@@ -5718,7 +5972,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
@@ -5726,7 +5980,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
@@ -5763,7 +6017,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
@@ -5992,7 +6246,7 @@ test text-27.2 {TextEditCmd procedure, argument parsing} -body {
.t edit gorp
} -cleanup {
destroy .t
-} -returnCodes {error} -result {bad edit option "gorp": must be modified, redo, reset, separator, or undo}
+} -returnCodes {error} -result {bad edit option "gorp": must be canundo, canredo, modified, redo, reset, separator, or undo}
test text-27.3 {TextEditUndo procedure, undoing changes} -body {
text .t -undo 1
pack .t
@@ -6084,7 +6338,7 @@ test text-27.11 {TextEditCmd procedure, set modified flag repeat} -setup {
# Shouldn't require [update idle] to trigger event [Bug 1809538]
lappend ::retval [.t edit modified]
.t edit modified 1
- update idletasks
+ update
lappend ::retval [.t edit modified]
.t edit modified 1 ; # binding should only fire once [Bug 1799782]
update idletasks
@@ -6099,6 +6353,7 @@ test text-27.12 {<<Modified>> virtual event} -body {
bind .t <<Modified>> "set ::retval modified"
update idletasks
.t insert end "nothing special\n"
+ update
return $::retval
} -cleanup {
destroy .t
@@ -6109,6 +6364,7 @@ test text-27.13 {<<Modified>> virtual event - insert before Modified} -body {
bind .t <<Modified>> { set ::retval [.t get 1.0 end-1c] }
update idletasks
.t insert end "nothing special"
+ update
return $::retval
} -cleanup {
destroy .t
@@ -6121,10 +6377,26 @@ test text-27.14 {<<Modified>> virtual event - delete before Modified} -body {
.t insert end "nothing special"
.t edit modified 0
.t delete 1.0 1.2
+ update
set ::retval
} -cleanup {
destroy .t
} -result {thing special}
+test text-27.14a {<<Modified>> virtual event - propagation to peers} -body {
+# Bug [fd3a4dc111], <<Modified>> event is not always sent to peers
+ set ::retval 0
+ text .t -undo 1
+ .t peer create .tt
+ pack .t .tt
+ bind .t <<Modified>> {incr ::retval}
+ bind .tt <<Modified>> {incr ::retval}
+ .t insert end "This increments ::retval once for each peer, i.e. twice."
+ .t edit modified 0 ; # shall increment twice as well, not just once
+ update
+ set ::retval
+} -cleanup {
+ destroy .t .tt
+} -result {4}
test text-27.15 {<<Selection>> virtual event} -body {
set ::retval no_selection
pack [text .t -undo 1]
@@ -6132,6 +6404,7 @@ test text-27.15 {<<Selection>> virtual event} -body {
update idletasks
.t insert end "nothing special\n"
.t tag add sel 1.0 1.1
+ update
set ::retval
} -cleanup {
destroy .t
@@ -6149,6 +6422,36 @@ test text-27.16 {-maxundo configuration option} -body {
} -cleanup {
destroy .t
} -result "line 1\n\n"
+test text-27.16a {undo configuration options with peers} -body {
+ text .t -undo 1 -autoseparators 0 -maxundo 100
+ .t peer create .tt
+ set res [.t cget -undo]
+ lappend res [.tt cget -undo]
+ lappend res [.t cget -autoseparators]
+ lappend res [.tt cget -autoseparators]
+ lappend res [.t cget -maxundo]
+ lappend res [.tt cget -maxundo]
+ .t insert end "The undo stack is common between peers"
+ lappend res [.t edit canundo]
+ lappend res [.tt edit canundo]
+} -cleanup {
+ destroy .t .tt
+} -result {1 1 0 0 100 100 1 1}
+test text-27.16b {undo configuration options with peers, defaults} -body {
+ text .t
+ .t peer create .tt
+ set res [.t cget -undo]
+ lappend res [.tt cget -undo]
+ lappend res [.t cget -autoseparators]
+ lappend res [.tt cget -autoseparators]
+ lappend res [.t cget -maxundo]
+ lappend res [.tt cget -maxundo]
+ .t insert end "The undo stack is common between peers"
+ lappend res [.t edit canundo]
+ lappend res [.tt edit canundo]
+} -cleanup {
+ destroy .t .tt
+} -result {0 0 1 1 0 0 0 0}
test text-27.17 {bug fix 1536735 - undo with empty text} -body {
text .t -undo 1
set r [.t edit modified]
@@ -6171,6 +6474,224 @@ test text-27.18 {patch 1469210 - inserting after undo} -setup {
} -cleanup {
destroy .t
} -result 1
+test text-27.19 {patch 1669632 (i) - undo after <Control-1>} -setup {
+ destroy .t
+} -body {
+ text .t -undo 1
+ .t insert end foo\nbar
+ .t edit reset
+ .t insert 2.2 WORLD
+ event generate .t <Control-1> -x 1 -y 1
+ .t insert insert HELLO
+ .t edit undo
+ .t get 2.2 2.7
+} -cleanup {
+ destroy .t
+} -result WORLD
+test text-27.20 {patch 1669632 (iv) - undo after <<SelectNone>>} -setup {
+ destroy .top .top.t
+} -body {
+ toplevel .top
+ pack [text .top.t -undo 1]
+ .top.t insert end "This is an example text"
+ .top.t edit reset
+ .top.t mark set insert 1.5
+ .top.t insert 1.5 HELLO
+ .top.t tag add sel 1.10 1.12
+ update
+ focus -force .top.t
+ event generate .top.t <<SelectNone>>
+ .top.t insert insert " WORLD "
+ .top.t edit undo
+ .top.t get 1.5 1.10
+} -cleanup {
+ destroy .top.t .top
+} -result HELLO
+test text-27.21 {patch 1669632 (vii) - <<Undo>> shall not remove separators} -setup {
+ destroy .t
+} -body {
+ text .t -undo 1
+ .t insert end "This is an example text"
+ .t edit reset
+ .t insert 1.5 "WORLD "
+ event generate .t <Control-1> -x 1 -y 1
+ .t insert insert HELLO
+ event generate .t <<Undo>>
+ .t insert insert E
+ event generate .t <<Undo>>
+ .t get 1.0 "1.0 lineend"
+} -cleanup {
+ destroy .t
+} -result "This WORLD is an example text"
+test text-27.22 {patch 1669632 (v) - <<Clear>> is atomic} -setup {
+ destroy .t
+} -body {
+ toplevel .top
+ pack [text .top.t -undo 1]
+ .top.t insert end "This is an example text"
+ .top.t edit reset
+ .top.t mark set insert 1.5
+ .top.t insert 1.5 "A"
+ update
+ focus -force .top.t
+ event generate .top.t <Delete>
+ event generate .top.t <<SelectNextChar>>
+ event generate .top.t <<Clear>>
+ event generate .top.t <Delete>
+ event generate .top.t <<Undo>>
+ .top.t get 1.0 "1.0 lineend"
+} -cleanup {
+ destroy .top.t .top
+} -result "This A an example text"
+ test text-27.23 {patch 1669632 (v) - <<Cut>> is atomic} -setup {
+ destroy .t
+} -body {
+ toplevel .top
+ pack [text .top.t -undo 1]
+ .top.t insert end "This is an example text"
+ .top.t edit reset
+ .top.t mark set insert 1.5
+ .top.t insert 1.5 "A"
+ update
+ focus -force .top.t
+ event generate .top.t <Delete>
+ event generate .top.t <<SelectNextChar>>
+ event generate .top.t <<Cut>>
+ event generate .top.t <Delete>
+ event generate .top.t <<Undo>>
+ .top.t get 1.0 "1.0 lineend"
+} -cleanup {
+ destroy .top.t .top
+} -result "This A an example text"
+test text-27.24 {TextEditCmd procedure, canundo and canredo} -setup {
+ destroy .t
+ set res {}
+} -body {
+ text .t -undo false -autoseparators false
+ lappend res [.t edit canundo] [.t edit canredo]
+ .t configure -undo true
+ lappend res [.t edit canundo] [.t edit canredo]
+ .t insert end "DO\n"
+ .t edit separator
+ .t insert end "IT\n"
+ .t insert end "YOURSELF\n"
+ .t edit separator
+ lappend res [.t edit canundo] [.t edit canredo]
+ .t edit undo
+ lappend res [.t edit canundo] [.t edit canredo]
+ .t configure -undo false
+ lappend res [.t edit canundo] [.t edit canredo]
+ .t configure -undo true
+ lappend res [.t edit canundo] [.t edit canredo]
+ .t edit redo
+ lappend res [.t edit canundo] [.t edit canredo]
+} -cleanup {
+ destroy .t
+} -result {0 0 0 0 1 0 1 1 0 0 1 1 1 0}
+test text-27.25 {<<UndoStack>> virtual event} -setup {
+ destroy .t
+ set res {}
+ set nbUS 0
+} -body {
+ text .t -undo false -autoseparators false
+ bind .t <<UndoStack>> {incr nbUS}
+ update ; lappend res $nbUS
+ .t configure -undo true
+ update ; lappend res $nbUS
+ .t insert end "DO\n"
+ .t edit separator
+ .t insert end "IT\n"
+ .t insert end "YOURSELF\n"
+ .t edit separator
+ .t insert end "MAN\n"
+ .t edit separator
+ update ; lappend res $nbUS
+ .t edit undo
+ update ; lappend res $nbUS
+ .t edit redo
+ update ; lappend res $nbUS
+ .t edit undo
+ update ; lappend res $nbUS
+ .t edit undo
+ update ; lappend res $nbUS
+ .t edit undo
+ update ; lappend res $nbUS
+ .t edit redo
+ update ; lappend res $nbUS
+ .t edit redo
+ update ; lappend res $nbUS
+ .t edit redo
+ update ; lappend res $nbUS
+ .t edit undo
+ update ; lappend res $nbUS
+ .t edit undo
+ update ; lappend res $nbUS
+ .t edit reset
+ update ; lappend res $nbUS
+} -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 {
pack [text .t -wrap none]
@@ -6440,7 +6961,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]
@@ -6461,7 +6982,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] \
@@ -6481,7 +7002,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] \
@@ -6526,7 +7047,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} {
@@ -6571,7 +7092,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}
@@ -6594,7 +7115,7 @@ test text-33.2 {TextWidgetCmd procedure, "peer" option} -setup {
test text-33.3 {TextWidgetCmd procedure, "peer" option} -setup {
text .t
} -body {
- .t p names
+ .t pee names
} -cleanup {
destroy .t
} -returnCodes {ok} -result {}
diff --git a/tests/textDisp.test b/tests/textDisp.test
index aed842c..ebaa6d8 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -590,7 +590,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.
@@ -615,10 +615,14 @@ catch {destroy .f2}
.t configure -borderwidth 0 -wrap char
wm geom . {}
update
+set bw [.t cget -borderwidth]
+set px [.t cget -padx]
+set py [.t cget -pady]
+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.
@@ -634,7 +638,7 @@ test textDisp-4.7 {UpdateDisplayInfo, filling in extra vertical space} {
update
set x [list [.t index @0,0] $tk_textRelayout $tk_textRedraw]
wm overrideredirect . 0
- update
+ update
set x
} {8.0 {16.0 17.0 15.0 14.0 13.0 12.0 11.0 10.0 9.0 8.0} {8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0}}
test textDisp-4.8 {UpdateDisplayInfo, filling in extra vertical space} {
@@ -653,7 +657,7 @@ test textDisp-4.9 {UpdateDisplayInfo, filling in extra vertical space} {textfont
update
.t delete 15.0 end
list [.t bbox 7.0] [.t bbox 12.0]
-} [list [list 3 [expr {2*$fixedDiff + 29}] 7 $fixedHeight] [list 3 [expr {7*$fixedDiff + 94}] 7 $fixedHeight]]
+} [list [list [expr {$hlth + $px + $bw}] [expr {$hlth + $py + $bw + 2 * $fixedHeight}] $fixedWidth $fixedHeight] [list [expr {$hlth + $px + $bw}] [expr {$hlth + $py + $bw + 7 * $fixedHeight}] $fixedWidth $fixedHeight]]
test textDisp-4.10 {UpdateDisplayInfo, filling in extra vertical space} {
.t delete 1.0 end
.t insert end "1\n2\n3\n4\n5\nLine 6 is such a long line that it wraps around.\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17"
@@ -1177,16 +1181,15 @@ test textDisp-8.12 {TkTextChanged, moving the insert cursor redraws only past an
.t mark set insert 3.8 ; # within the same line
update
lappend res $tk_textRedraw
- # This last one is tricky: correct result really is {2.0 3.0} when
- # calling .t mark set insert, two calls to TkTextChanged are done:
- # (a) to redraw the line of the past position of the cursor
- # (b) to redraw the line of the new position of the cursor
- # During (a) the display line showing the cursor gets unlinked,
- # which leads TkTextChanged in (b) to schedule a redraw starting
- # one line _before_ the line containing the insert cursor. This is
- # because during (b) findDLine cannot return the display line the
- # cursor is in since this display line was just unlinked in (a).
-} {{8.0 9.0} {8.0 12.0} {8.0 12.0} {3.0 8.0} {2.0 3.0}}
+} {{8.0 9.0} {8.0 12.0} {8.0 12.0} {3.0 8.0} {3.0 4.0}}
+test textDisp-8.13 {TkTextChanged, used to crash, see [06c1433906]} {
+ .t delete 1.0 end
+ .t insert 1.0 \nLine2\nLine3\n
+ update
+ .t insert 3.0 ""
+ .t delete 1.0 2.0
+ update idletasks
+} {}
test textDisp-9.1 {TkTextRedrawTag} {
.t configure -wrap char
@@ -1329,6 +1332,30 @@ test textDisp-9.13 {TkTextRedrawTag} {
update
list $tk_textRelayout $tk_textRedraw
} {{2.0 6.0 7.0} {2.0 6.0 7.0}}
+test textDisp-9.14 {TkTextRedrawTag} {
+ pack [text .tnocrash]
+ for {set i 1} {$i < 6} {incr i} {
+ .tnocrash insert end \nfoo$i
+ }
+ .tnocrash tag configure mytag1 -relief raised
+ .tnocrash tag configure mytag2 -relief solid
+ update
+ proc doit {} {
+ .tnocrash tag add mytag1 4.0 5.0
+ .tnocrash tag add mytag2 4.0 5.0
+ after idle {
+ .tnocrash tag remove mytag1 1.0 end
+ .tnocrash tag remove mytag2 1.0 end
+ }
+ .tnocrash delete 1.0 2.0
+ }
+ doit ; # must not crash
+ after 500 {
+ destroy .tnocrash
+ set done 1
+ }
+ vwait done
+} {}
test textDisp-10.1 {TkTextRelayoutWindow} {
.t configure -wrap char
@@ -1570,6 +1597,17 @@ test textDisp-11.20 {TkTextSetYView, see in elided lines} {
# this shall not crash (null chunkPtr in TkTextSeeCmd is tested)
.top.t see 3.0
} {}
+test textDisp-11.21 {TkTextSetYView, window height smaller than the line height} {
+ .top.t delete 1.0 end
+ for {set i 1} {$i <= 10} {incr i} {
+ .top.t insert end "Line $i\n"
+ }
+ set lineheight [font metrics [.top.t cget -font] -linespace]
+ wm geometry .top 200x[expr {$lineheight / 2}]
+ update
+ .top.t see 1.0
+ .top.t index @0,[expr {$lineheight - 2}]
+} {1.0}
.t configure -wrap word
.t delete 50.0 51.0
@@ -1825,7 +1863,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]
@@ -2006,9 +2044,9 @@ test textDisp-16.18 {TkTextYviewCmd procedure, "moveto" roundoff} {textfonts} {
wm geometry .top1 +0+0
text .top1.t -height 3 -width 4 -wrap none -setgrid 1 -padx 6 \
-spacing3 6
- .top1.t insert end "1\n2\n3\n4\n5\n6"
pack .top1.t
update
+ .top1.t insert end "1\n2\n3\n4\n5\n6"
.top1.t yview moveto 0.3333
set result [.top1.t yview]
destroy .top1
@@ -2279,7 +2317,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} {
@@ -2887,7 +2925,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.
@@ -3781,7 +3819,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 {
@@ -4100,7 +4138,7 @@ test textDisp-33.2 {one line longer than fits in the widget} {
.tt debug 1
set tk_textHeightCalc ""
.tt insert 1.0 [string repeat "more wrap + " 1]
- after 100 ; update
+ after 100 ; update idletasks
# Nothing should have been recalculated.
set tk_textHeightCalc
} {}
@@ -4158,29 +4196,50 @@ test textDisp-33.5 {bold or italic fonts} win {
} {italic font measurement ok}
destroy .tt
-test textDisp-34.1 {Text widgets multi-scrolling problem: Bug 2677890} -setup {
- pack [text .t1 -width 10 -yscrollcommand {.sy set}] \
- [ttk::scrollbar .sy -orient vertical -command {.t1 yview}] \
- -side left -fill both
- bindtags .sy {}; # No clicky!
+test textDisp-34.1 {Line heights recalculation problem: bug 2677890} -setup {
+ pack [text .t1] -expand 1 -fill both
set txt ""
- for {set i 0} {$i < 99} {incr i} {
- lappend txt "$i" [list pc $i] "\n" ""
+ for {set i 1} {$i < 100} {incr i} {
+ append txt "Line $i\n"
}
set result {}
} -body {
- .t1 insert end {*}$txt
- update
- lappend result [.sy get]
- .t1 replace 6.0 6.0+1c "*"
- lappend result [.sy get]
- after 0 {lappend result [.sy get]}
- after 1000 {lappend result [.sy get]}
- vwait result;vwait result
- return $result
+ .t1 insert end $txt
+ .t1 debug 1
+ set ge [winfo geometry .]
+ scan $ge "%dx%d+%d+%d" width height left top
+ update
+ .t1 sync
+ set negative 0
+ bind .t1 <<WidgetViewSync>> { if {%d < 0} {set negative 1} }
+ # Without the fix for bug 2677890, changing the width of the toplevel
+ # will launch recomputation of the line heights, but will produce negative
+ # number of still remaining outdated lines, which is obviously wrong.
+ # Thus we use this way to check for regression regarding bug 2677890,
+ # i.e. to check that the fix for this bug really is still in.
+ wm geometry . "[expr {$width * 2}]x$height+$left+$top"
+ update
+ .t1 sync
+ set negative
+} -cleanup {
+ destroy .t1
+} -result {0}
+
+test textDisp-35.1 {Init value of charHeight - Dancing scrollbar bug 1499165} -setup {
+ pack [text .t1] -fill both -expand y -side left
+ .t insert end "[string repeat a\nb\nc\n 500000]THE END\n"
+ set res {}
+} -body {
+ .t see 10000.0
+ after 300 {set fr1 [.t yview] ; set done 1}
+ vwait done
+ after 300 {set fr2 [.t yview] ; set done 1}
+ vwait done
+ lappend res [expr {[lindex $fr1 0] == [lindex $fr2 0]}]
+ lappend res [expr {[lindex $fr1 1] == [lindex $fr2 1]}]
} -cleanup {
- destroy .t1 .sy
-} -result {{0.0 1.0} {0.0 1.0} {0.0 1.0} {0.0 0.24}}
+ destroy .t1
+} -result {1 1}
deleteWindows
option clear
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 c949b1f..ce331b4 100644
--- a/tests/textIndex.test
+++ b/tests/textIndex.test
@@ -17,7 +17,7 @@ pack append . .t {top expand fill}
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} {
@@ -905,6 +905,21 @@ test textIndex-22.12 {text index wordstart, unicode} {
test textIndex-22.13 {text index wordstart, unicode} {
text_test_word wordstart "\uc700\uc700 abc" 8
} 3
+test textIndex-22.14 {text index wordstart, unicode, start index at internal segment start} {
+ catch {destroy .t}
+ text .t
+ .t insert end "C'est du texte en fran\u00e7ais\n"
+ .t insert end "\u042D\u0442\u043E\u0020\u0442\u0435\u043A\u0441\u0442\u0020\u043D\u0430\u0020\u0440\u0443\u0441\u0441\u043A\u043E\u043C"
+ .t mark set insert 1.23
+ set res [.t index "1.23 wordstart"]
+ .t mark set insert 2.16
+ lappend res [.t index "2.16 wordstart"] [.t index "2.15 wordstart"]
+} {1.18 2.13 2.13}
+test textIndex-22.15 {text index display wordstart} {
+ catch {destroy .t}
+ text .t
+ .t index "1.0 display wordstart" ; # used to crash
+} 1.0
test textIndex-23.1 {text paragraph start} {
pack [text .t2]
@@ -928,6 +943,19 @@ test textIndex-24.1 {text mark prev} {
set res
} {1.0}
+test textIndex-25.1 {IndexCountBytesOrdered, bug [3f1f79abcf]} {
+ pack [text .t2]
+ .t2 tag configure elided -elide 1
+ .t2 insert end "01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n"
+ .t2 insert end "11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n"
+ .t2 insert end "21\n22\n23\n25\n26\n27\n28\n29\n30\n31"
+ .t2 insert end "32\n33\n34\n36\n37\n38\n39" elided
+ # then this used to crash Tk:
+ .t2 see end
+ focus -force .t2 ; # to see the cursor blink
+ destroy .t2
+} {}
+
# cleanup
rename textimage {}
catch {destroy .t}
diff --git a/tests/textMark.test b/tests/textMark.test
index edd0e92..0fac8f7 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 fed073a..2df8c5a 100644
--- a/tests/textTag.test
+++ b/tests/textTag.test
@@ -13,9 +13,6 @@ tcltest::loadTestedCommands
destroy .t
text .t -width 20 -height 10
-testConstraint haveCourier12 [expr {[catch {
- .t configure -font {Courier 12}
-}] == 0}]
pack append . .t {top expand fill}
update
@@ -23,7 +20,7 @@ update
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,308 +37,290 @@ 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]
} -returnCodes error -result {bad screen distance "bad"}
-test textTag-1.18 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.17a {tag configuration options} -body {
+ .t tag configure x -lmargincolor lightgreen
+ .t tag cget x -lmargincolor
+} -cleanup {
+ .t tag configure x -lmargincolor [lindex [.t tag configure x -lmargincolor] 3]
+} -result {lightgreen}
+test textTag-1.17b {configuration options} -body {
+ .t tag configure x -lmargincolor non-existent
+} -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} -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]
} -returnCodes error -result {expected boolean value but got "stupid"}
-test textTag-1.22 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.21a {tag configuration options} -body {
+ .t tag configure x -overstrikefg red
+ .t tag cget x -overstrikefg
+} -cleanup {
+ .t tag configure x -overstrikefg [lindex [.t tag configure x -overstrikefg] 3]
+} -result {red}
+test textTag-1.21b {configuration options} -body {
+ .t tag configure x -overstrikefg stupid
+} -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} -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]
} -returnCodes error -result {bad screen distance "bad"}
-test textTag-1.26 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.25a {tag configuration options} -body {
+ .t tag configure x -rmargincolor darkblue
+ .t tag cget x -rmargincolor
+} -cleanup {
+ .t tag configure x -rmargincolor [lindex [.t tag configure x -rmargincolor] 3]
+} -result {darkblue}
+test textTag-1.25b {configuration options} -body {
+ .t tag configure x -rmargincolor non-existent
+} -cleanup {
+ .t tag configure x -rmargincolor [lindex [.t tag configure x -rmargincolor] 3]
+} -returnCodes error -result {unknown color name "non-existent"}
+test textTag-1.25c {tag configuration options} -body {
+ .t tag configure x -selectbackground #012345
+ .t tag cget x -selectbackground
+} -cleanup {
+ .t tag configure x -selectbackground [lindex [.t tag configure x -selectbackground] 3]
+} -result {#012345}
+test textTag-1.25d {configuration options} -body {
+ .t tag configure x -selectbackground non-existent
+} -cleanup {
+ .t tag configure x -selectbackground [lindex [.t tag configure x -selectbackground] 3]
+} -returnCodes error -result {unknown color name "non-existent"}
+test textTag-1.25e {tag configuration options} -body {
+ .t tag configure x -selectforeground #012345
+ .t tag cget x -selectforeground
+} -cleanup {
+ .t tag configure x -selectforeground [lindex [.t tag configure x -selectforeground] 3]
+} -result {#012345}
+test textTag-1.25f {configuration options} -body {
+ .t tag configure x -selectforeground non-existent
+} -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} -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]
} -returnCodes error -result {expected boolean value but got "stupid"}
+test textTag-1.36 {tag configuration options} -body {
+ .t tag configure x -underlinefg red
+ .t tag cget x -underlinefg
+} -cleanup {
+ .t tag configure x -underlinefg [lindex [.t tag configure x -underlinefg] 3]
+} -result {red}
+test textTag-1.37 {configuration options} -body {
+ .t tag configure x -underlinefg stupid
+} -cleanup {
+ .t tag configure x -underlinefg [lindex [.t tag configure x -underlinefg] 3]
+} -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
@@ -349,9 +328,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
@@ -359,9 +336,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
@@ -373,9 +348,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
@@ -388,23 +361,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"
@@ -416,54 +385,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
@@ -472,9 +427,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
@@ -483,17 +436,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 {
@@ -501,30 +450,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
@@ -533,136 +472,133 @@ 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
} -cleanup {
.t tag delete x
} -result {-underline {} {} {} yes}
-test textTag-5.5 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.4a {TkTextTagCmd - "configure" option} -body {
+ .t tag delete x
+ .t tag configure x -underlinefg lightgreen
+ .t tag configure x -underlinefg
+} -cleanup {
+ .t tag delete x
+} -result {-underlinefg {} {} {} lightgreen}
+test textTag-5.5 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -overstrike on
.t tag cget x -overstrike
} -cleanup {
.t tag delete x
} -result {on}
-test textTag-5.6 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.5a {TkTextTagCmd - "configure" option} -body {
+ .t tag delete x
+ .t tag configure x -overstrikefg lightgreen
+ .t tag configure x -overstrikefg
+} -cleanup {
+ .t tag delete x
+} -result {-overstrikefg {} {} {} lightgreen}
+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 {
.t tag delete x
} -returnCodes error -result {bad screen distance "1.0q"}
-test textTag-5.13 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.13 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
- .t tag configure x -lmargin1 2 -lmargin2 4 -rmargin 5
+ .t tag configure x -lmargin1 2 -lmargin2 4 -rmargin 5 \
+ -lmargincolor darkblue -rmargincolor lightgreen
list [.t tag configure x -lmargin1] [.t tag configure x -lmargin2] \
- [.t tag configure x -rmargin]
+ [.t tag configure x -rmargin] [.t tag configure x -lmargincolor] \
+ [.t tag configure x -rmargincolor]
} -cleanup {
.t tag delete x
-} -result {{-lmargin1 {} {} {} 2} {-lmargin2 {} {} {} 4} {-rmargin {} {} {} 5}}
-test textTag-5.14 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+} -result [list {-lmargin1 {} {} {} 2} {-lmargin2 {} {} {} 4} \
+ {-rmargin {} {} {} 5} \
+ {-lmargincolor {} {} {} darkblue} {-rmargincolor {} {} {} lightgreen} \
+ ]
+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 {
.t tag delete x
} -returnCodes error -result {bad screen distance "gorp"}
-test textTag-5.16 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.15a {TkTextTagCmd - "configure" option} -body {
+ .t tag delete x
+ .t tag configure x -lmargincolor rainbow
+} -cleanup {
+ .t tag delete x
+} -returnCodes error -result {unknown color name "rainbow"}
+test textTag-5.16 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -rmargin 140.1.1
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad screen distance "140.1.1"}
+test textTag-5.16a {TkTextTagCmd - "configure" option} -body {
+ .t tag delete x
+ .t tag configure x -rmargincolor rainbow
+} -cleanup {
+ .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] \
@@ -670,33 +606,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
@@ -706,28 +634,65 @@ 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
} -result {}
+test textTag-5.23 {TkTextTagCmd - "configure" option} -body {
+ set x {}
+ # when [.t tag cget sel -selectbackground] == "", mirroring happens between
+ # the text widget option -selectbackground
+ # and the tag option -background
+ .t tag configure sel -selectbackground {}
+ .t configure -selectbackground black
+ .t tag configure sel -background yellow
+ lappend x [.t cget -selectbackground]
+ .t tag configure sel -background orange
+ .t configure -selectbackground blue
+ lappend x [.t tag cget sel -background]
+ # when [.t tag cget sel -selectbackground] != "", mirroring happens between
+ # the text widget option -selectbackground
+ # and the tag option -selectbackground
+ .t tag configure sel -selectbackground green
+ .t configure -selectbackground red
+ lappend x [.t tag cget sel -selectbackground]
+ .t configure -selectbackground black
+ .t tag configure sel -selectbackground white
+ lappend x [.t cget -selectbackground]
+ return $x
+} -result {yellow blue red white}
+test textTag-5.24 {TkTextTagCmd - "configure" option} -body {
+ set x {}
+ # when [.t tag cget sel -selectforeground] == "", mirroring happens between
+ # the text widget option -selectforeground
+ # and the tag option -foreground
+ .t tag configure sel -selectforeground {}
+ .t configure -selectforeground black
+ .t tag configure sel -foreground yellow
+ lappend x [.t cget -selectforeground]
+ .t tag configure sel -foreground orange
+ .t configure -selectforeground blue
+ lappend x [.t tag cget sel -foreground]
+ # when [.t tag cget sel -selectforeground] != "", mirroring happens between
+ # the text widget option -selectforeground
+ # and the tag option -selectforeground
+ .t tag configure sel -selectforeground green
+ .t configure -selectforeground red
+ lappend x [.t tag cget sel -selectforeground]
+ .t configure -selectforeground black
+ .t tag configure sel -selectforeground white
+ lappend x [.t cget -selectforeground]
+ 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
@@ -738,9 +703,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
@@ -749,9 +712,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
@@ -761,24 +722,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} {
@@ -790,9 +743,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} {
@@ -804,9 +755,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} {
@@ -820,16 +769,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} {
@@ -840,9 +785,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} {
@@ -857,24 +800,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
@@ -882,9 +817,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
@@ -894,9 +827,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
@@ -906,9 +837,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
@@ -918,9 +847,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
@@ -930,9 +857,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
@@ -942,9 +867,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
@@ -954,9 +877,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
@@ -966,9 +887,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
@@ -978,9 +897,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
@@ -990,9 +907,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
@@ -1004,28 +919,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
@@ -1035,9 +942,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
@@ -1047,9 +952,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
@@ -1059,9 +962,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
@@ -1071,9 +972,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
@@ -1083,9 +982,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
@@ -1095,9 +992,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
@@ -1107,9 +1002,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
@@ -1119,9 +1012,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
@@ -1131,9 +1022,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
@@ -1143,9 +1032,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
@@ -1157,24 +1044,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} {
@@ -1186,9 +1065,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} {
@@ -1200,9 +1077,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} {
@@ -1216,20 +1091,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
@@ -1239,9 +1108,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
@@ -1252,14 +1119,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
@@ -1268,9 +1131,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
@@ -1286,7 +1147,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} {
@@ -1297,7 +1158,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} {
@@ -1310,7 +1171,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} {
@@ -1320,7 +1181,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} {
@@ -1346,7 +1207,7 @@ 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]
-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 {
@@ -1371,7 +1232,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 {
@@ -1399,7 +1260,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 {
@@ -1432,9 +1293,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 {
@@ -1454,9 +1313,7 @@ test textTag-16.1 {TkTextPickCurrent procedure} -constraints {
lappend x [.t index current]
} -result {2.1 3.2 3.2 3.2 3.2 3.2 4.3}
-test textTag-16.2 {TkTextPickCurrent procedure} -constraints {
- haveCourier12
-} -setup {
+test textTag-16.2 {TkTextPickCurrent procedure} -setup {
.t tag delete {*}[.t tag names]
event generate {} <Motion> -warp 1 -x -1 -y -1; update
} -body {
@@ -1471,9 +1328,7 @@ test textTag-16.2 {TkTextPickCurrent procedure} -constraints {
.t tag delete big
} -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
}
@@ -1500,9 +1355,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
}
@@ -1528,9 +1381,7 @@ test textTag-16.4 {TkTextPickCurrent procedure} -constraints {
.t tag delete {*}[.t tag names]
} -result {enter-a enter-b enter-c | leave-c leave-b}
-test textTag-16.5 {TkTextPickCurrent procedure} -constraints {
- haveCourier12
-} -setup {
+test textTag-16.5 {TkTextPickCurrent procedure} -setup {
foreach i {big a b c d} {
.t tag remove $i 1.0 end
}
@@ -1546,9 +1397,7 @@ test textTag-16.5 {TkTextPickCurrent procedure} -constraints {
.t tag delete a big
} -result {3.2}
-test textTag-16.6 {TkTextPickCurrent procedure} -constraints {
- haveCourier12
-} -setup {
+test textTag-16.6 {TkTextPickCurrent procedure} -setup {
foreach i {big a b c d} {
.t tag remove $i 1.0 end
}
@@ -1565,9 +1414,7 @@ test textTag-16.6 {TkTextPickCurrent procedure} -constraints {
.t tag delete a big
} -result {3.1}
-test textTag-16.7 {TkTextPickCurrent procedure} -constraints {
- haveCourier12
-} -setup {
+test textTag-16.7 {TkTextPickCurrent procedure} -setup {
foreach i {big a b c d} {
.t tag remove $i 1.0 end
}
@@ -1606,7 +1453,7 @@ test textTag-18.1 {TkTextPickCurrent tag bindings} -setup {
text .t -width 30 -height 4 -relief sunken -borderwidth 10 \
-highlightthickness 10 -pady 2
pack .t
-
+
.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 c3483e6..b0359f9 100644
--- a/tests/textWind.test
+++ b/tests/textWind.test
@@ -32,7 +32,7 @@ set fixedDiff [expr {$fixedHeight - 13}] ;# 2 on XP
set color [expr {[winfo depth .t] > 1 ? "green" : "black"}]
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.
@@ -1458,6 +1458,23 @@ test textWind-17.10 {peer widget window configuration} -setup {
destroy .tt .t
} -result {{-window {} {} {} {}} {-window {} {} {} {}} {-window {} {} {} .t.f} {-window {} {} {} .tt.t.f}}
+test textWind-18.1 {embedded window deletion triggered by a script bound to <Map>} -setup {
+ catch {destroy .t .f .f2}
+} -body {
+ pack [text .t]
+ for {set i 1} {$i < 100} {incr i} {.t insert end "Line $i\n"}
+ .t window create end -window [frame .f -background red -width 80 -height 80]
+ .t window create end -window [frame .f2 -background blue -width 80 -height 80]
+ bind .f <Map> {.t delete .f}
+ update
+ # this shall not crash (bug 1501749)
+ after 100 {.t yview end}
+ tkwait visibility .f2
+ update
+} -cleanup {
+ destroy .t .f .f2
+} -result {}
+
option clear
# cleanup
diff --git a/tests/ttk/all.tcl b/tests/ttk/all.tcl
index da2e316..f03cd56 100644
--- a/tests/ttk/all.tcl
+++ b/tests/ttk/all.tcl
@@ -9,9 +9,8 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require Tcl 8.5
-package require tcltest 2.2
package require Tk ;# This is the Tk test suite; fail early if no Tk!
+package require tcltest 2.2
tcltest::configure {*}$argv
tcltest::configure -testdir [file normalize [file dirname [info script]]]
tcltest::configure -loadfile \
diff --git a/tests/ttk/checkbutton.test b/tests/ttk/checkbutton.test
index e18ff32..6b79287 100644
--- a/tests/ttk/checkbutton.test
+++ b/tests/ttk/checkbutton.test
@@ -45,4 +45,20 @@ test checkbutton-1.6 "Checkbutton default variable" -body {
lappend result [info exists .cb] [set .cb] [.cb state]
} -result [list .cb 0 alternate 1 on selected 1 off {}]
+# Bug [109865fa01]
+test checkbutton-1.7 "Button destroyed by click" -body {
+ proc destroy_button {} {
+ destroy .top
+ }
+ toplevel .top
+ ttk::menubutton .top.mb -text Button -style TLabel
+ bind .top.mb <ButtonRelease-1> destroy_button
+ pack .top.mb
+ focus -force .top.mb
+ update
+ event generate .top.mb <1>
+ event generate .top.mb <ButtonRelease-1>
+ update ; # shall not trigger error invalid command name ".top.b"
+} -result {}
+
tcltest::cleanupTests
diff --git a/tests/ttk/combobox.test b/tests/ttk/combobox.test
index 43f3cf1..a31b3bd 100644
--- a/tests/ttk/combobox.test
+++ b/tests/ttk/combobox.test
@@ -38,7 +38,7 @@ 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
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/notebook.test b/tests/ttk/notebook.test
index cdce020..3a2a6ff 100644
--- a/tests/ttk/notebook.test
+++ b/tests/ttk/notebook.test
@@ -468,6 +468,27 @@ test notebook-1817596-3 "insert/configure" -body {
} -result [list [list .nb.l2 .nb.l0 .nb.l1] L2 L0 L1] -cleanup { destroy .nb }
+test notebook-readd-1 "add same widget twice" -body {
+ pack [ttk::notebook .nb]
+ .nb add [ttk::button .nb.b1] -text "Button"
+ .nb add .nb.b1
+ .nb tabs
+} -result [list .nb.b1] -cleanup { destroy .nb }
+
+test notebook-readd-2 "add same widget twice, with options" -body {
+ pack [ttk::notebook .nb]
+ .nb add [ttk::button .nb.b1] -text "Tab label"
+ .nb add .nb.b1 -text "Changed tab label"
+ .nb tabs
+} -result [list .nb.b1] -cleanup { destroy .nb }
+
+test notebook-readd-3 "insert same widget twice, with options" -body {
+ pack [ttk::notebook .nb]
+ .nb insert end [ttk::button .nb.b1] -text "Tab label"
+ .nb insert end .nb.b1 -text "Changed tab label"
+ .nb tabs
+} -result [list .nb.b1] -cleanup { destroy .nb }
+
# See #1343984
test notebook-1343984-1 "don't autoselect on destroy - setup" -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/scrollbar.test b/tests/ttk/scrollbar.test
index 0464273..1f8d158 100644
--- a/tests/ttk/scrollbar.test
+++ b/tests/ttk/scrollbar.test
@@ -9,8 +9,8 @@ test scrollbar-swapout-1 "Use core scrollbars on OSX..." -constraints {
} -body {
ttk::scrollbar .sb -command "yadda"
list [winfo class .sb] [.sb cget -command]
-} -result [list Scrollbar yadda] -cleanup {
- destroy .sb
+} -result [list Scrollbar yadda] -cleanup {
+ destroy .sb
}
test scrollbar-swapout-2 "... unless -style is specified ..." -constraints {
@@ -18,7 +18,7 @@ test scrollbar-swapout-2 "... unless -style is specified ..." -constraints {
} -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
@@ -27,7 +27,7 @@ test scrollbar-swapout-2 "... unless -style is specified ..." -constraints {
test scrollbar-swapout-3 "... or -class." -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 f7741c6..38bae14 100644
--- a/tests/ttk/spinbox.test
+++ b/tests/ttk/spinbox.test
@@ -143,7 +143,7 @@ test spinbox-1.8.4 "-validate option: " -setup {
.sb configure -validate all -validatecommand {lappend ::spinbox_test %P}
pack .sb
.sb set 50
- focus .sb
+ focus -force .sb
after 500 {set ::spinbox_wait 1} ; vwait ::spinbox_wait
set ::spinbox_test
} -cleanup {
@@ -199,6 +199,27 @@ test spinbox-2.4 "current command -- value not in list" -constraints nyi -setup
destroy .sb
} -result -1
+test spinbox-3.0 "textarea should expand to fill widget" -setup {
+ set SBV 5
+ set ::spinbox_test {}
+ ttk::spinbox .sb -from 0 -to 10 -textvariable SBV
+} -body {
+ grid .sb -sticky ew
+ grid columnconfigure . 0 -weight 1
+ bind . <Map> {
+ after idle {
+ wm geometry . "210x80"
+ after 100 {set ::spinbox_test [.sb identify element 5 5]}
+ }
+ bind . <Map> {}
+ }
+ after 500 {set ::spinbox_wait 1} ; vwait ::spinbox_wait
+ set ::spinbox_test
+} -cleanup {
+ destroy .sb
+ unset -nocomplain ::spinbox_test SBV
+} -result {textarea}
+
# nostomp: NB intentional difference between ttk::spinbox and tk::spinbox;
# see also #1439266
#
@@ -232,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 {
@@ -257,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/ttk.test b/tests/ttk/ttk.test
index e58b021..93dba34 100644
--- a/tests/ttk/ttk.test
+++ b/tests/ttk/ttk.test
@@ -206,7 +206,7 @@ test ttk-2.8 "bug 3223850: button state disabled during click" -setup {
destroy .b
set ttk28 {}
pack [ttk::button .b -command {set ::ttk28 failed}]
-} -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 137ef33..36064f9 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}
@@ -59,7 +59,7 @@ test unixbutton-1.1 {TkpComputeButtonGeometry procedure} -constraints {
image delete image1
} -result {68 48 74 54 112 52 112 52}
test unixbutton-1.2 {TkpComputeButtonGeometry procedure} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -77,7 +77,7 @@ test unixbutton-1.2 {TkpComputeButtonGeometry procedure} -constraints {
deleteWindows
} -result {23 33 29 39 54 37 54 37}
test unixbutton-1.3 {TkpComputeButtonGeometry procedure} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -178,7 +178,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 {
@@ -188,7 +188,7 @@ test unixbutton-1.9 {TkpComputeButtonGeometry procedure} -constraints {
deleteWindows
} -result {37 47}
test unixbutton-1.10 {TkpComputeButtonGeometry procedure} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -198,7 +198,7 @@ test unixbutton-1.10 {TkpComputeButtonGeometry procedure} -constraints {
deleteWindows
} -result {37 47}
test unixbutton-1.11 {TkpComputeButtonGeometry procedure} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -210,7 +210,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/unixEmbed.test b/tests/unixEmbed.test
index 8aaa3c4..9916df2 100644
--- a/tests/unixEmbed.test
+++ b/tests/unixEmbed.test
@@ -1,4 +1,4 @@
-# This file is a Tcl script to test out the procedures in the file
+# This file is a Tcl script to test out the procedures in the file
# tkUnixEmbed.c. It is organized in the standard fashion for Tcl
# tests.
#
@@ -55,14 +55,14 @@ proc colorsFree {w {red 31} {green 245} {blue 192}} {
}
test unixEmbed-1.1 {TkpUseWindow procedure, bad window identifier} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
toplevel .t -use xyz
} -returnCodes error -result {expected integer but got "xyz"}
test unixEmbed-1.2 {TkpUseWindow procedure, bad window identifier} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -237,7 +237,7 @@ test unixEmbed-3.1 {ContainerEventProc procedure, detect creation} -constraints
deleteWindows
} -result {{{XXX .f1 {} {}}} {{XXX .f1 XXX {}}}}
test unixEmbed-3.2 {ContainerEventProc procedure, set size on creation} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -250,7 +250,7 @@ test unixEmbed-3.2 {ContainerEventProc procedure, set size on creation} -constra
deleteWindows
} -result {200x200+0+0}
test unixEmbed-3.3 {ContainerEventProc procedure, disallow position changes} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -271,7 +271,7 @@ test unixEmbed-3.3 {ContainerEventProc procedure, disallow position changes} -co
deleteWindows
} -result {200x200+0+0}
test unixEmbed-3.4 {ContainerEventProc procedure, disallow position changes} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -292,7 +292,7 @@ test unixEmbed-3.4 {ContainerEventProc procedure, disallow position changes} -co
deleteWindows
} -result {300x100+0+0}
test unixEmbed-3.5 {ContainerEventProc procedure, geometry requests} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -313,7 +313,7 @@ test unixEmbed-3.5 {ContainerEventProc procedure, geometry requests} -constraint
deleteWindows
} -result {300 80 300x80+0+0}
test unixEmbed-3.6 {ContainerEventProc procedure, map requests} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -336,7 +336,7 @@ test unixEmbed-3.6 {ContainerEventProc procedure, map requests} -constraints {
deleteWindows
} -result {mapped}
test unixEmbed-3.7 {ContainerEventProc procedure, destroy events} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -361,7 +361,7 @@ test unixEmbed-3.7 {ContainerEventProc procedure, destroy events} -constraints {
test unixEmbed-4.1 {EmbedStructureProc procedure, configure events} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -405,7 +405,7 @@ test unixEmbed-4.2 {EmbedStructureProc procedure, destroy events} -constraints {
test unixEmbed-5.1 {EmbedFocusProc procedure, FocusIn events} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -426,7 +426,7 @@ test unixEmbed-5.1 {EmbedFocusProc procedure, FocusIn events} -constraints {
deleteWindows
} -result {{focus in .t1}}
test unixEmbed-5.2 {EmbedFocusProc procedure, focusing on dead window} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -448,7 +448,7 @@ test unixEmbed-5.2 {EmbedFocusProc procedure, focusing on dead window} -constrai
deleteWindows
} -result {}
test unixEmbed-5.3 {EmbedFocusProc procedure, FocusOut events} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -474,7 +474,7 @@ test unixEmbed-5.3 {EmbedFocusProc procedure, FocusOut events} -constraints {
test unixEmbed-6.1 {EmbedGeometryRequest procedure, window changes size} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -497,7 +497,7 @@ test unixEmbed-6.1 {EmbedGeometryRequest procedure, window changes size} -constr
deleteWindows
} -result {{{configure .t1 300 120}} 300x120+0+0}
test unixEmbed-6.2 {EmbedGeometryRequest procedure, window changes size} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -525,7 +525,7 @@ test unixEmbed-6.2 {EmbedGeometryRequest procedure, window changes size} -constr
test unixEmbed-7.1 {TkpRedirectKeyEvent procedure, forward keystroke} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -554,7 +554,7 @@ test unixEmbed-7.1 {TkpRedirectKeyEvent procedure, forward keystroke} -constrain
bind . <KeyPress> {}
} -result {{{key a 1}} {}}
test unixEmbed-7.2 {TkpRedirectKeyEvent procedure, don't forward keystroke width} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -679,7 +679,7 @@ test unixEmbed-9.2 {EmbedWindowDeleted procedure, check embeddedPtr} -constraint
test unixEmbed-10.1 {geometry propagation in tkUnixWm.c/UpdateGeometryInfo} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -694,7 +694,7 @@ test unixEmbed-10.1 {geometry propagation in tkUnixWm.c/UpdateGeometryInfo} -con
deleteWindows
} -result {150x80+0+0}
test unixEmbed-10.2 {geometry propagation in tkUnixWm.c/UpdateGeometryInfo} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
diff --git a/tests/unixFont.test b/tests/unixFont.test
index 27826d4..e8ff90e 100644
--- a/tests/unixFont.test
+++ b/tests/unixFont.test
@@ -1,4 +1,4 @@
-# This file is a Tcl script to test out the procedures in tkUnixFont.c.
+# This file is a Tcl script to test out the procedures in tkUnixFont.c.
# It is organized in the standard fashion for Tcl tests.
#
# Many of these tests are visually oriented and cannot be checked
@@ -6,7 +6,7 @@
# underlined?"); these tests attempt to exercise the code in question,
# but there are no results that can be checked. Some tests depend on the
# fonts having or not having certain properties, which may not be valid
-# at all sites.
+# at all sites.
#
# Copyright (c) 1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
@@ -124,7 +124,7 @@ test unixfont-2.11 {TkpGetFontFromAttributes: font cannot be loaded} unix {
font actual {-size 14}
set x {}
-} {}
+} {}
test unixfont-3.1 {TkpDeleteFont procedure} unix {
font actual {-family xyz}
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/unixWm.test b/tests/unixWm.test
index d579fc7..0c3fb9b 100644
--- a/tests/unixWm.test
+++ b/tests/unixWm.test
@@ -630,7 +630,7 @@ test unixWm-17.2 {Tk_WmCmd procedure, "focusmodel" option} unix {
list [catch {wm focusmodel .t bogus} msg] $msg
} {1 {bad argument "bogus": must be active or passive}}
test unixWm-17.3 {Tk_WmCmd procedure, "focusmodel" option} unix {
- set result {}
+ set result {}
lappend result [wm focusmodel .t]
wm focusmodel .t active
lappend result [wm focusmodel .t]
@@ -1326,7 +1326,7 @@ test unixWm-40.1 {Tk_SetGrid procedure, set grid dimensions before turning on gr
destroy .t
toplevel .t
wm geometry .t 30x10+0+0
- listbox .t.l -height 20 -width 20 -setgrid 1
+ listbox .t.l -height 20 -width 20 -setgrid 1
pack .t.l -fill both -expand 1
update
wm geometry .t
@@ -1335,7 +1335,7 @@ test unixWm-40.2 {Tk_SetGrid procedure, turning on grid when dimensions already
destroy .t
toplevel .t
wm geometry .t 200x100+0+0
- listbox .t.l -height 20 -width 20
+ listbox .t.l -height 20 -width 20
pack .t.l -fill both -expand 1
update
.t.l configure -setgrid 1
@@ -1748,7 +1748,7 @@ test unixWm-49.2 {Tk_GetRootCoords procedure, menubars} {unix testmenubar} {
testmenubar window .t .t.m
update
list [expr [winfo rootx .t.m.f] - $x] [expr [winfo rooty .t.m.f] - $y] \
- [expr [winfo rootx .t.f] - $x] [expr [winfo rooty .t.f] - $y]
+ [expr [winfo rootx .t.f] - $x] [expr [winfo rooty .t.f] - $y]
} {52 7 12 62}
deleteWindows
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/winButton.test b/tests/winButton.test
index 8bf1d01..88b4345 100644
--- a/tests/winButton.test
+++ b/tests/winButton.test
@@ -22,8 +22,10 @@ option clear
# ----------------------------------------------------------------------
test winbutton-1.1 {TkpComputeButtonGeometry procedure} -constraints {
- testImageType win
+ testImageType win nonPortable
} -setup {
+ # nonPortable because of [3e3e25f483]: on Win7 first started with a high DPI screen
+ # the smallest size (i.e. 8) is not available for "MS Sans Serif" font
deleteWindows
} -body {
image create test image1
@@ -47,7 +49,11 @@ test winbutton-1.1 {TkpComputeButtonGeometry procedure} -constraints {
image delete image1
} -result {68 48 70 50 90 52 90 52}
-test winbutton-1.2 {TkpComputeButtonGeometry procedure} -constraints win -setup {
+test winbutton-1.2 {TkpComputeButtonGeometry procedure} -constraints {
+ win nonPortable
+} -setup {
+ # nonPortable because of [3e3e25f483]: on Win7 first started with a high DPI screen
+ # the smallest size (i.e. 8) is not available for "MS Sans Serif" font
deleteWindows
} -body {
label .b1 -bitmap question -bd 3 -padx 0 -pady 2
diff --git a/tests/winDialog.test b/tests/winDialog.test
index b7847a5..c53b6d7 100644
--- 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
# http://core.tcl.tk/tk/tktview/4a0451f5291b3c9168cc560747dae9264e1d2ef6
# $x is expected to be empty
append x $y
@@ -265,6 +265,7 @@ test winDialog-5.6 {GetFileName: valid option, but missing value} -constraints {
} -body {
tk_getOpenFile -initialdir bar -title
} -returnCodes error -result {value for "-title" missing}
+
test winDialog-5.7 {GetFileName: extension begins with .} -constraints {
nt testwinevent
} -body {
@@ -281,6 +282,145 @@ test winDialog-5.7 {GetFileName: extension begins with .} -constraints {
} -cleanup {
unset msg
} -result bar.foo
+
+test winDialog-5.7.1 {GetFileName: extension {} } -constraints {
+ nt testwinevent
+} -body {
+ start {set x [tk_getSaveFile -defaultextension {} -title Save]}
+ set msg {}
+ then {
+ if {[catch {SetText [vista? 0x47C 0x3e9] bar} msg]} {
+ Click cancel
+ } else {
+ Click ok
+ }
+ }
+ set x "[file tail $x]$msg"
+} -cleanup {
+ unset msg
+} -result bar
+
+test winDialog-5.7.2 {GetFileName: extension {} Bug 47af31bd3ac6fbbb33cde1a5bab1e756ff2a6e00 } -constraints {
+ nt testwinevent
+} -body {
+ start {set x [tk_getSaveFile -filetypes {{All *}} -defaultextension {} -title Save]}
+ set msg {}
+ then {
+ if {[catch {SetText [vista? 0x47C 0x3e9] bar} msg]} {
+ Click cancel
+ } else {
+ Click ok
+ }
+ }
+ set x "[file tail $x]$msg"
+} -cleanup {
+ unset msg
+} -result bar
+
+test winDialog-5.7.3 {GetFileName: extension {} Bug 47af31bd3ac6fbbb33cde1a5bab1e756ff2a6e00 } -constraints {
+ nt testwinevent
+} -body {
+ start {set x [tk_getSaveFile -filetypes {{All *}} -defaultextension {} -title Save]}
+ set msg {}
+ then {
+ if {[catch {SetText [vista? 0x47C 0x3e9] bar.c} msg]} {
+ Click cancel
+ } else {
+ Click ok
+ }
+ }
+ set x "[file tail $x]$msg"
+} -cleanup {
+ unset msg
+} -result bar.c
+
+test winDialog-5.7.4 {GetFileName: extension {} } -constraints {
+ nt testwinevent
+} -body {
+ # Although the docs do not explicitly mention, -filetypes seems to
+ # override -defaultextension
+ start {set x [tk_getSaveFile -filetypes {{C .c} {Tcl .tcl}} -defaultextension {foo} -title Save]}
+ set msg {}
+ then {
+ if {[catch {SetText [vista? 0x47C 0x3e9] bar} msg]} {
+ Click cancel
+ } else {
+ Click ok
+ }
+ }
+ set x "[file tail $x]$msg"
+} -cleanup {
+ unset msg
+} -result bar.c
+
+test winDialog-5.7.5 {GetFileName: extension {} } -constraints {
+ nt testwinevent
+} -body {
+ # Although the docs do not explicitly mention, -filetypes seems to
+ # override -defaultextension
+ start {set x [tk_getSaveFile -filetypes {{C .c} {Tcl .tcl}} -defaultextension {} -title Save]}
+ set msg {}
+ then {
+ if {[catch {SetText [vista? 0x47C 0x3e9] bar} msg]} {
+ Click cancel
+ } else {
+ Click ok
+ }
+ }
+ set x "[file tail $x]$msg"
+} -cleanup {
+ unset msg
+} -result bar.c
+
+
+test winDialog-5.7.6 {GetFileName: All/extension } -constraints {
+ nt testwinevent
+} -body {
+ # In 8.6.4 this combination resulted in bar.ext.ext which is bad
+ start {set x [tk_getSaveFile -filetypes {{All *}} -defaultextension {ext} -title Save]}
+ set msg {}
+ then {
+ if {[catch {SetText [vista? 0x47C 0x3e9] bar} msg]} {
+ Click cancel
+ } else {
+ Click ok
+ }
+ }
+ set x "[file tail $x]$msg"
+} -cleanup {
+ unset msg
+} -result bar.ext
+
+test winDialog-5.7.7 {tk_getOpenFile: -defaultextension} -constraints {
+ nt testwinevent
+} -body {
+ unset -nocomplain x
+ tcltest::makeFile "" "5 7 7.ext" [initialdir]
+ start {set x [tk_getOpenFile \
+ -defaultextension ext \
+ -initialdir [file nativename [initialdir]] \
+ -initialfile "5 7 7" -title Foo]}
+ then {
+ Click ok
+ }
+ return $x
+} -result [file join [initialdir] "5 7 7.ext"]
+
+test winDialog-5.7.8 {tk_getOpenFile: -defaultextension} -constraints {
+ nt testwinevent
+} -body {
+ unset -nocomplain x
+ tcltest::makeFile "" "5 7 8.ext" [initialdir]
+ start {set x [tk_getOpenFile \
+ -defaultextension ext \
+ -initialdir [file nativename [initialdir]] \
+ -initialfile "5 7 8.ext" -title Foo]}
+ then {
+ Click ok
+ }
+ return $x
+} -result [file join [initialdir] "5 7 8.ext"]
+
test winDialog-5.8 {GetFileName: extension doesn't begin with .} -constraints {
nt testwinevent
} -body {
@@ -301,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
@@ -339,6 +479,7 @@ test winDialog-5.11 {GetFileName: initial directory} -constraints {
}
return $x
} -result [file join [initialdir] "12x 455"]
+
test winDialog-5.12 {GetFileName: initial directory: Tcl_TranslateFilename()} -constraints {
nt
} -body {
@@ -346,6 +487,199 @@ test winDialog-5.12 {GetFileName: initial directory: Tcl_TranslateFilename()} -c
tk_getOpenFile -initialdir ~12x/455
} -returnCodes error -result {user "12x" doesn't exist}
+
+test winDialog-5.12.1 {tk_getSaveFile: initial directory: ~} -constraints {
+ nt testwinevent
+} -body {
+ unset -nocomplain x
+ start {set x [tk_getSaveFile \
+ -initialdir ~ \
+ -initialfile "5 12 1" -title Foo]}
+ then {
+ Click ok
+ }
+ return $x
+} -result [file normalize [file join ~ "5 12 1"]]
+
+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
+ # least) it returned /users/Default instead of /users/USERNAME...
+
+ unset -nocomplain x
+ start {set x [tk_getSaveFile \
+ -initialdir ~$::tcl_platform(user) \
+ -initialfile "5 12 2" -title Foo]}
+ then {
+ Click ok
+ }
+ return $x
+} -result [file normalize [file join ~$::tcl_platform(user) "5 12 2"]]
+
+test winDialog-5.12.3 {tk_getSaveFile: initial directory: .} -constraints {
+ nt testwinevent
+} -body {
+ # Windows remembers dirs from previous selections so use
+ # a subdir for this test, not [initialdir] itself
+ set newdir [tcltest::makeDirectory "5 12 3"]
+ set cur [pwd]
+ try {
+ cd $newdir
+ unset -nocomplain x
+ start {set x [tk_getSaveFile \
+ -initialdir . \
+ -initialfile "testfile" -title Foo]}
+ then {
+ Click ok
+ }
+ } finally {
+ cd $cur
+ }
+ string equal $x [file join $newdir testfile]
+} -result 1
+
+test winDialog-5.12.4 {tk_getSaveFile: initial directory: unicode} -constraints {
+ nt testwinevent
+} -body {
+ set dir [tcltest::makeDirectory "\u0167\u00e9\u015d\u0167"]
+ unset -nocomplain x
+ start {set x [tk_getSaveFile \
+ -initialdir $dir \
+ -initialfile "testfile" -title Foo]}
+ then {
+ Click ok
+ }
+ string equal $x [file join $dir testfile]
+} -result 1
+
+test winDialog-5.12.5 {tk_getSaveFile: initial directory: nativename} -constraints {
+ nt testwinevent
+} -body {
+ unset -nocomplain x
+ start {set x [tk_getSaveFile \
+ -initialdir [file nativename [initialdir]] \
+ -initialfile "5 12 5" -title Foo]}
+ then {
+ Click ok
+ }
+ return $x
+} -result [file join [initialdir] "5 12 5"]
+
+test winDialog-5.12.6 {tk_getSaveFile: initial directory: relative} -constraints {
+ nt testwinevent
+} -body {
+ # Windows remembers dirs from previous selections so use
+ # a subdir for this test, not [initialdir] itself
+ set dir [tcltest::makeDirectory "5 12 6"]
+ set cur [pwd]
+ try {
+ cd [file dirname $dir]
+ unset -nocomplain x
+ start {set x [tk_getSaveFile \
+ -initialdir "5 12 6" \
+ -initialfile "testfile" -title Foo]}
+ then {
+ Click ok
+ }
+ } finally {
+ cd $cur
+ }
+ string equal $x [file join $dir testfile]
+} -result 1
+
+test winDialog-5.12.7 {tk_getOpenFile: initial directory: ~} -constraints {
+ nt testwinevent
+} -body {
+ set fn [file tail [lindex [glob -types f ~/*] 0]]
+ unset -nocomplain x
+ start {set x [tk_getOpenFile \
+ -initialdir ~ \
+ -initialfile $fn -title Foo]}
+ then {
+ Click ok
+ }
+ string equal $x [file normalize [file join ~ $fn]]
+} -result 1
+
+test winDialog-5.12.8 {tk_getOpenFile: initial directory: .} -constraints {
+ nt testwinevent
+} -body {
+ # Windows remembers dirs from previous selections so use
+ # a subdir for this test, not [initialdir] itself
+ set newdir [tcltest::makeDirectory "5 12 8"]
+ set path [tcltest::makeFile "" "testfile" $newdir]
+ set cur [pwd]
+ try {
+ cd $newdir
+ unset -nocomplain x
+ start {set x [tk_getOpenFile \
+ -initialdir . \
+ -initialfile "testfile" -title Foo]}
+ then {
+ Click ok
+ }
+ } finally {
+ cd $cur
+ }
+ string equal $x $path
+} -result 1
+
+test winDialog-5.12.9 {tk_getOpenFile: initial directory: unicode} -constraints {
+ nt testwinevent
+} -body {
+ set dir [tcltest::makeDirectory "\u0167\u00e9\u015d\u0167"]
+ set path [tcltest::makeFile "" testfile $dir]
+ unset -nocomplain x
+ start {set x [tk_getOpenFile \
+ -initialdir $dir \
+ -initialfile "testfile" -title Foo]}
+ then {
+ Click ok
+ }
+ string equal $x $path
+} -result 1
+
+test winDialog-5.12.10 {tk_getOpenFile: initial directory: nativename} -constraints {
+ nt testwinevent
+} -body {
+ unset -nocomplain x
+ tcltest::makeFile "" "5 12 10" [initialdir]
+ start {set x [tk_getOpenFile \
+ -initialdir [file nativename [initialdir]] \
+ -initialfile "5 12 10" -title Foo]}
+ then {
+ Click ok
+ }
+ return $x
+} -result [file join [initialdir] "5 12 10"]
+
+test winDialog-5.12.11 {tk_getOpenFile: initial directory: relative} -constraints {
+ nt testwinevent
+} -body {
+ # Windows remembers dirs from previous selections so use
+ # a subdir for this test, not [initialdir] itself
+ set dir [tcltest::makeDirectory "5 12 11"]
+ set path [tcltest::makeFile "" testfile $dir]
+ set cur [pwd]
+ try {
+ cd [file dirname $dir]
+ unset -nocomplain x
+ start {set x [tk_getOpenFile \
+ -initialdir [file tail $dir] \
+ -initialfile "testfile" -title Foo]}
+ then {
+ Click ok
+ }
+ } finally {
+ cd $cur
+ }
+ string equal $x $path
+} -result 1
+
test winDialog-5.13 {GetFileName: initial file} -constraints {
nt testwinevent
} -body {
@@ -397,7 +731,7 @@ test winDialog-5.17 {GetFileName: title} -constraints {
nt testwinevent
} -body {
# case FILE_TITLE:
-
+
start {tk_getOpenFile -title Narf}
then {
Click cancel
@@ -460,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]
@@ -593,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 8039426..08a53ff 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.
@@ -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..b339b2a 100644
--- a/tests/winWm.test
+++ b/tests/winWm.test
@@ -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 1aa0779..afcc2cd 100644
--- a/tests/wm.test
+++ b/tests/wm.test
@@ -2276,6 +2276,32 @@ test wm-forget-1.4 "pack into unmapped toplevel causes crash" -body {
deleteWindows
} -result {}
+test wm-forget-2 {bug [e9112ef96e] - [wm forget] doesn't completely} -setup {
+ catch {destroy .l .f.b .f}
+ set res {}
+} -body {
+ label .l -text "Top Dot"
+ frame .f
+ button .f.b -text Hello -command "puts Hello!"
+ pack .l -side top
+ pack .f.b
+ pack .f -side bottom
+ update
+ set res [winfo manager .f]
+ pack forget .f
+ update
+ lappend res [winfo manager .f]
+ wm manage .f
+ update
+ lappend res [winfo manager .f]
+ wm forget .f
+ update
+ lappend res [winfo manager .f]
+} -cleanup {
+ destroy .l .f.b .f
+ unset res
+} -result {pack {} wm {}}
+
# FIXME:
# Test delivery of virtual events to the WM. We could check to see if the
diff --git a/unix/Makefile.in b/unix/Makefile.in
index a55d454..88ec7a4 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -231,7 +231,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
@@ -270,7 +270,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.
@@ -745,10 +745,6 @@ install-strip:
INSTALL_PROGRAM="$(INSTALL_PROGRAM) ${INSTALL_STRIP_PROGRAM}" \
INSTALL_LIBRARY="$(INSTALL_LIBRARY) ${INSTALL_STRIP_LIBRARY}"
-# Note: before running ranlib below, must cd to target directory because
-# some ranlibs write to current directory, and this might not always be
-# possible (e.g. if installing as root).
-
install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) ${WISH_EXE}
@for i in "$(LIB_INSTALL_DIR)" "$(BIN_INSTALL_DIR)" \
"$(PKG_INSTALL_DIR)" "$(CONFIG_INSTALL_DIR)" ; \
@@ -1583,7 +1579,7 @@ 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 \
+$(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
@@ -1597,12 +1593,12 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tkConfig.h.in $(UNIX_DIR)/tk.pc.in $(M
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 \
+ cp $(UNIX_DIR)/configure $(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
+ chmod 775 $(DISTDIR)/unix/configure $(DISTDIR)/unix/configure.ac
mkdir $(DISTDIR)/bitmaps
@(cd $(TOP_DIR); for i in bitmaps/* ; do \
if [ -f $$i ] ; then \
@@ -1623,24 +1619,19 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tkConfig.h.in $(UNIX_DIR)/tk.pc.in $(M
$(TTK_DIR)/ttkGenStubs.tcl $(DISTDIR)/generic/ttk
mkdir $(DISTDIR)/win
cp $(TOP_DIR)/win/Makefile.in $(DISTDIR)/win
- cp $(TOP_DIR)/win/configure.in \
+ cp $(TOP_DIR)/win/configure.ac \
$(TOP_DIR)/win/configure \
$(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
- $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/*.bat
cp -p $(TOP_DIR)/win/makefile.* $(DISTDIR)/win
- $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/makefile.*
cp -p $(TOP_DIR)/win/rules.vc $(DISTDIR)/win
- $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/rules.vc
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
- $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/rc/*.rc
- $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/wish.exe.manifest.in
mkdir $(DISTDIR)/macosx
cp -p $(MAC_OSX_DIR)/GNUmakefile $(MAC_OSX_DIR)/README \
$(MAC_OSX_DIR)/*.icns $(MAC_OSX_DIR)/*.tiff \
@@ -1659,7 +1650,7 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tkConfig.h.in $(UNIX_DIR)/tk.pc.in $(M
$(DISTDIR)/macosx/Tk.xcodeproj
mkdir $(DISTDIR)/compat
cp -p $(TOP_DIR)/license.terms $(TCLDIR)/compat/unistd.h \
- $(TCLDIR)/compat/stdlib.h $(TCLDIR)/compat/limits.h \
+ $(TCLDIR)/compat/stdlib.h \
$(DISTDIR)/compat
mkdir $(DISTDIR)/xlib
cp -p $(XLIB_DIR)/*.[ch] $(DISTDIR)/xlib
diff --git a/unix/configure b/unix/configure
index 21a053e..1ed0275 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"
+
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+} # 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
+
+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,247 @@ 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
+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
+LIBOBJS
+AR
+RANLIB
+TCL_THREADS
+EGREP
+GREP
+CPP
+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'
ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+with_tcl
+enable_man_symlinks
+enable_man_compression
+enable_man_suffix
+enable_threads
+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 +817,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 +881,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 +960,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 +990,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 +1064,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 +1124,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 +1173,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 +1200,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 +1243,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 +1254,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 +1328,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 +1342,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 +1362,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 +1393,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)
@@ -879,128 +1435,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;;
+ 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_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
-
- 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_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_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_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 +1951,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 +1963,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 +1987,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 +1997,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 +2019,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 +2135,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 +2278,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=".4"
+TK_MINOR_VERSION=7
+TK_PATCH_LEVEL="a0"
VERSION=${TK_VERSION}
LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv"
@@ -1357,15 +2300,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 +2317,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
@@ -1460,28 +2401,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
@@ -1542,25 +2481,19 @@ echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
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
- 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'`
@@ -1581,22 +2514,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; }
@@ -1619,62 +2552,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; }
@@ -1697,10 +2628,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.
@@ -1710,35 +2641,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.
@@ -1748,39 +2681,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.
@@ -1790,77 +2734,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
+ { $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 "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
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}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.
@@ -1871,18 +2775,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.
@@ -1900,24 +2805,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.
@@ -1927,39 +2833,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.
@@ -1969,66 +2877,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
@@ -2040,112 +2960,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
@@ -2153,38 +3069,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
@@ -2196,45 +3164,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
@@ -2248,55 +3217,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
@@ -2307,39 +3255,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
@@ -2355,23 +3313,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);
@@ -2394,12 +3347,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);};
@@ -2414,205 +3372,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'
@@ -2620,18 +3410,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;
@@ -2640,41 +3426,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) ;;
@@ -2692,22 +3453,25 @@ _ACEOF
esac
-# limits header checks must come early to prevent
-# an autoconf bug that throws errors on configure
+#--------------------------------------------------------------------
+# 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_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"
@@ -2721,11 +3485,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>
@@ -2734,78 +3494,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
@@ -2817,8 +3533,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
@@ -2828,11 +3544,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>
@@ -2841,85 +3553,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
@@ -2929,31 +3596,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 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
+
+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"
+
+
+{ $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
- 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 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
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
+{ $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"
-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 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 >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>
#include <stdarg.h>
@@ -2968,51 +3746,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
@@ -3022,18 +3772,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
@@ -3043,16 +3789,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))
@@ -3072,109 +3815,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
@@ -3182,354 +3855,48 @@ fi
done
-if test "${ac_cv_header_limits_h+set}" = set; then
- echo "$as_me:$LINENO: checking for limits.h" >&5
-echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
-if test "${ac_cv_header_limits_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
-echo "${ECHO_T}$ac_cv_header_limits_h" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking limits.h usability" >&5
-echo $ECHO_N "checking limits.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 <limits.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 limits.h presence" >&5
-echo $ECHO_N "checking limits.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 <limits.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: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: limits.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: limits.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: limits.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 limits.h" >&5
-echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
-if test "${ac_cv_header_limits_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_limits_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
-echo "${ECHO_T}$ac_cv_header_limits_h" >&6
-
-fi
-if test $ac_cv_header_limits_h = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIMITS_H 1
-_ACEOF
-
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_LIMITS_H 1
-_ACEOF
-
-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).
-#--------------------------------------------------------------------
-
-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
+ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes; 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
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strtol" >/dev/null 2>&1; then
- :
+ $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
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strtoul" >/dev/null 2>&1; then
- :
+ $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
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strtod" >/dev/null 2>&1; then
- :
+ $EGREP "strtod" >/dev/null 2>&1; then :
+
else
tk_ok=0
fi
@@ -3537,9 +3904,7 @@ rm -f conftest*
if test $tk_ok = 0; then
-cat >>confdefs.h <<\_ACEOF
-#define NO_STDLIB_H 1
-_ACEOF
+$as_echo "#define NO_STDLIB_H 1" >>confdefs.h
fi
@@ -3549,18 +3914,14 @@ fi
#------------------------------------------------------------------------
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
+ { $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 >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
@@ -3571,40 +3932,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 :
tcl_cv_cc_pipe=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_pipe=no
+ tcl_cv_cc_pipe=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_pipe" >&5
-echo "${ECHO_T}$tcl_cv_cc_pipe" >&6
+{ $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
@@ -3615,13 +3952,13 @@ fi
#------------------------------------------------------------------------
- # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
- enableval="$enable_threads"
- tcl_ok=$enableval
+ # Check whether --enable-threads was given.
+if test "${enable_threads+set}" = set; then :
+ enableval=$enable_threads; tcl_ok=$enableval
else
tcl_ok=yes
-fi;
+fi
+
if test "${TCL_THREADS}" = 1; then
tcl_threaded_core=1;
@@ -3632,92 +3969,56 @@ fi;
# 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
+$as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.h
-cat >>confdefs.h <<\_ACEOF
-#define _REENTRANT 1
-_ACEOF
+$as_echo "#define _REENTRANT 1" >>confdefs.h
if test "`uname -s`" = "SunOS" ; then
-cat >>confdefs.h <<\_ACEOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-_ACEOF
+$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
fi
-cat >>confdefs.h <<\_ACEOF
-#define _THREAD_SAFE 1
-_ACEOF
+$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
- 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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5
+$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then :
+ $as_echo_n "(cached) " >&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
+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 pthread_mutex_init ();
int
main ()
{
-pthread_mutex_init ();
+return 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
+if ac_fn_c_try_link "$LINENO"; 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
+ ac_cv_lib_pthread_pthread_mutex_init=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_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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then :
tcl_ok=yes
else
tcl_ok=no
@@ -3729,71 +4030,43 @@ fi
# 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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5
+$as_echo_n "checking for __pthread_mutex_init in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread___pthread_mutex_init+:} false; then :
+ $as_echo_n "(cached) " >&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
+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 __pthread_mutex_init ();
int
main ()
{
-__pthread_mutex_init ();
+return __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
+if ac_fn_c_try_link "$LINENO"; 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
+ ac_cv_lib_pthread___pthread_mutex_init=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_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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_pthread___pthread_mutex_init" = xyes; then :
tcl_ok=yes
else
tcl_ok=no
@@ -3805,71 +4078,43 @@ fi
# 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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5
+$as_echo_n "checking for pthread_mutex_init in -lpthreads... " >&6; }
+if ${ac_cv_lib_pthreads_pthread_mutex_init+:} false; then :
+ $as_echo_n "(cached) " >&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
+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 pthread_mutex_init ();
int
main ()
{
-pthread_mutex_init ();
+return 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
+if ac_fn_c_try_link "$LINENO"; 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
+ ac_cv_lib_pthreads_pthread_mutex_init=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_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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = xyes; then :
tcl_ok=yes
else
tcl_ok=no
@@ -3879,142 +4124,86 @@ fi
# 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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5
+$as_echo_n "checking for pthread_mutex_init in -lc... " >&6; }
+if ${ac_cv_lib_c_pthread_mutex_init+:} false; then :
+ $as_echo_n "(cached) " >&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
+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 pthread_mutex_init ();
int
main ()
{
-pthread_mutex_init ();
+return 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
+if ac_fn_c_try_link "$LINENO"; 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
+ ac_cv_lib_c_pthread_mutex_init=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_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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_c_pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_c_pthread_mutex_init" = xyes; 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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5
+$as_echo_n "checking for pthread_mutex_init in -lc_r... " >&6; }
+if ${ac_cv_lib_c_r_pthread_mutex_init+:} false; then :
+ $as_echo_n "(cached) " >&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
+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 pthread_mutex_init ();
int
main ()
{
-pthread_mutex_init ();
+return 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
+if ac_fn_c_try_link "$LINENO"; 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
+ ac_cv_lib_c_r_pthread_mutex_init=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_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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
+$as_echo "$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
+if test "x$ac_cv_lib_c_r_pthread_mutex_init" = xyes; then :
tcl_ok=yes
else
tcl_ok=no
@@ -4025,8 +4214,8 @@ fi
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;}
+ { $as_echo "$as_me:${as_lineno-$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
+$as_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
@@ -4037,104 +4226,13 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m
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
+ for ac_func in pthread_attr_setstacksize pthread_atfork
+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
@@ -4145,24 +4243,22 @@ done
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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5
+$as_echo_n "checking for building with threads... " >&6; }
if test "${TCL_THREADS}" = 1; then
-cat >>confdefs.h <<\_ACEOF
-#define TCL_THREADS 1
-_ACEOF
+$as_echo "#define TCL_THREADS 1" >>confdefs.h
if test "${tcl_threaded_core}" = 1; then
- echo "$as_me:$LINENO: result: yes (threaded core)" >&5
-echo "${ECHO_T}yes (threaded core)" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (threaded core)" >&5
+$as_echo "yes (threaded core)" >&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; }
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; }
fi
@@ -4172,15 +4268,15 @@ echo "${ECHO_T}no" >&6
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
+ { $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"
@@ -4190,17 +4286,15 @@ 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
@@ -4214,10 +4308,10 @@ _ACEOF
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.
@@ -4227,35 +4321,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.
@@ -4265,28 +4361,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
- 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
+ { $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
@@ -4295,52 +4401,47 @@ 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);
@@ -4353,79 +4454,50 @@ 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
@@ -4433,8 +4505,8 @@ else
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
@@ -4450,79 +4522,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
@@ -4548,10 +4592,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 -Wsign-compare -Wdeclaration-after-statement"
else
@@ -4559,14 +4603,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.
@@ -4576,35 +4619,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.
@@ -4614,27 +4659,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
@@ -4644,13 +4700,12 @@ fi
PLAT_OBJS=""
PLAT_SRCS=""
LDAIX_SRC=""
- if test x"${SHLIB_VERSION}" = x; then
+ 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 "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then :
# AIX requires the _r compiler when gcc isn't being used
case "${CC}" in
@@ -4662,11 +4717,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"
@@ -4679,12 +4733,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
@@ -4697,17 +4751,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}'
@@ -4716,12 +4768,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'
@@ -4731,14 +4782,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"
@@ -4752,71 +4801,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
@@ -4853,16 +4874,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__
@@ -4877,49 +4894,21 @@ 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; }; }
+ as_fn_error $? "${CC} is not a cygwin compiler." "$LINENO" 5
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 $? "CYGWIN compile is only supported with --enable-threads" "$LINENO" 5
fi
do64bit_ok=yes
if test "x${SHARED_BUILD}" = "x1"; then
@@ -4949,71 +4938,43 @@ echo "$as_me: error: CYGWIN compile is only supported with --enable-threads" >&2
SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
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
@@ -5021,18 +4982,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"
@@ -5041,78 +4998,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"
@@ -5124,8 +5052,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}
@@ -5136,30 +5063,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
@@ -5171,82 +5096,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"
@@ -5258,28 +5153,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=""
@@ -5287,21 +5178,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"
@@ -5320,7 +5208,6 @@ else
LDFLAGS="$LDFLAGS -n32"
fi
-
;;
IRIX64-6.*)
SHLIB_CFLAGS=""
@@ -5328,29 +5215,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
@@ -5361,9 +5245,7 @@ else
fi
-
fi
-
;;
Linux*|GNU*|NetBSD-Debian)
SHLIB_CFLAGS="-fPIC"
@@ -5379,31 +5261,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
@@ -5414,62 +5290,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
# 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"
@@ -5479,12 +5328,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"
@@ -5519,7 +5367,7 @@ fi
;;
*)
case "$arch" in
- alpha|sparc64)
+ alpha|sparc|sparc64)
SHLIB_CFLAGS="-fPIC"
;;
*)
@@ -5530,11 +5378,10 @@ 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}'
LDFLAGS="-Wl,-export-dynamic"
@@ -5551,7 +5398,7 @@ fi
CFLAGS_OPTIMIZE="-O2"
;;
esac
- if test "${TCL_THREADS}" = "1"; then
+ if test "${TCL_THREADS}" = "1"; then :
# On OpenBSD: Compile with -pthread
# Don't link with -lpthread
@@ -5559,7 +5406,6 @@ fi
CFLAGS="$CFLAGS -pthread"
fi
-
# OpenBSD doesn't do version numbers with dots.
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
TCL_LIB_VERSIONS_OK=nodots
@@ -5572,13 +5418,12 @@ 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
+ if test "${TCL_THREADS}" = "1"; then :
# The -pthread needs to go in the CFLAGS, not LIBS
LIBS=`echo $LIBS | sed s/-pthread//`
@@ -5586,7 +5431,6 @@ fi
LDFLAGS="$LDFLAGS -pthread"
fi
-
;;
FreeBSD-*)
# This configuration from FreeBSD Ports.
@@ -5597,20 +5441,18 @@ 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
+ 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
-
case $system in
FreeBSD-3.*)
# Version numbers are dot-stripped by system policy.
@@ -5633,23 +5475,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
@@ -5660,62 +5498,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
@@ -5726,79 +5535,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
@@ -5809,71 +5587,41 @@ 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=""
# Don't use -prebind when building for Mac OS X 10.4 or later only:
if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
- "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
+ "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then :
LDFLAGS="$LDFLAGS -prebind"
fi
-
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
@@ -5884,88 +5632,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
@@ -5975,13 +5693,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
@@ -5992,77 +5705,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
@@ -6073,60 +5754,31 @@ 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=""
@@ -6142,9 +5794,7 @@ fi
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)
@@ -6162,14 +5812,13 @@ _ACEOF
OSF1-1.*)
# OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
SHLIB_CFLAGS="-fPIC"
- if test "$SHARED_BUILD" = 1; then
+ 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"
@@ -6180,7 +5829,7 @@ fi
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 "*"'
@@ -6189,30 +5838,27 @@ 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
+ 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
+ if test "$GCC" = yes; then :
LIBS="$LIBS -lpthread -lmach -lexc"
@@ -6223,9 +5869,7 @@ else
fi
-
fi
-
;;
QNX-6*)
# QNX RTP
@@ -6244,7 +5888,7 @@ 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"
@@ -6255,7 +5899,6 @@ else
LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
fi
-
SHLIB_LD="ld -G"
SHLIB_LD_LIBS=""
SHLIB_SUFFIX=".so"
@@ -6300,21 +5943,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}'
@@ -6327,37 +5966,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
@@ -6368,11 +6002,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"
@@ -6383,17 +6016,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]*)
@@ -6401,8 +6032,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
@@ -6419,169 +6050,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
@@ -6590,26 +6084,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.
@@ -6620,26 +6112,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}";;
@@ -6650,7 +6138,6 @@ fi
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
fi
-
;;
UNIX_SV* | UnixWare-5*)
SHLIB_CFLAGS="-KPIC"
@@ -6661,19 +6148,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
@@ -6684,93 +6167,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=""
@@ -6782,14 +6235,13 @@ 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-*) ;;
@@ -6803,37 +6255,31 @@ 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)"'
+ 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)"
else
@@ -6842,65 +6288,54 @@ else
fi
-
else
LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
- if test "$RANLIB" = ""; then
+ if test "$RANLIB" = ""; then :
MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"'
else
MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)" ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))'
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}'
- INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"'
else
MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
- INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)" ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(STUB_LIB_FILE))'
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
@@ -6914,45 +6349,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
@@ -6998,38 +6407,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
@@ -7037,9 +6442,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
@@ -7047,11 +6450,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
@@ -7061,18 +6464,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
@@ -7083,38 +6482,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>
@@ -7126,58 +6497,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
@@ -7188,38 +6529,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>
@@ -7231,58 +6544,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
@@ -7293,38 +6576,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>
@@ -7336,72 +6591,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
@@ -7412,44 +6637,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
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# See if we should 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
@@ -7462,66 +6659,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: using long" >&5
+$as_echo "using long" >&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>
@@ -7533,58 +6699,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 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
@@ -7596,161 +6732,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
@@ -7762,51 +6777,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
@@ -7815,235 +6804,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
#------------------------------------------------------------------------
@@ -8058,10 +7041,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
@@ -8076,17 +7059,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
@@ -8097,58 +7076,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
@@ -8156,22 +7107,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
@@ -8179,166 +7126,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>
@@ -8353,44 +7158,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
@@ -8403,117 +7182,24 @@ fi
#--------------------------------------------------------------------
- echo "$as_me:$LINENO: checking for strtod" >&5
-echo $ECHO_N "checking for strtod... $ECHO_C" >&6
-if test "${ac_cv_func_strtod+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 strtod to an innocuous variant, in case <limits.h> declares strtod.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define strtod innocuous_strtod
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char strtod (); 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 strtod
-
-/* 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 strtod ();
-/* 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_strtod) || defined (__stub___strtod)
-choke me
-#else
-char (*f) () = strtod;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != strtod;
- ;
- 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_strtod=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_strtod=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5
-echo "${ECHO_T}$ac_cv_func_strtod" >&6
-if test $ac_cv_func_strtod = yes; then
+ ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod"
+if test "x$ac_cv_func_strtod" = xyes; then :
tcl_strtod=1
else
tcl_strtod=0
fi
if test "$tcl_strtod" = 1; then
- echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5
-echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6
-if test "${tcl_cv_strtod_buggy+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris2.4/Tru64 strtod bugs" >&5
+$as_echo_n "checking for Solaris2.4/Tru64 strtod bugs... " >&6; }
+if ${tcl_cv_strtod_buggy+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then
+ if test "$cross_compiling" = yes; then :
tcl_cv_strtod_buggy=buggy
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. */
extern double strtod();
@@ -8536,45 +7222,28 @@ cat >>conftest.$ac_ext <<_ACEOF
exit(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 :
tcl_cv_strtod_buggy=ok
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_strtod_buggy=buggy
+ tcl_cv_strtod_buggy=buggy
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_strtod_buggy" >&5
-echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_strtod_buggy" >&5
+$as_echo "$tcl_cv_strtod_buggy" >&6; }
if test "$tcl_cv_strtod_buggy" = buggy; then
- case $LIBOBJS in
- "fixstrtod.$ac_objext" | \
- *" fixstrtod.$ac_objext" | \
- "fixstrtod.$ac_objext "* | \
+ case " $LIBOBJS " in
*" fixstrtod.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;;
+ *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext"
+ ;;
esac
USE_COMPAT=1
-cat >>confdefs.h <<\_ACEOF
-#define strtod fixstrtod
-_ACEOF
+$as_echo "#define strtod fixstrtod" >>confdefs.h
fi
fi
@@ -8585,64 +7254,9 @@ _ACEOF
# 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
@@ -8651,64 +7265,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
@@ -8717,88 +7276,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
@@ -8806,147 +7306,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_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
+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 :
-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
@@ -8957,132 +7369,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_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 :
-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
-
-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
@@ -9098,17 +7426,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
@@ -9119,44 +7443,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
@@ -9165,41 +7463,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
@@ -9207,11 +7505,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
@@ -9222,49 +7516,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
@@ -9272,19 +7542,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
@@ -9295,186 +7561,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
@@ -9482,18 +7586,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__
@@ -9513,60 +7613,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__
@@ -9587,45 +7657,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
@@ -9635,18 +7679,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
@@ -9660,44 +7700,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
@@ -9705,37 +7748,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
@@ -9755,48 +7802,24 @@ ac_x_header_dirs='
/usr/openwin/share/include'
if test "$ac_x_includes" = no; then
- # Guess where to find include files, by looking for Intrinsic.h.
+ # 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/Intrinsic.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/Intrinsic.h"; then
+ if test -r "$ac_dir/X11/Xlib.h"; then
ac_x_includes=$ac_dir
break
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
@@ -9804,133 +7827,85 @@ if test "$ac_x_libraries" = no; then
# See if we find them without any special options.
# Don't add to $LIBS permanently.
ac_save_LIBS=$LIBS
- LIBS="-lXt $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ LIBS="-lX11 $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <X11/Intrinsic.h>
+#include <X11/Xlib.h>
int
main ()
{
-XtMalloc (0)
+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"
@@ -9938,49 +7913,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
@@ -9994,19 +7945,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
@@ -10020,78 +7971,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
@@ -10140,65 +8063,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
@@ -10216,17 +8111,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>
@@ -10241,43 +8132,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
@@ -10287,20 +8154,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"
@@ -10310,63 +8177,17 @@ echo "${ECHO_T}$enable_xft" >&6
XFT_CFLAGS=`pkg-config --cflags xft 2>/dev/null` || found_xft="no"
XFT_LIBS=`pkg-config --libs xft 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>
+ 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 :
-#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_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
@@ -10382,72 +8203,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
@@ -10468,71 +8260,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"
@@ -10543,8 +8307,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=""
@@ -10556,9 +8320,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
@@ -10577,55 +8339,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
@@ -10637,71 +8353,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
@@ -10716,9 +8404,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
@@ -10730,15 +8416,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>
@@ -10753,48 +8435,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
@@ -10814,306 +8470,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. */
+ ac_fn_c_check_func "$LINENO" "XScreenSaverQueryInfo" "ac_cv_func_XScreenSaverQueryInfo"
+if test "x$ac_cv_func_XScreenSaverQueryInfo" = xyes; then :
-#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_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,
@@ -11135,9 +8600,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
@@ -11149,66 +8612,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
@@ -11247,38 +8680,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
@@ -11290,7 +8723,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`"
@@ -11298,13 +8731,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
@@ -11442,7 +8873,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
@@ -11462,39 +8893,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
@@ -11503,63 +8965,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
@@ -11568,12 +9022,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.
@@ -11583,81 +9040,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
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+# 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
+
+
+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'
@@ -11665,148 +9294,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'"
@@ -11815,31 +9407,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
@@ -11847,43 +9428,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
@@ -11891,83 +9470,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
@@ -11981,42 +9555,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
@@ -12027,523 +9613,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 &&
@@ -12551,17 +10023,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.
@@ -12581,7 +10054,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 26aadfd..a748246 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=".4"
+TK_MINOR_VERSION=7
+TK_PATCH_LEVEL="a0"
VERSION=${TK_VERSION}
LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv"
@@ -81,12 +81,6 @@ fi
AC_PROG_CC
AC_C_INLINE
-# limits header checks must come early to prevent
-# an autoconf bug that throws errors on configure
-AC_CHECK_HEADER(limits.h,
- [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])],
- [AC_DEFINE(NO_LIMITS_H, 1, [Do we have <limits.h>?])])
-
#--------------------------------------------------------------------
# Supply a substitute for stdlib.h if it doesn't define strtol,
# strtoul, or strtod (which it doesn't in some versions of SunOS).
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 30b3bc1..a1d4021 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1096,7 +1096,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS_DEBUG=-g
AS_IF([test "$GCC" = yes], [
CFLAGS_OPTIMIZE=-O2
- CFLAGS_WARNING="-Wall"
+ CFLAGS_WARNING="-Wall -Wsign-compare -Wdeclaration-after-statement"
], [
CFLAGS_OPTIMIZE=-O
CFLAGS_WARNING=""
@@ -1476,7 +1476,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
;;
*)
case "$arch" in
- alpha|sparc64)
+ alpha|sparc|sparc64)
SHLIB_CFLAGS="-fPIC"
;;
*)
@@ -2050,7 +2050,7 @@ dnl # preprocessing tests use only CPPFLAGS.
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}'
AS_IF([test "${SHLIB_SUFFIX}" = ".dll"], [
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)/$(LIB_FILE)"'
+ 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)"
], [
INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"'
@@ -2060,21 +2060,19 @@ dnl # preprocessing tests use only CPPFLAGS.
AS_IF([test "$RANLIB" = ""], [
MAKE_LIB='$(STLIB_LD) [$]@ ${OBJS}'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"'
], [
MAKE_LIB='${STLIB_LD} [$]@ ${OBJS} ; ${RANLIB} [$]@'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)" ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))'
])
+ INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"'
])
# Stub lib does not depend on shared/static configuration
AS_IF([test "$RANLIB" = ""], [
MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS}'
- INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"'
], [
MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS} ; ${RANLIB} [$]@'
- INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)" ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(STUB_LIB_FILE))'
])
+ 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
@@ -2158,7 +2156,6 @@ dnl # preprocessing tests use only CPPFLAGS.
# Defines some of the following vars:
# NO_DIRENT_H
# NO_VALUES_H
-# HAVE_LIMITS_H or NO_LIMITS_H
# NO_STDLIB_H
# NO_STRING_H
# NO_SYS_WAIT_H
@@ -2198,9 +2195,6 @@ closedir(d);
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(limits.h,
- [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])],
- [AC_DEFINE(NO_LIMITS_H, 1, [Do we have <limits.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)
diff --git a/unix/tk.spec b/unix/tk.spec
index af982f7..c4ec12b 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.4
+Version: 8.7a0
Release: 2
License: BSD
Group: Development/Languages
Source: http://prdownloads.sourceforge.net/tcl/tk%{version}-src.tar.gz
URL: http://www.tcl.tk/
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/tkConfig.h.in b/unix/tkConfig.h.in
index 1e5593c..4fd7726 100644
--- a/unix/tkConfig.h.in
+++ b/unix/tkConfig.h.in
@@ -25,9 +25,6 @@
/* Define to 1 if you have the `Xft' library (-lXft). */
#undef HAVE_LIBXFT
-/* Do we have <limits.h>? */
-#undef HAVE_LIMITS_H
-
/* Define to 1 if you have the `lseek64' function. */
#undef HAVE_LSEEK64
@@ -115,9 +112,6 @@
/* Do we have fd_set? */
#undef NO_FD_SET
-/* Do we have <limits.h>? */
-#undef NO_LIMITS_H
-
/* Do we have <stdlib.h>? */
#undef NO_STDLIB_H
diff --git a/unix/tkUnixCursor.c b/unix/tkUnixCursor.c
index 5266bde..8afb92d 100644
--- a/unix/tkUnixCursor.c
+++ b/unix/tkUnixCursor.c
@@ -639,7 +639,6 @@ TkpFreeCursor(
TkUnixCursor *unixCursorPtr = (TkUnixCursor *) cursorPtr;
XFreeCursor(unixCursorPtr->display, (Cursor) unixCursorPtr->info.cursor);
- Tk_FreeXId(unixCursorPtr->display, (XID) unixCursorPtr->info.cursor);
}
/*
diff --git a/unix/tkUnixDefault.h b/unix/tkUnixDefault.h
index b922278..2c3854d 100644
--- a/unix/tkUnixDefault.h
+++ b/unix/tkUnixDefault.h
@@ -221,6 +221,7 @@
#define DEF_LISTBOX_HIGHLIGHT_BG NORMAL_BG
#define DEF_LISTBOX_HIGHLIGHT BLACK
#define DEF_LISTBOX_HIGHLIGHT_WIDTH "1"
+#define DEF_LISTBOX_JUSTIFY "left"
#define DEF_LISTBOX_RELIEF "sunken"
#define DEF_LISTBOX_SCROLL_COMMAND ""
#define DEF_LISTBOX_LIST_VARIABLE ""
@@ -367,6 +368,7 @@
#define DEF_PANEDWINDOW_HEIGHT ""
#define DEF_PANEDWINDOW_OPAQUERESIZE "1"
#define DEF_PANEDWINDOW_ORIENT "horizontal"
+#define DEF_PANEDWINDOW_PROXYBORDER "2"
#define DEF_PANEDWINDOW_RELIEF "flat"
#define DEF_PANEDWINDOW_SASHCURSOR ""
#define DEF_PANEDWINDOW_SASHPAD "0"
diff --git a/unix/tkUnixEmbed.c b/unix/tkUnixEmbed.c
index 7f3f94b..b170ad0 100644
--- a/unix/tkUnixEmbed.c
+++ b/unix/tkUnixEmbed.c
@@ -101,7 +101,7 @@ TkpUseWindow(
{
TkWindow *winPtr = (TkWindow *) tkwin;
TkWindow *usePtr;
- int id, anyError;
+ int anyError;
Window parent;
Tk_ErrorHandler handler;
Container *containerPtr;
@@ -115,10 +115,9 @@ TkpUseWindow(
Tcl_SetErrorCode(interp, "TK", "EMBED", "POST_CREATE", NULL);
return TCL_ERROR;
}
- if (Tcl_GetInt(interp, string, &id) != TCL_OK) {
+ if (TkpScanWindowId(interp, string, &parent) != TCL_OK) {
return TCL_ERROR;
}
- parent = (Window) id;
usePtr = (TkWindow *) Tk_IdToWindow(winPtr->display, parent);
if (usePtr != NULL && !(usePtr->flags & TK_CONTAINER)) {
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c
index a4998aa..e694573 100644
--- a/unix/tkUnixFont.c
+++ b/unix/tkUnixFont.c
@@ -35,9 +35,9 @@ static const char *const encodingList[] = {
* family": the foundry, face name, and charset.
*/
-#define FONTMAP_SHIFT 10
+#define FONTMAP_SHIFT 12
-#define FONTMAP_PAGES (1 << (sizeof(Tcl_UniChar)*8 - FONTMAP_SHIFT))
+#define FONTMAP_PAGES (1 << (21 - FONTMAP_SHIFT))
#define FONTMAP_BITSPERPAGE (1 << FONTMAP_SHIFT)
typedef struct FontFamily {
@@ -171,7 +171,7 @@ static Tcl_ThreadDataKey dataKey;
* encodings into the names expected by the Tcl encoding package.
*/
-static EncodingAlias encodingAliases[] = {
+static const EncodingAlias encodingAliases[] = {
{"gb2312-raw", "gb2312*"},
{"big5", "big5*"},
{"cns11643-1", "cns11643*-1"},
@@ -406,10 +406,10 @@ ControlUtfProc(
{
const char *srcStart, *srcEnd;
char *dstStart, *dstEnd;
- Tcl_UniChar ch;
+ int ch;
int 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'
};
@@ -427,9 +427,9 @@ ControlUtfProc(
result = TCL_CONVERT_NOSPACE;
break;
}
- src += Tcl_UtfToUniChar(src, &ch);
+ src += TkUtfToUniChar(src, &ch);
dst[0] = '\\';
- if ((ch < sizeof(mapChars)) && (mapChars[ch] != 0)) {
+ if (((size_t) ch < sizeof(mapChars)) && (mapChars[ch] != 0)) {
dst[1] = mapChars[ch];
dst += 2;
} else if (ch < 256) {
@@ -437,13 +437,21 @@ ControlUtfProc(
dst[2] = hexChars[(ch >> 4) & 0xf];
dst[3] = hexChars[ch & 0xf];
dst += 4;
- } else {
+ } else if (ch < 0x10000) {
dst[1] = 'u';
dst[2] = hexChars[(ch >> 12) & 0xf];
dst[3] = hexChars[(ch >> 8) & 0xf];
dst[4] = hexChars[(ch >> 4) & 0xf];
dst[5] = hexChars[ch & 0xf];
dst += 6;
+ } else {
+ /* TODO we can do better here */
+ dst[1] = 'u';
+ dst[2] = 'f';
+ dst[3] = 'f';
+ dst[4] = 'f';
+ dst[5] = 'd';
+ dst += 6;
}
}
*srcReadPtr = src - srcStart;
@@ -513,7 +521,7 @@ Ucs2beToUtfProc(
srcEnd = src + srcLen;
dstStart = dst;
- dstEnd = dst + dstLen - TCL_UTF_MAX;
+ dstEnd = dst + dstLen - 4;
for (numChars = 0; src < srcEnd; numChars++) {
if (dst > dstEnd) {
@@ -588,7 +596,7 @@ UtfToUcs2beProc(
srcEnd = src + srcLen;
srcClose = srcEnd;
if (!(flags & TCL_ENCODING_END)) {
- srcClose -= TCL_UTF_MAX;
+ srcClose -= 4;
}
dstStart = dst;
@@ -946,7 +954,7 @@ void
TkpGetFontAttrsForChar(
Tk_Window tkwin, /* Window on the font's display */
Tk_Font tkfont, /* Font to query */
- Tcl_UniChar c, /* Character of interest */
+ int c, /* Character of interest */
TkFontAttributes *faPtr) /* Output: Font attributes */
{
FontAttributes atts;
@@ -1028,7 +1036,7 @@ Tk_MeasureChars(
curByte = 0;
} else if (maxLength < 0) {
const char *p, *end, *next;
- Tcl_UniChar ch;
+ int ch;
SubFont *thisSubFontPtr;
FontFamily *familyPtr;
Tcl_DString runString;
@@ -1044,7 +1052,7 @@ Tk_MeasureChars(
curX = 0;
end = source + numBytes;
for (p = source; p < end; ) {
- next = p + Tcl_UtfToUniChar(p, &ch);
+ next = p + TkUtfToUniChar(p, &ch);
thisSubFontPtr = FindSubFontForChar(fontPtr, ch, &lastSubFontPtr);
if (thisSubFontPtr != lastSubFontPtr) {
familyPtr = lastSubFontPtr->familyPtr;
@@ -2202,7 +2210,7 @@ FontMapLoadPage(
int row) /* Index of the page to be loaded into the
* cache. */
{
- char buf[16], src[TCL_UTF_MAX];
+ char buf[16], src[4];
int minHi, maxHi, minLo, maxLo, scale, checkLo;
int i, end, bitOffset, isTwoByteFont, n;
Tcl_Encoding encoding;
@@ -2406,7 +2414,7 @@ CanUseFallback(
unsigned bestScore[2];
char **nameList;
char **nameListOrig;
- char src[TCL_UTF_MAX];
+ char src[4];
FontAttributes want, got;
Display *display;
SubFont subFont;
diff --git a/unix/tkUnixPort.h b/unix/tkUnixPort.h
index 9051c63..dbd5e09 100644
--- a/unix/tkUnixPort.h
+++ b/unix/tkUnixPort.h
@@ -20,11 +20,7 @@
#include <stdio.h>
#include <ctype.h>
#include <fcntl.h>
-#ifndef NO_LIMITS_H
-# include <limits.h>
-#else
-# include "../compat/limits.h"
-#endif
+#include <limits.h>
#include <math.h>
#include <pwd.h>
#ifdef NO_STDLIB_H
diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c
index ab2ed4a..36c4540 100644
--- a/unix/tkUnixRFont.c
+++ b/unix/tkUnixRFont.c
@@ -14,6 +14,8 @@
#include <X11/Xft/Xft.h>
#include <ctype.h>
+#define MAX_CACHED_COLORS 16
+
typedef struct {
XftFont *ftFont;
XftFont *ft0Font;
@@ -23,6 +25,11 @@ typedef struct {
} UnixFtFace;
typedef struct {
+ XftColor color;
+ int next;
+} UnixFtColorList;
+
+typedef struct {
TkFont font; /* Stuff used by generic font package. Must be
* first in structure. */
UnixFtFace *faces;
@@ -33,7 +40,9 @@ typedef struct {
Display *display;
int screen;
XftDraw *ftDraw;
- XftColor color;
+ int ncolors;
+ int firstColor;
+ UnixFtColorList colors[MAX_CACHED_COLORS];
} UnixFtFont;
/*
@@ -60,7 +69,7 @@ void
TkpFontPkgInit(
TkMainInfo *mainPtr) /* The application being created. */
{
- static Tcl_Config cfg[] = {
+ static const Tcl_Config cfg[] = {
{ "fontsystem", "xft" },
{ 0,0 }
};
@@ -289,11 +298,8 @@ InitFont(
fontPtr->display = Tk_Display(tkwin);
fontPtr->screen = Tk_ScreenNumber(tkwin);
fontPtr->ftDraw = 0;
- fontPtr->color.color.red = 0;
- fontPtr->color.color.green = 0;
- fontPtr->color.color.blue = 0;
- fontPtr->color.color.alpha = 0xffff;
- fontPtr->color.pixel = 0xffffffff;
+ fontPtr->ncolors = 0;
+ fontPtr->firstColor = -1;
/*
* Fill in platform-specific fields of TkFont.
@@ -609,7 +615,7 @@ void
TkpGetFontAttrsForChar(
Tk_Window tkwin, /* Window on the font's display */
Tk_Font tkfont, /* Font to query */
- Tcl_UniChar c, /* Character of interest */
+ int c, /* Character of interest */
TkFontAttributes *faPtr) /* Output: Font attributes */
{
UnixFtFont *fontPtr = (UnixFtFont *) tkfont;
@@ -662,9 +668,9 @@ Tk_MeasureChars(
curByte = 0;
sawNonSpace = 0;
while (numBytes > 0) {
- Tcl_UniChar unichar;
+ int unichar;
- clen = Tcl_UtfToUniChar(source, &unichar);
+ clen = TkUtfToUniChar(source, &unichar);
c = (FcChar32) unichar;
if (clen <= 0) {
@@ -737,6 +743,89 @@ TkpMeasureCharsInContext(
maxLength, flags, lengthPtr);
}
+/*
+ *----------------------------------------------------------------------
+ *
+ * LookUpColor --
+ *
+ * Convert a pixel value to an XftColor. This can be slow due to the
+ * need to call XQueryColor, which involves a server round-trip. To
+ * avoid that, a least-recently-used cache of up to MAX_CACHED_COLORS
+ * is kept, in the form of a linked list. The returned color is moved
+ * to the front of the list, so repeatedly asking for the same one
+ * should be fast.
+ *
+ * Results:
+ * A pointer to the XftColor structure for the requested color is
+ * returned.
+ *
+ * Side effects:
+ * The converted color is stored in a cache in the UnixFtFont structure. The cache
+ * can hold at most MAX_CACHED_COLORS colors. If no more slots are available, the least
+ * recently used color is replaced with the new one.
+ *----------------------------------------------------------------------
+ */
+
+static XftColor *
+LookUpColor(Display *display, /* Display to lookup colors on */
+ UnixFtFont *fontPtr, /* Font to search for cached colors */
+ unsigned long pixel) /* Pixel value to translate to XftColor */
+{
+ int i, last = -1, last2 = -1;
+ XColor xcolor;
+
+ for (i = fontPtr->firstColor;
+ i >= 0; last2 = last, last = i, i = fontPtr->colors[i].next) {
+
+ if (pixel == fontPtr->colors[i].color.pixel) {
+ /*
+ * Color found in cache. Move it to the front of the list and return it.
+ */
+ if (last >= 0) {
+ fontPtr->colors[last].next = fontPtr->colors[i].next;
+ fontPtr->colors[i].next = fontPtr->firstColor;
+ fontPtr->firstColor = i;
+ }
+
+ return &fontPtr->colors[i].color;
+ }
+ }
+
+ /*
+ * Color wasn't found, so it needs to be added to the cache.
+ * If a spare slot is available, it can be put there. If not, last
+ * will now point to the least recently used color, so replace that one.
+ */
+
+ if (fontPtr->ncolors < MAX_CACHED_COLORS) {
+ last2 = -1;
+ last = fontPtr->ncolors++;
+ }
+
+ /*
+ * Translate the pixel value to a color. Needs a server round-trip.
+ */
+ xcolor.pixel = pixel;
+ XQueryColor(display, DefaultColormap(display, fontPtr->screen), &xcolor);
+
+ fontPtr->colors[last].color.color.red = xcolor.red;
+ fontPtr->colors[last].color.color.green = xcolor.green;
+ fontPtr->colors[last].color.color.blue = xcolor.blue;
+ fontPtr->colors[last].color.color.alpha = 0xffff;
+ fontPtr->colors[last].color.pixel = pixel;
+
+ /*
+ * Put at the front of the list.
+ */
+ if (last2 >= 0) {
+ fontPtr->colors[last2].next = fontPtr->colors[last].next;
+ }
+ fontPtr->colors[last].next = fontPtr->firstColor;
+ fontPtr->firstColor = last;
+
+ return &fontPtr->colors[last].color;
+}
+
#define NUM_SPEC 1024
void
@@ -760,7 +849,7 @@ Tk_DrawChars(
const int maxCoord = 0x7FFF;/* Xft coordinates are 16 bit values */
UnixFtFont *fontPtr = (UnixFtFont *) tkfont;
XGCValues values;
- XColor xcolor;
+ XftColor *xftcolor;
int clen, nspec, xStart = x;
XftGlyphFontSpec specs[NUM_SPEC];
XGlyphInfo metrics;
@@ -782,16 +871,7 @@ Tk_DrawChars(
Tk_DeleteErrorHandler(handler);
}
XGetGCValues(display, gc, GCForeground, &values);
- if (values.foreground != fontPtr->color.pixel) {
- xcolor.pixel = values.foreground;
- XQueryColor(display, DefaultColormap(display, fontPtr->screen),
- &xcolor);
- fontPtr->color.color.red = xcolor.red;
- fontPtr->color.color.green = xcolor.green;
- fontPtr->color.color.blue = xcolor.blue;
- fontPtr->color.color.alpha = 0xffff;
- fontPtr->color.pixel = values.foreground;
- }
+ xftcolor = LookUpColor(display, fontPtr, values.foreground);
if (tsdPtr->clipRegion != None) {
XftDrawSetClip(fontPtr->ftDraw, tsdPtr->clipRegion);
}
@@ -823,14 +903,14 @@ Tk_DrawChars(
y += metrics.yOff;
nspec++;
if (nspec == NUM_SPEC) {
- XftDrawGlyphFontSpec(fontPtr->ftDraw, &fontPtr->color,
+ XftDrawGlyphFontSpec(fontPtr->ftDraw, xftcolor,
specs, nspec);
nspec = 0;
}
}
}
if (nspec) {
- XftDrawGlyphFontSpec(fontPtr->ftDraw, &fontPtr->color, specs, nspec);
+ XftDrawGlyphFontSpec(fontPtr->ftDraw, xftcolor, specs, nspec);
}
doUnderlineStrikeout:
@@ -892,7 +972,7 @@ TkDrawAngledChars(
const int minCoord = -1000; /* Should be good enough... */
UnixFtFont *fontPtr = (UnixFtFont *) tkfont;
XGCValues values;
- XColor xcolor;
+ XftColor *xftcolor;
int xStart = x, yStart = y;
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
@@ -919,16 +999,7 @@ TkDrawAngledChars(
}
XGetGCValues(display, gc, GCForeground, &values);
- if (values.foreground != fontPtr->color.pixel) {
- xcolor.pixel = values.foreground;
- XQueryColor(display, DefaultColormap(display, fontPtr->screen),
- &xcolor);
- fontPtr->color.color.red = xcolor.red;
- fontPtr->color.color.green = xcolor.green;
- fontPtr->color.color.blue = xcolor.blue;
- fontPtr->color.color.alpha = 0xffff;
- fontPtr->color.pixel = values.foreground;
- }
+ xftcolor = LookUpColor(display, fontPtr, values.foreground);
if (tsdPtr->clipRegion != None) {
XftDrawSetClip(fontPtr->ftDraw, tsdPtr->clipRegion);
}
@@ -967,7 +1038,7 @@ TkDrawAngledChars(
* this information... but we'll be ready when it does!
*/
- XftDrawGlyphs(fontPtr->ftDraw, &fontPtr->color, currentFtFont,
+ XftDrawGlyphs(fontPtr->ftDraw, xftcolor, currentFtFont,
originX, originY, glyphs, nglyph);
}
originX = ROUND16(x);
@@ -984,7 +1055,7 @@ TkDrawAngledChars(
glyphs[nglyph++] = XftCharIndex(fontPtr->display, ftFont, c);
}
if (nglyph) {
- XftDrawGlyphs(fontPtr->ftDraw, &fontPtr->color, currentFtFont,
+ XftDrawGlyphs(fontPtr->ftDraw, xftcolor, currentFtFont,
originX, originY, glyphs, nglyph);
}
#else /* !XFT_HAS_FIXED_ROTATED_PLACEMENT */
@@ -1008,16 +1079,7 @@ TkDrawAngledChars(
Tk_DeleteErrorHandler(handler);
}
XGetGCValues(display, gc, GCForeground, &values);
- if (values.foreground != fontPtr->color.pixel) {
- xcolor.pixel = values.foreground;
- XQueryColor(display, DefaultColormap(display, fontPtr->screen),
- &xcolor);
- fontPtr->color.color.red = xcolor.red;
- fontPtr->color.color.green = xcolor.green;
- fontPtr->color.color.blue = xcolor.blue;
- fontPtr->color.color.alpha = 0xffff;
- fontPtr->color.pixel = values.foreground;
- }
+ xftcolor = LookUpColor(display, fontPtr, values.foreground);
if (tsdPtr->clipRegion != None) {
XftDrawSetClip(fontPtr->ftDraw, tsdPtr->clipRegion);
}
@@ -1051,14 +1113,14 @@ TkDrawAngledChars(
y += metrics.yOff*cosA - metrics.xOff*sinA;
nspec++;
if (nspec == NUM_SPEC) {
- XftDrawGlyphFontSpec(fontPtr->ftDraw, &fontPtr->color,
+ XftDrawGlyphFontSpec(fontPtr->ftDraw, xftcolor,
specs, nspec);
nspec = 0;
}
}
}
if (nspec) {
- XftDrawGlyphFontSpec(fontPtr->ftDraw, &fontPtr->color, specs, nspec);
+ XftDrawGlyphFontSpec(fontPtr->ftDraw, xftcolor, specs, nspec);
}
#endif /* XFT_HAS_FIXED_ROTATED_PLACEMENT */
diff --git a/unix/tkUnixSelect.c b/unix/tkUnixSelect.c
index 4bb462e..53275d1 100644
--- a/unix/tkUnixSelect.c
+++ b/unix/tkUnixSelect.c
@@ -21,7 +21,7 @@ typedef struct ConvertInfo {
* offset of the next chunk of data to
* transfer. */
Tcl_EncodingState state; /* The encoding state needed across chunks. */
- char buffer[TCL_UTF_MAX]; /* 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.*/
} ConvertInfo;
@@ -439,7 +439,7 @@ TkSelPropProc(
* Preserve any left-over bytes.
*/
- if (srcLen > TCL_UTF_MAX) {
+ if (srcLen > 4) {
Tcl_Panic("selection conversion left too many bytes unconverted");
}
memcpy(incrPtr->converts[i].buffer, src, (size_t) srcLen+1);
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index 8a7ec3c..19ac86c 100644
--- a/unix/tkUnixWm.c
+++ b/unix/tkUnixWm.c
@@ -1826,6 +1826,11 @@ WmForgetCmd(
~(TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED);
RemapWindows(winPtr, winPtr->parentPtr);
+ /*
+ * Make sure wm no longer manages this window
+ */
+ Tk_ManageGeometry(frameWin, NULL, NULL);
+
/*
* Flags (above) must be cleared before calling TkMapTopFrame (below).
*/
@@ -3734,7 +3739,7 @@ WmWaitMapProc(
* This function is invoked by a widget when it wishes to set a grid
* coordinate system that controls the size of a top-level window. It
* provides a C interface equivalent to the "wm grid" command and is
- * usually asscoiated with the -setgrid option.
+ * usually associated with the -setgrid option.
*
* Results:
* None.
diff --git a/unix/tkUnixXId.c b/unix/tkUnixXId.c
index 819b7aa..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
@@ -96,7 +63,6 @@ Tk_FreePixmap(
Pixmap pixmap) /* Identifier for pixmap. */
{
XFreePixmap(display, pixmap);
- Tk_FreeXId(display, (XID) pixmap);
}
@@ -125,13 +91,23 @@ TkpScanWindowId(
const char *string,
Window *idPtr)
{
- int value;
+ int code;
+ Tcl_Obj obj;
+
+ obj.refCount = 1;
+ obj.bytes = (char *) string; /* DANGER?! */
+ obj.length = strlen(string);
+ obj.typePtr = NULL;
- if (Tcl_GetInt(interp, string, &value) != TCL_OK) {
- return TCL_ERROR;
+ code = Tcl_GetLongFromObj(interp, &obj, (long *)idPtr);
+
+ if (obj.refCount > 1) {
+ Tcl_Panic("invalid sharing of Tcl_Obj on C stack");
+ }
+ if (obj.typePtr && obj.typePtr->freeIntRepProc) {
+ obj.typePtr->freeIntRepProc(&obj);
}
- *idPtr = (Window) value;
- return TCL_OK;
+ return code;
}
/*
diff --git a/win/Makefile.in b/win/Makefile.in
index 443acfb..82d8545 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -27,6 +27,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
+datarootdir = @datarootdir@
mandir = @mandir@
# The following definition can be set to non-null for special systems
@@ -171,7 +172,7 @@ LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
#CFLAGS = $(CFLAGS_DEBUG)
#CFLAGS = $(CFLAGS_OPTIMIZE)
#CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE)
-CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -DUNICODE -D_UNICODE
+CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -DUNICODE -D_UNICODE -D_ATL_XP_TARGETING
# Special compiler flags to use when building man2tcl on Windows.
MAN2TCLFLAGS = @MAN2TCLFLAGS@
diff --git a/win/README b/win/README
index 8670446..7f1818e 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/buildall.vc.bat b/win/buildall.vc.bat
index 162490e..8f6803b 100755
--- a/win/buildall.vc.bat
+++ b/win/buildall.vc.bat
@@ -1,107 +1,107 @@
-@echo off
-
-:: This is an example batchfile for building everything. Please
-:: edit this (or make your own) for your needs and wants using
-:: the instructions for calling makefile.vc found in makefile.vc
-
-set SYMBOLS=
-
-:OPTIONS
-if "%1" == "/?" goto help
-if /i "%1" == "/help" goto help
-if %1.==symbols. goto SYMBOLS
-if %1.==debug. goto SYMBOLS
-goto OPTIONS_DONE
-
-:SYMBOLS
- set SYMBOLS=symbols
- shift
- goto OPTIONS
-
-:OPTIONS_DONE
-
-:: reset errorlevel
-cd > nul
-
-:: You might have installed your developer studio to add itself to the
-:: path or have already run vcvars32.bat. Testing these envars proves
-:: cl.exe and friends are in your path.
-::
-if defined VCINSTALLDIR (goto :startBuilding)
-if defined MSDEVDIR (goto :startBuilding)
-if defined MSVCDIR (goto :startBuilding)
-if defined MSSDK (goto :startBuilding)
-if defined WINDOWSSDKDIR (goto :startBuilding)
-
-:: We need to run the development environment batch script that comes
-:: with developer studio (v4,5,6,7,etc...) All have it. This path
-:: might not be correct. You should call it yourself prior to running
-:: this batchfile.
-::
-call "C:\Program Files\Microsoft Developer Studio\vc98\bin\vcvars32.bat"
-if errorlevel 1 (goto no_vcvars)
-
-:startBuilding
-
-echo.
-echo Sit back and have a cup of coffee while this grinds through ;)
-echo You asked for *everything*, remember?
-echo.
-title Building Tk, please wait...
-
-
-:: makefile.vc uses this for its default anyways, but show its use here
-:: just to be explicit and convey understanding to the user. Setting
-:: the INSTALLDIR envar prior to running this batchfile affects all builds.
-::
-if "%INSTALLDIR%" == "" set INSTALLDIR=C:\Program Files\Tcl
-
-
-:: Where is the Tcl source directory?
-:: You can set the TCLDIR environment variable to your Tcl HEAD checkout
-if "%TCLDIR%" == "" set TCLDIR=..\..\tcl
-
-:: Build the normal stuff along with the help file.
-::
-set OPTS=none
-if not %SYMBOLS%.==. set OPTS=symbols
-nmake -nologo -f makefile.vc release htmlhelp OPTS=%OPTS% %1
-if errorlevel 1 goto error
-
-:: Build the static core and shell.
-::
-set OPTS=static,msvcrt
-if not %SYMBOLS%.==. set OPTS=symbols,static,msvcrt
-nmake -nologo -f makefile.vc shell OPTS=%OPTS% %1
-if errorlevel 1 goto error
-
-set OPTS=
-set SYMBOLS=
-goto end
-
-:error
-echo *** BOOM! ***
-goto end
-
-:no_vcvars
-echo vcvars32.bat was not run prior to this batchfile, nor are the MS tools in your path.
-goto out
-
-:help
-title buildall.vc.bat help message
-echo usage:
-echo %0 : builds Tk for all build types (do this first)
-echo %0 install : installs all the release builds (do this second)
-echo %0 symbols : builds Tk for all debugging build types
-echo %0 symbols install : install all the debug builds.
-echo.
-goto out
-
-:end
-title Building Tk, please wait... DONE!
-echo DONE!
-goto out
-
-:out
-pause
-title Command Prompt
+@echo off
+
+:: This is an example batchfile for building everything. Please
+:: edit this (or make your own) for your needs and wants using
+:: the instructions for calling makefile.vc found in makefile.vc
+
+set SYMBOLS=
+
+:OPTIONS
+if "%1" == "/?" goto help
+if /i "%1" == "/help" goto help
+if %1.==symbols. goto SYMBOLS
+if %1.==debug. goto SYMBOLS
+goto OPTIONS_DONE
+
+:SYMBOLS
+ set SYMBOLS=symbols
+ shift
+ goto OPTIONS
+
+:OPTIONS_DONE
+
+:: reset errorlevel
+cd > nul
+
+:: You might have installed your developer studio to add itself to the
+:: path or have already run vcvars32.bat. Testing these envars proves
+:: cl.exe and friends are in your path.
+::
+if defined VCINSTALLDIR (goto :startBuilding)
+if defined MSDEVDIR (goto :startBuilding)
+if defined MSVCDIR (goto :startBuilding)
+if defined MSSDK (goto :startBuilding)
+if defined WINDOWSSDKDIR (goto :startBuilding)
+
+:: We need to run the development environment batch script that comes
+:: with developer studio (v4,5,6,7,etc...) All have it. This path
+:: might not be correct. You should call it yourself prior to running
+:: this batchfile.
+::
+call "C:\Program Files\Microsoft Developer Studio\vc98\bin\vcvars32.bat"
+if errorlevel 1 (goto no_vcvars)
+
+:startBuilding
+
+echo.
+echo Sit back and have a cup of coffee while this grinds through ;)
+echo You asked for *everything*, remember?
+echo.
+title Building Tk, please wait...
+
+
+:: makefile.vc uses this for its default anyways, but show its use here
+:: just to be explicit and convey understanding to the user. Setting
+:: the INSTALLDIR envar prior to running this batchfile affects all builds.
+::
+if "%INSTALLDIR%" == "" set INSTALLDIR=C:\Program Files\Tcl
+
+
+:: Where is the Tcl source directory?
+:: You can set the TCLDIR environment variable to your Tcl HEAD checkout
+if "%TCLDIR%" == "" set TCLDIR=..\..\tcl
+
+:: Build the normal stuff along with the help file.
+::
+set OPTS=none
+if not %SYMBOLS%.==. set OPTS=symbols
+nmake -nologo -f makefile.vc release htmlhelp OPTS=%OPTS% %1
+if errorlevel 1 goto error
+
+:: Build the static core and shell.
+::
+set OPTS=static,msvcrt
+if not %SYMBOLS%.==. set OPTS=symbols,static,msvcrt
+nmake -nologo -f makefile.vc shell OPTS=%OPTS% %1
+if errorlevel 1 goto error
+
+set OPTS=
+set SYMBOLS=
+goto end
+
+:error
+echo *** BOOM! ***
+goto end
+
+:no_vcvars
+echo vcvars32.bat was not run prior to this batchfile, nor are the MS tools in your path.
+goto out
+
+:help
+title buildall.vc.bat help message
+echo usage:
+echo %0 : builds Tk for all build types (do this first)
+echo %0 install : installs all the release builds (do this second)
+echo %0 symbols : builds Tk for all debugging build types
+echo %0 symbols install : install all the debug builds.
+echo.
+goto out
+
+:end
+title Building Tk, please wait... DONE!
+echo DONE!
+goto out
+
+:out
+pause
+title Command Prompt
diff --git a/win/configure b/win/configure
index 8b7ae07..0b80f22 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
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+## --------------------- ##
+## 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
+
+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,212 @@ 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
+CELIB_DIR
+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_SRC_DIR
+TCL_BIN_DIR
+TCL_VERSION
+TCL_THREADS
+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'
ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_threads
+enable_shared
+with_tcl
+enable_64bit
+enable_wince
+with_celib
+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 +808,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 +872,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 +951,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 +981,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 +1055,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 +1115,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 +1164,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 +1191,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'
@@ -689,8 +1234,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 +1245,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 +1333,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 +1353,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,6 +1383,7 @@ 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)
@@ -860,126 +1406,382 @@ 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
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;;
+ 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_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
-
- 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_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+ (void) $as_decl_use;
+#else
+ (void) $as_decl_name;
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_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_decl
+
+# 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_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
+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 +1800,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 +1812,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 +1836,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 +1846,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 +1868,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 +1984,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 +2125,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=".4"
+TK_MINOR_VERSION=7
+TK_PATCH_LEVEL="a0"
VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION
#------------------------------------------------------------------------
@@ -1346,10 +2167,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 +2180,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 +2220,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 +2273,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
+ { $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 "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
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}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 +2314,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 +2344,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 +2372,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 +2416,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 +2499,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 +2608,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 +2703,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 +2756,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 +2794,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
@@ -2004,23 +2852,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 +2886,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 +2911,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 +2949,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 +2965,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 +2996,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 +3018,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 +3027,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 +3066,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 +3077,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 +3086,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 +3129,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
+
fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
+{ $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 +3279,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 +3305,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 +3322,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 +3348,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 +3375,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 +3388,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 +3428,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 +3467,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 +3480,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 +3520,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 +3559,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 +3572,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 +3612,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,32 +3653,34 @@ 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
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
- echo $ECHO_N "(cached) $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=`$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
all:
- @echo 'ac_maketemp="$(MAKE)"'
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
rm -f conftest.make
fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $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
@@ -3041,34 +3697,30 @@ fi
#--------------------------------------------------------------------
- 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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5
+$as_echo_n "checking for building with threads... " >&6; }
+ # Check whether --enable-threads was given.
+if test "${enable_threads+set}" = set; then :
+ enableval=$enable_threads; tcl_ok=$enableval
else
tcl_ok=yes
-fi;
+fi
+
if test "$tcl_ok" = "yes"; then
- echo "$as_me:$LINENO: result: yes (default)" >&5
-echo "${ECHO_T}yes (default)" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
+$as_echo "yes (default)" >&6; }
TCL_THREADS=1
- cat >>confdefs.h <<\_ACEOF
-#define TCL_THREADS 1
-_ACEOF
+ $as_echo "#define TCL_THREADS 1" >>confdefs.h
# 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
+ $as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.h
else
TCL_THREADS=0
- 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
@@ -3079,15 +3731,15 @@ echo "${ECHO_T}no" >&6
#--------------------------------------------------------------------
- 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"
@@ -3097,17 +3749,15 @@ 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
@@ -3127,15 +3777,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
@@ -3144,17 +3794,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
@@ -3218,28 +3866,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
#
@@ -3285,22 +3931,14 @@ echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
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
#--------------------------------------------------------------------
@@ -3310,70 +3948,15 @@ 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
@@ -3385,59 +3968,57 @@ done
# Step 0: 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; }
# 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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Windows/CE build is requested" >&5
+$as_echo_n "checking if Windows/CE build is requested... " >&6; }
+ # Check whether --enable-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
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doWince" >&5
+$as_echo "$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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Windows/CE celib directory" >&5
+$as_echo_n "checking for Windows/CE celib directory... " >&6; }
-# Check whether --with-celib or --without-celib was given.
-if test "${with_celib+set}" = set; then
- withval="$with_celib"
- CELIB_DIR=$withval
+# Check whether --with-celib was given.
+if test "${with_celib+set}" = set; then :
+ withval=$with_celib; CELIB_DIR=$withval
else
CELIB_DIR=NO_CELIB
-fi;
- echo "$as_me:$LINENO: result: $CELIB_DIR" >&5
-echo "${ECHO_T}$CELIB_DIR" >&6
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CELIB_DIR" >&5
+$as_echo "$CELIB_DIR" >&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.
@@ -3447,28 +4028,30 @@ 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_CYGPATH="cygpath -w"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ 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"
+ $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
- 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,
@@ -3477,16 +4060,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
@@ -3501,40 +4080,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
@@ -3569,20 +4124,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=
@@ -3600,16 +4155,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
@@ -3624,57 +4175,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>
@@ -3688,41 +4255,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"
@@ -3731,12 +4274,12 @@ 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}'
- LIBS="-lnetapi32 -lkernel32 -luser32 -ladvapi32 -lws2_32"
+ LIBS="-lnetapi32 -lkernel32 -luser32 -ladvapi32 -luserenv -lws2_32"
# mingw needs to link ole32 and oleaut32 for [send], but MSVC doesn't
LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -luuid -lole32 -loleaut32"
STLIB_LD='${AR} cr'
@@ -3753,23 +4296,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=
@@ -3795,7 +4335,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 -Wsign-compare -Wdeclaration-after-statement"
LDFLAGS_DEBUG=
LDFLAGS_OPTIMIZE=
@@ -3823,20 +4363,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
@@ -3851,61 +4387,44 @@ 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}"
EXESUFFIX="\${DBGX}.exe"
+ case "x`echo \${VisualStudioVersion}`" in
+ x1[4-9]*)
+ lflags="${lflags} -nodefaultlib:libucrt.lib"
+ ;;
+ *)
+ ;;
+ esac
fi
MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\$@"
# DLLSUFFIX is separate because it is the building block for
@@ -3934,82 +4453,32 @@ echo "${ECHO_T}using shared flags" >&6
;;
esac
if test ! -d "${PATH64}" ; then
- { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
-echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
- { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
-echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
- do64bit="no"
- else
- 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}: WARNING: Could not find 64-bit $MACHINE SDK" >&5
+$as_echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK" >&2;}
fi
+ { $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 ws2_32.lib"
+ LIBS="netapi32.lib kernel32.lib user32.lib advapi32.lib userenv.lib ws2_32.lib"
+
+ case "x`echo \${VisualStudioVersion}`" in
+ x1[4-9]*)
+ LIBS="$LIBS ucrt.lib"
+ ;;
+ *)
+ ;;
+ esac
+
if test "$do64bit" != "no" ; then
# The space-based-path will work for the Makefile, but will
# not work if AC_TRY_COMPILE is called. TEA has the
# TEA_PATH_NOSPACE to avoid this issue.
# Check if _WIN64 is already recognized, and if so we don't
# need to modify CC.
- echo "$as_me:$LINENO: checking whether _WIN64 is declared" >&5
-echo $ECHO_N "checking whether _WIN64 is declared... $ECHO_C" >&6
-if test "${ac_cv_have_decl__WIN64+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 ()
-{
-#ifndef _WIN64
- char *p = (char *) _WIN64;
-#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
- ac_cv_have_decl__WIN64=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ ac_fn_c_check_decl "$LINENO" "_WIN64" "ac_cv_have_decl__WIN64" "$ac_includes_default"
+if test "x$ac_cv_have_decl__WIN64" = xyes; then :
-ac_cv_have_decl__WIN64=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_have_decl__WIN64" >&5
-echo "${ECHO_T}$ac_cv_have_decl__WIN64" >&6
-if test $ac_cv_have_decl__WIN64 = yes; then
- :
else
CC="\"${PATH64}/cl.exe\" -I\"${MSSDK}/Include\" \
-I\"${MSSDK}/Include/crt\" \
@@ -4020,7 +4489,7 @@ fi
CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d"
# Do not use -O2 for Win64 - this has proved buggy in code gen.
CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}"
- lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
+ lflags="${lflags} -nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
LINKBIN="\"${PATH64}/link.exe\""
# Avoid 'unresolved external symbol __security_cookie' errors.
# c.f. http://support.microsoft.com/?id=894573
@@ -4032,7 +4501,7 @@ fi
CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d"
# -O2 - create fast code (/Og /Oi /Ot /Oy /Ob2 /Gs /GF /Gy)
CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}"
- lflags="-nologo"
+ lflags="${lflags} -nologo"
LINKBIN="link"
fi
@@ -4077,15 +4546,11 @@ fi
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; }; }
+ as_fn_error $? "Invalid celib directory \"${CELIB_DIR}\"" "$LINENO" 5
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; }; }
+ as_fn_error $? "could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" "$LINENO" 5
else
CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
@@ -4181,26 +4646,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
@@ -4219,37 +4678,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
@@ -4259,16 +4703,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
@@ -4285,45 +4725,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
@@ -4331,16 +4745,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
@@ -4360,45 +4770,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_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
@@ -4406,16 +4790,12 @@ _ACEOF
# 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
@@ -4429,45 +4809,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
@@ -4483,145 +4837,9 @@ _ACEOF
# man2tcl needs this so that it can use errno.h
#--------------------------------------------------------------------
-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
@@ -4633,17 +4851,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
@@ -4654,45 +4868,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
@@ -4700,118 +4888,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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: xpnative theme will be unavailable" >&5
+$as_echo "$as_me: xpnative theme will be unavailable" >&6;}
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;}
-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
@@ -4824,39 +4916,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
@@ -4864,32 +4952,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
@@ -4901,15 +4983,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=
@@ -4917,11 +4999,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
@@ -4930,7 +5008,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
@@ -4949,26 +5027,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'`
@@ -4989,13 +5067,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
@@ -5158,7 +5236,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
@@ -5177,39 +5256,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
@@ -5218,63 +5328,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
@@ -5282,12 +5384,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.
@@ -5297,81 +5401,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'
@@ -5379,148 +5655,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'"
@@ -5529,31 +5768,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
@@ -5561,124 +5789,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
@@ -5692,32 +5912,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
@@ -5727,418 +5961,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 "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,@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.
@@ -6158,7 +6388,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 709b97f..cdef517 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=".4"
+TK_MINOR_VERSION=7
+TK_PATCH_LEVEL="a0"
VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION
#------------------------------------------------------------------------
@@ -83,13 +83,13 @@ SC_LOAD_TCLCONFIG
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
#--------------------------------------------------------------------
diff --git a/win/makefile.bc b/win/makefile.bc
index 934599c..d98dfd7 100644
--- a/win/makefile.bc
+++ b/win/makefile.bc
@@ -1,537 +1,537 @@
-#
-# Makefile for Borland C++ 5.5 (or C++ Builder 5), adapted from the makefile
-# for Visual C++ that came with tk 8.3.3
-#
-# Some "not so obvious" details in this makefile are preceded by a comment
-# "maintenance hint", which tries to explain what's going on. Better to
-# leave those in place.
-# Helmut Giese, July 2002
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# Copyright (c) 1995-1997 Sun Microsystems, Inc.
-# Copyright (c) 1998-2000 Ajuba Solutions.
-
-# Does not depend on the presence of any environment variables in
-# order to compile tcl; all needed information is derived from
-# location of the compiler directories.
-
-#
-# Project directories
-#
-# ROOT = top of source tree
-#
-# TMPDIR = location where .obj files should be stored during build
-#
-# TOOLS32 = location of Borland development tools.
-#
-# TCLDIR = location of top of Tcl source hierarchy
-#
-
-ROOT = ..
-TCLDIR = ..\..\tcl8.4
-INSTALLDIR = D:\tmp\tcl
-
-# If you have C++ Builder 5 or the free Borland C++ 5.5 compiler
-# adapt the following paths as appropriate for your system
-TOOLS32 = d:\cbld5
-TOOLS32_rc = d:\cbld5
-#TOOLS32 = c:\bc55
-#TOOLS32_rc = c:\bc55
-
-cc32 = "$(TOOLS32)\bin\bcc32.exe"
-link32 = "$(TOOLS32)\bin\ilink32.exe"
-lib32 = "$(TOOLS32)\bin\tlib.exe"
-rc32 = "$(TOOLS32_rc)\bin\brcc32.exe"
-include32 = -I"$(TOOLS32)\include;$(TOOLS32)\include\mfc"
-libpath32 = -L"$(TOOLS32)\lib"
-
-# Uncomment the following line to compile with thread support
-#THREADDEFINES = -DTCL_THREADS=1
-
-# Allow definition of NDEBUG via command line
-# Set NODEBUG to 0 to compile with symbols
-!if !defined(NODEBUG)
-NODEBUG = 1
-!endif
-
-# uncomment the following two lines to compile with TCL_MEM_DEBUG
-#DEBUGDEFINES =-DTCL_MEM_DEBUG
-
-######################################################################
-# Do not modify below this line
-######################################################################
-
-TCLNAMEPREFIX = tcl
-TKNAMEPREFIX = tk
-WISHNAMEPREFIX = wish
-VERSION = 84
-DOTVERSION = 8.4
-
-TCLSTUBPREFIX = $(TCLNAMEPREFIX)stub
-TKSTUBPREFIX = $(TKNAMEPREFIX)stub
-
-
-BINROOT = .
-!IF "$(NODEBUG)" == "1"
-TMPDIRNAME = Release
-DBGX =
-!ELSE
-TMPDIRNAME = Debug
-DBGX =
-#DBGX = d
-!ENDIF
-TMPDIR = $(BINROOT)\$(TMPDIRNAME)
-OUTDIRNAME = $(TMPDIRNAME)
-OUTDIR = $(TMPDIR)
-
-TCLLIB = $(TCLNAMEPREFIX)$(VERSION)$(DBGX).lib
-TCLPLUGINLIB = $(TCLNAMEPREFIX)$(VERSION)p.lib
-TCLSTUBLIB = $(TCLSTUBPREFIX)$(VERSION)$(DBGX).lib
-TKDLLNAME = $(TKNAMEPREFIX)$(VERSION)$(DBGX).dll
-TKDLL = $(OUTDIR)\$(TKDLLNAME)
-TKLIB = $(OUTDIR)\$(TKNAMEPREFIX)$(VERSION)$(DBGX).lib
-TKSTUBLIBNAME = $(TKSTUBPREFIX)$(VERSION)$(DBGX).lib
-TKSTUBLIB = $(OUTDIR)\$(TKSTUBLIBNAME)
-TKPLUGINDLLNAME = $(TKNAMEPREFIX)$(VERSION)p$(DBG).dll
-TKPLUGINDLL = $(OUTDIR)\$(TKPLUGINDLLNAME)
-TKPLUGINLIB = $(OUTDIR)\$(TKNAMEPREFIX)$(VERSION)p$(DBGX).lib
-
-WISH = $(OUTDIR)\$(WISHNAMEPREFIX)$(VERSION)$(DBGX).exe
-WISHC = $(OUTDIR)\$(WISHNAMEPREFIX)c$(VERSION)$(DBGX).exe
-WISHP = $(OUTDIR)\$(WISHNAMEPREFIX)p$(VERSION)$(DBGX).exe
-TKTEST = $(OUTDIR)\$(TKNAMEPREFIX)test.exe
-CAT32 = $(TMPDIR)\cat32.exe
-
-BIN_INSTALL_DIR = $(INSTALLDIR)\bin
-INCLUDE_INSTALL_DIR = $(INSTALLDIR)\include
-LIB_INSTALL_DIR = $(INSTALLDIR)\lib
-SCRIPT_INSTALL_DIR = $(LIB_INSTALL_DIR)\tk$(DOTVERSION)
-
-WISHOBJS = \
- $(TMPDIR)\winMain.obj
-
-TKTESTOBJS = \
- $(TMPDIR)\tkTest.obj \
- $(TMPDIR)\tkSquare.obj \
- $(TMPDIR)\testMain.obj \
- $(TMPDIR)\tkOldTest.obj \
- $(TMPDIR)\tkWinTest.obj \
- $(TCLLIBDIR)\tclThreadTest.obj
-
-XLIBOBJS = \
- $(TMPDIR)\xcolors.obj \
- $(TMPDIR)\xdraw.obj \
- $(TMPDIR)\xgc.obj \
- $(TMPDIR)\ximage.obj \
- $(TMPDIR)\xutil.obj
-
-TKOBJS = \
- $(TMPDIR)\tkConsole.obj \
- $(TMPDIR)\tkUnixMenubu.obj \
- $(TMPDIR)\tkUnixScale.obj \
- $(XLIBOBJS) \
- $(TMPDIR)\tkWin3d.obj \
- $(TMPDIR)\tkWin32Dll.obj \
- $(TMPDIR)\tkWinButton.obj \
- $(TMPDIR)\tkWinClipboard.obj \
- $(TMPDIR)\tkWinColor.obj \
- $(TMPDIR)\tkWinConfig.obj \
- $(TMPDIR)\tkWinCursor.obj \
- $(TMPDIR)\tkWinDialog.obj \
- $(TMPDIR)\tkWinDraw.obj \
- $(TMPDIR)\tkWinEmbed.obj \
- $(TMPDIR)\tkWinFont.obj \
- $(TMPDIR)\tkWinImage.obj \
- $(TMPDIR)\tkWinInit.obj \
- $(TMPDIR)\tkWinKey.obj \
- $(TMPDIR)\tkWinMenu.obj \
- $(TMPDIR)\tkWinPixmap.obj \
- $(TMPDIR)\tkWinPointer.obj \
- $(TMPDIR)\tkWinRegion.obj \
- $(TMPDIR)\tkWinScrlbr.obj \
- $(TMPDIR)\tkWinSend.obj \
- $(TMPDIR)\tkWinWindow.obj \
- $(TMPDIR)\tkWinWm.obj \
- $(TMPDIR)\tkWinX.obj \
- $(TMPDIR)\stubs.obj \
- $(TMPDIR)\tk3d.obj \
- $(TMPDIR)\tkArgv.obj \
- $(TMPDIR)\tkAtom.obj \
- $(TMPDIR)\tkBind.obj \
- $(TMPDIR)\tkBitmap.obj \
- $(TMPDIR)\tkBusy.obj \
- $(TMPDIR)\tkButton.obj \
- $(TMPDIR)\tkCanvArc.obj \
- $(TMPDIR)\tkCanvBmap.obj \
- $(TMPDIR)\tkCanvImg.obj \
- $(TMPDIR)\tkCanvLine.obj \
- $(TMPDIR)\tkCanvPoly.obj \
- $(TMPDIR)\tkCanvPs.obj \
- $(TMPDIR)\tkCanvText.obj \
- $(TMPDIR)\tkCanvUtil.obj \
- $(TMPDIR)\tkCanvWind.obj \
- $(TMPDIR)\tkCanvas.obj \
- $(TMPDIR)\tkClipboard.obj \
- $(TMPDIR)\tkCmds.obj \
- $(TMPDIR)\tkColor.obj \
- $(TMPDIR)\tkConfig.obj \
- $(TMPDIR)\tkCursor.obj \
- $(TMPDIR)\tkEntry.obj \
- $(TMPDIR)\tkError.obj \
- $(TMPDIR)\tkEvent.obj \
- $(TMPDIR)\tkFileFilter.obj \
- $(TMPDIR)\tkFocus.obj \
- $(TMPDIR)\tkFont.obj \
- $(TMPDIR)\tkFrame.obj \
- $(TMPDIR)\tkGC.obj \
- $(TMPDIR)\tkGeometry.obj \
- $(TMPDIR)\tkGet.obj \
- $(TMPDIR)\tkGrab.obj \
- $(TMPDIR)\tkGrid.obj \
- $(TMPDIR)\tkImage.obj \
- $(TMPDIR)\tkImgBmap.obj \
- $(TMPDIR)\tkImgGIF.obj \
- $(TMPDIR)\tkImgPPM.obj \
- $(TMPDIR)\tkImgPhoto.obj \
- $(TMPDIR)\tkImgPhInstance.obj \
- $(TMPDIR)\tkImgUtil.obj \
- $(TMPDIR)\tkListbox.obj \
- $(TMPDIR)\tkMacWinMenu.obj \
- $(TMPDIR)\tkMain.obj \
- $(TMPDIR)\tkMenu.obj \
- $(TMPDIR)\tkMenubutton.obj \
- $(TMPDIR)\tkMenuDraw.obj \
- $(TMPDIR)\tkMessage.obj \
- $(TMP_DIR)\tkPanedWindow.obj \
- $(TMPDIR)\tkObj.obj \
- $(TMPDIR)\tkOldConfig.obj \
- $(TMPDIR)\tkOption.obj \
- $(TMPDIR)\tkPack.obj \
- $(TMPDIR)\tkPlace.obj \
- $(TMPDIR)\tkPointer.obj \
- $(TMPDIR)\tkRectOval.obj \
- $(TMPDIR)\tkScale.obj \
- $(TMPDIR)\tkScrollbar.obj \
- $(TMPDIR)\tkSelect.obj \
- $(TMPDIR)\tkText.obj \
- $(TMPDIR)\tkTextBTree.obj \
- $(TMPDIR)\tkTextDisp.obj \
- $(TMPDIR)\tkTextImage.obj \
- $(TMPDIR)\tkTextIndex.obj \
- $(TMPDIR)\tkTextMark.obj \
- $(TMPDIR)\tkTextTag.obj \
- $(TMPDIR)\tkTextWind.obj \
- $(TMPDIR)\tkTrig.obj \
- $(TMPDIR)\tkUtil.obj \
- $(TMPDIR)\tkVisual.obj \
- $(TMPDIR)\tkStubInit.obj \
- $(TMPDIR)\tkWindow.obj
-
-# Maintenance hint: Please have multiple members of TKSTUBOBJS be separated
-# by exactly one ' ' (see below the rule for making TKSTUBLIB)
-TKSTUBOBJS = $(TMPDIR)\tkStubLib.obj
-
-WINDIR = $(ROOT)\win
-GENERICDIR = $(ROOT)\generic
-XLIBDIR = $(ROOT)\xlib
-BITMAPDIR = $(ROOT)\bitmaps
-TCLLIBDIR = $(TCLDIR)\win\$(OUTDIRNAME)
-RCDIR = $(WINDIR)\rc
-
-TK_INCLUDES = -I$(WINDIR) -I$(GENERICDIR) -I$(BITMAPDIR) -I$(XLIBDIR) \
- -I$(TCLDIR)\generic -I$(TCLDIR)\win
-
-TK_DEFINES = -D_WIN32 $(DEBUGDEFINES) $(THREADDEFINES) SUPPORT_CONFIG_EMBEDDED
-
-######################################################################
-# Compile flags
-######################################################################
-
-!IF "$(NODEBUG)" == "1"
-# these macros cause maximum optimization and no symbols
-cdebug = -v- -vi- -O2 -D_DEBUG
-!ELSE
-# these macros enable debugging
-cdebug = -k -Od -r- -v -vi- -y
-!ENDIF
-
-SYSDEFINES = _MT;NO_STRICT;_NO_VCL
-
-# declarations common to all compiler options
-cbase = -3 -a4 -c -g0 -tWM -Ve -Vx -X-
-WARNINGS = -w-rch -w-pch -w-par -w-dup -w-pro -w-dpu
-
-ccons = -tWC
-
-CFLAGS = $(cdebug) $(cbase) $(WARNINGS) -D$(SYSDEFINES)
-
-CON_CFLAGS = $(CFLAGS) $(TK_DEFINES) $(include32) $(ccons)
-WISH_CFLAGS = $(CFLAGS) $(include32) $(TK_INCLUDES) $(TK_DEFINES)
-TK_CFLAGS = $(CFLAGS) $(include32) $(TK_INCLUDES) $(TK_DEFINES) \
- -DUSE_TCL_STUBS
-
-######################################################################
-# Link flags
-######################################################################
-
-!IF "$(NODEBUG)" == "1"
-ldebug =
-!ELSE
-ldebug = -v
-!ENDIF
-
-# declarations common to all linker options
-LNFLAGS = -D"" -Gn -I$(TMPDIR) -x $(ldebug) $(libpath32)
-# -Gi: create lib file (is -Gl in doc)
-# -aa: Windows app, -ap: Windows console app
-LNFLAGS_DLL = -ap -Gi -Tpd
-LNFLAGS_CONS = -ap -Tpe
-LNFLAGS_GUI = -aa -Tpe
-
-LNLIBS = import32 cw32mt
-
-
-######################################################################
-# Project specific targets
-######################################################################
-
-all: setup $(WISH) $(CAT32)
-install: install-binaries install-libraries
-plugin: setup $(TKPLUGINDLL) $(WISHP)
-tktest: setup $(TKTEST) $(CAT32)
-
-# Maintenance hint: We want to set environment variables before calling tktest.
-# If we do this in the form of normal commands, they will not persist up to
-# the call of tktest. Therfore we put all commands wanted into a batch file.
-# The normal way of using 'echo >x.bat' and 'echo >>x.bat' does not work here
-# because we cannot write '... > tktest.txt' this way. Hence this advanced
-# form of loop hopping:
-# - Have MAKE produce a temporary file with the content we want.
-# - Use it as input to the COPY command to produce a batch file.
-# - Run the batch file and be happy.
-#
-test: setup $(TKTEST) $(TKLIB) $(CAT32)
- copy &&!
- set TCL_LIBRARY=$(TCLDIR)/library
- set PATH=$(TCLDIR)\win\$(TMPDIRNAME);$(PATH)
- $(TKTEST) $(ROOT)/tests/all.tcl > tktest.txt
-! _test.bat
- _test.bat
-# del _test.bat
-
-runtest: setup $(TKTEST) $(TKLIB) $(CAT32)
- echo set TCL_LIBRARY=$(TCLDIR)/library > _test2.bat
- echo set PATH=$(TCLDIR)\win\$(TMPDIRNAME);$(PATH) >> _test2.bat
- echo $(TKTEST) >> _test2.bat
- _test2.bat
-# del _test2.bat
-
-console-wish : all $(WISHC)
-
-stubs:
- $(TCLDIR)\win\$(TMPDIRNAME)\tclsh$(VERSION)$(DBGX) \
- $(TCLDIR)\tools\genStubs.tcl $(GENERICDIR) \
- $(GENERICDIR)\tk.decls $(GENERICDIR)\tkInt.decls
-
-setup:
- @mkd $(TMPDIR)
- @mkd $(OUTDIR)
-
-install-binaries:
- @mkd "$(BIN_INSTALL_DIR)"
- copy $(TKDLL) "$(BIN_INSTALL_DIR)"
- copy $(WISH) "$(BIN_INSTALL_DIR)"
- @mkd "$(LIB_INSTALL_DIR)"
- copy $(TKLIB) "$(LIB_INSTALL_DIR)"
-
-install-libraries:
- @mkd "$(INCLUDE_INSTALL_DIR)"
- @mkd "$(INCLUDE_INSTALL_DIR)\X11"
- copy "$(GENERICDIR)\tk.h" "$(INCLUDE_INSTALL_DIR)"
- copy "$(GENERICDIR)\tkDecls.h" "$(INCLUDE_INSTALL_DIR)"
- copy "$(GENERICDIR)\tkPlatDecls.h" "$(INCLUDE_INSTALL_DIR)"
- copy "$(GENERICDIR)\tkIntXlibDecls.h" "$(INCLUDE_INSTALL_DIR)"
- xcopy "$(XLIBDIR)\X11\*.h" "$(INCLUDE_INSTALL_DIR)\X11"
- @mkd "$(SCRIPT_INSTALL_DIR)"
- @mkd "$(SCRIPT_INSTALL_DIR)\images"
- @mkd "$(SCRIPT_INSTALL_DIR)\demos"
- @mkd "$(SCRIPT_INSTALL_DIR)\demos\images"
- @mkd "$(SCRIPT_INSTALL_DIR)\msgs"
- xcopy "$(ROOT)\library" "$(SCRIPT_INSTALL_DIR)"
- xcopy "$(ROOT)\library\images" "$(SCRIPT_INSTALL_DIR)\images"
- xcopy "$(ROOT)\library\demos" "$(SCRIPT_INSTALL_DIR)\demos"
- xcopy "$(ROOT)\library\demos\images" "$(SCRIPT_INSTALL_DIR)\demos\images"
- xcopy "$(ROOT)\library\msgs" "$(SCRIPT_INSTALL_DIR)\msgs"
-
-$(TKLIB): $(TKDLL) $(TKSTUBLIB)
-
-# Maintenance hint: The macro puts a '+-' before the first member of
-# TKSTUBOBJS, than replaces any ' ' with ' +-' - together putting '+-' in
-# front of any member of TKSTUBOBJS (provided, they are separated in their
-# defintion by just one space).
-#
-# The first time you *make* this target, you will get a warning
-# tkStubLib not found in library
-# This is (probably) because of the '-' option, telling TLIB to remove
-# 'tkStubLib' when it does not yet exist. Forcing a re-make when it already
-# exists avoids this warning.
-#
-$(TKSTUBLIB): $(TKSTUBOBJS)
- $(lib32) $@ +-$(TKSTUBOBJS: = +-)
-
-# $(lib32) $@ @&&!
-#+-$(TKSTUBOBJS: = &^
-#+-)
-#!
-
-$(TKDLL): $(TKOBJS) $(TMPDIR)\tk.res
- $(link32) $(ldebug) $(LNFLAGS) $(LNFLAGS_DLL) $(TOOLS32)\lib\c0d32 @&&!
- $(TKOBJS), $@, -x, $(LNLIBS) $(TCLLIBDIR)\$(TCLSTUBLIB),, $(TMPDIR)\tk.res
-!
-
-$(TKPLUGINLIB): $(TKPLUGINDLL)
-
-#$(TKPLUGINDLL): $(TKOBJS) $(TMPDIR)\tk.res
-# $(link32) $(ldebug) $(dlllflags) \
-# -out:$@ $(TMPDIR)\tk.res $(TCLLIBDIR)\$(TCLPLUGINLIB) \
-# $(guilibsdll) @<<
-# $(TKOBJS)
-#<<
-
-$(WISH): $(WISHOBJS) $(TKLIB) $(TMPDIR)\wish.res
- $(link32) $(ldebug) -S:2400000 $(LNFLAGS) $(LNFLAGS_GUI) $(TOOLS32)\lib\c0x32 @&&!
- $(WISHOBJS), $@, -x, $(LNLIBS) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB),, $(TMPDIR)\wish.res
-!
-
-$(WISHC): $(WISHOBJS) $(TKLIB) $(TMPDIR)\wish.res
- $(link32) $(ldebug) -S:2400000 $(LNFLAGS) $(LNFLAGS_CONS) $(TOOLS32)\lib\c0x32 @&&!
- $(WISHOBJS), $@, -x, $(LNLIBS) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB),, $(TMPDIR)\wish.res
-!
-
-$(WISHP): $(WISHOBJS) $(TKPLUGINLIB) $(TMPDIR)\wish.res
- $(link32) $(ldebug) $(guilflags) $(TMPDIR)\wish.res -out:$@ \
- $(guilibsdll) $(TCLLIBDIR)\$(TCLPLUGINLIB) \
- $(TKPLUGINLIB) $(WISHOBJS)
-
-$(TKTEST): $(TKTESTOBJS) $(TKLIB) $(TMPDIR)\wish.res
- $(link32) $(ldebug) -S:2400000 $(LNFLAGS) $(LNFLAGS_GUI) $(TOOLS32)\lib\c0x32 @&&!
- $(TKTESTOBJS), $@, -x, $(LNLIBS) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB),, $(TMPDIR)\wish.res
-!
-# $(link32) $(ldebug) $(guilflags) $(TMPDIR)\wish.res -out:$@ \
-# $(guilibsdll) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB) $(TKTESTOBJS)
-
-#$(CAT32): $(TCLDIR)\win\cat.c
-# $(cc32) $(CON_CFLAGS) -o$(TMPDIR)\cat.obj $?
-# $(link32) $(conlflags) -out:$@ -stack:16384 $(TMPDIR)\cat.obj $(conlibs)
-
-$(CAT32): $(TCLDIR)\win\cat.c
- $(cc32) $(CONS_CFLAGS) -o$(TMPDIR)\cat.obj $?
- $(link32) $(ldebug) $(LNFLAGS) $(LNFLAGS_CONS) $(TOOLS32)\lib\c0x32 \
- $(TMPDIR)\cat.obj, $@, -x, $(LNLIBS),,
-
-#
-# Regenerate the stubs files.
-#
-
-genstubs:
- tclsh$(VERSION) $(TCLDIR)\tools\genStubs.tcl $(GENERICDIR) \
- $(GENERICDIR)\tk.decls $(GENERICDIR)\tkInt.decls
-
-#
-# Special case object file targets
-#
-
-$(TMPDIR)\testMain.obj: $(WINDIR)\winMain.c
- $(cc32) $(WISH_CFLAGS) -DTK_TEST -o$@ $?
-
-$(TMPDIR)\tkTest.obj: $(GENERICDIR)\tkTest.c
- $(cc32) $(WISH_CFLAGS) -o$@ $?
-
-$(TMPDIR)\tkOldTest.obj: $(GENERICDIR)\tkOldTest.c
- $(cc32) $(WISH_CFLAGS) -o$@ $?
-
-$(TMPDIR)\tkWinTest.obj: $(WINDIR)\tkWinTest.c
- $(cc32) $(WISH_CFLAGS) -o$@ $?
-
-$(TMPDIR)\tkSquare.obj: $(GENERICDIR)\tkSquare.c
- $(cc32) $(WISH_CFLAGS) -o$@ $?
-
-$(TMPDIR)\winMain.obj: $(WINDIR)\winMain.c
- $(cc32) $(WISH_CFLAGS) -o$@ $?
-
-$(TMPDIR)\tkStubLib.obj : $(GENERICDIR)\tkStubLib.c
- $(cc32) $(TK_CFLAGS) -DSTATIC_BUILD -o$@ $?
-
-#
-# Implicit rules
-#
-
-{$(XLIBDIR)}.c{$(TMPDIR)}.obj:
- $(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -o$@ $<
-
-{$(GENERICDIR)}.c{$(TMPDIR)}.obj:
- $(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -o$@ $<
-
-{$(WINDIR)}.c{$(TMPDIR)}.obj:
- $(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -o$@ $<
-
-{$(ROOT)\unix}.c{$(TMPDIR)}.obj:
- $(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -o$@ $<
-
-{$(RCDIR)}.rc{$(TMPDIR)}.res:
- $(rc32) -I"$(GENERICDIR)" -I"$(TOOLS32)\include" -I"$(TCLDIR)\generic" \
- -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $<
-
-clean:
- -@del $(OUTDIR)\*.exp
- -@del $(OUTDIR)\*.lib
- -@del $(OUTDIR)\*.dll
- -@del $(OUTDIR)\*.exe
- -@del $(OUTDIR)\*.pdb
- -@del $(TMPDIR)\*.pch
- -@del $(TMPDIR)\*.obj
- -@del $(TMPDIR)\*.res
- -@del $(TMPDIR)\*.exe
- -@rmd $(OUTDIR)
- -@rmd $(TMPDIR)
-
-# dependencies
-
-$(TMPDIR)\tk.res: \
- $(RCDIR)\buttons.bmp \
- $(RCDIR)\cursor*.cur \
- $(RCDIR)\tk.ico
-
-$(GENERICDIR)/default.h: $(WINDIR)/tkWinDefault.h
-$(GENERICDIR)/tkButton.c: $(GENERICDIR)/default.h
-$(GENERICDIR)/tkCanvas.c: $(GENERICDIR)/default.h
-$(GENERICDIR)/tkEntry.c: $(GENERICDIR)/default.h
-$(GENERICDIR)/tkFrame.c: $(GENERICDIR)/default.h
-$(GENERICDIR)/tkListbox.c: $(GENERICDIR)/default.h
-$(GENERICDIR)/tkMenu.c: $(GENERICDIR)/default.h
-$(GENERICDIR)/tkMenubutton.c: $(GENERICDIR)/default.h
-$(GENERICDIR)/tkMessage.c: $(GENERICDIR)/default.h
-$(GENERICDIR)/tkScale.c: $(GENERICDIR)/default.h
-$(GENERICDIR)/tkScrollbar.c: $(GENERICDIR)/default.h
-$(GENERICDIR)/tkText.c: $(GENERICDIR)/default.h
-$(GENERICDIR)/tkTextIndex.c: $(GENERICDIR)/default.h
-$(GENERICDIR)/tkTextTag.c: $(GENERICDIR)/default.h
-
-$(GENERICDIR)/tkText.c: $(GENERICDIR)/tkText.h
-$(GENERICDIR)/tkTextBTree.c: $(GENERICDIR)/tkText.h
-$(GENERICDIR)/tkTextDisp.c: $(GENERICDIR)/tkText.h
-$(GENERICDIR)/tkTextDisp.c: $(GENERICDIR)/tkText.h
-$(GENERICDIR)/tkTextImage.c: $(GENERICDIR)/tkText.h
-$(GENERICDIR)/tkTextIndex.c: $(GENERICDIR)/tkText.h
-$(GENERICDIR)/tkTextMark.c: $(GENERICDIR)/tkText.h
-$(GENERICDIR)/tkTextTag.c: $(GENERICDIR)/tkText.h
-$(GENERICDIR)/tkTextWind.c: $(GENERICDIR)/tkText.h
-
-$(GENERICDIR)/tkMacWinMenu.c: $(GENERICDIR)/tkMenu.h
-$(GENERICDIR)/tkMenu.c: $(GENERICDIR)/tkMenu.h
-$(GENERICDIR)/tkMenuDraw.c: $(GENERICDIR)/tkMenu.h
-$(WINDIR)/tkWinMenu.c: $(GENERICDIR)/tkMenu.h
-
-
+#
+# Makefile for Borland C++ 5.5 (or C++ Builder 5), adapted from the makefile
+# for Visual C++ that came with tk 8.3.3
+#
+# Some "not so obvious" details in this makefile are preceded by a comment
+# "maintenance hint", which tries to explain what's going on. Better to
+# leave those in place.
+# Helmut Giese, July 2002
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# Copyright (c) 1995-1997 Sun Microsystems, Inc.
+# Copyright (c) 1998-2000 Ajuba Solutions.
+
+# Does not depend on the presence of any environment variables in
+# order to compile tcl; all needed information is derived from
+# location of the compiler directories.
+
+#
+# Project directories
+#
+# ROOT = top of source tree
+#
+# TMPDIR = location where .obj files should be stored during build
+#
+# TOOLS32 = location of Borland development tools.
+#
+# TCLDIR = location of top of Tcl source hierarchy
+#
+
+ROOT = ..
+TCLDIR = ..\..\tcl8.4
+INSTALLDIR = D:\tmp\tcl
+
+# If you have C++ Builder 5 or the free Borland C++ 5.5 compiler
+# adapt the following paths as appropriate for your system
+TOOLS32 = d:\cbld5
+TOOLS32_rc = d:\cbld5
+#TOOLS32 = c:\bc55
+#TOOLS32_rc = c:\bc55
+
+cc32 = "$(TOOLS32)\bin\bcc32.exe"
+link32 = "$(TOOLS32)\bin\ilink32.exe"
+lib32 = "$(TOOLS32)\bin\tlib.exe"
+rc32 = "$(TOOLS32_rc)\bin\brcc32.exe"
+include32 = -I"$(TOOLS32)\include;$(TOOLS32)\include\mfc"
+libpath32 = -L"$(TOOLS32)\lib"
+
+# Uncomment the following line to compile with thread support
+#THREADDEFINES = -DTCL_THREADS=1
+
+# Allow definition of NDEBUG via command line
+# Set NODEBUG to 0 to compile with symbols
+!if !defined(NODEBUG)
+NODEBUG = 1
+!endif
+
+# uncomment the following two lines to compile with TCL_MEM_DEBUG
+#DEBUGDEFINES =-DTCL_MEM_DEBUG
+
+######################################################################
+# Do not modify below this line
+######################################################################
+
+TCLNAMEPREFIX = tcl
+TKNAMEPREFIX = tk
+WISHNAMEPREFIX = wish
+VERSION = 84
+DOTVERSION = 8.4
+
+TCLSTUBPREFIX = $(TCLNAMEPREFIX)stub
+TKSTUBPREFIX = $(TKNAMEPREFIX)stub
+
+
+BINROOT = .
+!IF "$(NODEBUG)" == "1"
+TMPDIRNAME = Release
+DBGX =
+!ELSE
+TMPDIRNAME = Debug
+DBGX =
+#DBGX = d
+!ENDIF
+TMPDIR = $(BINROOT)\$(TMPDIRNAME)
+OUTDIRNAME = $(TMPDIRNAME)
+OUTDIR = $(TMPDIR)
+
+TCLLIB = $(TCLNAMEPREFIX)$(VERSION)$(DBGX).lib
+TCLPLUGINLIB = $(TCLNAMEPREFIX)$(VERSION)p.lib
+TCLSTUBLIB = $(TCLSTUBPREFIX)$(VERSION)$(DBGX).lib
+TKDLLNAME = $(TKNAMEPREFIX)$(VERSION)$(DBGX).dll
+TKDLL = $(OUTDIR)\$(TKDLLNAME)
+TKLIB = $(OUTDIR)\$(TKNAMEPREFIX)$(VERSION)$(DBGX).lib
+TKSTUBLIBNAME = $(TKSTUBPREFIX)$(VERSION)$(DBGX).lib
+TKSTUBLIB = $(OUTDIR)\$(TKSTUBLIBNAME)
+TKPLUGINDLLNAME = $(TKNAMEPREFIX)$(VERSION)p$(DBG).dll
+TKPLUGINDLL = $(OUTDIR)\$(TKPLUGINDLLNAME)
+TKPLUGINLIB = $(OUTDIR)\$(TKNAMEPREFIX)$(VERSION)p$(DBGX).lib
+
+WISH = $(OUTDIR)\$(WISHNAMEPREFIX)$(VERSION)$(DBGX).exe
+WISHC = $(OUTDIR)\$(WISHNAMEPREFIX)c$(VERSION)$(DBGX).exe
+WISHP = $(OUTDIR)\$(WISHNAMEPREFIX)p$(VERSION)$(DBGX).exe
+TKTEST = $(OUTDIR)\$(TKNAMEPREFIX)test.exe
+CAT32 = $(TMPDIR)\cat32.exe
+
+BIN_INSTALL_DIR = $(INSTALLDIR)\bin
+INCLUDE_INSTALL_DIR = $(INSTALLDIR)\include
+LIB_INSTALL_DIR = $(INSTALLDIR)\lib
+SCRIPT_INSTALL_DIR = $(LIB_INSTALL_DIR)\tk$(DOTVERSION)
+
+WISHOBJS = \
+ $(TMPDIR)\winMain.obj
+
+TKTESTOBJS = \
+ $(TMPDIR)\tkTest.obj \
+ $(TMPDIR)\tkSquare.obj \
+ $(TMPDIR)\testMain.obj \
+ $(TMPDIR)\tkOldTest.obj \
+ $(TMPDIR)\tkWinTest.obj \
+ $(TCLLIBDIR)\tclThreadTest.obj
+
+XLIBOBJS = \
+ $(TMPDIR)\xcolors.obj \
+ $(TMPDIR)\xdraw.obj \
+ $(TMPDIR)\xgc.obj \
+ $(TMPDIR)\ximage.obj \
+ $(TMPDIR)\xutil.obj
+
+TKOBJS = \
+ $(TMPDIR)\tkConsole.obj \
+ $(TMPDIR)\tkUnixMenubu.obj \
+ $(TMPDIR)\tkUnixScale.obj \
+ $(XLIBOBJS) \
+ $(TMPDIR)\tkWin3d.obj \
+ $(TMPDIR)\tkWin32Dll.obj \
+ $(TMPDIR)\tkWinButton.obj \
+ $(TMPDIR)\tkWinClipboard.obj \
+ $(TMPDIR)\tkWinColor.obj \
+ $(TMPDIR)\tkWinConfig.obj \
+ $(TMPDIR)\tkWinCursor.obj \
+ $(TMPDIR)\tkWinDialog.obj \
+ $(TMPDIR)\tkWinDraw.obj \
+ $(TMPDIR)\tkWinEmbed.obj \
+ $(TMPDIR)\tkWinFont.obj \
+ $(TMPDIR)\tkWinImage.obj \
+ $(TMPDIR)\tkWinInit.obj \
+ $(TMPDIR)\tkWinKey.obj \
+ $(TMPDIR)\tkWinMenu.obj \
+ $(TMPDIR)\tkWinPixmap.obj \
+ $(TMPDIR)\tkWinPointer.obj \
+ $(TMPDIR)\tkWinRegion.obj \
+ $(TMPDIR)\tkWinScrlbr.obj \
+ $(TMPDIR)\tkWinSend.obj \
+ $(TMPDIR)\tkWinWindow.obj \
+ $(TMPDIR)\tkWinWm.obj \
+ $(TMPDIR)\tkWinX.obj \
+ $(TMPDIR)\stubs.obj \
+ $(TMPDIR)\tk3d.obj \
+ $(TMPDIR)\tkArgv.obj \
+ $(TMPDIR)\tkAtom.obj \
+ $(TMPDIR)\tkBind.obj \
+ $(TMPDIR)\tkBitmap.obj \
+ $(TMPDIR)\tkBusy.obj \
+ $(TMPDIR)\tkButton.obj \
+ $(TMPDIR)\tkCanvArc.obj \
+ $(TMPDIR)\tkCanvBmap.obj \
+ $(TMPDIR)\tkCanvImg.obj \
+ $(TMPDIR)\tkCanvLine.obj \
+ $(TMPDIR)\tkCanvPoly.obj \
+ $(TMPDIR)\tkCanvPs.obj \
+ $(TMPDIR)\tkCanvText.obj \
+ $(TMPDIR)\tkCanvUtil.obj \
+ $(TMPDIR)\tkCanvWind.obj \
+ $(TMPDIR)\tkCanvas.obj \
+ $(TMPDIR)\tkClipboard.obj \
+ $(TMPDIR)\tkCmds.obj \
+ $(TMPDIR)\tkColor.obj \
+ $(TMPDIR)\tkConfig.obj \
+ $(TMPDIR)\tkCursor.obj \
+ $(TMPDIR)\tkEntry.obj \
+ $(TMPDIR)\tkError.obj \
+ $(TMPDIR)\tkEvent.obj \
+ $(TMPDIR)\tkFileFilter.obj \
+ $(TMPDIR)\tkFocus.obj \
+ $(TMPDIR)\tkFont.obj \
+ $(TMPDIR)\tkFrame.obj \
+ $(TMPDIR)\tkGC.obj \
+ $(TMPDIR)\tkGeometry.obj \
+ $(TMPDIR)\tkGet.obj \
+ $(TMPDIR)\tkGrab.obj \
+ $(TMPDIR)\tkGrid.obj \
+ $(TMPDIR)\tkImage.obj \
+ $(TMPDIR)\tkImgBmap.obj \
+ $(TMPDIR)\tkImgGIF.obj \
+ $(TMPDIR)\tkImgPPM.obj \
+ $(TMPDIR)\tkImgPhoto.obj \
+ $(TMPDIR)\tkImgPhInstance.obj \
+ $(TMPDIR)\tkImgUtil.obj \
+ $(TMPDIR)\tkListbox.obj \
+ $(TMPDIR)\tkMacWinMenu.obj \
+ $(TMPDIR)\tkMain.obj \
+ $(TMPDIR)\tkMenu.obj \
+ $(TMPDIR)\tkMenubutton.obj \
+ $(TMPDIR)\tkMenuDraw.obj \
+ $(TMPDIR)\tkMessage.obj \
+ $(TMP_DIR)\tkPanedWindow.obj \
+ $(TMPDIR)\tkObj.obj \
+ $(TMPDIR)\tkOldConfig.obj \
+ $(TMPDIR)\tkOption.obj \
+ $(TMPDIR)\tkPack.obj \
+ $(TMPDIR)\tkPlace.obj \
+ $(TMPDIR)\tkPointer.obj \
+ $(TMPDIR)\tkRectOval.obj \
+ $(TMPDIR)\tkScale.obj \
+ $(TMPDIR)\tkScrollbar.obj \
+ $(TMPDIR)\tkSelect.obj \
+ $(TMPDIR)\tkText.obj \
+ $(TMPDIR)\tkTextBTree.obj \
+ $(TMPDIR)\tkTextDisp.obj \
+ $(TMPDIR)\tkTextImage.obj \
+ $(TMPDIR)\tkTextIndex.obj \
+ $(TMPDIR)\tkTextMark.obj \
+ $(TMPDIR)\tkTextTag.obj \
+ $(TMPDIR)\tkTextWind.obj \
+ $(TMPDIR)\tkTrig.obj \
+ $(TMPDIR)\tkUtil.obj \
+ $(TMPDIR)\tkVisual.obj \
+ $(TMPDIR)\tkStubInit.obj \
+ $(TMPDIR)\tkWindow.obj
+
+# Maintenance hint: Please have multiple members of TKSTUBOBJS be separated
+# by exactly one ' ' (see below the rule for making TKSTUBLIB)
+TKSTUBOBJS = $(TMPDIR)\tkStubLib.obj
+
+WINDIR = $(ROOT)\win
+GENERICDIR = $(ROOT)\generic
+XLIBDIR = $(ROOT)\xlib
+BITMAPDIR = $(ROOT)\bitmaps
+TCLLIBDIR = $(TCLDIR)\win\$(OUTDIRNAME)
+RCDIR = $(WINDIR)\rc
+
+TK_INCLUDES = -I$(WINDIR) -I$(GENERICDIR) -I$(BITMAPDIR) -I$(XLIBDIR) \
+ -I$(TCLDIR)\generic -I$(TCLDIR)\win
+
+TK_DEFINES = -D_WIN32 $(DEBUGDEFINES) $(THREADDEFINES) SUPPORT_CONFIG_EMBEDDED
+
+######################################################################
+# Compile flags
+######################################################################
+
+!IF "$(NODEBUG)" == "1"
+# these macros cause maximum optimization and no symbols
+cdebug = -v- -vi- -O2 -D_DEBUG
+!ELSE
+# these macros enable debugging
+cdebug = -k -Od -r- -v -vi- -y
+!ENDIF
+
+SYSDEFINES = _MT;NO_STRICT;_NO_VCL
+
+# declarations common to all compiler options
+cbase = -3 -a4 -c -g0 -tWM -Ve -Vx -X-
+WARNINGS = -w-rch -w-pch -w-par -w-dup -w-pro -w-dpu
+
+ccons = -tWC
+
+CFLAGS = $(cdebug) $(cbase) $(WARNINGS) -D$(SYSDEFINES)
+
+CON_CFLAGS = $(CFLAGS) $(TK_DEFINES) $(include32) $(ccons)
+WISH_CFLAGS = $(CFLAGS) $(include32) $(TK_INCLUDES) $(TK_DEFINES)
+TK_CFLAGS = $(CFLAGS) $(include32) $(TK_INCLUDES) $(TK_DEFINES) \
+ -DUSE_TCL_STUBS
+
+######################################################################
+# Link flags
+######################################################################
+
+!IF "$(NODEBUG)" == "1"
+ldebug =
+!ELSE
+ldebug = -v
+!ENDIF
+
+# declarations common to all linker options
+LNFLAGS = -D"" -Gn -I$(TMPDIR) -x $(ldebug) $(libpath32)
+# -Gi: create lib file (is -Gl in doc)
+# -aa: Windows app, -ap: Windows console app
+LNFLAGS_DLL = -ap -Gi -Tpd
+LNFLAGS_CONS = -ap -Tpe
+LNFLAGS_GUI = -aa -Tpe
+
+LNLIBS = import32 cw32mt
+
+
+######################################################################
+# Project specific targets
+######################################################################
+
+all: setup $(WISH) $(CAT32)
+install: install-binaries install-libraries
+plugin: setup $(TKPLUGINDLL) $(WISHP)
+tktest: setup $(TKTEST) $(CAT32)
+
+# Maintenance hint: We want to set environment variables before calling tktest.
+# If we do this in the form of normal commands, they will not persist up to
+# the call of tktest. Therfore we put all commands wanted into a batch file.
+# The normal way of using 'echo >x.bat' and 'echo >>x.bat' does not work here
+# because we cannot write '... > tktest.txt' this way. Hence this advanced
+# form of loop hopping:
+# - Have MAKE produce a temporary file with the content we want.
+# - Use it as input to the COPY command to produce a batch file.
+# - Run the batch file and be happy.
+#
+test: setup $(TKTEST) $(TKLIB) $(CAT32)
+ copy &&!
+ set TCL_LIBRARY=$(TCLDIR)/library
+ set PATH=$(TCLDIR)\win\$(TMPDIRNAME);$(PATH)
+ $(TKTEST) $(ROOT)/tests/all.tcl > tktest.txt
+! _test.bat
+ _test.bat
+# del _test.bat
+
+runtest: setup $(TKTEST) $(TKLIB) $(CAT32)
+ echo set TCL_LIBRARY=$(TCLDIR)/library > _test2.bat
+ echo set PATH=$(TCLDIR)\win\$(TMPDIRNAME);$(PATH) >> _test2.bat
+ echo $(TKTEST) >> _test2.bat
+ _test2.bat
+# del _test2.bat
+
+console-wish : all $(WISHC)
+
+stubs:
+ $(TCLDIR)\win\$(TMPDIRNAME)\tclsh$(VERSION)$(DBGX) \
+ $(TCLDIR)\tools\genStubs.tcl $(GENERICDIR) \
+ $(GENERICDIR)\tk.decls $(GENERICDIR)\tkInt.decls
+
+setup:
+ @mkd $(TMPDIR)
+ @mkd $(OUTDIR)
+
+install-binaries:
+ @mkd "$(BIN_INSTALL_DIR)"
+ copy $(TKDLL) "$(BIN_INSTALL_DIR)"
+ copy $(WISH) "$(BIN_INSTALL_DIR)"
+ @mkd "$(LIB_INSTALL_DIR)"
+ copy $(TKLIB) "$(LIB_INSTALL_DIR)"
+
+install-libraries:
+ @mkd "$(INCLUDE_INSTALL_DIR)"
+ @mkd "$(INCLUDE_INSTALL_DIR)\X11"
+ copy "$(GENERICDIR)\tk.h" "$(INCLUDE_INSTALL_DIR)"
+ copy "$(GENERICDIR)\tkDecls.h" "$(INCLUDE_INSTALL_DIR)"
+ copy "$(GENERICDIR)\tkPlatDecls.h" "$(INCLUDE_INSTALL_DIR)"
+ copy "$(GENERICDIR)\tkIntXlibDecls.h" "$(INCLUDE_INSTALL_DIR)"
+ xcopy "$(XLIBDIR)\X11\*.h" "$(INCLUDE_INSTALL_DIR)\X11"
+ @mkd "$(SCRIPT_INSTALL_DIR)"
+ @mkd "$(SCRIPT_INSTALL_DIR)\images"
+ @mkd "$(SCRIPT_INSTALL_DIR)\demos"
+ @mkd "$(SCRIPT_INSTALL_DIR)\demos\images"
+ @mkd "$(SCRIPT_INSTALL_DIR)\msgs"
+ xcopy "$(ROOT)\library" "$(SCRIPT_INSTALL_DIR)"
+ xcopy "$(ROOT)\library\images" "$(SCRIPT_INSTALL_DIR)\images"
+ xcopy "$(ROOT)\library\demos" "$(SCRIPT_INSTALL_DIR)\demos"
+ xcopy "$(ROOT)\library\demos\images" "$(SCRIPT_INSTALL_DIR)\demos\images"
+ xcopy "$(ROOT)\library\msgs" "$(SCRIPT_INSTALL_DIR)\msgs"
+
+$(TKLIB): $(TKDLL) $(TKSTUBLIB)
+
+# Maintenance hint: The macro puts a '+-' before the first member of
+# TKSTUBOBJS, than replaces any ' ' with ' +-' - together putting '+-' in
+# front of any member of TKSTUBOBJS (provided, they are separated in their
+# defintion by just one space).
+#
+# The first time you *make* this target, you will get a warning
+# tkStubLib not found in library
+# This is (probably) because of the '-' option, telling TLIB to remove
+# 'tkStubLib' when it does not yet exist. Forcing a re-make when it already
+# exists avoids this warning.
+#
+$(TKSTUBLIB): $(TKSTUBOBJS)
+ $(lib32) $@ +-$(TKSTUBOBJS: = +-)
+
+# $(lib32) $@ @&&!
+#+-$(TKSTUBOBJS: = &^
+#+-)
+#!
+
+$(TKDLL): $(TKOBJS) $(TMPDIR)\tk.res
+ $(link32) $(ldebug) $(LNFLAGS) $(LNFLAGS_DLL) $(TOOLS32)\lib\c0d32 @&&!
+ $(TKOBJS), $@, -x, $(LNLIBS) $(TCLLIBDIR)\$(TCLSTUBLIB),, $(TMPDIR)\tk.res
+!
+
+$(TKPLUGINLIB): $(TKPLUGINDLL)
+
+#$(TKPLUGINDLL): $(TKOBJS) $(TMPDIR)\tk.res
+# $(link32) $(ldebug) $(dlllflags) \
+# -out:$@ $(TMPDIR)\tk.res $(TCLLIBDIR)\$(TCLPLUGINLIB) \
+# $(guilibsdll) @<<
+# $(TKOBJS)
+#<<
+
+$(WISH): $(WISHOBJS) $(TKLIB) $(TMPDIR)\wish.res
+ $(link32) $(ldebug) -S:2400000 $(LNFLAGS) $(LNFLAGS_GUI) $(TOOLS32)\lib\c0x32 @&&!
+ $(WISHOBJS), $@, -x, $(LNLIBS) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB),, $(TMPDIR)\wish.res
+!
+
+$(WISHC): $(WISHOBJS) $(TKLIB) $(TMPDIR)\wish.res
+ $(link32) $(ldebug) -S:2400000 $(LNFLAGS) $(LNFLAGS_CONS) $(TOOLS32)\lib\c0x32 @&&!
+ $(WISHOBJS), $@, -x, $(LNLIBS) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB),, $(TMPDIR)\wish.res
+!
+
+$(WISHP): $(WISHOBJS) $(TKPLUGINLIB) $(TMPDIR)\wish.res
+ $(link32) $(ldebug) $(guilflags) $(TMPDIR)\wish.res -out:$@ \
+ $(guilibsdll) $(TCLLIBDIR)\$(TCLPLUGINLIB) \
+ $(TKPLUGINLIB) $(WISHOBJS)
+
+$(TKTEST): $(TKTESTOBJS) $(TKLIB) $(TMPDIR)\wish.res
+ $(link32) $(ldebug) -S:2400000 $(LNFLAGS) $(LNFLAGS_GUI) $(TOOLS32)\lib\c0x32 @&&!
+ $(TKTESTOBJS), $@, -x, $(LNLIBS) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB),, $(TMPDIR)\wish.res
+!
+# $(link32) $(ldebug) $(guilflags) $(TMPDIR)\wish.res -out:$@ \
+# $(guilibsdll) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB) $(TKTESTOBJS)
+
+#$(CAT32): $(TCLDIR)\win\cat.c
+# $(cc32) $(CON_CFLAGS) -o$(TMPDIR)\cat.obj $?
+# $(link32) $(conlflags) -out:$@ -stack:16384 $(TMPDIR)\cat.obj $(conlibs)
+
+$(CAT32): $(TCLDIR)\win\cat.c
+ $(cc32) $(CONS_CFLAGS) -o$(TMPDIR)\cat.obj $?
+ $(link32) $(ldebug) $(LNFLAGS) $(LNFLAGS_CONS) $(TOOLS32)\lib\c0x32 \
+ $(TMPDIR)\cat.obj, $@, -x, $(LNLIBS),,
+
+#
+# Regenerate the stubs files.
+#
+
+genstubs:
+ tclsh$(VERSION) $(TCLDIR)\tools\genStubs.tcl $(GENERICDIR) \
+ $(GENERICDIR)\tk.decls $(GENERICDIR)\tkInt.decls
+
+#
+# Special case object file targets
+#
+
+$(TMPDIR)\testMain.obj: $(WINDIR)\winMain.c
+ $(cc32) $(WISH_CFLAGS) -DTK_TEST -o$@ $?
+
+$(TMPDIR)\tkTest.obj: $(GENERICDIR)\tkTest.c
+ $(cc32) $(WISH_CFLAGS) -o$@ $?
+
+$(TMPDIR)\tkOldTest.obj: $(GENERICDIR)\tkOldTest.c
+ $(cc32) $(WISH_CFLAGS) -o$@ $?
+
+$(TMPDIR)\tkWinTest.obj: $(WINDIR)\tkWinTest.c
+ $(cc32) $(WISH_CFLAGS) -o$@ $?
+
+$(TMPDIR)\tkSquare.obj: $(GENERICDIR)\tkSquare.c
+ $(cc32) $(WISH_CFLAGS) -o$@ $?
+
+$(TMPDIR)\winMain.obj: $(WINDIR)\winMain.c
+ $(cc32) $(WISH_CFLAGS) -o$@ $?
+
+$(TMPDIR)\tkStubLib.obj : $(GENERICDIR)\tkStubLib.c
+ $(cc32) $(TK_CFLAGS) -DSTATIC_BUILD -o$@ $?
+
+#
+# Implicit rules
+#
+
+{$(XLIBDIR)}.c{$(TMPDIR)}.obj:
+ $(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -o$@ $<
+
+{$(GENERICDIR)}.c{$(TMPDIR)}.obj:
+ $(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -o$@ $<
+
+{$(WINDIR)}.c{$(TMPDIR)}.obj:
+ $(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -o$@ $<
+
+{$(ROOT)\unix}.c{$(TMPDIR)}.obj:
+ $(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -o$@ $<
+
+{$(RCDIR)}.rc{$(TMPDIR)}.res:
+ $(rc32) -I"$(GENERICDIR)" -I"$(TOOLS32)\include" -I"$(TCLDIR)\generic" \
+ -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $<
+
+clean:
+ -@del $(OUTDIR)\*.exp
+ -@del $(OUTDIR)\*.lib
+ -@del $(OUTDIR)\*.dll
+ -@del $(OUTDIR)\*.exe
+ -@del $(OUTDIR)\*.pdb
+ -@del $(TMPDIR)\*.pch
+ -@del $(TMPDIR)\*.obj
+ -@del $(TMPDIR)\*.res
+ -@del $(TMPDIR)\*.exe
+ -@rmd $(OUTDIR)
+ -@rmd $(TMPDIR)
+
+# dependencies
+
+$(TMPDIR)\tk.res: \
+ $(RCDIR)\buttons.bmp \
+ $(RCDIR)\cursor*.cur \
+ $(RCDIR)\tk.ico
+
+$(GENERICDIR)/default.h: $(WINDIR)/tkWinDefault.h
+$(GENERICDIR)/tkButton.c: $(GENERICDIR)/default.h
+$(GENERICDIR)/tkCanvas.c: $(GENERICDIR)/default.h
+$(GENERICDIR)/tkEntry.c: $(GENERICDIR)/default.h
+$(GENERICDIR)/tkFrame.c: $(GENERICDIR)/default.h
+$(GENERICDIR)/tkListbox.c: $(GENERICDIR)/default.h
+$(GENERICDIR)/tkMenu.c: $(GENERICDIR)/default.h
+$(GENERICDIR)/tkMenubutton.c: $(GENERICDIR)/default.h
+$(GENERICDIR)/tkMessage.c: $(GENERICDIR)/default.h
+$(GENERICDIR)/tkScale.c: $(GENERICDIR)/default.h
+$(GENERICDIR)/tkScrollbar.c: $(GENERICDIR)/default.h
+$(GENERICDIR)/tkText.c: $(GENERICDIR)/default.h
+$(GENERICDIR)/tkTextIndex.c: $(GENERICDIR)/default.h
+$(GENERICDIR)/tkTextTag.c: $(GENERICDIR)/default.h
+
+$(GENERICDIR)/tkText.c: $(GENERICDIR)/tkText.h
+$(GENERICDIR)/tkTextBTree.c: $(GENERICDIR)/tkText.h
+$(GENERICDIR)/tkTextDisp.c: $(GENERICDIR)/tkText.h
+$(GENERICDIR)/tkTextDisp.c: $(GENERICDIR)/tkText.h
+$(GENERICDIR)/tkTextImage.c: $(GENERICDIR)/tkText.h
+$(GENERICDIR)/tkTextIndex.c: $(GENERICDIR)/tkText.h
+$(GENERICDIR)/tkTextMark.c: $(GENERICDIR)/tkText.h
+$(GENERICDIR)/tkTextTag.c: $(GENERICDIR)/tkText.h
+$(GENERICDIR)/tkTextWind.c: $(GENERICDIR)/tkText.h
+
+$(GENERICDIR)/tkMacWinMenu.c: $(GENERICDIR)/tkMenu.h
+$(GENERICDIR)/tkMenu.c: $(GENERICDIR)/tkMenu.h
+$(GENERICDIR)/tkMenuDraw.c: $(GENERICDIR)/tkMenu.h
+$(WINDIR)/tkWinMenu.c: $(GENERICDIR)/tkMenu.h
+
+
diff --git a/win/makefile.vc b/win/makefile.vc
index 6be320e..6f61327 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -1,1027 +1,1036 @@
-#------------------------------------------------------------- -*- makefile -*-
-# makefile.vc --
-#
-# Microsoft Visual C++ makefile for use with nmake.exe v1.62+ (VC++ 5.0+)
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# Copyright (c) 1995-1996 Sun Microsystems, Inc.
-# Copyright (c) 1998-2000 Ajuba Solutions.
-# Copyright (c) 2001-2005 ActiveState Corporation.
-# Copyright (c) 2001-2004 David Gravereaux.
-# Copyright (c) 2003-2008 Pat Thoyts.
-#------------------------------------------------------------------------------
-
-# Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or
-# VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir)
-!if !defined(MSDEVDIR) && !defined(MSVCDIR) && !defined(VCINSTALLDIR) && !defined(MSSDK) && !defined(WINDOWSSDKDIR)
-MSG = ^
-You need to run vcvars32.bat from Developer Studio or setenv.bat from the^
-Platform SDK first to setup the environment. Jump to this line to read^
-the build instructions.
-!error $(MSG)
-!endif
-
-#------------------------------------------------------------------------------
-# HOW TO USE this makefile:
-#
-# 1) It is now necessary to have MSVCDir, MSDevDir or MSSDK set in the
-# environment. This is used as a check to see if vcvars32.bat had been
-# run prior to running nmake or during the installation of Microsoft
-# Visual C++, MSVCDir had been set globally and the PATH adjusted.
-# Either way is valid.
-#
-# You'll need to run vcvars32.bat contained in the MsDev's vc(98)/bin
-# directory to setup the proper environment, if needed, for your
-# current setup. This is a needed bootstrap requirement and allows the
-# swapping of different environments to be easier.
-#
-# 2) To use the Platform SDK (not expressly needed), run setenv.bat after
-# vcvars32.bat according to the instructions for it. This can also
-# turn on the 64-bit compiler, if your SDK has it.
-#
-# 3) Targets are:
-# release -- Builds the core, the shell. (default)
-# dlls -- Just builds the windows extensions.
-# shell -- Just builds the shell and the core.
-# core -- Only builds the core [tkXX.(dll|lib)].
-# all -- Builds everything.
-# test -- Builds and runs the test suite.
-# tktest -- Just builds the binaries for the test suite.
-# install -- Installs the built binaries and libraries to $(INSTALLDIR)
-# as the root of the install tree.
-# cwish -- Builds a console version of wish.
-# tidy/clean/hose -- varying levels of cleaning.
-# genstubs -- Rebuilds the Stubs table and support files (dev only).
-# depend -- Generates an accurate set of source dependancies for this
-# makefile. Helpful to avoid problems when the sources are
-# refreshed and you rebuild, but can "overbuild" when common
-# headers like tkInt.h just get small changes.
-# htmlhelp -- Builds a Windows .chm help file for Tcl and Tk from the
-# troff manual pages found in $(ROOT)\doc. You need to
-# have installed the HTML Help Compiler package from Microsoft
-# to produce the .chm file.
-# winhelp -- Builds the windows .hlp file for Tcl from the troff man
-# files found in $(ROOT)\doc.
-#
-# 4) Macros usable on the commandline:
-# TCLDIR=<path>
-# Sets the location for where to find the Tcl headers and
-# libraries. The install point is assumed when not specified.
-# Tk does need the source directory, though. Tk comes very close
-# to not needing the sources, but does, in fact, require them.
-#
-# INSTALLDIR=<path>
-# Sets where to install Tcl from the built binaries.
-# C:\Progra~1\Tcl is assumed when not specified.
-#
-# OPTS=loimpact,msvcrt,nothreads,noxp,pdbs,profile,square,static,staticpkg,symbols,unchecked,none
-# Sets special options for the core. The default is for none.
-# Any combination of the above may be used (comma separated).
-# 'none' will over-ride everything to nothing.
-#
-# loimpact = Adds a flag for how NT treats the heap to keep memory
-# in use, low. This is said to impact alloc performance.
-# msvcrt = Affects the static option only to switch it from
-# using libcmt(d) as the C runtime [by default] to
-# msvcrt(d). This is useful for static embedding
-# support.
-# nothreads= Turns off full multithreading support.
-# noxp = If you do not have the uxtheme.h header then you
-# cannot include support for XP themeing.
-# square = Include the demo square widget.
-# static = Builds a static library of the core instead of a
-# dll. The shell will be static (and large), as well.
-# staticpkg= Affects the static option only to switch wishXX.exe
-# to have the dde and reg extension linked inside it.
-# pdbs = Build detached symbols for release builds.
-# profile = Adds profiling hooks. Map file is assumed.
-# thrdalloc = Use the thread allocator (shared global free pool)
-# This is the default on threaded builds.
-# tclalloc = Use the old non-thread allocator
-# symbols = Debug build. Links to the debug C runtime, disables
-# optimizations and creates pdb symbols files.
-# unchecked = Allows a symbols build to not use the debug
-# enabled runtime (msvcrt.dll not msvcrtd.dll
-# or libcmt.lib not libcmtd.lib).
-#
-# STATS=compdbg,memdbg,none
-# Sets optional memory and bytecode compiler debugging code added
-# to the core. The default is for none. Any combination of the
-# above may be used (comma separated). 'none' will over-ride
-# everything to nothing.
-#
-# compdbg = Enables byte compilation logging.
-# memdbg = Enables the debugging memory allocator.
-#
-# CHECKS=64bit,fullwarn,nodep,none
-# Sets special macros for checking compatability.
-#
-# 64bit = Enable 64bit portability warnings (if available)
-# fullwarn = Builds with full compiler and link warnings enabled.
-# Very verbose.
-# nodep = Turns off compatability macros to ensure the core
-# isn't being built with deprecated functions.
-#
-# MACHINE=(ALPHA|AMD64|IA64|IX86)
-# Set the machine type used for the compiler, linker, and
-# resource compiler. This hook is needed to tell the tools
-# when alternate platforms are requested. IX86 is the default
-# when not specified. If the CPU environment variable has been
-# set (ie: recent Platform SDK) then MACHINE is set from CPU.
-#
-# TMP_DIR=<path>
-# OUT_DIR=<path>
-# Hooks to allow the intermediate and output directories to be
-# changed. $(OUT_DIR) is assumed to be
-# $(BINROOT)\(Release|Debug) based on if symbols are requested.
-# $(TMP_DIR) will de $(OUT_DIR)\<buildtype> by default.
-#
-# TESTPAT=<file>
-# Reads the tests requested to be run from this file.
-#
-# 5) Examples:
-#
-# Basic syntax of calling nmake looks like this:
-# nmake [-nologo] -f makefile.vc [target|macrodef [target|macrodef] [...]]
-#
-# Standard (no frills)
-# c:\tk_src\win\>c:\progra~1\micros~1\vc98\bin\vcvars32.bat
-# Setting environment for using Microsoft Visual C++ tools.
-# c:\tk_src\win\>nmake -f makefile.vc release
-# c:\tk_src\win\>nmake -f makefile.vc install INSTALLDIR=c:\progra~1\tcl
-#
-# Building for Win64
-# c:\tk_src\win\>c:\progra~1\micros~1\vc98\bin\vcvars32.bat
-# Setting environment for using Microsoft Visual C++ tools.
-# c:\tk_src\win\>c:\progra~1\platfo~1\setenv.bat /pre64 /RETAIL
-# Targeting Windows pre64 RETAIL
-# c:\tk_src\win\>nmake -f makefile.vc MACHINE=IA64
-#
-#------------------------------------------------------------------------------
-#==============================================================================
-###############################################################################
-
-
-# //==================================================================\\
-# >>[ -> Do not modify below this line. <- ]<<
-# >>[ Please, use the commandline macros to modify how Tcl is built. ]<<
-# >>[ If you need more features, send us a patch for more macros. ]<<
-# \\==================================================================//
-
-
-###############################################################################
-#==============================================================================
-#------------------------------------------------------------------------------
-
-!if !exist("makefile.vc")
-MSG = ^
-You must run this makefile only from the directory it is in.^
-Please `cd` to its location first.
-!error $(MSG)
-!endif
-
-PROJECT = tk
-!include "rules.vc"
-
-!if $(TCLINSTALL)
-!message *** Warning: Tk requires the source distribution of Tcl to build from,
-!message *** at this time, sorry. Please set the TCLDIR macro to point to the
-!message *** Tcl sources.
-!endif
-
-# Extra makefile options processing...
-!if "$(OPTS)" == "" || [nmakehlp -f "$(OPTS)" "none"]
-HAVE_UXTHEME_H = 1
-TTK_SQUARE_WIDGET = 0
-!else
-!if [nmakehlp -f $(OPTS) "noxp"]
-!message *** Exclude support for XP theme
-HAVE_UXTHEME_H = 0
-!else
-HAVE_UXTHEME_H = 1
-!endif
-!if [nmakehlp -f "$(OPTS)" "square"]
-!message *** Include ttk square demo widget
-TTK_SQUARE_WIDGET = 1
-!else
-TTK_SQUARE_WIDGET = 0
-!endif
-!endif
-
-STUBPREFIX = $(PROJECT)stub
-WISHNAMEPREFIX = wish
-
-BINROOT = $(MAKEDIR) # originally .
-ROOT = $(MAKEDIR)\.. # originally ..
-
-TK_LIBRARY = $(ROOT)\library
-
-TKIMPLIB = "$(OUT_DIR)\$(PROJECT)$(TK_VERSION)$(SUFX).lib"
-TKLIBNAME = $(PROJECT)$(TK_VERSION)$(SUFX).$(EXT)
-TKLIB = "$(OUT_DIR)\$(TKLIBNAME)"
-
-TKSTUBLIBNAME = $(STUBPREFIX)$(TK_VERSION).lib
-TKSTUBLIB = "$(OUT_DIR)\$(TKSTUBLIBNAME)"
-
-WISH = "$(OUT_DIR)\$(WISHNAMEPREFIX)$(TK_VERSION)$(SUFX).exe"
-WISHC = "$(OUT_DIR)\$(WISHNAMEPREFIX)c$(TK_VERSION)$(SUFX).exe"
-
-TKTEST = "$(OUT_DIR)\$(PROJECT)test.exe"
-CAT32 = "$(OUT_DIR)\cat32.exe"
-
-LIB_INSTALL_DIR = $(_INSTALLDIR)\lib
-BIN_INSTALL_DIR = $(_INSTALLDIR)\bin
-DOC_INSTALL_DIR = $(_INSTALLDIR)\doc
-SCRIPT_INSTALL_DIR = $(_INSTALLDIR)\lib\$(PROJECT)$(TK_DOTVERSION)
-INCLUDE_INSTALL_DIR = $(_INSTALLDIR)\include
-
-WISHOBJS = \
- $(TMP_DIR)\winMain.obj \
-!if $(TCL_USE_STATIC_PACKAGES)
- $(TCLDDELIB) \
- $(TCLREGLIB) \
-!endif
- $(TMP_DIR)\wish.res
-
-TKTESTOBJS = \
- $(TMP_DIR)\testMain.obj \
- $(TMP_DIR)\tkSquare.obj \
- $(TMP_DIR)\tkTest.obj \
- $(TMP_DIR)\tkOldTest.obj \
- $(TMP_DIR)\tkWinTest.obj
-
-XLIBOBJS = \
- $(TMP_DIR)\xcolors.obj \
- $(TMP_DIR)\xdraw.obj \
- $(TMP_DIR)\xgc.obj \
- $(TMP_DIR)\ximage.obj \
- $(TMP_DIR)\xutil.obj
-
-TKOBJS = \
- $(TMP_DIR)\tkConsole.obj \
- $(TMP_DIR)\tkUnixMenubu.obj \
- $(TMP_DIR)\tkUnixScale.obj \
- $(XLIBOBJS) \
- $(TMP_DIR)\tkWin3d.obj \
- $(TMP_DIR)\tkWin32Dll.obj \
- $(TMP_DIR)\tkWinButton.obj \
- $(TMP_DIR)\tkWinClipboard.obj \
- $(TMP_DIR)\tkWinColor.obj \
- $(TMP_DIR)\tkWinConfig.obj \
- $(TMP_DIR)\tkWinCursor.obj \
- $(TMP_DIR)\tkWinDialog.obj \
- $(TMP_DIR)\tkWinDraw.obj \
- $(TMP_DIR)\tkWinEmbed.obj \
- $(TMP_DIR)\tkWinFont.obj \
- $(TMP_DIR)\tkWinImage.obj \
- $(TMP_DIR)\tkWinInit.obj \
- $(TMP_DIR)\tkWinKey.obj \
- $(TMP_DIR)\tkWinMenu.obj \
- $(TMP_DIR)\tkWinPixmap.obj \
- $(TMP_DIR)\tkWinPointer.obj \
- $(TMP_DIR)\tkWinRegion.obj \
- $(TMP_DIR)\tkWinScrlbr.obj \
- $(TMP_DIR)\tkWinSend.obj \
- $(TMP_DIR)\tkWinSendCom.obj \
- $(TMP_DIR)\tkWinWindow.obj \
- $(TMP_DIR)\tkWinWm.obj \
- $(TMP_DIR)\tkWinX.obj \
- $(TMP_DIR)\stubs.obj \
- $(TMP_DIR)\tk3d.obj \
- $(TMP_DIR)\tkArgv.obj \
- $(TMP_DIR)\tkAtom.obj \
- $(TMP_DIR)\tkBind.obj \
- $(TMP_DIR)\tkBitmap.obj \
- $(TMP_DIR)\tkBusy.obj \
- $(TMP_DIR)\tkButton.obj \
- $(TMP_DIR)\tkCanvArc.obj \
- $(TMP_DIR)\tkCanvBmap.obj \
- $(TMP_DIR)\tkCanvImg.obj \
- $(TMP_DIR)\tkCanvLine.obj \
- $(TMP_DIR)\tkCanvPoly.obj \
- $(TMP_DIR)\tkCanvPs.obj \
- $(TMP_DIR)\tkCanvText.obj \
- $(TMP_DIR)\tkCanvUtil.obj \
- $(TMP_DIR)\tkCanvWind.obj \
- $(TMP_DIR)\tkCanvas.obj \
- $(TMP_DIR)\tkClipboard.obj \
- $(TMP_DIR)\tkCmds.obj \
- $(TMP_DIR)\tkColor.obj \
- $(TMP_DIR)\tkConfig.obj \
- $(TMP_DIR)\tkCursor.obj \
- $(TMP_DIR)\tkEntry.obj \
- $(TMP_DIR)\tkError.obj \
- $(TMP_DIR)\tkEvent.obj \
- $(TMP_DIR)\tkFileFilter.obj \
- $(TMP_DIR)\tkFocus.obj \
- $(TMP_DIR)\tkFont.obj \
- $(TMP_DIR)\tkFrame.obj \
- $(TMP_DIR)\tkGC.obj \
- $(TMP_DIR)\tkGeometry.obj \
- $(TMP_DIR)\tkGet.obj \
- $(TMP_DIR)\tkGrab.obj \
- $(TMP_DIR)\tkGrid.obj \
- $(TMP_DIR)\tkImage.obj \
- $(TMP_DIR)\tkImgBmap.obj \
- $(TMP_DIR)\tkImgGIF.obj \
- $(TMP_DIR)\tkImgPNG.obj \
- $(TMP_DIR)\tkImgPPM.obj \
- $(TMP_DIR)\tkImgPhoto.obj \
- $(TMP_DIR)\tkImgPhInstance.obj \
- $(TMP_DIR)\tkImgUtil.obj \
- $(TMP_DIR)\tkListbox.obj \
- $(TMP_DIR)\tkMacWinMenu.obj \
- $(TMP_DIR)\tkMain.obj \
- $(TMP_DIR)\tkMain2.obj \
- $(TMP_DIR)\tkMenu.obj \
- $(TMP_DIR)\tkMenubutton.obj \
- $(TMP_DIR)\tkMenuDraw.obj \
- $(TMP_DIR)\tkMessage.obj \
- $(TMP_DIR)\tkPanedWindow.obj \
- $(TMP_DIR)\tkObj.obj \
- $(TMP_DIR)\tkOldConfig.obj \
- $(TMP_DIR)\tkOption.obj \
- $(TMP_DIR)\tkPack.obj \
- $(TMP_DIR)\tkPlace.obj \
- $(TMP_DIR)\tkPointer.obj \
- $(TMP_DIR)\tkRectOval.obj \
- $(TMP_DIR)\tkScale.obj \
- $(TMP_DIR)\tkScrollbar.obj \
- $(TMP_DIR)\tkSelect.obj \
- $(TMP_DIR)\tkStyle.obj \
- $(TMP_DIR)\tkText.obj \
- $(TMP_DIR)\tkTextBTree.obj \
- $(TMP_DIR)\tkTextDisp.obj \
- $(TMP_DIR)\tkTextImage.obj \
- $(TMP_DIR)\tkTextIndex.obj \
- $(TMP_DIR)\tkTextMark.obj \
- $(TMP_DIR)\tkTextTag.obj \
- $(TMP_DIR)\tkTextWind.obj \
- $(TMP_DIR)\tkTrig.obj \
- $(TMP_DIR)\tkUndo.obj \
- $(TMP_DIR)\tkUtil.obj \
- $(TMP_DIR)\tkVisual.obj \
- $(TMP_DIR)\tkStubInit.obj \
- $(TMP_DIR)\tkWindow.obj \
- $(TTK_OBJS) \
-!if !$(STATIC_BUILD)
- $(TMP_DIR)\tk.res
-!endif
-
-TTK_OBJS = \
- $(TMP_DIR)\ttkWinMonitor.obj \
- $(TMP_DIR)\ttkWinTheme.obj \
- $(TMP_DIR)\ttkWinXPTheme.obj \
- $(TMP_DIR)\ttkBlink.obj \
- $(TMP_DIR)\ttkButton.obj \
- $(TMP_DIR)\ttkCache.obj \
- $(TMP_DIR)\ttkClamTheme.obj \
- $(TMP_DIR)\ttkClassicTheme.obj \
- $(TMP_DIR)\ttkDefaultTheme.obj \
- $(TMP_DIR)\ttkElements.obj \
- $(TMP_DIR)\ttkEntry.obj \
- $(TMP_DIR)\ttkFrame.obj \
- $(TMP_DIR)\ttkImage.obj \
- $(TMP_DIR)\ttkInit.obj \
- $(TMP_DIR)\ttkLabel.obj \
- $(TMP_DIR)\ttkLayout.obj \
- $(TMP_DIR)\ttkManager.obj \
- $(TMP_DIR)\ttkNotebook.obj \
- $(TMP_DIR)\ttkPanedwindow.obj \
- $(TMP_DIR)\ttkProgress.obj \
- $(TMP_DIR)\ttkScale.obj \
- $(TMP_DIR)\ttkScrollbar.obj \
- $(TMP_DIR)\ttkScroll.obj \
- $(TMP_DIR)\ttkSeparator.obj \
- $(TMP_DIR)\ttkSquare.obj \
- $(TMP_DIR)\ttkState.obj \
- $(TMP_DIR)\ttkTagSet.obj \
- $(TMP_DIR)\ttkTheme.obj \
- $(TMP_DIR)\ttkTrace.obj \
- $(TMP_DIR)\ttkTrack.obj \
- $(TMP_DIR)\ttkTreeview.obj \
- $(TMP_DIR)\ttkWidget.obj \
- $(TMP_DIR)\ttkStubInit.obj
-
-TKSTUBOBJS = \
- $(TMP_DIR)\tkStubLib.obj \
- $(TMP_DIR)\ttkStubLib.obj
-
-
-WINDIR = $(ROOT)\win
-GENERICDIR = $(ROOT)\generic
-XLIBDIR = $(ROOT)\xlib
-TTKDIR = $(ROOT)\generic\ttk
-BITMAPDIR = $(ROOT)\bitmaps
-DOCDIR = $(ROOT)\doc
-RCDIR = $(WINDIR)\rc
-
-TK_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)" -I"$(BITMAPDIR)" -I"$(XLIBDIR)" \
- $(TCL_INCLUDES)
-
-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_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 \
- -DSUPPORT_CONFIG_EMBEDDED \
-!if $(HAVE_UXTHEME_H)
- -DHAVE_UXTHEME_H=1 \
-!endif
-!if $(TTK_SQUARE_WIDGET)
- -DTTK_SQUARE_WIDGET=1 \
-!endif
-
-TK_DEFINES =-DBUILD_ttk $(OPTDEFINES) $(CONFIG_DEFS) -Dinline=__inline
-
-#---------------------------------------------------------------------
-# Compile flags
-#---------------------------------------------------------------------
-
-!if !$(DEBUG)
-!if $(OPTIMIZING)
-### This cranks the optimization level to maximize speed
-### We can't use -O2 because sometimes it causes problems.
-cdebug = $(OPTIMIZATIONS)
-!else
-cdebug =
-!endif
-!if $(SYMBOLS)
-cdebug = $(cdebug) -Zi
-!endif
-!else if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64"
-### Warnings are too many, can't support warnings into errors.
-cdebug = -Zi -Od $(DEBUGFLAGS)
-!else
-cdebug = -Zi -WX $(DEBUGFLAGS)
-!endif
-
-### Declarations common to all compiler options
-cwarn = $(WARNINGS) -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE
-cflags = -nologo -c $(COMPILERFLAGS) $(cwarn) -Fp$(TMP_DIR)^\
-
-!if $(MSVCRT)
-!if $(DEBUG) && !$(UNCHECKED)
-crt = -MDd
-!else
-crt = -MD
-!endif
-!else
-!if $(DEBUG) && !$(UNCHECKED)
-crt = -MTd
-!else
-crt = -MT
-!endif
-!endif
-
-BASE_CFLAGS = $(cdebug) $(cflags) $(crt) $(TK_INCLUDES)
-TK_CFLAGS = $(BASE_CFLAGS) $(TK_DEFINES) -DUSE_TCL_STUBS
-CON_CFLAGS = $(cdebug) $(cflags) $(crt) -DCONSOLE
-WISH_CFLAGS = $(BASE_CFLAGS) $(TK_DEFINES)
-STUB_CFLAGS = $(cflags) $(cdebug) $(TK_DEFINES)
-
-#---------------------------------------------------------------------
-# Link flags
-#---------------------------------------------------------------------
-
-!if $(DEBUG)
-ldebug = -debug -debugtype:cv
-!else
-ldebug = -release -opt:ref -opt:icf,3
-!if $(SYMBOLS)
-ldebug = $(ldebug) -debug -debugtype:cv
-!endif
-!endif
-
-### Declarations common to all linker options
-lflags = -nologo -machine:$(MACHINE) $(LINKERFLAGS) $(ldebug)
-
-!if $(PROFILE)
-lflags = $(lflags) -profile
-!endif
-
-!if $(ALIGN98_HACK) && !$(STATIC_BUILD)
-### Align sections for PE size savings.
-lflags = $(lflags) -opt:nowin98
-!else if !$(ALIGN98_HACK) && $(STATIC_BUILD)
-### Align sections for speed in loading by choosing the virtual page size.
-lflags = $(lflags) -align:4096
-!endif
-
-!if $(LOIMPACT)
-lflags = $(lflags) -ws:aggressive
-!endif
-
-dlllflags = $(lflags) -dll
-conlflags = $(lflags) -subsystem:console
-guilflags = $(lflags) -subsystem:windows
-
-tcllibs = $(TCLSTUBLIB) $(TCLIMPLIB)
-
-baselibs = netapi32.lib kernel32.lib user32.lib advapi32.lib ws2_32.lib
-# Avoid 'unresolved external symbol __security_cookie' errors.
-# c.f. http://support.microsoft.com/?id=894573
-!if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64"
-!if $(VCVERSION) > 1399 && $(VCVERSION) < 1500
-baselibs = $(baselibs) bufferoverflowU.lib
-!endif
-!endif
-guilibs = $(baselibs) gdi32.lib
-
-
-#---------------------------------------------------------------------
-# TkTest flags
-#---------------------------------------------------------------------
-
-!if "$(TESTPAT)" != ""
-TESTFLAGS = $(TESTFLAGS) -file $(TESTPAT)
-!endif
-
-
-#---------------------------------------------------------------------
-# Project specific targets
-#---------------------------------------------------------------------
-
-release: setup $(TKSTUBLIB) $(WISH)
-all: release $(CAT32)
-core: setup $(TKSTUBLIB) $(TKLIB)
-cwish: $(WISHC)
-install: install-binaries install-libraries install-docs
-tktest: setup $(TKTEST) $(CAT32)
-
-
-test: test-classic test-ttk
-
-test-classic: setup $(TKTEST) $(TKLIB) $(CAT32)
- @set TCL_LIBRARY=$(TCL_LIBRARY:\=/)
- @set TK_LIBRARY=$(TK_LIBRARY:\=/)
- @set TCLLIBPATH=
-!if $(TCLINSTALL)
- @set PATH=$(_TCLDIR)\bin;$(PATH)
-!else
- @set PATH=$(_TCLDIR)\win\$(BUILDDIRTOP);$(PATH)
-!endif
- $(DEBUGGER) $(TKTEST) "$(ROOT:\=/)/tests/all.tcl" $(TESTFLAGS) | $(CAT32)
-
-test-ttk: setup $(TKTEST) $(TKLIB) $(CAT32)
- @set TCL_LIBRARY=$(TCL_LIBRARY:\=/)
- @set TK_LIBRARY=$(TK_LIBRARY:\=/)
- @set TCLLIBPATH=
-!if $(TCLINSTALL)
- @set PATH=$(_TCLDIR)\bin;$(PATH)
-!else
- @set PATH=$(_TCLDIR)\win\$(BUILDDIRTOP);$(PATH)
-!endif
- $(DEBUGGER) $(TKTEST) "$(ROOT:\=/)/tests/ttk/all.tcl" $(TESTFLAGS) | $(CAT32)
-
-runtest: setup $(TKTEST) $(TKLIB) $(CAT32)
- @set TCL_LIBRARY=$(TCL_LIBRARY:\=/)
- @set TK_LIBRARY=$(TK_LIBRARY:\=/)
- @set TCLLIBPATH=
-!if $(TCLINSTALL)
- @set PATH=$(_TCLDIR)\bin;$(PATH)
-!else
- @set PATH=$(_TCLDIR)\win\$(BUILDDIRTOP);$(PATH)
-!endif
- $(DEBUGGER) $(TKTEST)
-
-rundemo: setup $(TKTEST) $(TKLIB) $(CAT32)
- @set TCL_LIBRARY=$(TCL_LIBRARY:\=/)
- @set TK_LIBRARY=$(TK_LIBRARY:\=/)
- @set TCLLIBPATH=
-!if $(TCLINSTALL)
- @set PATH=$(_TCLDIR)\bin;$(PATH)
-!else
- @set PATH=$(_TCLDIR)\win\$(BUILDDIRTOP);$(PATH)
-!endif
- $(TKTEST) $(ROOT:\=/)\library\demos\widget
-
-shell: setup $(WISH)
- @set TCL_LIBRARY=$(TCL_LIBRARY:\=/)
- @set TK_LIBRARY=$(TK_LIBRARY:\=/)
- @set TCLLIBPATH=
-!if $(TCLINSTALL)
- @set PATH=$(_TCLDIR)\bin;$(PATH)
-!else
- @set PATH=$(_TCLDIR)\win\$(BUILDDIRTOP);$(PATH)
-!endif
- $(DEBUGGER) $(WISH) <<
- console show
-<<
-
-dbgshell: setup $(WISH)
- @set TCL_LIBRARY=$(TCL_LIBRARY:\=/)
- @set TK_LIBRARY=$(TK_LIBRARY:\=/)
- @set TCLLIBPATH=
-!if $(TCLINSTALL)
- @set PATH=$(_TCLDIR)\bin;$(PATH)
-!else
- @set PATH=$(_TCLDIR)\win\$(BUILDDIRTOP);$(PATH)
-!endif
- windbg $(WISH)
-
-setup:
- @if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR)
- @if not exist $(TMP_DIR)\nul mkdir $(TMP_DIR)
-
-!if !$(STATIC_BUILD)
-$(TKIMPLIB): $(TKLIB)
-!endif
-
-$(TKLIB): $(TKOBJS)
-!if $(STATIC_BUILD)
- $(lib32) -nologo -out:$@ @<<
-$**
-<<
-!else
- $(link32) $(dlllflags) -base:@$(COFFBASE),tk -out:$@ $(guilibs) \
- $(TCLSTUBLIB) @<<
-$**
-<<
- $(_VC_MANIFEST_EMBED_DLL)
- -@del $*.exp
-!endif
-
-
-$(TKSTUBLIB): $(TKSTUBOBJS)
- $(lib32) -nologo -nodefaultlib -out:$@ $**
-
-
-$(WISH): $(WISHOBJS) $(TKSTUBLIB) $(TKIMPLIB)
- $(link32) $(guilflags) -stack:2300000 -out:$@ $(guilibs) $(tcllibs) $**
- $(_VC_MANIFEST_EMBED_EXE)
-
-
-$(WISHC): $(WISHOBJS) $(TKSTUBLIB) $(TKIMPLIB)
- $(link32) $(conlflags) -stack:2300000 -out:$@ $(guilibs) $(tcllibs) $**
- $(_VC_MANIFEST_EMBED_EXE)
-
-
-$(TKTEST): $(TKTESTOBJS) $(TKSTUBLIB) $(TKIMPLIB)
- $(link32) $(guilflags) -stack:2300000 -out:$@ $(guilibs) $(tcllibs) $**
- $(_VC_MANIFEST_EMBED_EXE)
-
-
-$(CAT32): $(_TCLDIR)\win\cat.c
- $(cc32) $(CON_CFLAGS) -Fo$(TMP_DIR)\ $?
- $(link32) $(conlflags) -out:$@ -stack:16384 $(TMP_DIR)\cat.obj $(baselibs)
- $(_VC_MANIFEST_EMBED_EXE)
-
-#---------------------------------------------------------------------
-# Regenerate the stubs files. [Development use only]
-#---------------------------------------------------------------------
-
-genstubs:
-!if !exist($(TCLSH))
- @echo Build tclsh first!
-!else
- set TCL_LIBRARY=$(TCL_LIBRARY)
- $(TCLSH) $(_TCLDIR)\tools\genStubs.tcl $(GENERICDIR) \
- $(GENERICDIR)\$(PROJECT).decls $(GENERICDIR)\$(PROJECT)Int.decls
-!endif
-
-
-#---------------------------------------------------------------------
-# Build the Windows HTML help file.
-#---------------------------------------------------------------------
-
-# NOTE: you can define HHC on the command-line to override this
-!ifndef HHC
-HHC=""%ProgramFiles%\HTML Help Workshop\hhc.exe""
-!endif
-HTMLDIR=$(ROOT)\html
-HTMLBASE=TclTk$(VERSION)
-HHPFILE=$(HTMLDIR)\$(HTMLBASE).hhp
-CHMFILE=$(HTMLDIR)\$(HTMLBASE).chm
-
-htmlhelp: chmsetup $(CHMFILE)
-
-$(CHMFILE): $(DOCDIR)\*
- @$(TCLSH) $(TCLTOOLSDIR)\tcltk-man2html.tcl
- @echo Compiling HTML help project
- @$(HHC) <<$(HHPFILE) >NUL
-[OPTIONS]
-Compatibility=1.1 or later
-Compiled file=$(HTMLBASE).chm
-Display compile progress=no
-Error log file=$(HTMLBASE).log
-Language=0x409 English (United States)
-Title=Tcl/Tk $(DOT_VERSION) Help
-[FILES]
-contents.htm
-docs.css
-Keywords
-TclCmd
-TclLib
-TkCmd
-TkLib
-UserCmd
-<<
-
-chmsetup:
- @if not exist $(HTMLDIR)\nul mkdir $(HTMLDIR)
-
-#-------------------------------------------------------------------------
-# Build the old-style Windows .hlp file
-#-------------------------------------------------------------------------
-
-HLPBASE = $(PROJECT)$(TK_VERSION)
-HELPFILE = $(OUT_DIR)\$(HLPBASE).hlp
-HELPCNT = $(OUT_DIR)\$(HLPBASE).cnt
-DOCTMP_DIR = $(OUT_DIR)\$(PROJECT)_docs
-HELPRTF = $(DOCTMP_DIR)\$(PROJECT).rtf
-MAN2HELP = $(DOCTMP_DIR)\man2help.tcl
-MAN2HELP2 = $(DOCTMP_DIR)\man2help2.tcl
-INDEX = $(DOCTMP_DIR)\index.tcl
-BMP = $(DOCTMP_DIR)\lamp.bmp
-BMP_NOPATH = lamp.bmp
-MAN2TCL = $(DOCTMP_DIR)\man2tcl.exe
-
-winhelp: docsetup $(HELPFILE)
-
-docsetup:
- @if not exist $(DOCTMP_DIR)\nul mkdir $(DOCTMP_DIR)
-
-$(MAN2HELP) $(MAN2HELP2) $(INDEX): $(TCLTOOLSDIR)\$$(@F)
- $(CPY) $(TCLTOOLSDIR)\$(@F) $(@D)
-
-$(BMP):
- $(CPY) $(WINDIR)\rc\$(@F) $(@D)
-
-$(HELPFILE): $(HELPRTF) $(BMP)
- cd $(DOCTMP_DIR)
- start /wait hcrtf.exe -x <<$(PROJECT).hpj
-[OPTIONS]
-COMPRESS=12 Hall Zeck
-LCID=0x409 0x0 0x0 ; English (United States)
-TITLE=Tk Reference Manual
-BMROOT=.
-CNT=$(@B).cnt
-HLP=$(@B).hlp
-
-[FILES]
-$(PROJECT).rtf
-
-[WINDOWS]
-main="Tcl/Tk Reference Manual",,27648,(r15263976),(r4227327)
-
-[CONFIG]
-BrowseButtons()
-CreateButton(1, "Web", ExecFile("http://www.tcl.tk"))
-CreateButton(2, "SF", ExecFile("http://sf.net/projects/tcl"))
-CreateButton(3, "Wiki", ExecFile("http://wiki.tcl.tk"))
-CreateButton(4, "FAQ", ExecFile("http://www.purl.org/NET/Tcl-FAQ/"))
-<<
- cd $(MAKEDIR)
- @$(CPY) "$(DOCTMP_DIR)\$(@B).hlp" "$(OUT_DIR)"
- @$(CPY) "$(DOCTMP_DIR)\$(@B).cnt" "$(OUT_DIR)"
-
-$(MAN2TCL): $(TCLTOOLSDIR)\$$(@B).c
- $(cc32) $(TK_CFLAGS) -Fo$(@D)\ $(TCLTOOLSDIR)\$(@B).c
- $(link32) $(conlflags) -out:$@ -stack:16384 $(@D)\man2tcl.obj
- $(_VC_MANIFEST_EMBED_EXE)
-
-$(HELPRTF): $(MAN2TCL) $(MAN2HELP) $(MAN2HELP2) $(INDEX)
- $(TCLSH) $(MAN2HELP) -bitmap $(BMP_NOPATH) $(PROJECT) $(TK_VERSION) $(DOCDIR:\=/)
-
-install-docs:
-!if exist($(HELPFILE))
- $(CPY) "$(HELPFILE)" "$(DOC_INSTALL_DIR)\"
- $(CPY) "$(HELPCNT)" "$(DOC_INSTALL_DIR)\"
- $(TCLSH) <<
-puts "Installing $(PROJECT)'s helpfile contents into Tcl's ..."
-set f [open "$(DOC_INSTALL_DIR:\=/)/tcl$(TK_VERSION).cnt" r]
-while {![eof $$f]} {
- if {[regexp {:Include $(PROJECT)([0-9]{2}).cnt} [gets $$f] dummy ver]} {
- if {$$ver == $(TK_VERSION)} {
- puts "Already installed."
- exit
- } else {
- # do something here logical to remove (or replace) it.
- puts "$$ver != $(TK_VERSION), unfinished code path, die, die!"
- exit 1
- }
- }
-}
-close $$f
-set f [open "$(DOC_INSTALL_DIR:\=/)/tcl$(TK_VERSION).cnt" a]
-puts $$f {:Include $(HLPBASE).cnt}
-close $$f
-<<
- start /wait winhlp32 -g $(DOC_INSTALL_DIR)\tcl$(TK_VERSION).hlp
-!endif
-
-#---------------------------------------------------------------------
-# Special case object file targets
-#---------------------------------------------------------------------
-
-$(TMP_DIR)\testMain.obj: $(WINDIR)\winMain.c
- $(cc32) $(WISH_CFLAGS) -DTK_TEST \
- -DTCL_USE_STATIC_PACKAGES=$(TCL_USE_STATIC_PACKAGES) \
- -Fo$@ $?
-
-$(TMP_DIR)\tkTest.obj: $(GENERICDIR)\tkTest.c
- $(cc32) $(WISH_CFLAGS) -Fo$@ $?
-
-$(TMP_DIR)\tkOldTest.obj: $(GENERICDIR)\tkOldTest.c
- $(cc32) $(WISH_CFLAGS) -Fo$@ $?
-
-$(TMP_DIR)\tkWinTest.obj: $(WINDIR)\tkWinTest.c
- $(cc32) $(WISH_CFLAGS) -Fo$@ $?
-
-$(TMP_DIR)\tkSquare.obj: $(GENERICDIR)\tkSquare.c
- $(cc32) $(WISH_CFLAGS) -Fo$@ $?
-
-$(TMP_DIR)\winMain.obj: $(WINDIR)\winMain.c
- $(cc32) $(WISH_CFLAGS) \
- -DTCL_USE_STATIC_PACKAGES=$(TCL_USE_STATIC_PACKAGES) \
- -Fo$@ $?
-
-$(TMP_DIR)\tkMain2.obj: $(GENERICDIR)\tkMain.c
- $(cc32) -DBUILD_tk $(TK_CFLAGS) -DTK_ASCII_MAIN -Fo$@ $?
-
-# The following objects are part of the stub library and should not
-# be built as DLL objects but none of the symbols should be exported
-# and no reference made to a C runtime.
-
-$(TMP_DIR)\tkStubLib.obj : $(GENERICDIR)\tkStubLib.c
- $(cc32) $(STUB_CFLAGS) $(TK_INCLUDES) -Zl -DSTATIC_BUILD -Fo$@ $?
-
-
-$(TMP_DIR)\wish.exe.manifest: $(WINDIR)\wish.exe.manifest.in
- @nmakehlp -s << $** >$@
-@MACHINE@ $(MACHINE:IX86=X86)
-@TK_WIN_VERSION@ $(TK_DOTVERSION).0.0
-<<
-
-#---------------------------------------------------------------------
-# Generate the source dependencies. Having dependency rules will
-# improve incremental build accuracy without having to resort to a
-# full rebuild just because some non-global header file like
-# tclCompile.h was changed. These rules aren't needed when building
-# from scratch.
-#---------------------------------------------------------------------
-
-depend:
-!if !exist($(TCLSH))
- @echo Build tclsh first!
-!else
- set TCL_LIBRARY=$(TCL_LIBRARY)
- $(TCLSH) $(TCLTOOLSDIR:\=/)/mkdepend.tcl -vc32 -out:"$(OUT_DIR)\depend.mk" \
- -passthru:"-DBUILD_tk $(TK_INCLUDES)" $(GENERICDIR),$$(GENERICDIR) \
- $(WINDIR),$$(WINDIR) $(TTKDIR),$$(TTKDIR) $(XLIBDIR),$$(XLIBDIR) \
- $(BITMAPDIR),$$(BITMAPDIR) @<<
-$(TKOBJS)
-<<
-!endif
-
-#---------------------------------------------------------------------
-# Dependency rules
-#---------------------------------------------------------------------
-
-$(TMP_DIR)\tk.res: \
- $(RCDIR)\buttons.bmp \
- $(RCDIR)\cursor*.cur \
- $(RCDIR)\tk.ico
-
-!if exist("$(OUT_DIR)\depend.mk")
-!include "$(OUT_DIR)\depend.mk"
-!message *** Dependency rules in use.
-!else
-!message *** Dependency rules are not being used.
-!endif
-
-### add a spacer in the output
-!message
-
-#---------------------------------------------------------------------
-# Implicit rules
-#---------------------------------------------------------------------
-
-{$(XLIBDIR)}.c{$(TMP_DIR)}.obj::
- $(cc32) -DBUILD_tk $(TK_CFLAGS) -Fo$(TMP_DIR)\ @<<
-$<
-<<
-
-{$(GENERICDIR)}.c{$(TMP_DIR)}.obj::
- $(cc32) -DBUILD_tk $(TK_CFLAGS) -Fo$(TMP_DIR)\ @<<
-$<
-<<
-
-{$(TTKDIR)}.c{$(TMP_DIR)}.obj::
- $(cc32) -DBUILD_tk $(TK_CFLAGS) -Fo$(TMP_DIR)\ @<<
-$<
-<<
-
-{$(WINDIR)}.c{$(TMP_DIR)}.obj::
- $(cc32) -DBUILD_tk $(TK_CFLAGS) -Fo$(TMP_DIR)\ @<<
-$<
-<<
-
-{$(ROOT)\unix}.c{$(TMP_DIR)}.obj::
- $(cc32) -DBUILD_tk $(TK_CFLAGS) -Fo$(TMP_DIR)\ @<<
-$<
-<<
-
-{$(RCDIR)}.rc{$(TMP_DIR)}.res:
- $(rc32) -fo $@ -r -i "$(GENERICDIR)" -i "$(TMP_DIR)" $(TCL_INCLUDES) \
- -d DEBUG=$(DEBUG) -d UNCHECKED=$(UNCHECKED) \
- -d TCL_THREADS=$(TCL_THREADS) \
- -d STATIC_BUILD=$(STATIC_BUILD) \
- $<
-
-$(TMP_DIR)\tk.res: $(TMP_DIR)\wish.exe.manifest
-$(TMP_DIR)\wish.res: $(TMP_DIR)\wish.exe.manifest
-
-.SUFFIXES:
-.SUFFIXES:.c .rc
-
-
-#---------------------------------------------------------------------
-# Installation.
-#---------------------------------------------------------------------
-
-install-binaries:
- @echo installing binaries
- @$(CPY) "$(WISH)" "$(BIN_INSTALL_DIR)\"
-!if $(TKLIB) != $(TKIMPLIB)
- @$(CPY) "$(TKLIB)" "$(BIN_INSTALL_DIR)\"
-!endif
- @$(CPY) "$(TKIMPLIB)" "$(LIB_INSTALL_DIR)\"
- @$(CPY) "$(TKSTUBLIB)" "$(LIB_INSTALL_DIR)\"
-!if !$(STATIC_BUILD)
- @echo creating package index
- @type << > $(OUT_DIR)\pkgIndex.tcl
-if {[catch {package present Tcl $(TCL_PATCH_LEVEL)}]} { 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$(TK_DOTVERSION).dll] Tk]
-} else {
- package ifneeded Tk $(TK_PATCH_LEVEL) [list load [file join $$dir .. .. bin $(TKLIBNAME)] Tk]
-}
-<<
- @$(CPY) $(OUT_DIR)\pkgIndex.tcl "$(SCRIPT_INSTALL_DIR)\"
-!endif
-
-#"
-
-install-libraries:
- @echo installing Tk headers
- @$(CPY) "$(GENERICDIR)\tk.h" "$(INCLUDE_INSTALL_DIR)\"
- @$(CPY) "$(GENERICDIR)\tkDecls.h" "$(INCLUDE_INSTALL_DIR)\"
- @$(CPY) "$(GENERICDIR)\tkPlatDecls.h" "$(INCLUDE_INSTALL_DIR)\"
- @$(CPY) "$(GENERICDIR)\tkIntXlibDecls.h" "$(INCLUDE_INSTALL_DIR)\"
- @$(CPY) "$(XLIBDIR)\X11\*.h" "$(INCLUDE_INSTALL_DIR)\X11\"
- @echo installing script library
- @$(CPY) "$(ROOT)\library\*" "$(SCRIPT_INSTALL_DIR)\"
- @echo installing theme library
- @$(CPY) "$(ROOT)\library\ttk\*" "$(SCRIPT_INSTALL_DIR)\ttk\"
- @echo installing demos
- @$(CPY) "$(ROOT)\library\demos\*" "$(SCRIPT_INSTALL_DIR)\demos\"
- @$(CPY) "$(ROOT)\library\demos\images\*" "$(SCRIPT_INSTALL_DIR)\demos\images\"
- @echo installing images
- @$(CPY) "$(ROOT)\library\images\*" "$(SCRIPT_INSTALL_DIR)\images\"
- @echo installing language files
- @$(CPY) "$(ROOT)\library\msgs\*" "$(SCRIPT_INSTALL_DIR)\msgs\"
-
-#"
-
-#---------------------------------------------------------------------
-# Clean up
-#---------------------------------------------------------------------
-
-tidy:
-!if $(TKLIB) != $(TKIMPLIB)
- @echo Removing $(TKLIB) ...
- @if exist $(TKLIB) del $(TKLIB)
-!endif
- @echo Removing $(TKIMPLIB) ...
- @if exist $(TKIMPLIB) del $(TKIMPLIB)
- @echo Removing $(WISH) ...
- @if exist $(WISH) del $(WISH)
- @echo Removing $(TKTEST) ...
- @if exist $(TKTEST) del $(TKTEST)
- @echo Removing $(TKSTUBLIB) ...
- @if exist $(TKSTUBLIB) del $(TKSTUBLIB)
-
-clean:
- @echo Cleaning $(TMP_DIR)\* ...
- @if exist $(TMP_DIR)\nul $(RMDIR) $(TMP_DIR)
- @echo Cleaning $(WINDIR)\nmakehlp.obj ...
- @if exist $(WINDIR)\nmakehlp.obj del $(WINDIR)\nmakehlp.obj
- @echo Cleaning $(WINDIR)\nmakehlp.exe ...
- @if exist $(WINDIR)\nmakehlp.exe del $(WINDIR)\nmakehlp.exe
- @echo Cleaning $(WINDIR)\_junk.pch ...
- @if exist $(WINDIR)\_junk.pch del $(WINDIR)\_junk.pch
- @echo Cleaning $(WINDIR)\vercl.x ...
- @if exist $(WINDIR)\vercl.x del $(WINDIR)\vercl.x
- @echo Cleaning $(WINDIR)\vercl.i ...
- @if exist $(WINDIR)\vercl.i del $(WINDIR)\vercl.i
- @echo Cleaning $(WINDIR)\versions.vc ...
- @if exist $(WINDIR)\versions.vc del $(WINDIR)\versions.vc
-
-realclean: hose
-
-hose:
- @echo Hosing $(OUT_DIR)\* ...
- @if exist $(OUT_DIR)\nul $(RMDIR) $(OUT_DIR)
+#------------------------------------------------------------- -*- makefile -*-
+# makefile.vc --
+#
+# Microsoft Visual C++ makefile for use with nmake.exe v1.62+ (VC++ 5.0+)
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# Copyright (c) 1995-1996 Sun Microsystems, Inc.
+# Copyright (c) 1998-2000 Ajuba Solutions.
+# Copyright (c) 2001-2005 ActiveState Corporation.
+# Copyright (c) 2001-2004 David Gravereaux.
+# Copyright (c) 2003-2008 Pat Thoyts.
+#------------------------------------------------------------------------------
+
+# Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or
+# VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir)
+!if !defined(MSDEVDIR) && !defined(MSVCDIR) && !defined(VCINSTALLDIR) && !defined(MSSDK) && !defined(WINDOWSSDKDIR)
+MSG = ^
+You need to run vcvars32.bat from Developer Studio or setenv.bat from the^
+Platform SDK first to setup the environment. Jump to this line to read^
+the build instructions.
+!error $(MSG)
+!endif
+
+#------------------------------------------------------------------------------
+# HOW TO USE this makefile:
+#
+# 1) It is now necessary to have MSVCDir, MSDevDir or MSSDK set in the
+# environment. This is used as a check to see if vcvars32.bat had been
+# run prior to running nmake or during the installation of Microsoft
+# Visual C++, MSVCDir had been set globally and the PATH adjusted.
+# Either way is valid.
+#
+# You'll need to run vcvars32.bat contained in the MsDev's vc(98)/bin
+# directory to setup the proper environment, if needed, for your
+# current setup. This is a needed bootstrap requirement and allows the
+# swapping of different environments to be easier.
+#
+# 2) To use the Platform SDK (not expressly needed), run setenv.bat after
+# vcvars32.bat according to the instructions for it. This can also
+# turn on the 64-bit compiler, if your SDK has it.
+#
+# 3) Targets are:
+# release -- Builds the core, the shell and the dlls. (default)
+# dlls -- Just builds the windows extensions.
+# shell -- Just builds the shell and the core.
+# core -- Only builds the core [tkXX.(dll|lib)].
+# all -- Builds everything.
+# test -- Builds and runs the test suite.
+# tktest -- Just builds the binaries for the test suite.
+# install -- Installs the built binaries and libraries to $(INSTALLDIR)
+# as the root of the install tree.
+# cwish -- Builds a console version of wish.
+# tidy/clean/hose -- varying levels of cleaning.
+# genstubs -- Rebuilds the Stubs table and support files (dev only).
+# depend -- Generates an accurate set of source dependancies for this
+# makefile. Helpful to avoid problems when the sources are
+# refreshed and you rebuild, but can "overbuild" when common
+# headers like tkInt.h just get small changes.
+# htmlhelp -- Builds a Windows .chm help file for Tcl and Tk from the
+# troff manual pages found in $(ROOT)\doc. You need to
+# have installed the HTML Help Compiler package from Microsoft
+# to produce the .chm file.
+# winhelp -- Builds the windows .hlp file for Tcl from the troff man
+# files found in $(ROOT)\doc.
+#
+# 4) Macros usable on the commandline:
+# TCLDIR=<path>
+# Sets the location for where to find the Tcl headers and
+# libraries. The install point is assumed when not specified.
+# Tk does need the source directory, though. Tk comes very close
+# to not needing the sources, but does, in fact, require them.
+#
+# INSTALLDIR=<path>
+# Sets where to install Tcl from the built binaries.
+# C:\Progra~1\Tcl is assumed when not specified.
+#
+# OPTS=loimpact,msvcrt,nothreads,noxp,pdbs,profile,square,static,staticpkg,symbols,unchecked,none
+# Sets special options for the core. The default is for none.
+# Any combination of the above may be used (comma separated).
+# 'none' will over-ride everything to nothing.
+#
+# loimpact = Adds a flag for how NT treats the heap to keep memory
+# in use, low. This is said to impact alloc performance.
+# msvcrt = Affects the static option only to switch it from
+# using libcmt(d) as the C runtime [by default] to
+# msvcrt(d). This is useful for static embedding
+# support.
+# nothreads= Turns off full multithreading support.
+# noxp = If you do not have the uxtheme.h header then you
+# cannot include support for XP themeing.
+# square = Include the demo square widget.
+# static = Builds a static library of the core instead of a
+# dll. The shell will be static (and large), as well.
+# staticpkg= Affects the static option only to switch wishXX.exe
+# to have the dde and reg extension linked inside it.
+# pdbs = Build detached symbols for release builds.
+# profile = Adds profiling hooks. Map file is assumed.
+# thrdalloc = Use the thread allocator (shared global free pool)
+# This is the default on threaded builds.
+# tclalloc = Use the old non-thread allocator
+# symbols = Debug build. Links to the debug C runtime, disables
+# optimizations and creates pdb symbols files.
+# unchecked = Allows a symbols build to not use the debug
+# enabled runtime (msvcrt.dll not msvcrtd.dll
+# or libcmt.lib not libcmtd.lib).
+#
+# STATS=compdbg,memdbg,none
+# Sets optional memory and bytecode compiler debugging code added
+# to the core. The default is for none. Any combination of the
+# above may be used (comma separated). 'none' will over-ride
+# everything to nothing.
+#
+# compdbg = Enables byte compilation logging.
+# memdbg = Enables the debugging memory allocator.
+#
+# CHECKS=64bit,fullwarn,nodep,none
+# Sets special macros for checking compatability.
+#
+# 64bit = Enable 64bit portability warnings (if available)
+# fullwarn = Builds with full compiler and link warnings enabled.
+# Very verbose.
+# nodep = Turns off compatability macros to ensure the core
+# isn't being built with deprecated functions.
+#
+# MACHINE=(ALPHA|AMD64|IA64|IX86)
+# Set the machine type used for the compiler, linker, and
+# resource compiler. This hook is needed to tell the tools
+# when alternate platforms are requested. IX86 is the default
+# when not specified. If the CPU environment variable has been
+# set (ie: recent Platform SDK) then MACHINE is set from CPU.
+#
+# TMP_DIR=<path>
+# OUT_DIR=<path>
+# Hooks to allow the intermediate and output directories to be
+# changed. $(OUT_DIR) is assumed to be
+# $(BINROOT)\(Release|Debug) based on if symbols are requested.
+# $(TMP_DIR) will de $(OUT_DIR)\<buildtype> by default.
+#
+# TESTPAT=<file>
+# Reads the tests requested to be run from this file.
+#
+# 5) Examples:
+#
+# Basic syntax of calling nmake looks like this:
+# nmake [-nologo] -f makefile.vc [target|macrodef [target|macrodef] [...]]
+#
+# Standard (no frills)
+# c:\tk_src\win\>c:\progra~1\micros~1\vc98\bin\vcvars32.bat
+# Setting environment for using Microsoft Visual C++ tools.
+# c:\tk_src\win\>nmake -f makefile.vc release
+# c:\tk_src\win\>nmake -f makefile.vc install INSTALLDIR=c:\progra~1\tcl
+#
+# Building for Win64
+# c:\tk_src\win\>c:\progra~1\micros~1\vc98\bin\vcvars32.bat
+# Setting environment for using Microsoft Visual C++ tools.
+# c:\tk_src\win\>c:\progra~1\platfo~1\setenv.bat /pre64 /RETAIL
+# Targeting Windows pre64 RETAIL
+# c:\tk_src\win\>nmake -f makefile.vc MACHINE=IA64
+#
+#------------------------------------------------------------------------------
+#==============================================================================
+###############################################################################
+
+
+# //==================================================================\\
+# >>[ -> Do not modify below this line. <- ]<<
+# >>[ Please, use the commandline macros to modify how Tcl is built. ]<<
+# >>[ If you need more features, send us a patch for more macros. ]<<
+# \\==================================================================//
+
+
+###############################################################################
+#==============================================================================
+#------------------------------------------------------------------------------
+
+!if !exist("makefile.vc")
+MSG = ^
+You must run this makefile only from the directory it is in.^
+Please `cd` to its location first.
+!error $(MSG)
+!endif
+
+PROJECT = tk
+!include "rules.vc"
+
+!if $(TCLINSTALL)
+!message *** Warning: Tk requires the source distribution of Tcl to build from,
+!message *** at this time, sorry. Please set the TCLDIR macro to point to the
+!message *** Tcl sources.
+!endif
+
+# Extra makefile options processing...
+!if "$(OPTS)" == "" || [nmakehlp -f "$(OPTS)" "none"]
+HAVE_UXTHEME_H = 1
+TTK_SQUARE_WIDGET = 0
+!else
+!if [nmakehlp -f $(OPTS) "noxp"]
+!message *** Exclude support for XP theme
+HAVE_UXTHEME_H = 0
+!else
+HAVE_UXTHEME_H = 1
+!endif
+!if [nmakehlp -f "$(OPTS)" "square"]
+!message *** Include ttk square demo widget
+TTK_SQUARE_WIDGET = 1
+!else
+TTK_SQUARE_WIDGET = 0
+!endif
+!endif
+
+STUBPREFIX = $(PROJECT)stub
+WISHNAMEPREFIX = wish
+
+BINROOT = $(MAKEDIR) # originally .
+ROOT = $(MAKEDIR)\.. # originally ..
+
+TK_LIBRARY = $(ROOT)\library
+
+TKIMPLIB = "$(OUT_DIR)\$(PROJECT)$(TK_VERSION)$(SUFX).lib"
+TKLIBNAME = $(PROJECT)$(TK_VERSION)$(SUFX).$(EXT)
+TKLIB = "$(OUT_DIR)\$(TKLIBNAME)"
+
+TKSTUBLIBNAME = $(STUBPREFIX)$(TK_VERSION).lib
+TKSTUBLIB = "$(OUT_DIR)\$(TKSTUBLIBNAME)"
+
+WISH = "$(OUT_DIR)\$(WISHNAMEPREFIX)$(TK_VERSION)$(SUFX).exe"
+WISHC = "$(OUT_DIR)\$(WISHNAMEPREFIX)c$(TK_VERSION)$(SUFX).exe"
+
+TKTEST = "$(OUT_DIR)\$(PROJECT)test.exe"
+CAT32 = "$(OUT_DIR)\cat32.exe"
+
+LIB_INSTALL_DIR = $(_INSTALLDIR)\lib
+BIN_INSTALL_DIR = $(_INSTALLDIR)\bin
+DOC_INSTALL_DIR = $(_INSTALLDIR)\doc
+SCRIPT_INSTALL_DIR = $(_INSTALLDIR)\lib\$(PROJECT)$(TK_DOTVERSION)
+INCLUDE_INSTALL_DIR = $(_INSTALLDIR)\include
+
+WISHOBJS = \
+ $(TMP_DIR)\winMain.obj \
+!if $(TCL_USE_STATIC_PACKAGES)
+ $(TCLDDELIB) \
+ $(TCLREGLIB) \
+!endif
+ $(TMP_DIR)\wish.res
+
+TKTESTOBJS = \
+ $(TMP_DIR)\testMain.obj \
+ $(TMP_DIR)\tkSquare.obj \
+ $(TMP_DIR)\tkTest.obj \
+ $(TMP_DIR)\tkOldTest.obj \
+ $(TMP_DIR)\tkWinTest.obj
+
+XLIBOBJS = \
+ $(TMP_DIR)\xcolors.obj \
+ $(TMP_DIR)\xdraw.obj \
+ $(TMP_DIR)\xgc.obj \
+ $(TMP_DIR)\ximage.obj \
+ $(TMP_DIR)\xutil.obj
+
+TKOBJS = \
+ $(TMP_DIR)\tkConsole.obj \
+ $(TMP_DIR)\tkUnixMenubu.obj \
+ $(TMP_DIR)\tkUnixScale.obj \
+ $(XLIBOBJS) \
+ $(TMP_DIR)\tkWin3d.obj \
+ $(TMP_DIR)\tkWin32Dll.obj \
+ $(TMP_DIR)\tkWinButton.obj \
+ $(TMP_DIR)\tkWinClipboard.obj \
+ $(TMP_DIR)\tkWinColor.obj \
+ $(TMP_DIR)\tkWinConfig.obj \
+ $(TMP_DIR)\tkWinCursor.obj \
+ $(TMP_DIR)\tkWinDialog.obj \
+ $(TMP_DIR)\tkWinDraw.obj \
+ $(TMP_DIR)\tkWinEmbed.obj \
+ $(TMP_DIR)\tkWinFont.obj \
+ $(TMP_DIR)\tkWinImage.obj \
+ $(TMP_DIR)\tkWinInit.obj \
+ $(TMP_DIR)\tkWinKey.obj \
+ $(TMP_DIR)\tkWinMenu.obj \
+ $(TMP_DIR)\tkWinPixmap.obj \
+ $(TMP_DIR)\tkWinPointer.obj \
+ $(TMP_DIR)\tkWinRegion.obj \
+ $(TMP_DIR)\tkWinScrlbr.obj \
+ $(TMP_DIR)\tkWinSend.obj \
+ $(TMP_DIR)\tkWinSendCom.obj \
+ $(TMP_DIR)\tkWinWindow.obj \
+ $(TMP_DIR)\tkWinWm.obj \
+ $(TMP_DIR)\tkWinX.obj \
+ $(TMP_DIR)\stubs.obj \
+ $(TMP_DIR)\tk3d.obj \
+ $(TMP_DIR)\tkArgv.obj \
+ $(TMP_DIR)\tkAtom.obj \
+ $(TMP_DIR)\tkBind.obj \
+ $(TMP_DIR)\tkBitmap.obj \
+ $(TMP_DIR)\tkBusy.obj \
+ $(TMP_DIR)\tkButton.obj \
+ $(TMP_DIR)\tkCanvArc.obj \
+ $(TMP_DIR)\tkCanvBmap.obj \
+ $(TMP_DIR)\tkCanvImg.obj \
+ $(TMP_DIR)\tkCanvLine.obj \
+ $(TMP_DIR)\tkCanvPoly.obj \
+ $(TMP_DIR)\tkCanvPs.obj \
+ $(TMP_DIR)\tkCanvText.obj \
+ $(TMP_DIR)\tkCanvUtil.obj \
+ $(TMP_DIR)\tkCanvWind.obj \
+ $(TMP_DIR)\tkCanvas.obj \
+ $(TMP_DIR)\tkClipboard.obj \
+ $(TMP_DIR)\tkCmds.obj \
+ $(TMP_DIR)\tkColor.obj \
+ $(TMP_DIR)\tkConfig.obj \
+ $(TMP_DIR)\tkCursor.obj \
+ $(TMP_DIR)\tkEntry.obj \
+ $(TMP_DIR)\tkError.obj \
+ $(TMP_DIR)\tkEvent.obj \
+ $(TMP_DIR)\tkFileFilter.obj \
+ $(TMP_DIR)\tkFocus.obj \
+ $(TMP_DIR)\tkFont.obj \
+ $(TMP_DIR)\tkFrame.obj \
+ $(TMP_DIR)\tkGC.obj \
+ $(TMP_DIR)\tkGeometry.obj \
+ $(TMP_DIR)\tkGet.obj \
+ $(TMP_DIR)\tkGrab.obj \
+ $(TMP_DIR)\tkGrid.obj \
+ $(TMP_DIR)\tkImage.obj \
+ $(TMP_DIR)\tkImgBmap.obj \
+ $(TMP_DIR)\tkImgGIF.obj \
+ $(TMP_DIR)\tkImgPNG.obj \
+ $(TMP_DIR)\tkImgPPM.obj \
+ $(TMP_DIR)\tkImgPhoto.obj \
+ $(TMP_DIR)\tkImgPhInstance.obj \
+ $(TMP_DIR)\tkImgUtil.obj \
+ $(TMP_DIR)\tkListbox.obj \
+ $(TMP_DIR)\tkMacWinMenu.obj \
+ $(TMP_DIR)\tkMain.obj \
+ $(TMP_DIR)\tkMain2.obj \
+ $(TMP_DIR)\tkMenu.obj \
+ $(TMP_DIR)\tkMenubutton.obj \
+ $(TMP_DIR)\tkMenuDraw.obj \
+ $(TMP_DIR)\tkMessage.obj \
+ $(TMP_DIR)\tkPanedWindow.obj \
+ $(TMP_DIR)\tkObj.obj \
+ $(TMP_DIR)\tkOldConfig.obj \
+ $(TMP_DIR)\tkOption.obj \
+ $(TMP_DIR)\tkPack.obj \
+ $(TMP_DIR)\tkPlace.obj \
+ $(TMP_DIR)\tkPointer.obj \
+ $(TMP_DIR)\tkRectOval.obj \
+ $(TMP_DIR)\tkScale.obj \
+ $(TMP_DIR)\tkScrollbar.obj \
+ $(TMP_DIR)\tkSelect.obj \
+ $(TMP_DIR)\tkStyle.obj \
+ $(TMP_DIR)\tkText.obj \
+ $(TMP_DIR)\tkTextBTree.obj \
+ $(TMP_DIR)\tkTextDisp.obj \
+ $(TMP_DIR)\tkTextImage.obj \
+ $(TMP_DIR)\tkTextIndex.obj \
+ $(TMP_DIR)\tkTextMark.obj \
+ $(TMP_DIR)\tkTextTag.obj \
+ $(TMP_DIR)\tkTextWind.obj \
+ $(TMP_DIR)\tkTrig.obj \
+ $(TMP_DIR)\tkUndo.obj \
+ $(TMP_DIR)\tkUtil.obj \
+ $(TMP_DIR)\tkVisual.obj \
+ $(TMP_DIR)\tkStubInit.obj \
+ $(TMP_DIR)\tkWindow.obj \
+ $(TTK_OBJS) \
+!if !$(STATIC_BUILD)
+ $(TMP_DIR)\tk.res
+!endif
+
+TTK_OBJS = \
+ $(TMP_DIR)\ttkWinMonitor.obj \
+ $(TMP_DIR)\ttkWinTheme.obj \
+ $(TMP_DIR)\ttkWinXPTheme.obj \
+ $(TMP_DIR)\ttkBlink.obj \
+ $(TMP_DIR)\ttkButton.obj \
+ $(TMP_DIR)\ttkCache.obj \
+ $(TMP_DIR)\ttkClamTheme.obj \
+ $(TMP_DIR)\ttkClassicTheme.obj \
+ $(TMP_DIR)\ttkDefaultTheme.obj \
+ $(TMP_DIR)\ttkElements.obj \
+ $(TMP_DIR)\ttkEntry.obj \
+ $(TMP_DIR)\ttkFrame.obj \
+ $(TMP_DIR)\ttkImage.obj \
+ $(TMP_DIR)\ttkInit.obj \
+ $(TMP_DIR)\ttkLabel.obj \
+ $(TMP_DIR)\ttkLayout.obj \
+ $(TMP_DIR)\ttkManager.obj \
+ $(TMP_DIR)\ttkNotebook.obj \
+ $(TMP_DIR)\ttkPanedwindow.obj \
+ $(TMP_DIR)\ttkProgress.obj \
+ $(TMP_DIR)\ttkScale.obj \
+ $(TMP_DIR)\ttkScrollbar.obj \
+ $(TMP_DIR)\ttkScroll.obj \
+ $(TMP_DIR)\ttkSeparator.obj \
+ $(TMP_DIR)\ttkSquare.obj \
+ $(TMP_DIR)\ttkState.obj \
+ $(TMP_DIR)\ttkTagSet.obj \
+ $(TMP_DIR)\ttkTheme.obj \
+ $(TMP_DIR)\ttkTrace.obj \
+ $(TMP_DIR)\ttkTrack.obj \
+ $(TMP_DIR)\ttkTreeview.obj \
+ $(TMP_DIR)\ttkWidget.obj \
+ $(TMP_DIR)\ttkStubInit.obj
+
+TKSTUBOBJS = \
+ $(TMP_DIR)\tkStubLib.obj \
+ $(TMP_DIR)\ttkStubLib.obj
+
+
+WINDIR = $(ROOT)\win
+GENERICDIR = $(ROOT)\generic
+XLIBDIR = $(ROOT)\xlib
+TTKDIR = $(ROOT)\generic\ttk
+BITMAPDIR = $(ROOT)\bitmaps
+DOCDIR = $(ROOT)\doc
+RCDIR = $(WINDIR)\rc
+
+TK_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)" -I"$(BITMAPDIR)" -I"$(XLIBDIR)" \
+ $(TCL_INCLUDES)
+
+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_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 \
+ -DSUPPORT_CONFIG_EMBEDDED \
+!if $(HAVE_UXTHEME_H)
+ -DHAVE_UXTHEME_H=1 \
+!endif
+!if $(TTK_SQUARE_WIDGET)
+ -DTTK_SQUARE_WIDGET=1 \
+!endif
+
+TK_DEFINES =-DBUILD_ttk $(OPTDEFINES) $(CONFIG_DEFS) -Dinline=__inline
+
+#---------------------------------------------------------------------
+# Compile flags
+#---------------------------------------------------------------------
+
+!if !$(DEBUG)
+!if $(OPTIMIZING)
+### This cranks the optimization level to maximize speed
+### We can't use -O2 because sometimes it causes problems.
+cdebug = $(OPTIMIZATIONS)
+!else
+cdebug =
+!endif
+!if $(SYMBOLS)
+cdebug = $(cdebug) -Zi
+!endif
+!else if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64"
+### Warnings are too many, can't support warnings into errors.
+cdebug = -Zi -Od $(DEBUGFLAGS)
+!else
+cdebug = -Zi -WX $(DEBUGFLAGS)
+!endif
+
+### Declarations common to all compiler options
+cwarn = $(WARNINGS) -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE
+cflags = -nologo -c $(COMPILERFLAGS) $(cwarn) -Fp$(TMP_DIR)^\
+
+!if $(MSVCRT)
+!if $(DEBUG) && !$(UNCHECKED)
+crt = -MDd
+!else
+crt = -MD
+!endif
+!else
+!if $(DEBUG) && !$(UNCHECKED)
+crt = -MTd
+!else
+crt = -MT
+!endif
+!endif
+
+BASE_CFLAGS = $(cdebug) $(cflags) $(crt) $(TK_INCLUDES)
+TK_CFLAGS = $(BASE_CFLAGS) $(TK_DEFINES) -DUSE_TCL_STUBS
+CON_CFLAGS = $(cdebug) $(cflags) $(crt) -DCONSOLE
+WISH_CFLAGS = $(BASE_CFLAGS) $(TK_DEFINES)
+STUB_CFLAGS = $(cflags) $(cdebug) $(TK_DEFINES)
+
+
+#---------------------------------------------------------------------
+# Link flags
+#---------------------------------------------------------------------
+
+!if $(DEBUG)
+ldebug = -debug -debugtype:cv
+!else
+ldebug = -release -opt:ref -opt:icf,3
+!if $(SYMBOLS)
+ldebug = $(ldebug) -debug -debugtype:cv
+!endif
+!endif
+
+### Declarations common to all linker options
+lflags = -nologo -machine:$(MACHINE) $(LINKERFLAGS) $(ldebug)
+
+!if $(PROFILE)
+lflags = $(lflags) -profile
+!endif
+
+!if $(MSVCRT) && !($(DEBUG) && !$(UNCHECKED)) && $(VCVERSION) >= 1900
+lflags = $(lflags) -nodefaultlib:libucrt.lib
+!endif
+
+!if $(ALIGN98_HACK) && !$(STATIC_BUILD)
+### Align sections for PE size savings.
+lflags = $(lflags) -opt:nowin98
+!else if !$(ALIGN98_HACK) && $(STATIC_BUILD)
+### Align sections for speed in loading by choosing the virtual page size.
+lflags = $(lflags) -align:4096
+!endif
+
+!if $(LOIMPACT)
+lflags = $(lflags) -ws:aggressive
+!endif
+
+dlllflags = $(lflags) -dll
+conlflags = $(lflags) -subsystem:console
+guilflags = $(lflags) -subsystem:windows
+
+tcllibs = $(TCLSTUBLIB) $(TCLIMPLIB)
+
+baselibs = netapi32.lib kernel32.lib user32.lib advapi32.lib userenv.lib ws2_32.lib
+# Avoid 'unresolved external symbol __security_cookie' errors.
+# c.f. http://support.microsoft.com/?id=894573
+!if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64"
+!if $(VCVERSION) > 1399 && $(VCVERSION) < 1500
+baselibs = $(baselibs) bufferoverflowU.lib
+!endif
+!endif
+!if $(MSVCRT) && !($(DEBUG) && !$(UNCHECKED)) && $(VCVERSION) >= 1900
+baselibs = $(baselibs) ucrt.lib
+!endif
+
+guilibs = $(baselibs) gdi32.lib
+
+
+#---------------------------------------------------------------------
+# TkTest flags
+#---------------------------------------------------------------------
+
+!if "$(TESTPAT)" != ""
+TESTFLAGS = $(TESTFLAGS) -file $(TESTPAT)
+!endif
+
+
+#---------------------------------------------------------------------
+# Project specific targets
+#---------------------------------------------------------------------
+
+release: setup $(TKSTUBLIB) $(WISH)
+all: release $(CAT32)
+core: setup $(TKSTUBLIB) $(TKLIB)
+cwish: $(WISHC)
+install: install-binaries install-libraries install-docs
+tktest: setup $(TKTEST) $(CAT32)
+
+
+test: test-classic test-ttk
+
+test-classic: setup $(TKTEST) $(TKLIB) $(CAT32)
+ @set TCL_LIBRARY=$(TCL_LIBRARY:\=/)
+ @set TK_LIBRARY=$(TK_LIBRARY:\=/)
+ @set TCLLIBPATH=
+!if $(TCLINSTALL)
+ @set PATH=$(_TCLDIR)\bin;$(PATH)
+!else
+ @set PATH=$(_TCLDIR)\win\$(BUILDDIRTOP);$(PATH)
+!endif
+ $(DEBUGGER) $(TKTEST) "$(ROOT:\=/)/tests/all.tcl" $(TESTFLAGS) | $(CAT32)
+
+test-ttk: setup $(TKTEST) $(TKLIB) $(CAT32)
+ @set TCL_LIBRARY=$(TCL_LIBRARY:\=/)
+ @set TK_LIBRARY=$(TK_LIBRARY:\=/)
+ @set TCLLIBPATH=
+!if $(TCLINSTALL)
+ @set PATH=$(_TCLDIR)\bin;$(PATH)
+!else
+ @set PATH=$(_TCLDIR)\win\$(BUILDDIRTOP);$(PATH)
+!endif
+ $(DEBUGGER) $(TKTEST) "$(ROOT:\=/)/tests/ttk/all.tcl" $(TESTFLAGS) | $(CAT32)
+
+runtest: setup $(TKTEST) $(TKLIB) $(CAT32)
+ @set TCL_LIBRARY=$(TCL_LIBRARY:\=/)
+ @set TK_LIBRARY=$(TK_LIBRARY:\=/)
+ @set TCLLIBPATH=
+!if $(TCLINSTALL)
+ @set PATH=$(_TCLDIR)\bin;$(PATH)
+!else
+ @set PATH=$(_TCLDIR)\win\$(BUILDDIRTOP);$(PATH)
+!endif
+ $(DEBUGGER) $(TKTEST)
+
+rundemo: setup $(TKTEST) $(TKLIB) $(CAT32)
+ @set TCL_LIBRARY=$(TCL_LIBRARY:\=/)
+ @set TK_LIBRARY=$(TK_LIBRARY:\=/)
+ @set TCLLIBPATH=
+!if $(TCLINSTALL)
+ @set PATH=$(_TCLDIR)\bin;$(PATH)
+!else
+ @set PATH=$(_TCLDIR)\win\$(BUILDDIRTOP);$(PATH)
+!endif
+ $(TKTEST) $(ROOT:\=/)\library\demos\widget
+
+shell: setup $(WISH)
+ @set TCL_LIBRARY=$(TCL_LIBRARY:\=/)
+ @set TK_LIBRARY=$(TK_LIBRARY:\=/)
+ @set TCLLIBPATH=
+!if $(TCLINSTALL)
+ @set PATH=$(_TCLDIR)\bin;$(PATH)
+!else
+ @set PATH=$(_TCLDIR)\win\$(BUILDDIRTOP);$(PATH)
+!endif
+ $(DEBUGGER) $(WISH) <<
+ console show
+<<
+
+dbgshell: setup $(WISH)
+ @set TCL_LIBRARY=$(TCL_LIBRARY:\=/)
+ @set TK_LIBRARY=$(TK_LIBRARY:\=/)
+ @set TCLLIBPATH=
+!if $(TCLINSTALL)
+ @set PATH=$(_TCLDIR)\bin;$(PATH)
+!else
+ @set PATH=$(_TCLDIR)\win\$(BUILDDIRTOP);$(PATH)
+!endif
+ windbg $(WISH)
+
+setup:
+ @if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR)
+ @if not exist $(TMP_DIR)\nul mkdir $(TMP_DIR)
+
+!if !$(STATIC_BUILD)
+$(TKIMPLIB): $(TKLIB)
+!endif
+
+$(TKLIB): $(TKOBJS)
+!if $(STATIC_BUILD)
+ $(lib32) -nologo -out:$@ @<<
+$**
+<<
+!else
+ $(link32) $(dlllflags) -base:@$(COFFBASE),tk -out:$@ $(guilibs) \
+ $(TCLSTUBLIB) @<<
+$**
+<<
+ $(_VC_MANIFEST_EMBED_DLL)
+ -@del $*.exp
+!endif
+
+
+$(TKSTUBLIB): $(TKSTUBOBJS)
+ $(lib32) -nologo -nodefaultlib -out:$@ $**
+
+
+$(WISH): $(WISHOBJS) $(TKSTUBLIB) $(TKIMPLIB)
+ $(link32) $(guilflags) -stack:2300000 -out:$@ $(guilibs) $(tcllibs) $**
+ $(_VC_MANIFEST_EMBED_EXE)
+
+
+$(WISHC): $(WISHOBJS) $(TKSTUBLIB) $(TKIMPLIB)
+ $(link32) $(conlflags) -stack:2300000 -out:$@ $(guilibs) $(tcllibs) $**
+ $(_VC_MANIFEST_EMBED_EXE)
+
+
+$(TKTEST): $(TKTESTOBJS) $(TKSTUBLIB) $(TKIMPLIB)
+ $(link32) $(guilflags) -stack:2300000 -out:$@ $(guilibs) $(tcllibs) $**
+ $(_VC_MANIFEST_EMBED_EXE)
+
+
+$(CAT32): $(_TCLDIR)\win\cat.c
+ $(cc32) $(CON_CFLAGS) -Fo$(TMP_DIR)\ $?
+ $(link32) $(conlflags) -out:$@ -stack:16384 $(TMP_DIR)\cat.obj $(baselibs)
+ $(_VC_MANIFEST_EMBED_EXE)
+
+#---------------------------------------------------------------------
+# Regenerate the stubs files. [Development use only]
+#---------------------------------------------------------------------
+
+genstubs:
+!if !exist($(TCLSH))
+ @echo Build tclsh first!
+!else
+ set TCL_LIBRARY=$(TCL_LIBRARY)
+ $(TCLSH) $(_TCLDIR)\tools\genStubs.tcl $(GENERICDIR) \
+ $(GENERICDIR)\$(PROJECT).decls $(GENERICDIR)\$(PROJECT)Int.decls
+!endif
+
+
+#---------------------------------------------------------------------
+# Build the Windows HTML help file.
+#---------------------------------------------------------------------
+
+# NOTE: you can define HHC on the command-line to override this
+!ifndef HHC
+HHC=""%ProgramFiles%\HTML Help Workshop\hhc.exe""
+!endif
+HTMLDIR=$(ROOT)\html
+HTMLBASE=TclTk$(VERSION)
+HHPFILE=$(HTMLDIR)\$(HTMLBASE).hhp
+CHMFILE=$(HTMLDIR)\$(HTMLBASE).chm
+
+htmlhelp: chmsetup $(CHMFILE)
+
+$(CHMFILE): $(DOCDIR)\*
+ @$(TCLSH) $(TCLTOOLSDIR)\tcltk-man2html.tcl
+ @echo Compiling HTML help project
+ @$(HHC) <<$(HHPFILE) >NUL
+[OPTIONS]
+Compatibility=1.1 or later
+Compiled file=$(HTMLBASE).chm
+Display compile progress=no
+Error log file=$(HTMLBASE).log
+Language=0x409 English (United States)
+Title=Tcl/Tk $(DOT_VERSION) Help
+[FILES]
+contents.htm
+docs.css
+Keywords
+TclCmd
+TclLib
+TkCmd
+TkLib
+UserCmd
+<<
+
+chmsetup:
+ @if not exist $(HTMLDIR)\nul mkdir $(HTMLDIR)
+
+#-------------------------------------------------------------------------
+# Build the old-style Windows .hlp file
+#-------------------------------------------------------------------------
+
+HLPBASE = $(PROJECT)$(TK_VERSION)
+HELPFILE = $(OUT_DIR)\$(HLPBASE).hlp
+HELPCNT = $(OUT_DIR)\$(HLPBASE).cnt
+DOCTMP_DIR = $(OUT_DIR)\$(PROJECT)_docs
+HELPRTF = $(DOCTMP_DIR)\$(PROJECT).rtf
+MAN2HELP = $(DOCTMP_DIR)\man2help.tcl
+MAN2HELP2 = $(DOCTMP_DIR)\man2help2.tcl
+INDEX = $(DOCTMP_DIR)\index.tcl
+BMP = $(DOCTMP_DIR)\lamp.bmp
+BMP_NOPATH = lamp.bmp
+MAN2TCL = $(DOCTMP_DIR)\man2tcl.exe
+
+winhelp: docsetup $(HELPFILE)
+
+docsetup:
+ @if not exist $(DOCTMP_DIR)\nul mkdir $(DOCTMP_DIR)
+
+$(MAN2HELP) $(MAN2HELP2) $(INDEX): $(TCLTOOLSDIR)\$$(@F)
+ $(CPY) $(TCLTOOLSDIR)\$(@F) $(@D)
+
+$(BMP):
+ $(CPY) $(WINDIR)\rc\$(@F) $(@D)
+
+$(HELPFILE): $(HELPRTF) $(BMP)
+ cd $(DOCTMP_DIR)
+ start /wait hcrtf.exe -x <<$(PROJECT).hpj
+[OPTIONS]
+COMPRESS=12 Hall Zeck
+LCID=0x409 0x0 0x0 ; English (United States)
+TITLE=Tk Reference Manual
+BMROOT=.
+CNT=$(@B).cnt
+HLP=$(@B).hlp
+
+[FILES]
+$(PROJECT).rtf
+
+[WINDOWS]
+main="Tcl/Tk Reference Manual",,27648,(r15263976),(r4227327)
+
+[CONFIG]
+BrowseButtons()
+CreateButton(1, "Web", ExecFile("http://www.tcl.tk"))
+CreateButton(2, "SF", ExecFile("http://sf.net/projects/tcl"))
+CreateButton(3, "Wiki", ExecFile("http://wiki.tcl.tk"))
+CreateButton(4, "FAQ", ExecFile("http://www.purl.org/NET/Tcl-FAQ/"))
+<<
+ cd $(MAKEDIR)
+ @$(CPY) "$(DOCTMP_DIR)\$(@B).hlp" "$(OUT_DIR)"
+ @$(CPY) "$(DOCTMP_DIR)\$(@B).cnt" "$(OUT_DIR)"
+
+$(MAN2TCL): $(TCLTOOLSDIR)\$$(@B).c
+ $(cc32) $(TK_CFLAGS) -Fo$(@D)\ $(TCLTOOLSDIR)\$(@B).c
+ $(link32) $(conlflags) -out:$@ -stack:16384 $(@D)\man2tcl.obj
+ $(_VC_MANIFEST_EMBED_EXE)
+
+$(HELPRTF): $(MAN2TCL) $(MAN2HELP) $(MAN2HELP2) $(INDEX)
+ $(TCLSH) $(MAN2HELP) -bitmap $(BMP_NOPATH) $(PROJECT) $(TK_VERSION) $(DOCDIR:\=/)
+
+install-docs:
+!if exist($(HELPFILE))
+ $(CPY) "$(HELPFILE)" "$(DOC_INSTALL_DIR)\"
+ $(CPY) "$(HELPCNT)" "$(DOC_INSTALL_DIR)\"
+ $(TCLSH) <<
+puts "Installing $(PROJECT)'s helpfile contents into Tcl's ..."
+set f [open "$(DOC_INSTALL_DIR:\=/)/tcl$(TK_VERSION).cnt" r]
+while {![eof $$f]} {
+ if {[regexp {:Include $(PROJECT)([0-9]{2}).cnt} [gets $$f] dummy ver]} {
+ if {$$ver == $(TK_VERSION)} {
+ puts "Already installed."
+ exit
+ } else {
+ # do something here logical to remove (or replace) it.
+ puts "$$ver != $(TK_VERSION), unfinished code path, die, die!"
+ exit 1
+ }
+ }
+}
+close $$f
+set f [open "$(DOC_INSTALL_DIR:\=/)/tcl$(TK_VERSION).cnt" a]
+puts $$f {:Include $(HLPBASE).cnt}
+close $$f
+<<
+ start /wait winhlp32 -g $(DOC_INSTALL_DIR)\tcl$(TK_VERSION).hlp
+!endif
+
+#---------------------------------------------------------------------
+# Special case object file targets
+#---------------------------------------------------------------------
+
+$(TMP_DIR)\testMain.obj: $(WINDIR)\winMain.c
+ $(cc32) $(WISH_CFLAGS) -DTK_TEST \
+ -DTCL_USE_STATIC_PACKAGES=$(TCL_USE_STATIC_PACKAGES) \
+ -Fo$@ $?
+
+$(TMP_DIR)\tkTest.obj: $(GENERICDIR)\tkTest.c
+ $(cc32) $(WISH_CFLAGS) -Fo$@ $?
+
+$(TMP_DIR)\tkOldTest.obj: $(GENERICDIR)\tkOldTest.c
+ $(cc32) $(WISH_CFLAGS) -Fo$@ $?
+
+$(TMP_DIR)\tkWinTest.obj: $(WINDIR)\tkWinTest.c
+ $(cc32) $(WISH_CFLAGS) -Fo$@ $?
+
+$(TMP_DIR)\tkSquare.obj: $(GENERICDIR)\tkSquare.c
+ $(cc32) $(WISH_CFLAGS) -Fo$@ $?
+
+$(TMP_DIR)\winMain.obj: $(WINDIR)\winMain.c
+ $(cc32) $(WISH_CFLAGS) \
+ -DTCL_USE_STATIC_PACKAGES=$(TCL_USE_STATIC_PACKAGES) \
+ -Fo$@ $?
+
+$(TMP_DIR)\tkMain2.obj: $(GENERICDIR)\tkMain.c
+ $(cc32) -DBUILD_tk $(TK_CFLAGS) -DTK_ASCII_MAIN -Fo$@ $?
+
+# The following objects are part of the stub library and should not
+# be built as DLL objects but none of the symbols should be exported
+# and no reference made to a C runtime.
+
+$(TMP_DIR)\tkStubLib.obj : $(GENERICDIR)\tkStubLib.c
+ $(cc32) $(STUB_CFLAGS) $(TK_INCLUDES) -Zl -DSTATIC_BUILD -Fo$@ $?
+
+
+$(TMP_DIR)\wish.exe.manifest: $(WINDIR)\wish.exe.manifest.in
+ @nmakehlp -s << $** >$@
+@MACHINE@ $(MACHINE:IX86=X86)
+@TK_WIN_VERSION@ $(TK_DOTVERSION).0.0
+<<
+
+#---------------------------------------------------------------------
+# Generate the source dependencies. Having dependency rules will
+# improve incremental build accuracy without having to resort to a
+# full rebuild just because some non-global header file like
+# tclCompile.h was changed. These rules aren't needed when building
+# from scratch.
+#---------------------------------------------------------------------
+
+depend:
+!if !exist($(TCLSH))
+ @echo Build tclsh first!
+!else
+ set TCL_LIBRARY=$(TCL_LIBRARY)
+ $(TCLSH) $(TCLTOOLSDIR:\=/)/mkdepend.tcl -vc32 -out:"$(OUT_DIR)\depend.mk" \
+ -passthru:"-DBUILD_tk $(TK_INCLUDES)" $(GENERICDIR),$$(GENERICDIR) \
+ $(WINDIR),$$(WINDIR) $(TTKDIR),$$(TTKDIR) $(XLIBDIR),$$(XLIBDIR) \
+ $(BITMAPDIR),$$(BITMAPDIR) @<<
+$(TKOBJS)
+<<
+!endif
+
+#---------------------------------------------------------------------
+# Dependency rules
+#---------------------------------------------------------------------
+
+$(TMP_DIR)\tk.res: \
+ $(RCDIR)\buttons.bmp \
+ $(RCDIR)\cursor*.cur \
+ $(RCDIR)\tk.ico
+
+!if exist("$(OUT_DIR)\depend.mk")
+!include "$(OUT_DIR)\depend.mk"
+!message *** Dependency rules in use.
+!else
+!message *** Dependency rules are not being used.
+!endif
+
+### add a spacer in the output
+!message
+
+#---------------------------------------------------------------------
+# Implicit rules
+#---------------------------------------------------------------------
+
+{$(XLIBDIR)}.c{$(TMP_DIR)}.obj::
+ $(cc32) -DBUILD_tk $(TK_CFLAGS) -Fo$(TMP_DIR)\ @<<
+$<
+<<
+
+{$(GENERICDIR)}.c{$(TMP_DIR)}.obj::
+ $(cc32) -DBUILD_tk $(TK_CFLAGS) -Fo$(TMP_DIR)\ @<<
+$<
+<<
+
+{$(TTKDIR)}.c{$(TMP_DIR)}.obj::
+ $(cc32) -DBUILD_tk $(TK_CFLAGS) -Fo$(TMP_DIR)\ @<<
+$<
+<<
+
+{$(WINDIR)}.c{$(TMP_DIR)}.obj::
+ $(cc32) -DBUILD_tk $(TK_CFLAGS) -Fo$(TMP_DIR)\ @<<
+$<
+<<
+
+{$(ROOT)\unix}.c{$(TMP_DIR)}.obj::
+ $(cc32) -DBUILD_tk $(TK_CFLAGS) -Fo$(TMP_DIR)\ @<<
+$<
+<<
+
+{$(RCDIR)}.rc{$(TMP_DIR)}.res:
+ $(rc32) -fo $@ -r -i "$(GENERICDIR)" -i "$(TMP_DIR)" $(TCL_INCLUDES) \
+ -d DEBUG=$(DEBUG) -d UNCHECKED=$(UNCHECKED) \
+ -d TCL_THREADS=$(TCL_THREADS) \
+ -d STATIC_BUILD=$(STATIC_BUILD) \
+ $<
+
+$(TMP_DIR)\tk.res: $(TMP_DIR)\wish.exe.manifest
+$(TMP_DIR)\wish.res: $(TMP_DIR)\wish.exe.manifest
+
+.SUFFIXES:
+.SUFFIXES:.c .rc
+
+
+#---------------------------------------------------------------------
+# Installation.
+#---------------------------------------------------------------------
+
+install-binaries:
+ @echo installing binaries
+ @$(CPY) "$(WISH)" "$(BIN_INSTALL_DIR)\"
+!if $(TKLIB) != $(TKIMPLIB)
+ @$(CPY) "$(TKLIB)" "$(BIN_INSTALL_DIR)\"
+!endif
+ @$(CPY) "$(TKIMPLIB)" "$(LIB_INSTALL_DIR)\"
+ @$(CPY) "$(TKSTUBLIB)" "$(LIB_INSTALL_DIR)\"
+!if !$(STATIC_BUILD)
+ @echo creating package index
+ @type << > $(OUT_DIR)\pkgIndex.tcl
+if {[catch {package present Tcl 8.6.0}]} { 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$(TK_DOTVERSION).dll] Tk]
+} else {
+ package ifneeded Tk $(TK_PATCH_LEVEL) [list load [file join $$dir .. .. bin $(TKLIBNAME)] Tk]
+}
+<<
+ @$(CPY) $(OUT_DIR)\pkgIndex.tcl "$(SCRIPT_INSTALL_DIR)\"
+!endif
+
+#"
+
+install-libraries:
+ @echo installing Tk headers
+ @$(CPY) "$(GENERICDIR)\tk.h" "$(INCLUDE_INSTALL_DIR)\"
+ @$(CPY) "$(GENERICDIR)\tkDecls.h" "$(INCLUDE_INSTALL_DIR)\"
+ @$(CPY) "$(GENERICDIR)\tkPlatDecls.h" "$(INCLUDE_INSTALL_DIR)\"
+ @$(CPY) "$(GENERICDIR)\tkIntXlibDecls.h" "$(INCLUDE_INSTALL_DIR)\"
+ @$(CPY) "$(XLIBDIR)\X11\*.h" "$(INCLUDE_INSTALL_DIR)\X11\"
+ @echo installing script library
+ @$(CPY) "$(ROOT)\library\*" "$(SCRIPT_INSTALL_DIR)\"
+ @echo installing theme library
+ @$(CPY) "$(ROOT)\library\ttk\*" "$(SCRIPT_INSTALL_DIR)\ttk\"
+ @echo installing demos
+ @$(CPY) "$(ROOT)\library\demos\*" "$(SCRIPT_INSTALL_DIR)\demos\"
+ @$(CPY) "$(ROOT)\library\demos\images\*" "$(SCRIPT_INSTALL_DIR)\demos\images\"
+ @echo installing images
+ @$(CPY) "$(ROOT)\library\images\*" "$(SCRIPT_INSTALL_DIR)\images\"
+ @echo installing language files
+ @$(CPY) "$(ROOT)\library\msgs\*" "$(SCRIPT_INSTALL_DIR)\msgs\"
+
+#"
+
+#---------------------------------------------------------------------
+# Clean up
+#---------------------------------------------------------------------
+
+tidy:
+!if $(TKLIB) != $(TKIMPLIB)
+ @echo Removing $(TKLIB) ...
+ @if exist $(TKLIB) del $(TKLIB)
+!endif
+ @echo Removing $(TKIMPLIB) ...
+ @if exist $(TKIMPLIB) del $(TKIMPLIB)
+ @echo Removing $(WISH) ...
+ @if exist $(WISH) del $(WISH)
+ @echo Removing $(TKTEST) ...
+ @if exist $(TKTEST) del $(TKTEST)
+ @echo Removing $(TKSTUBLIB) ...
+ @if exist $(TKSTUBLIB) del $(TKSTUBLIB)
+
+clean:
+ @echo Cleaning $(TMP_DIR)\* ...
+ @if exist $(TMP_DIR)\nul $(RMDIR) $(TMP_DIR)
+ @echo Cleaning $(WINDIR)\nmakehlp.obj ...
+ @if exist $(WINDIR)\nmakehlp.obj del $(WINDIR)\nmakehlp.obj
+ @echo Cleaning $(WINDIR)\nmakehlp.exe ...
+ @if exist $(WINDIR)\nmakehlp.exe del $(WINDIR)\nmakehlp.exe
+ @echo Cleaning $(WINDIR)\_junk.pch ...
+ @if exist $(WINDIR)\_junk.pch del $(WINDIR)\_junk.pch
+ @echo Cleaning $(WINDIR)\vercl.x ...
+ @if exist $(WINDIR)\vercl.x del $(WINDIR)\vercl.x
+ @echo Cleaning $(WINDIR)\vercl.i ...
+ @if exist $(WINDIR)\vercl.i del $(WINDIR)\vercl.i
+ @echo Cleaning $(WINDIR)\versions.vc ...
+ @if exist $(WINDIR)\versions.vc del $(WINDIR)\versions.vc
+
+realclean: hose
+
+hose:
+ @echo Hosing $(OUT_DIR)\* ...
+ @if exist $(OUT_DIR)\nul $(RMDIR) $(OUT_DIR)
diff --git a/win/mkd.bat b/win/mkd.bat
index f741daf..1bd5ccb 100644
--- a/win/mkd.bat
+++ b/win/mkd.bat
@@ -1,12 +1,12 @@
-@echo off
-
-if exist %1\nul goto end
-
-md %1
-if errorlevel 1 goto end
-
-echo Created directory %1
-
-:end
-
-
+@echo off
+
+if exist %1\nul goto end
+
+md %1
+if errorlevel 1 goto end
+
+echo Created directory %1
+
+:end
+
+
diff --git a/win/nmakehlp.c b/win/nmakehlp.c
index b1a1517..84cf75c 100644
--- a/win/nmakehlp.c
+++ b/win/nmakehlp.c
@@ -606,8 +606,8 @@ SubstituteFile(
sp = fopen(substitutions, "rt");
if (sp != NULL) {
while (fgets(szBuffer, cbBuffer, sp) != NULL) {
- char *ks, *ke, *vs, *ve;
- ks = szBuffer;
+ unsigned char *ks, *ke, *vs, *ve;
+ ks = (unsigned char*)szBuffer;
while (ks && *ks && isspace(*ks)) ++ks;
ke = ks;
while (ke && *ke && !isspace(*ke)) ++ke;
@@ -616,7 +616,7 @@ SubstituteFile(
ve = vs;
while (ve && *ve && !(*ve == '\r' || *ve == '\n')) ++ve;
*ke = 0, *ve = 0;
- list_insert(&substPtr, ks, vs);
+ list_insert(&substPtr, (char*)ks, (char*)vs);
}
fclose(sp);
}
diff --git a/win/rc/lamp.bmp b/win/rc/lamp.bmp
index 834c0f9..1e2f9d4 100644
--- a/win/rc/lamp.bmp
+++ b/win/rc/lamp.bmp
Binary files differ
diff --git a/win/rc/tk_base.rc b/win/rc/tk_base.rc
index 3e065c9..e6ab016 100644
--- a/win/rc/tk_base.rc
+++ b/win/rc/tk_base.rc
@@ -26,12 +26,12 @@ FONT 8, "Helv"
BEGIN
LTEXT "Directory &name:",-1,8,6,118,9
EDITTEXT edt10,8,26,144,12, WS_TABSTOP | ES_AUTOHSCROLL
- LISTBOX lst2,8,40,144,64,LBS_SORT | LBS_OWNERDRAWFIXED |
- LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT |
+ LISTBOX lst2,8,40,144,64,LBS_SORT | LBS_OWNERDRAWFIXED |
+ LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT |
LBS_DISABLENOSCROLL | WS_VSCROLL | WS_TABSTOP
LTEXT "Dri&ves:",stc4,8,106,92,9
- COMBOBOX cmb2,8,115,144,68,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED |
- CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER |
+ COMBOBOX cmb2,8,115,144,68,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED |
+ CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER |
WS_VSCROLL | WS_TABSTOP
DEFPUSHBUTTON "OK",1,160,6,50,14,WS_GROUP
PUSHBUTTON "Cancel",2,160,24,50,14,WS_GROUP
@@ -42,8 +42,8 @@ BEGIN
LTEXT "a",stc3,9,143,114,15
EDITTEXT edt1,7,158,135,20,NOT WS_TABSTOP
LISTBOX lst1,8,205,134,42,LBS_NOINTEGRALHEIGHT
- COMBOBOX cmb1,8,253,135,21,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED |
- CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER |
+ COMBOBOX cmb1,8,253,135,21,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED |
+ CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER |
WS_VSCROLL
END
diff --git a/win/rc/wish.ico b/win/rc/wish.ico
index 05cad66..5801fb8 100644
--- a/win/rc/wish.ico
+++ b/win/rc/wish.ico
Binary files differ
diff --git a/win/rc/wish.rc b/win/rc/wish.rc
index 5cc2fa4..53e02fa 100644
--- a/win/rc/wish.rc
+++ b/win/rc/wish.rc
@@ -63,7 +63,7 @@ END
//
// Icon
-//
+//
// The icon whose name or resource ID is lexigraphically first, is used
// as the application's icon.
//
diff --git a/win/rmd.bat b/win/rmd.bat
index d260936..820b76f 100644
--- a/win/rmd.bat
+++ b/win/rmd.bat
@@ -1,20 +1,20 @@
-@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
+@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.vc b/win/rules.vc
index adc3165..2cd711b 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -1,716 +1,721 @@
-#------------------------------------------------------------------------------
-# rules.vc --
-#
-# Microsoft Visual C++ makefile include for decoding the commandline
-# macros. This file does not need editing to build Tcl.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# Copyright (c) 2001-2003 David Gravereaux.
-# Copyright (c) 2003-2008 Patrick Thoyts
-#------------------------------------------------------------------------------
-
-!ifndef _RULES_VC
-_RULES_VC = 1
-
-cc32 = $(CC) # built-in default.
-link32 = link
-lib32 = lib
-rc32 = $(RC) # built-in default.
-
-!ifndef INSTALLDIR
-### Assume the normal default.
-_INSTALLDIR = C:\Program Files\Tcl
-!else
-### Fix the path separators.
-_INSTALLDIR = $(INSTALLDIR:/=\)
-!endif
-
-#----------------------------------------------------------
-# Set the proper copy method to avoid overwrite questions
-# to the user when copying files and selecting the right
-# "delete all" method.
-#----------------------------------------------------------
-
-!if "$(OS)" == "Windows_NT"
-RMDIR = rmdir /S /Q
-ERRNULL = 2>NUL
-!if ![ver | find "4.0" > nul]
-CPY = echo y | xcopy /i >NUL
-COPY = copy >NUL
-!else
-CPY = xcopy /i /y >NUL
-COPY = copy /y >NUL
-!endif
-!else # "$(OS)" != "Windows_NT"
-CPY = xcopy /i >_JUNK.OUT # On Win98 NUL does not work here.
-COPY = copy >_JUNK.OUT # On Win98 NUL does not work here.
-RMDIR = deltree /Y
-NULL = \NUL # Used in testing directory existence
-ERRNULL = >NUL # Win9x shell cannot redirect stderr
-!endif
-MKDIR = mkdir
-
-#------------------------------------------------------------------------------
-# Determine the host and target architectures and compiler version.
-#------------------------------------------------------------------------------
-
-_HASH=^#
-_VC_MANIFEST_EMBED_EXE=
-_VC_MANIFEST_EMBED_DLL=
-VCVER=0
-!if ![echo VCVERSION=_MSC_VER > vercl.x] \
- && ![echo $(_HASH)if defined(_M_IX86) >> vercl.x] \
- && ![echo ARCH=IX86 >> vercl.x] \
- && ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \
- && ![echo ARCH=AMD64 >> vercl.x] \
- && ![echo $(_HASH)endif >> vercl.x] \
- && ![cl -nologo -TC -P vercl.x $(ERRNULL)]
-!include vercl.i
-!if ![echo VCVER= ^\> vercl.vc] \
- && ![set /a $(VCVERSION) / 100 - 6 >> vercl.vc]
-!include vercl.vc
-!endif
-!endif
-!if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc]
-!endif
-
-!if ![reg query HKLM\Hardware\Description\System\CentralProcessor\0 /v Identifier | findstr /i x86]
-NATIVE_ARCH=IX86
-!else
-NATIVE_ARCH=AMD64
-!endif
-
-# Since MSVC8 we must deal with manifest resources.
-!if $(VCVERSION) >= 1400
-_VC_MANIFEST_EMBED_EXE=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1
-_VC_MANIFEST_EMBED_DLL=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2
-!endif
-
-!ifndef MACHINE
-MACHINE=$(ARCH)
-!endif
-
-!ifndef CFG_ENCODING
-CFG_ENCODING = \"cp1252\"
-!endif
-
-!message ===============================================================================
-
-#----------------------------------------------------------
-# build the helper app we need to overcome nmake's limiting
-# environment.
-#----------------------------------------------------------
-
-!if !exist(nmakehlp.exe)
-!if [$(cc32) -nologo nmakehlp.c -link -subsystem:console > nul]
-!endif
-!endif
-
-#----------------------------------------------------------
-# Test for compiler features
-#----------------------------------------------------------
-
-### test for optimizations
-!if [nmakehlp -c -Ot]
-!message *** Compiler has 'Optimizations'
-OPTIMIZING = 1
-!else
-!message *** Compiler does not have 'Optimizations'
-OPTIMIZING = 0
-!endif
-
-OPTIMIZATIONS =
-
-!if [nmakehlp -c -Ot]
-OPTIMIZATIONS = $(OPTIMIZATIONS) -Ot
-!endif
-
-!if [nmakehlp -c -Oi]
-OPTIMIZATIONS = $(OPTIMIZATIONS) -Oi
-!endif
-
-!if [nmakehlp -c -Op]
-OPTIMIZATIONS = $(OPTIMIZATIONS) -Op
-!endif
-
-!if [nmakehlp -c -fp:strict]
-OPTIMIZATIONS = $(OPTIMIZATIONS) -fp:strict
-!endif
-
-!if [nmakehlp -c -Gs]
-OPTIMIZATIONS = $(OPTIMIZATIONS) -Gs
-!endif
-
-!if [nmakehlp -c -GS]
-OPTIMIZATIONS = $(OPTIMIZATIONS) -GS
-!endif
-
-!if [nmakehlp -c -GL]
-OPTIMIZATIONS = $(OPTIMIZATIONS) -GL
-!endif
-
-DEBUGFLAGS =
-
-!if [nmakehlp -c -RTC1]
-DEBUGFLAGS = $(DEBUGFLAGS) -RTC1
-!elseif [nmakehlp -c -GZ]
-DEBUGFLAGS = $(DEBUGFLAGS) -GZ
-!endif
-
-COMPILERFLAGS =-W3 -DUNICODE -D_UNICODE
-
-# In v13 -GL and -YX are incompatible.
-!if [nmakehlp -c -YX]
-!if ![nmakehlp -c -GL]
-OPTIMIZATIONS = $(OPTIMIZATIONS) -YX
-!endif
-!endif
-
-!if "$(MACHINE)" == "IX86"
-### test for pentium errata
-!if [nmakehlp -c -QI0f]
-!message *** Compiler has 'Pentium 0x0f fix'
-COMPILERFLAGS = $(COMPILERFLAGS) -QI0f
-!else
-!message *** Compiler does not have 'Pentium 0x0f fix'
-!endif
-!endif
-
-!if "$(MACHINE)" == "IA64"
-### test for Itanium errata
-!if [nmakehlp -c -QIA64_Bx]
-!message *** Compiler has 'B-stepping errata workarounds'
-COMPILERFLAGS = $(COMPILERFLAGS) -QIA64_Bx
-!else
-!message *** Compiler does not have 'B-stepping errata workarounds'
-!endif
-!endif
-
-!if "$(MACHINE)" == "IX86"
-### test for -align:4096, when align:512 will do.
-!if [nmakehlp -l -opt:nowin98]
-!message *** Linker has 'Win98 alignment problem'
-ALIGN98_HACK = 1
-!else
-!message *** Linker does not have 'Win98 alignment problem'
-ALIGN98_HACK = 0
-!endif
-!else
-ALIGN98_HACK = 0
-!endif
-
-LINKERFLAGS =
-
-!if [nmakehlp -l -ltcg]
-LINKERFLAGS =-ltcg
-!endif
-
-#----------------------------------------------------------
-# Decode the options requested.
-#----------------------------------------------------------
-
-!if "$(OPTS)" == "" || [nmakehlp -f "$(OPTS)" "none"]
-STATIC_BUILD = 0
-TCL_THREADS = 1
-DEBUG = 0
-SYMBOLS = 0
-PROFILE = 0
-PGO = 0
-MSVCRT = 1
-LOIMPACT = 0
-TCL_USE_STATIC_PACKAGES = 0
-USE_THREAD_ALLOC = 1
-UNCHECKED = 0
-!else
-!if [nmakehlp -f $(OPTS) "static"]
-!message *** Doing static
-STATIC_BUILD = 1
-!else
-STATIC_BUILD = 0
-!endif
-!if [nmakehlp -f $(OPTS) "msvcrt"]
-!message *** Doing msvcrt
-MSVCRT = 1
-!else
-!if !$(STATIC_BUILD)
-MSVCRT = 1
-!else
-MSVCRT = 0
-!endif
-!endif
-!if [nmakehlp -f $(OPTS) "staticpkg"] && $(STATIC_BUILD)
-!message *** Doing staticpkg
-TCL_USE_STATIC_PACKAGES = 1
-!else
-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) "symbols"]
-!message *** Doing symbols
-DEBUG = 1
-!else
-DEBUG = 0
-!endif
-!if [nmakehlp -f $(OPTS) "pdbs"]
-!message *** Doing pdbs
-SYMBOLS = 1
-!else
-SYMBOLS = 0
-!endif
-!if [nmakehlp -f $(OPTS) "profile"]
-!message *** Doing profile
-PROFILE = 1
-!else
-PROFILE = 0
-!endif
-!if [nmakehlp -f $(OPTS) "pgi"]
-!message *** Doing profile guided optimization instrumentation
-PGO = 1
-!elseif [nmakehlp -f $(OPTS) "pgo"]
-!message *** Doing profile guided optimization
-PGO = 2
-!else
-PGO = 0
-!endif
-!if [nmakehlp -f $(OPTS) "loimpact"]
-!message *** Doing loimpact
-LOIMPACT = 1
-!else
-LOIMPACT = 0
-!endif
-!if [nmakehlp -f $(OPTS) "thrdalloc"]
-!message *** Doing thrdalloc
-USE_THREAD_ALLOC = 1
-!endif
-!if [nmakehlp -f $(OPTS) "tclalloc"]
-!message *** Doing tclalloc
-USE_THREAD_ALLOC = 0
-!endif
-!if [nmakehlp -f $(OPTS) "unchecked"]
-!message *** Doing unchecked
-UNCHECKED = 1
-!else
-UNCHECKED = 0
-!endif
-!endif
-
-#----------------------------------------------------------
-# Figure-out how to name our intermediate and output directories.
-# We wouldn't want different builds to use the same .obj files
-# by accident.
-#----------------------------------------------------------
-
-#----------------------------------------
-# Naming convention:
-# t = full thread support.
-# s = static library (as opposed to an
-# import library)
-# g = linked to the debug enabled C
-# run-time.
-# x = special static build when it
-# links to the dynamic C run-time.
-#----------------------------------------
-SUFX = tsgx
-
-!if $(DEBUG)
-BUILDDIRTOP = Debug
-!else
-BUILDDIRTOP = Release
-!endif
-
-!if "$(MACHINE)" != "IX86"
-BUILDDIRTOP =$(BUILDDIRTOP)_$(MACHINE)
-!endif
-!if $(VCVER) > 6
-BUILDDIRTOP =$(BUILDDIRTOP)_VC$(VCVER)
-!endif
-
-!if !$(DEBUG) || $(DEBUG) && $(UNCHECKED)
-SUFX = $(SUFX:g=)
-!endif
-
-TMP_DIRFULL = .\$(BUILDDIRTOP)\$(PROJECT)_ThreadedDynamicStaticX
-
-!if !$(STATIC_BUILD)
-TMP_DIRFULL = $(TMP_DIRFULL:Static=)
-SUFX = $(SUFX:s=)
-EXT = dll
-TMP_DIRFULL = $(TMP_DIRFULL:X=)
-SUFX = $(SUFX:x=)
-!else
-TMP_DIRFULL = $(TMP_DIRFULL:Dynamic=)
-EXT = lib
-!if !$(MSVCRT)
-TMP_DIRFULL = $(TMP_DIRFULL:X=)
-SUFX = $(SUFX:x=)
-!endif
-!endif
-
-!if !$(TCL_THREADS)
-TMP_DIRFULL = $(TMP_DIRFULL:Threaded=)
-SUFX = $(SUFX:t=)
-!endif
-
-!ifndef TMP_DIR
-TMP_DIR = $(TMP_DIRFULL)
-!ifndef OUT_DIR
-OUT_DIR = .\$(BUILDDIRTOP)
-!endif
-!else
-!ifndef OUT_DIR
-OUT_DIR = $(TMP_DIR)
-!endif
-!endif
-
-
-#----------------------------------------------------------
-# Decode the statistics requested.
-#----------------------------------------------------------
-
-!if "$(STATS)" == "" || [nmakehlp -f "$(STATS)" "none"]
-TCL_MEM_DEBUG = 0
-TCL_COMPILE_DEBUG = 0
-!else
-!if [nmakehlp -f $(STATS) "memdbg"]
-!message *** Doing memdbg
-TCL_MEM_DEBUG = 1
-!else
-TCL_MEM_DEBUG = 0
-!endif
-!if [nmakehlp -f $(STATS) "compdbg"]
-!message *** Doing compdbg
-TCL_COMPILE_DEBUG = 1
-!else
-TCL_COMPILE_DEBUG = 0
-!endif
-!endif
-
-
-#----------------------------------------------------------
-# Decode the checks requested.
-#----------------------------------------------------------
-
-!if "$(CHECKS)" == "" || [nmakehlp -f "$(CHECKS)" "none"]
-TCL_NO_DEPRECATED = 0
-WARNINGS = -W3
-!else
-!if [nmakehlp -f $(CHECKS) "nodep"]
-!message *** Doing nodep check
-TCL_NO_DEPRECATED = 1
-!else
-TCL_NO_DEPRECATED = 0
-!endif
-!if [nmakehlp -f $(CHECKS) "fullwarn"]
-!message *** Doing full warnings check
-WARNINGS = -W4
-!if [nmakehlp -l -warn:3]
-LINKERFLAGS = $(LINKERFLAGS) -warn:3
-!endif
-!else
-WARNINGS = -W3
-!endif
-!if [nmakehlp -f $(CHECKS) "64bit"] && [nmakehlp -c -Wp64]
-!message *** Doing 64bit portability warnings
-WARNINGS = $(WARNINGS) -Wp64
-!endif
-!endif
-
-!if $(PGO) > 1
-!if [nmakehlp -l -ltcg:pgoptimize]
-LINKERFLAGS = $(LINKERFLAGS:-ltcg=) -ltcg:pgoptimize
-!else
-MSG=^
-This compiler does not support profile guided optimization.
-!error $(MSG)
-!endif
-!elseif $(PGO) > 0
-!if [nmakehlp -l -ltcg:pginstrument]
-LINKERFLAGS = $(LINKERFLAGS:-ltcg=) -ltcg:pginstrument
-!else
-MSG=^
-This compiler does not support profile guided optimization.
-!error $(MSG)
-!endif
-!endif
-
-#----------------------------------------------------------
-# Set our defines now armed with our options.
-#----------------------------------------------------------
-
-OPTDEFINES = -DTCL_CFGVAL_ENCODING=$(CFG_ENCODING) -DSTDC_HEADERS
-
-!if $(TCL_MEM_DEBUG)
-OPTDEFINES = $(OPTDEFINES) -DTCL_MEM_DEBUG
-!endif
-!if $(TCL_COMPILE_DEBUG)
-OPTDEFINES = $(OPTDEFINES) -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS
-!endif
-!if $(TCL_THREADS)
-OPTDEFINES = $(OPTDEFINES) -DTCL_THREADS=1
-!if $(USE_THREAD_ALLOC)
-OPTDEFINES = $(OPTDEFINES) -DUSE_THREAD_ALLOC=1
-!endif
-!endif
-!if $(STATIC_BUILD)
-OPTDEFINES = $(OPTDEFINES) -DSTATIC_BUILD
-!endif
-!if $(TCL_NO_DEPRECATED)
-OPTDEFINES = $(OPTDEFINES) -DTCL_NO_DEPRECATED
-!endif
-
-!if !$(DEBUG)
-OPTDEFINES = $(OPTDEFINES) -DNDEBUG
-!if $(OPTIMIZING)
-OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_OPTIMIZED
-!endif
-!endif
-!if $(PROFILE)
-OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_PROFILED
-!endif
-!if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64"
-OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_DO64BIT
-!endif
-!if $(VCVERSION) < 1300
-OPTDEFINES = $(OPTDEFINES) -DNO_STRTOI64
-!endif
-
-#----------------------------------------------------------
-# Locate the Tcl headers to build against
-#----------------------------------------------------------
-
-!if "$(PROJECT)" == "tcl"
-
-_TCL_H = ..\generic\tcl.h
-
-!else
-
-# If INSTALLDIR set to tcl root dir then reset to the lib dir.
-!if exist("$(_INSTALLDIR)\include\tcl.h")
-_INSTALLDIR=$(_INSTALLDIR)\lib
-!endif
-
-!if !defined(TCLDIR)
-!if exist("$(_INSTALLDIR)\..\include\tcl.h")
-TCLINSTALL = 1
-_TCLDIR = $(_INSTALLDIR)\..
-_TCL_H = $(_INSTALLDIR)\..\include\tcl.h
-TCLDIR = $(_INSTALLDIR)\..
-!else
-MSG=^
-Failed to find tcl.h. Set the TCLDIR macro.
-!error $(MSG)
-!endif
-!else
-_TCLDIR = $(TCLDIR:/=\)
-!if exist("$(_TCLDIR)\include\tcl.h")
-TCLINSTALL = 1
-_TCL_H = $(_TCLDIR)\include\tcl.h
-!elseif exist("$(_TCLDIR)\generic\tcl.h")
-TCLINSTALL = 0
-_TCL_H = $(_TCLDIR)\generic\tcl.h
-!else
-MSG =^
-Failed to find tcl.h. The TCLDIR macro does not appear correct.
-!error $(MSG)
-!endif
-!endif
-!endif
-
-#--------------------------------------------------------------
-# Extract various version numbers from tcl headers
-# The generated file is then included in the makefile.
-#--------------------------------------------------------------
-
-!if [echo REM = This file is generated from rules.vc > versions.vc]
-!endif
-!if [echo TCL_MAJOR_VERSION = \>> versions.vc] \
- && [nmakehlp -V "$(_TCL_H)" TCL_MAJOR_VERSION >> versions.vc]
-!endif
-!if [echo TCL_MINOR_VERSION = \>> versions.vc] \
- && [nmakehlp -V "$(_TCL_H)" TCL_MINOR_VERSION >> versions.vc]
-!endif
-!if [echo TCL_PATCH_LEVEL = \>> versions.vc] \
- && [nmakehlp -V "$(_TCL_H)" TCL_PATCH_LEVEL >> versions.vc]
-!endif
-
-# If building the tcl core then we need additional package versions
-!if "$(PROJECT)" == "tcl"
-!if [echo PKG_HTTP_VER = \>> versions.vc] \
- && [nmakehlp -V ..\library\http\pkgIndex.tcl http >> versions.vc]
-!endif
-!if [echo PKG_TCLTEST_VER = \>> versions.vc] \
- && [nmakehlp -V ..\library\tcltest\pkgIndex.tcl tcltest >> versions.vc]
-!endif
-!if [echo PKG_MSGCAT_VER = \>> versions.vc] \
- && [nmakehlp -V ..\library\msgcat\pkgIndex.tcl msgcat >> versions.vc]
-!endif
-!if [echo PKG_PLATFORM_VER = \>> versions.vc] \
- && [nmakehlp -V ..\library\platform\pkgIndex.tcl "platform " >> versions.vc]
-!endif
-!if [echo PKG_SHELL_VER = \>> versions.vc] \
- && [nmakehlp -V ..\library\platform\pkgIndex.tcl "platform::shell" >> versions.vc]
-!endif
-!if [echo PKG_DDE_VER = \>> versions.vc] \
- && [nmakehlp -V ..\library\dde\pkgIndex.tcl "dde " >> versions.vc]
-!endif
-!if [echo PKG_REG_VER =\>> versions.vc] \
- && [nmakehlp -V ..\library\reg\pkgIndex.tcl registry >> versions.vc]
-!endif
-!endif
-
-!include versions.vc
-
-#--------------------------------------------------------------
-# Setup tcl version dependent stuff headers
-#--------------------------------------------------------------
-
-!if "$(PROJECT)" != "tcl"
-
-TCL_VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION)
-
-!if $(TCLINSTALL)
-TCLSH = "$(_TCLDIR)\bin\tclsh$(TCL_VERSION)$(SUFX).exe"
-!if !exist($(TCLSH))
-TCLSH = "$(_TCLDIR)\bin\tclsh$(TCL_VERSION)$(SUFX:x=).exe"
-!endif
-TCLSTUBLIB = "$(_TCLDIR)\lib\tclstub$(TCL_VERSION).lib"
-TCLIMPLIB = "$(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX).lib"
-!if !exist($(TCLIMPLIB))
-TCLIMPLIB = "$(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX:x=).lib"
-!endif
-TCL_LIBRARY = $(_TCLDIR)\lib
-TCLREGLIB = "$(_TCLDIR)\lib\tclreg13$(SUFX:t=).lib"
-TCLDDELIB = "$(_TCLDIR)\lib\tcldde14$(SUFX:t=).lib"
-COFFBASE = \must\have\tcl\sources\to\build\this\target
-TCLTOOLSDIR = \must\have\tcl\sources\to\build\this\target
-TCL_INCLUDES = -I"$(_TCLDIR)\include"
-!else
-TCLSH = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)$(SUFX).exe"
-!if !exist($(TCLSH))
-TCLSH = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)$(SUFX:x=).exe"
-!endif
-TCLSTUBLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub$(TCL_VERSION).lib"
-TCLIMPLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX).lib"
-!if !exist($(TCLIMPLIB))
-TCLIMPLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX:x=).lib"
-!endif
-TCL_LIBRARY = $(_TCLDIR)\library
-TCLREGLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclreg13$(SUFX:t=).lib"
-TCLDDELIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde14$(SUFX:t=).lib"
-COFFBASE = "$(_TCLDIR)\win\coffbase.txt"
-TCLTOOLSDIR = $(_TCLDIR)\tools
-TCL_INCLUDES = -I"$(_TCLDIR)\generic" -I"$(_TCLDIR)\win"
-!endif
-
-!endif
-
-#-------------------------------------------------------------------------
-# Locate the Tk headers to build against
-#-------------------------------------------------------------------------
-
-!if "$(PROJECT)" == "tk"
-_TK_H = ..\generic\tk.h
-_INSTALLDIR = $(_INSTALLDIR)\..
-!endif
-
-!ifdef PROJECT_REQUIRES_TK
-!if !defined(TKDIR)
-!if exist("$(_INSTALLDIR)\..\include\tk.h")
-TKINSTALL = 1
-_TKDIR = $(_INSTALLDIR)\..
-_TK_H = $(_TKDIR)\include\tk.h
-TKDIR = $(_TKDIR)
-!elseif exist("$(_TCLDIR)\include\tk.h")
-TKINSTALL = 1
-_TKDIR = $(_TCLDIR)
-_TK_H = $(_TKDIR)\include\tk.h
-TKDIR = $(_TKDIR)
-!endif
-!else
-_TKDIR = $(TKDIR:/=\)
-!if exist("$(_TKDIR)\include\tk.h")
-TKINSTALL = 1
-_TK_H = $(_TKDIR)\include\tk.h
-!elseif exist("$(_TKDIR)\generic\tk.h")
-TKINSTALL = 0
-_TK_H = $(_TKDIR)\generic\tk.h
-!else
-MSG =^
-Failed to find tk.h. The TKDIR macro does not appear correct.
-!error $(MSG)
-!endif
-!endif
-!endif
-
-#-------------------------------------------------------------------------
-# Extract Tk version numbers
-#-------------------------------------------------------------------------
-
-!if defined(PROJECT_REQUIRES_TK) || "$(PROJECT)" == "tk"
-
-!if [echo TK_MAJOR_VERSION = \>> versions.vc] \
- && [nmakehlp -V $(_TK_H) TK_MAJOR_VERSION >> versions.vc]
-!endif
-!if [echo TK_MINOR_VERSION = \>> versions.vc] \
- && [nmakehlp -V $(_TK_H) TK_MINOR_VERSION >> versions.vc]
-!endif
-!if [echo TK_PATCH_LEVEL = \>> versions.vc] \
- && [nmakehlp -V $(_TK_H) TK_PATCH_LEVEL >> versions.vc]
-!endif
-
-!include versions.vc
-
-TK_DOTVERSION = $(TK_MAJOR_VERSION).$(TK_MINOR_VERSION)
-TK_VERSION = $(TK_MAJOR_VERSION)$(TK_MINOR_VERSION)
-
-!if "$(PROJECT)" != "tk"
-!if $(TKINSTALL)
-WISH = "$(_TKDIR)\bin\wish$(TK_VERSION)$(SUFX).exe"
-!if !exist($(WISH))
-WISH = "$(_TKDIR)\bin\wish$(TK_VERSION)$(SUFX:x=).exe"
-!endif
-TKSTUBLIB = "$(_TKDIR)\lib\tkstub$(TK_VERSION).lib"
-TKIMPLIB = "$(_TKDIR)\lib\tk$(TK_VERSION)$(SUFX).lib"
-!if !exist($(TKIMPLIB))
-TKIMPLIB = "$(_TKDIR)\win\$(BUILDDIRTOP)\tk$(TCL_VERSION)$(SUFX:x=).lib"
-!endif
-TK_INCLUDES = -I"$(_TKDIR)\include"
-!else
-WISH = "$(_TKDIR)\win\$(BUILDDIRTOP)\wish$(TCL_VERSION)$(SUFX).exe"
-!if !exist($(WISH))
-WISH = "$(_TKDIR)\win\$(BUILDDIRTOP)\wish$(TCL_VERSION)$(SUFX:x=).exe"
-!endif
-TKSTUBLIB = "$(_TKDIR)\win\$(BUILDDIRTOP)\tkstub$(TCL_VERSION).lib"
-TKIMPLIB = "$(_TKDIR)\win\$(BUILDDIRTOP)\tk$(TCL_VERSION)$(SUFX).lib"
-!if !exist($(TKIMPLIB))
-TKIMPLIB = "$(_TKDIR)\win\$(BUILDDIRTOP)\tk$(TCL_VERSION)$(SUFX:x=).lib"
-!endif
-TK_INCLUDES = -I"$(_TKDIR)\generic" -I"$(_TKDIR)\win" -I"$(_TKDIR)\xlib"
-!endif
-!endif
-
-!endif
-
-#----------------------------------------------------------
-# Display stats being used.
-#----------------------------------------------------------
-
-!message *** Intermediate directory will be '$(TMP_DIR)'
-!message *** Output directory will be '$(OUT_DIR)'
-!message *** Suffix for binaries will be '$(SUFX)'
-!message *** Optional defines are '$(OPTDEFINES)'
-!message *** Compiler version $(VCVER). Target machine is $(MACHINE)
-!message *** Host architecture is $(NATIVE_ARCH)
-!message *** Compiler options '$(COMPILERFLAGS) $(OPTIMIZATIONS) $(DEBUGFLAGS) $(WARNINGS)'
-!message *** Link options '$(LINKERFLAGS)'
-
-!endif
+#------------------------------------------------------------------------------
+# rules.vc --
+#
+# Microsoft Visual C++ makefile include for decoding the commandline
+# macros. This file does not need editing to build Tcl.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# Copyright (c) 2001-2003 David Gravereaux.
+# Copyright (c) 2003-2008 Patrick Thoyts
+#------------------------------------------------------------------------------
+
+!ifndef _RULES_VC
+_RULES_VC = 1
+
+cc32 = $(CC) # built-in default.
+link32 = link
+lib32 = lib
+rc32 = $(RC) # built-in default.
+
+!ifndef INSTALLDIR
+### Assume the normal default.
+_INSTALLDIR = C:\Program Files\Tcl
+!else
+### Fix the path separators.
+_INSTALLDIR = $(INSTALLDIR:/=\)
+!endif
+
+#----------------------------------------------------------
+# Set the proper copy method to avoid overwrite questions
+# to the user when copying files and selecting the right
+# "delete all" method.
+#----------------------------------------------------------
+
+!if "$(OS)" == "Windows_NT"
+RMDIR = rmdir /S /Q
+ERRNULL = 2>NUL
+!if ![ver | find "4.0" > nul]
+CPY = echo y | xcopy /i >NUL
+COPY = copy >NUL
+!else
+CPY = xcopy /i /y >NUL
+COPY = copy /y >NUL
+!endif
+!else # "$(OS)" != "Windows_NT"
+CPY = xcopy /i >_JUNK.OUT # On Win98 NUL does not work here.
+COPY = copy >_JUNK.OUT # On Win98 NUL does not work here.
+RMDIR = deltree /Y
+NULL = \NUL # Used in testing directory existence
+ERRNULL = >NUL # Win9x shell cannot redirect stderr
+!endif
+MKDIR = mkdir
+
+#------------------------------------------------------------------------------
+# Determine the host and target architectures and compiler version.
+#------------------------------------------------------------------------------
+
+_HASH=^#
+_VC_MANIFEST_EMBED_EXE=
+_VC_MANIFEST_EMBED_DLL=
+VCVER=0
+!if ![echo VCVERSION=_MSC_VER > vercl.x] \
+ && ![echo $(_HASH)if defined(_M_IX86) >> vercl.x] \
+ && ![echo ARCH=IX86 >> vercl.x] \
+ && ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \
+ && ![echo ARCH=AMD64 >> vercl.x] \
+ && ![echo $(_HASH)endif >> vercl.x] \
+ && ![cl -nologo -TC -P vercl.x $(ERRNULL)]
+!include vercl.i
+!if ![echo VCVER= ^\> vercl.vc] \
+ && ![set /a $(VCVERSION) / 100 - 6 >> vercl.vc]
+!include vercl.vc
+!endif
+!endif
+!if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc]
+!endif
+
+!if ![reg query HKLM\Hardware\Description\System\CentralProcessor\0 /v Identifier | findstr /i x86]
+NATIVE_ARCH=IX86
+!else
+NATIVE_ARCH=AMD64
+!endif
+
+# Since MSVC8 we must deal with manifest resources.
+!if $(VCVERSION) >= 1400
+_VC_MANIFEST_EMBED_EXE=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1
+_VC_MANIFEST_EMBED_DLL=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2
+!endif
+
+!ifndef MACHINE
+MACHINE=$(ARCH)
+!endif
+
+!ifndef CFG_ENCODING
+CFG_ENCODING = \"cp1252\"
+!endif
+
+!message ===============================================================================
+
+#----------------------------------------------------------
+# build the helper app we need to overcome nmake's limiting
+# environment.
+#----------------------------------------------------------
+
+!if !exist(nmakehlp.exe)
+!if [$(cc32) -nologo nmakehlp.c -link -subsystem:console > nul]
+!endif
+!endif
+
+#----------------------------------------------------------
+# Test for compiler features
+#----------------------------------------------------------
+
+### test for optimizations
+!if [nmakehlp -c -Ot]
+!message *** Compiler has 'Optimizations'
+OPTIMIZING = 1
+!else
+!message *** Compiler does not have 'Optimizations'
+OPTIMIZING = 0
+!endif
+
+OPTIMIZATIONS =
+
+!if [nmakehlp -c -Ot]
+OPTIMIZATIONS = $(OPTIMIZATIONS) -Ot
+!endif
+
+!if [nmakehlp -c -Oi]
+OPTIMIZATIONS = $(OPTIMIZATIONS) -Oi
+!endif
+
+!if [nmakehlp -c -Op]
+OPTIMIZATIONS = $(OPTIMIZATIONS) -Op
+!endif
+
+!if [nmakehlp -c -fp:strict]
+OPTIMIZATIONS = $(OPTIMIZATIONS) -fp:strict
+!endif
+
+!if [nmakehlp -c -Gs]
+OPTIMIZATIONS = $(OPTIMIZATIONS) -Gs
+!endif
+
+!if [nmakehlp -c -GS]
+OPTIMIZATIONS = $(OPTIMIZATIONS) -GS
+!endif
+
+!if [nmakehlp -c -GL]
+OPTIMIZATIONS = $(OPTIMIZATIONS) -GL
+!endif
+
+DEBUGFLAGS =
+
+!if [nmakehlp -c -RTC1]
+DEBUGFLAGS = $(DEBUGFLAGS) -RTC1
+!elseif [nmakehlp -c -GZ]
+DEBUGFLAGS = $(DEBUGFLAGS) -GZ
+!endif
+
+COMPILERFLAGS =-W3 /DUNICODE /D_UNICODE /D_ATL_XP_TARGETING
+
+# In v13 -GL and -YX are incompatible.
+!if [nmakehlp -c -YX]
+!if ![nmakehlp -c -GL]
+OPTIMIZATIONS = $(OPTIMIZATIONS) -YX
+!endif
+!endif
+
+!if "$(MACHINE)" == "IX86"
+### test for pentium errata
+!if [nmakehlp -c -QI0f]
+!message *** Compiler has 'Pentium 0x0f fix'
+COMPILERFLAGS = $(COMPILERFLAGS) -QI0f
+!else
+!message *** Compiler does not have 'Pentium 0x0f fix'
+!endif
+!endif
+
+!if "$(MACHINE)" == "IA64"
+### test for Itanium errata
+!if [nmakehlp -c -QIA64_Bx]
+!message *** Compiler has 'B-stepping errata workarounds'
+COMPILERFLAGS = $(COMPILERFLAGS) -QIA64_Bx
+!else
+!message *** Compiler does not have 'B-stepping errata workarounds'
+!endif
+!endif
+
+!if "$(MACHINE)" == "IX86"
+### test for -align:4096, when align:512 will do.
+!if [nmakehlp -l -opt:nowin98]
+!message *** Linker has 'Win98 alignment problem'
+ALIGN98_HACK = 1
+!else
+!message *** Linker does not have 'Win98 alignment problem'
+ALIGN98_HACK = 0
+!endif
+!else
+ALIGN98_HACK = 0
+!endif
+
+LINKERFLAGS =
+
+!if [nmakehlp -l -ltcg]
+LINKERFLAGS =-ltcg
+!endif
+
+#----------------------------------------------------------
+# Decode the options requested.
+#----------------------------------------------------------
+
+!if "$(OPTS)" == "" || [nmakehlp -f "$(OPTS)" "none"]
+STATIC_BUILD = 0
+TCL_THREADS = 1
+DEBUG = 0
+SYMBOLS = 0
+PROFILE = 0
+PGO = 0
+MSVCRT = 1
+LOIMPACT = 0
+TCL_USE_STATIC_PACKAGES = 0
+USE_THREAD_ALLOC = 1
+UNCHECKED = 0
+!else
+!if [nmakehlp -f $(OPTS) "static"]
+!message *** Doing static
+STATIC_BUILD = 1
+!else
+STATIC_BUILD = 0
+!endif
+!if [nmakehlp -f $(OPTS) "nomsvcrt"]
+!message *** Doing nomsvcrt
+MSVCRT = 0
+!else
+!if [nmakehlp -f $(OPTS) "msvcrt"]
+!message *** Doing msvcrt
+MSVCRT = 1
+!else
+!if !$(STATIC_BUILD)
+MSVCRT = 1
+!else
+MSVCRT = 0
+!endif
+!endif
+!endif
+!if [nmakehlp -f $(OPTS) "staticpkg"] && $(STATIC_BUILD)
+!message *** Doing staticpkg
+TCL_USE_STATIC_PACKAGES = 1
+!else
+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) "symbols"]
+!message *** Doing symbols
+DEBUG = 1
+!else
+DEBUG = 0
+!endif
+!if [nmakehlp -f $(OPTS) "pdbs"]
+!message *** Doing pdbs
+SYMBOLS = 1
+!else
+SYMBOLS = 0
+!endif
+!if [nmakehlp -f $(OPTS) "profile"]
+!message *** Doing profile
+PROFILE = 1
+!else
+PROFILE = 0
+!endif
+!if [nmakehlp -f $(OPTS) "pgi"]
+!message *** Doing profile guided optimization instrumentation
+PGO = 1
+!elseif [nmakehlp -f $(OPTS) "pgo"]
+!message *** Doing profile guided optimization
+PGO = 2
+!else
+PGO = 0
+!endif
+!if [nmakehlp -f $(OPTS) "loimpact"]
+!message *** Doing loimpact
+LOIMPACT = 1
+!else
+LOIMPACT = 0
+!endif
+!if [nmakehlp -f $(OPTS) "thrdalloc"]
+!message *** Doing thrdalloc
+USE_THREAD_ALLOC = 1
+!endif
+!if [nmakehlp -f $(OPTS) "tclalloc"]
+!message *** Doing tclalloc
+USE_THREAD_ALLOC = 0
+!endif
+!if [nmakehlp -f $(OPTS) "unchecked"]
+!message *** Doing unchecked
+UNCHECKED = 1
+!else
+UNCHECKED = 0
+!endif
+!endif
+
+#----------------------------------------------------------
+# Figure-out how to name our intermediate and output directories.
+# We wouldn't want different builds to use the same .obj files
+# by accident.
+#----------------------------------------------------------
+
+#----------------------------------------
+# Naming convention:
+# t = full thread support.
+# s = static library (as opposed to an
+# import library)
+# g = linked to the debug enabled C
+# run-time.
+# x = special static build when it
+# links to the dynamic C run-time.
+#----------------------------------------
+SUFX = tsgx
+
+!if $(DEBUG)
+BUILDDIRTOP = Debug
+!else
+BUILDDIRTOP = Release
+!endif
+
+!if "$(MACHINE)" != "IX86"
+BUILDDIRTOP =$(BUILDDIRTOP)_$(MACHINE)
+!endif
+!if $(VCVER) > 6
+BUILDDIRTOP =$(BUILDDIRTOP)_VC$(VCVER)
+!endif
+
+!if !$(DEBUG) || $(DEBUG) && $(UNCHECKED)
+SUFX = $(SUFX:g=)
+!endif
+
+TMP_DIRFULL = .\$(BUILDDIRTOP)\$(PROJECT)_ThreadedDynamicStaticX
+
+!if !$(STATIC_BUILD)
+TMP_DIRFULL = $(TMP_DIRFULL:Static=)
+SUFX = $(SUFX:s=)
+EXT = dll
+TMP_DIRFULL = $(TMP_DIRFULL:X=)
+SUFX = $(SUFX:x=)
+!else
+TMP_DIRFULL = $(TMP_DIRFULL:Dynamic=)
+EXT = lib
+!if !$(MSVCRT)
+TMP_DIRFULL = $(TMP_DIRFULL:X=)
+SUFX = $(SUFX:x=)
+!endif
+!endif
+
+!if !$(TCL_THREADS)
+TMP_DIRFULL = $(TMP_DIRFULL:Threaded=)
+SUFX = $(SUFX:t=)
+!endif
+
+!ifndef TMP_DIR
+TMP_DIR = $(TMP_DIRFULL)
+!ifndef OUT_DIR
+OUT_DIR = .\$(BUILDDIRTOP)
+!endif
+!else
+!ifndef OUT_DIR
+OUT_DIR = $(TMP_DIR)
+!endif
+!endif
+
+
+#----------------------------------------------------------
+# Decode the statistics requested.
+#----------------------------------------------------------
+
+!if "$(STATS)" == "" || [nmakehlp -f "$(STATS)" "none"]
+TCL_MEM_DEBUG = 0
+TCL_COMPILE_DEBUG = 0
+!else
+!if [nmakehlp -f $(STATS) "memdbg"]
+!message *** Doing memdbg
+TCL_MEM_DEBUG = 1
+!else
+TCL_MEM_DEBUG = 0
+!endif
+!if [nmakehlp -f $(STATS) "compdbg"]
+!message *** Doing compdbg
+TCL_COMPILE_DEBUG = 1
+!else
+TCL_COMPILE_DEBUG = 0
+!endif
+!endif
+
+
+#----------------------------------------------------------
+# Decode the checks requested.
+#----------------------------------------------------------
+
+!if "$(CHECKS)" == "" || [nmakehlp -f "$(CHECKS)" "none"]
+TCL_NO_DEPRECATED = 0
+WARNINGS = -W3
+!else
+!if [nmakehlp -f $(CHECKS) "nodep"]
+!message *** Doing nodep check
+TCL_NO_DEPRECATED = 1
+!else
+TCL_NO_DEPRECATED = 0
+!endif
+!if [nmakehlp -f $(CHECKS) "fullwarn"]
+!message *** Doing full warnings check
+WARNINGS = -W4
+!if [nmakehlp -l -warn:3]
+LINKERFLAGS = $(LINKERFLAGS) -warn:3
+!endif
+!else
+WARNINGS = -W3
+!endif
+!if [nmakehlp -f $(CHECKS) "64bit"] && [nmakehlp -c -Wp64]
+!message *** Doing 64bit portability warnings
+WARNINGS = $(WARNINGS) -Wp64
+!endif
+!endif
+
+!if $(PGO) > 1
+!if [nmakehlp -l -ltcg:pgoptimize]
+LINKERFLAGS = $(LINKERFLAGS:-ltcg=) -ltcg:pgoptimize
+!else
+MSG=^
+This compiler does not support profile guided optimization.
+!error $(MSG)
+!endif
+!elseif $(PGO) > 0
+!if [nmakehlp -l -ltcg:pginstrument]
+LINKERFLAGS = $(LINKERFLAGS:-ltcg=) -ltcg:pginstrument
+!else
+MSG=^
+This compiler does not support profile guided optimization.
+!error $(MSG)
+!endif
+!endif
+
+#----------------------------------------------------------
+# Set our defines now armed with our options.
+#----------------------------------------------------------
+
+OPTDEFINES = -DTCL_CFGVAL_ENCODING=$(CFG_ENCODING) -DSTDC_HEADERS
+
+!if $(TCL_MEM_DEBUG)
+OPTDEFINES = $(OPTDEFINES) -DTCL_MEM_DEBUG
+!endif
+!if $(TCL_COMPILE_DEBUG)
+OPTDEFINES = $(OPTDEFINES) -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS
+!endif
+!if $(TCL_THREADS)
+OPTDEFINES = $(OPTDEFINES) -DTCL_THREADS=1
+!if $(USE_THREAD_ALLOC)
+OPTDEFINES = $(OPTDEFINES) -DUSE_THREAD_ALLOC=1
+!endif
+!endif
+!if $(STATIC_BUILD)
+OPTDEFINES = $(OPTDEFINES) -DSTATIC_BUILD
+!endif
+!if $(TCL_NO_DEPRECATED)
+OPTDEFINES = $(OPTDEFINES) -DTCL_NO_DEPRECATED
+!endif
+
+!if !$(DEBUG)
+OPTDEFINES = $(OPTDEFINES) -DNDEBUG
+!if $(OPTIMIZING)
+OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_OPTIMIZED
+!endif
+!endif
+!if $(PROFILE)
+OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_PROFILED
+!endif
+!if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64"
+OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_DO64BIT
+!endif
+!if $(VCVERSION) < 1300
+OPTDEFINES = $(OPTDEFINES) -DNO_STRTOI64
+!endif
+
+#----------------------------------------------------------
+# Locate the Tcl headers to build against
+#----------------------------------------------------------
+
+!if "$(PROJECT)" == "tcl"
+
+_TCL_H = ..\generic\tcl.h
+
+!else
+
+# If INSTALLDIR set to tcl root dir then reset to the lib dir.
+!if exist("$(_INSTALLDIR)\include\tcl.h")
+_INSTALLDIR=$(_INSTALLDIR)\lib
+!endif
+
+!if !defined(TCLDIR)
+!if exist("$(_INSTALLDIR)\..\include\tcl.h")
+TCLINSTALL = 1
+_TCLDIR = $(_INSTALLDIR)\..
+_TCL_H = $(_INSTALLDIR)\..\include\tcl.h
+TCLDIR = $(_INSTALLDIR)\..
+!else
+MSG=^
+Failed to find tcl.h. Set the TCLDIR macro.
+!error $(MSG)
+!endif
+!else
+_TCLDIR = $(TCLDIR:/=\)
+!if exist("$(_TCLDIR)\include\tcl.h")
+TCLINSTALL = 1
+_TCL_H = $(_TCLDIR)\include\tcl.h
+!elseif exist("$(_TCLDIR)\generic\tcl.h")
+TCLINSTALL = 0
+_TCL_H = $(_TCLDIR)\generic\tcl.h
+!else
+MSG =^
+Failed to find tcl.h. The TCLDIR macro does not appear correct.
+!error $(MSG)
+!endif
+!endif
+!endif
+
+#--------------------------------------------------------------
+# Extract various version numbers from tcl headers
+# The generated file is then included in the makefile.
+#--------------------------------------------------------------
+
+!if [echo REM = This file is generated from rules.vc > versions.vc]
+!endif
+!if [echo TCL_MAJOR_VERSION = \>> versions.vc] \
+ && [nmakehlp -V "$(_TCL_H)" TCL_MAJOR_VERSION >> versions.vc]
+!endif
+!if [echo TCL_MINOR_VERSION = \>> versions.vc] \
+ && [nmakehlp -V "$(_TCL_H)" TCL_MINOR_VERSION >> versions.vc]
+!endif
+!if [echo TCL_PATCH_LEVEL = \>> versions.vc] \
+ && [nmakehlp -V "$(_TCL_H)" TCL_PATCH_LEVEL >> versions.vc]
+!endif
+
+# If building the tcl core then we need additional package versions
+!if "$(PROJECT)" == "tcl"
+!if [echo PKG_HTTP_VER = \>> versions.vc] \
+ && [nmakehlp -V ..\library\http\pkgIndex.tcl http >> versions.vc]
+!endif
+!if [echo PKG_TCLTEST_VER = \>> versions.vc] \
+ && [nmakehlp -V ..\library\tcltest\pkgIndex.tcl tcltest >> versions.vc]
+!endif
+!if [echo PKG_MSGCAT_VER = \>> versions.vc] \
+ && [nmakehlp -V ..\library\msgcat\pkgIndex.tcl msgcat >> versions.vc]
+!endif
+!if [echo PKG_PLATFORM_VER = \>> versions.vc] \
+ && [nmakehlp -V ..\library\platform\pkgIndex.tcl "platform " >> versions.vc]
+!endif
+!if [echo PKG_SHELL_VER = \>> versions.vc] \
+ && [nmakehlp -V ..\library\platform\pkgIndex.tcl "platform::shell" >> versions.vc]
+!endif
+!if [echo PKG_DDE_VER = \>> versions.vc] \
+ && [nmakehlp -V ..\library\dde\pkgIndex.tcl "dde " >> versions.vc]
+!endif
+!if [echo PKG_REG_VER =\>> versions.vc] \
+ && [nmakehlp -V ..\library\reg\pkgIndex.tcl registry >> versions.vc]
+!endif
+!endif
+
+!include versions.vc
+
+#--------------------------------------------------------------
+# Setup tcl version dependent stuff headers
+#--------------------------------------------------------------
+
+!if "$(PROJECT)" != "tcl"
+
+TCL_VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION)
+
+!if $(TCLINSTALL)
+TCLSH = "$(_TCLDIR)\bin\tclsh$(TCL_VERSION)$(SUFX).exe"
+!if !exist($(TCLSH))
+TCLSH = "$(_TCLDIR)\bin\tclsh$(TCL_VERSION)$(SUFX:x=).exe"
+!endif
+TCLSTUBLIB = "$(_TCLDIR)\lib\tclstub$(TCL_VERSION).lib"
+TCLIMPLIB = "$(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX).lib"
+!if !exist($(TCLIMPLIB))
+TCLIMPLIB = "$(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX:x=).lib"
+!endif
+TCL_LIBRARY = $(_TCLDIR)\lib
+TCLREGLIB = "$(_TCLDIR)\lib\tclreg13$(SUFX:t=).lib"
+TCLDDELIB = "$(_TCLDIR)\lib\tcldde14$(SUFX:t=).lib"
+COFFBASE = \must\have\tcl\sources\to\build\this\target
+TCLTOOLSDIR = \must\have\tcl\sources\to\build\this\target
+TCL_INCLUDES = -I"$(_TCLDIR)\include"
+!else
+TCLSH = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)$(SUFX).exe"
+!if !exist($(TCLSH))
+TCLSH = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)$(SUFX:x=).exe"
+!endif
+TCLSTUBLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub$(TCL_VERSION).lib"
+TCLIMPLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX).lib"
+!if !exist($(TCLIMPLIB))
+TCLIMPLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX:x=).lib"
+!endif
+TCL_LIBRARY = $(_TCLDIR)\library
+TCLREGLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclreg13$(SUFX:t=).lib"
+TCLDDELIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde14$(SUFX:t=).lib"
+COFFBASE = "$(_TCLDIR)\win\coffbase.txt"
+TCLTOOLSDIR = $(_TCLDIR)\tools
+TCL_INCLUDES = -I"$(_TCLDIR)\generic" -I"$(_TCLDIR)\win"
+!endif
+
+!endif
+
+#-------------------------------------------------------------------------
+# Locate the Tk headers to build against
+#-------------------------------------------------------------------------
+
+!if "$(PROJECT)" == "tk"
+_TK_H = ..\generic\tk.h
+_INSTALLDIR = $(_INSTALLDIR)\..
+!endif
+
+!ifdef PROJECT_REQUIRES_TK
+!if !defined(TKDIR)
+!if exist("$(_INSTALLDIR)\..\include\tk.h")
+TKINSTALL = 1
+_TKDIR = $(_INSTALLDIR)\..
+_TK_H = $(_TKDIR)\include\tk.h
+TKDIR = $(_TKDIR)
+!elseif exist("$(_TCLDIR)\include\tk.h")
+TKINSTALL = 1
+_TKDIR = $(_TCLDIR)
+_TK_H = $(_TKDIR)\include\tk.h
+TKDIR = $(_TKDIR)
+!endif
+!else
+_TKDIR = $(TKDIR:/=\)
+!if exist("$(_TKDIR)\include\tk.h")
+TKINSTALL = 1
+_TK_H = $(_TKDIR)\include\tk.h
+!elseif exist("$(_TKDIR)\generic\tk.h")
+TKINSTALL = 0
+_TK_H = $(_TKDIR)\generic\tk.h
+!else
+MSG =^
+Failed to find tk.h. The TKDIR macro does not appear correct.
+!error $(MSG)
+!endif
+!endif
+!endif
+
+#-------------------------------------------------------------------------
+# Extract Tk version numbers
+#-------------------------------------------------------------------------
+
+!if defined(PROJECT_REQUIRES_TK) || "$(PROJECT)" == "tk"
+
+!if [echo TK_MAJOR_VERSION = \>> versions.vc] \
+ && [nmakehlp -V $(_TK_H) TK_MAJOR_VERSION >> versions.vc]
+!endif
+!if [echo TK_MINOR_VERSION = \>> versions.vc] \
+ && [nmakehlp -V $(_TK_H) TK_MINOR_VERSION >> versions.vc]
+!endif
+!if [echo TK_PATCH_LEVEL = \>> versions.vc] \
+ && [nmakehlp -V $(_TK_H) TK_PATCH_LEVEL >> versions.vc]
+!endif
+
+!include versions.vc
+
+TK_DOTVERSION = $(TK_MAJOR_VERSION).$(TK_MINOR_VERSION)
+TK_VERSION = $(TK_MAJOR_VERSION)$(TK_MINOR_VERSION)
+
+!if "$(PROJECT)" != "tk"
+!if $(TKINSTALL)
+WISH = "$(_TKDIR)\bin\wish$(TK_VERSION)$(SUFX).exe"
+!if !exist($(WISH))
+WISH = "$(_TKDIR)\bin\wish$(TK_VERSION)$(SUFX:x=).exe"
+!endif
+TKSTUBLIB = "$(_TKDIR)\lib\tkstub$(TK_VERSION).lib"
+TKIMPLIB = "$(_TKDIR)\lib\tk$(TK_VERSION)$(SUFX).lib"
+!if !exist($(TKIMPLIB))
+TKIMPLIB = "$(_TKDIR)\win\$(BUILDDIRTOP)\tk$(TCL_VERSION)$(SUFX:x=).lib"
+!endif
+TK_INCLUDES = -I"$(_TKDIR)\include"
+!else
+WISH = "$(_TKDIR)\win\$(BUILDDIRTOP)\wish$(TCL_VERSION)$(SUFX).exe"
+!if !exist($(WISH))
+WISH = "$(_TKDIR)\win\$(BUILDDIRTOP)\wish$(TCL_VERSION)$(SUFX:x=).exe"
+!endif
+TKSTUBLIB = "$(_TKDIR)\win\$(BUILDDIRTOP)\tkstub$(TCL_VERSION).lib"
+TKIMPLIB = "$(_TKDIR)\win\$(BUILDDIRTOP)\tk$(TCL_VERSION)$(SUFX).lib"
+!if !exist($(TKIMPLIB))
+TKIMPLIB = "$(_TKDIR)\win\$(BUILDDIRTOP)\tk$(TCL_VERSION)$(SUFX:x=).lib"
+!endif
+TK_INCLUDES = -I"$(_TKDIR)\generic" -I"$(_TKDIR)\win" -I"$(_TKDIR)\xlib"
+!endif
+!endif
+
+!endif
+
+#----------------------------------------------------------
+# Display stats being used.
+#----------------------------------------------------------
+
+!message *** Intermediate directory will be '$(TMP_DIR)'
+!message *** Output directory will be '$(OUT_DIR)'
+!message *** Suffix for binaries will be '$(SUFX)'
+!message *** Optional defines are '$(OPTDEFINES)'
+!message *** Compiler version $(VCVER). Target machine is $(MACHINE)
+!message *** Host architecture is $(NATIVE_ARCH)
+!message *** Compiler options '$(COMPILERFLAGS) $(OPTIMIZATIONS) $(DEBUGFLAGS) $(WARNINGS)'
+!message *** Link options '$(LINKERFLAGS)'
+
+!endif
diff --git a/win/tcl.m4 b/win/tcl.m4
index d12ae10..d1fb11c 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -559,7 +559,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
EXTRA_CFLAGS=""
AC_DEFINE(MODULE_SCOPE, [extern], [No need to mark inidividual symbols as hidden])
- AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
+ AC_CHECK_PROG(CYGPATH, cygpath, cygpath -m, echo)
SHLIB_SUFFIX=".dll"
@@ -673,7 +673,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
if test "${GCC}" = "yes" ; then
SHLIB_LD=""
SHLIB_LD_LIBS='${LIBS}'
- LIBS="-lnetapi32 -lkernel32 -luser32 -ladvapi32 -lws2_32"
+ LIBS="-lnetapi32 -lkernel32 -luser32 -ladvapi32 -luserenv -lws2_32"
# mingw needs to link ole32 and oleaut32 for [send], but MSVC doesn't
LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -luuid -lole32 -loleaut32"
STLIB_LD='${AR} cr'
@@ -727,7 +727,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
- CFLAGS_WARNING="-Wall -Wdeclaration-after-statement"
+ CFLAGS_WARNING="-Wall -Wsign-compare -Wdeclaration-after-statement"
LDFLAGS_DEBUG=
LDFLAGS_OPTIMIZE=
@@ -791,6 +791,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
# Add SHLIB_LD_LIBS to the Make rule, not here.
LIBRARIES="\${SHARED_LIBRARIES}"
EXESUFFIX="\${DBGX}.exe"
+ case "x`echo \${VisualStudioVersion}`" in
+ x1[[4-9]]*)
+ lflags="${lflags} -nodefaultlib:libucrt.lib"
+ ;;
+ *)
+ ;;
+ esac
fi
MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\[$]@"
# DLLSUFFIX is separate because it is the building block for
@@ -819,15 +826,21 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
;;
esac
if test ! -d "${PATH64}" ; then
- AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode])
- AC_MSG_WARN([Ensure latest Platform SDK is installed])
- do64bit="no"
- else
- AC_MSG_RESULT([ Using 64-bit $MACHINE mode])
+ AC_MSG_WARN([Could not find 64-bit $MACHINE SDK])
fi
+ AC_MSG_RESULT([ Using 64-bit $MACHINE mode])
fi
- LIBS="netapi32.lib kernel32.lib user32.lib advapi32.lib ws2_32.lib"
+ LIBS="netapi32.lib kernel32.lib user32.lib advapi32.lib userenv.lib ws2_32.lib"
+
+ case "x`echo \${VisualStudioVersion}`" in
+ x1[[4-9]]*)
+ LIBS="$LIBS ucrt.lib"
+ ;;
+ *)
+ ;;
+ esac
+
if test "$do64bit" != "no" ; then
# The space-based-path will work for the Makefile, but will
# not work if AC_TRY_COMPILE is called. TEA has the
@@ -842,7 +855,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d"
# Do not use -O2 for Win64 - this has proved buggy in code gen.
CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}"
- lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
+ lflags="${lflags} -nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
LINKBIN="\"${PATH64}/link.exe\""
# Avoid 'unresolved external symbol __security_cookie' errors.
# c.f. http://support.microsoft.com/?id=894573
@@ -854,7 +867,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d"
# -O2 - create fast code (/Og /Oi /Ot /Oy /Ob2 /Gs /GF /Gy)
CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}"
- lflags="-nologo"
+ lflags="${lflags} -nologo"
LINKBIN="link"
fi
@@ -1113,13 +1126,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.6+ 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)
diff --git a/win/tkConfig.sh.in b/win/tkConfig.sh.in
index 7816b15..c511312 100644
--- a/win/tkConfig.sh.in
+++ b/win/tkConfig.sh.in
@@ -1,5 +1,5 @@
# tkConfig.sh --
-#
+#
# This shell script (for sh) is generated automatically by Tk's
# configure script. It will create shell variables for most of
# the configuration options discovered by the configure script.
diff --git a/win/tkWinClipboard.c b/win/tkWinClipboard.c
index 2501688..200883f 100644
--- a/win/tkWinClipboard.c
+++ b/win/tkWinClipboard.c
@@ -12,6 +12,7 @@
#include "tkWinInt.h"
#include "tkSelect.h"
+#include <shlobj.h> /* for DROPFILES */
static void UpdateClipboard(HWND hwnd);
@@ -52,7 +53,7 @@ TkSelGetSelection(
Tcl_DString ds;
HGLOBAL handle;
Tcl_Encoding encoding;
- int result, locale;
+ int result, locale, noBackslash = 0;
if ((selection != Tk_InternAtom(tkwin, "CLIPBOARD"))
|| (target != XA_STRING)
@@ -132,7 +133,37 @@ TkSelGetSelection(
if (encoding) {
Tcl_FreeEncoding(encoding);
}
+ } else if (IsClipboardFormatAvailable(CF_HDROP)) {
+ DROPFILES *drop;
+ handle = GetClipboardData(CF_HDROP);
+ if (!handle) {
+ CloseClipboard();
+ goto error;
+ }
+ Tcl_DStringInit(&ds);
+ drop = (DROPFILES *) GlobalLock(handle);
+ if (drop->fWide) {
+ WCHAR *fname = (WCHAR *) ((char *) drop + drop->pFiles);
+ Tcl_DString dsTmp;
+ int count = 0, len;
+
+ while (*fname != 0) {
+ if (count) {
+ Tcl_DStringAppend(&ds, "\n", 1);
+ }
+ len = Tcl_UniCharLen((Tcl_UniChar *) fname);
+ Tcl_DStringInit(&dsTmp);
+ Tcl_UniCharToUtfDString((Tcl_UniChar *) fname, len, &dsTmp);
+ Tcl_DStringAppend(&ds, Tcl_DStringValue(&dsTmp),
+ Tcl_DStringLength(&dsTmp));
+ Tcl_DStringFree(&dsTmp);
+ fname += len + 1;
+ count++;
+ }
+ noBackslash = (count > 0);
+ }
+ GlobalUnlock(handle);
} else {
CloseClipboard();
goto error;
@@ -146,6 +177,9 @@ TkSelGetSelection(
while (*data) {
if (data[0] == '\r' && data[1] == '\n') {
data++;
+ } else if (noBackslash && data[0] == '\\') {
+ data++;
+ *destPtr++ = '/';
} else {
*destPtr++ = *data++;
}
diff --git a/win/tkWinColor.c b/win/tkWinColor.c
index 5eaeeb3..ba9815c 100644
--- a/win/tkWinColor.c
+++ b/win/tkWinColor.c
@@ -316,7 +316,8 @@ XAllocColor(
if (GetDeviceCaps(dc, RASTERCAPS) & RC_PALETTE) {
unsigned long sizePalette = GetDeviceCaps(dc, SIZEPALETTE);
UINT newPixel, closePixel;
- int new, refCount;
+ int new;
+ size_t refCount;
Tcl_HashEntry *entryPtr;
UINT index;
@@ -361,9 +362,9 @@ XAllocColor(
if (new) {
refCount = 1;
} else {
- refCount = (PTR2INT(Tcl_GetHashValue(entryPtr))) + 1;
+ refCount = (size_t)Tcl_GetHashValue(entryPtr) + 1;
}
- Tcl_SetHashValue(entryPtr, INT2PTR(refCount));
+ Tcl_SetHashValue(entryPtr, (void *)refCount);
} else {
/*
* Determine what color will actually be used on non-colormap systems.
@@ -407,7 +408,8 @@ XFreeColors(
{
TkWinColormap *cmap = (TkWinColormap *) colormap;
COLORREF cref;
- UINT count, index, refCount;
+ UINT count, index;
+ size_t refCount;
int i;
PALETTEENTRY entry, *entries;
Tcl_HashEntry *entryPtr;
@@ -427,7 +429,7 @@ XFreeColors(
if (!entryPtr) {
Tcl_Panic("Tried to free a color that isn't allocated");
}
- refCount = PTR2INT(Tcl_GetHashValue(entryPtr)) - 1;
+ refCount = (size_t)Tcl_GetHashValue(entryPtr) - 1;
if (refCount == 0) {
cref = pixels[i] & 0x00ffffff;
index = GetNearestPaletteIndex(cmap->palette, cref);
@@ -444,7 +446,7 @@ XFreeColors(
}
Tcl_DeleteHashEntry(entryPtr);
} else {
- Tcl_SetHashValue(entryPtr, INT2PTR(refCount));
+ Tcl_SetHashValue(entryPtr, (size_t)refCount);
}
}
}
diff --git a/win/tkWinDefault.h b/win/tkWinDefault.h
index 11c3e6d..f389075 100644
--- a/win/tkWinDefault.h
+++ b/win/tkWinDefault.h
@@ -224,6 +224,7 @@
#define DEF_LISTBOX_HIGHLIGHT_BG NORMAL_BG
#define DEF_LISTBOX_HIGHLIGHT HIGHLIGHT
#define DEF_LISTBOX_HIGHLIGHT_WIDTH "1"
+#define DEF_LISTBOX_JUSTIFY "left"
#define DEF_LISTBOX_RELIEF "sunken"
#define DEF_LISTBOX_SCROLL_COMMAND ""
#define DEF_LISTBOX_LIST_VARIABLE ""
@@ -370,6 +371,7 @@
#define DEF_PANEDWINDOW_HEIGHT ""
#define DEF_PANEDWINDOW_OPAQUERESIZE "1"
#define DEF_PANEDWINDOW_ORIENT "horizontal"
+#define DEF_PANEDWINDOW_PROXYBORDER "2"
#define DEF_PANEDWINDOW_RELIEF "flat"
#define DEF_PANEDWINDOW_SASHCURSOR ""
#define DEF_PANEDWINDOW_SASHPAD "0"
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index c137111..a7d8c7d 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -18,7 +18,6 @@
#include <cderr.h> /* includes the common dialog error codes */
#include <shlobj.h> /* includes SHBrowseForFolder */
-#include <shobjidl.h>
#ifdef _MSC_VER
# pragma comment (lib, "shell32.lib")
@@ -675,19 +674,25 @@ static void LoadShellProcs()
* processing functions are used to cope with keyboard navigation of
* controls.)
*
- * Here is one solution. After returning, we poll the message queue for
- * 1/4s looking for WM_LBUTTON up messages. If we see one it's consumed.
- * If we get a WM_LBUTTONDOWN message, then we exit early, since the user
- * must be doing something new. This fix only works for the current
- * application, so the problem will still occur if the open dialog
- * happens to be over another applications button. However this is a
- * fairly rare occurrance.
+ * Here is one solution. After returning, we flush all mouse events
+ * for 1/4 second. In 8.6.5 and earlier, the code used to
+ * poll the message queue consuming WM_LBUTTONUP messages.
+ * On seeing a WM_LBUTTONDOWN message, it would exit early, since the user
+ * must be doing something new. However this early exit does not work
+ * on Vista and later because the Windows sends both BUTTONDOWN and
+ * BUTTONUP after the DBLCLICK instead of just BUTTONUP as on XP.
+ * Rather than try and figure out version specific sequences, we
+ * ignore all mouse events in that interval.
+ *
+ * This fix only works for the current application, so the problem will
+ * still occur if the open dialog happens to be over another applications
+ * button. However this is a fairly rare occurrance.
*
* Results:
* None.
*
* Side effects:
- * Consumes an unwanted BUTTON messages.
+ * Consumes unwanted mouse related messages.
*
*-------------------------------------------------------------------------
*/
@@ -699,10 +704,7 @@ EatSpuriousMessageBugFix(void)
DWORD nTime = GetTickCount() + 250;
while (GetTickCount() < nTime) {
- if (PeekMessageA(&msg, 0, WM_LBUTTONDOWN, WM_LBUTTONDOWN, PM_NOREMOVE)){
- break;
- }
- PeekMessageA(&msg, 0, WM_LBUTTONUP, WM_LBUTTONUP, PM_REMOVE);
+ PeekMessage(&msg, 0, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE);
}
}
@@ -1103,7 +1105,7 @@ ParseOFNOptions(
for (i = 1; i < objc; i += 2) {
int index;
const char *string;
- Tcl_Obj *valuePtr = objv[i + 1];
+ Tcl_Obj *valuePtr;
if (Tcl_GetIndexFromObjStruct(interp, objv[i], options,
sizeof(struct Options), "option", 0, &index) != TCL_OK) {
@@ -1113,19 +1115,25 @@ ParseOFNOptions(
*/
if (strcmp(Tcl_GetString(objv[i]), "-xpstyle"))
goto error_return;
- if (Tcl_GetBooleanFromObj(interp, valuePtr,
+ if (i + 1 == objc) {
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("value for \"-xpstyle\" missing", -1));
+ Tcl_SetErrorCode(interp, "TK", "FILEDIALOG", "VALUE", NULL);
+ goto error_return;
+ }
+ if (Tcl_GetBooleanFromObj(interp, objv[i+1],
&optsPtr->forceXPStyle) != TCL_OK)
goto error_return;
continue;
} else if (i + 1 == objc) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "value for \"%s\" missing", options[index].name));
- Tcl_SetErrorCode(interp, "TK", "FILEDIALOG", "VALUE", NULL);
- goto error_return;
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "value for \"%s\" missing", options[index].name));
+ Tcl_SetErrorCode(interp, "TK", "FILEDIALOG", "VALUE", NULL);
+ goto error_return;
}
+ valuePtr = objv[i + 1];
string = Tcl_GetString(valuePtr);
switch (options[index].value) {
case FILE_DEFAULT:
@@ -1186,6 +1194,7 @@ error_return: /* interp should already hold error */
/* On error, we need to clean up anything we might have allocated */
CleanupOFNOptions(optsPtr);
return TCL_ERROR;
+
}
@@ -1275,9 +1284,8 @@ static int GetFileNameVista(Tcl_Interp *interp, OFNOpts *optsPtr,
int oldMode;
if (tsdPtr->newFileDialogsState != FDLG_STATE_USE_NEW) {
- /* XXX - should be an assert but Tcl does not seem to have one? */
- Tcl_SetResult(interp, "Internal error: GetFileNameVista: IFileDialog API not available", TCL_STATIC);
- return TCL_ERROR;
+ Tcl_Panic("Internal error: GetFileNameVista: IFileDialog API not available");
+ return TCL_ERROR;
}
/*
@@ -1323,7 +1331,11 @@ static int GetFileNameVista(Tcl_Interp *interp, OFNOpts *optsPtr,
goto vamoose;
if (filterPtr) {
- flags |= FOS_STRICTFILETYPES;
+ /*
+ * Causes -filetypes {{All *}} -defaultextension ext to return
+ * foo.ext.ext when foo is typed into the entry box
+ * flags |= FOS_STRICTFILETYPES;
+ */
hr = fdlgIf->lpVtbl->SetFileTypes(fdlgIf, nfilters, filterPtr);
if (FAILED(hr))
goto vamoose;
@@ -1389,23 +1401,33 @@ static int GetFileNameVista(Tcl_Interp *interp, OFNOpts *optsPtr,
}
if (Tcl_DStringValue(&optsPtr->utfDirString)[0] != '\0') {
- Tcl_DString dirString;
- Tcl_WinUtfToTChar(Tcl_DStringValue(&optsPtr->utfDirString),
- Tcl_DStringLength(&optsPtr->utfDirString), &dirString);
- hr = ShellProcs.SHCreateItemFromParsingName(
- (TCHAR *) Tcl_DStringValue(&dirString), NULL,
- &IIDIShellItem, (void **) &dirIf);
- /* XXX - Note on failure we do not raise error, simply ignore ini dir */
- if (SUCCEEDED(hr)) {
- /* Note we use SetFolder, not SetDefaultFolder - see MSDN docs */
- fdlgIf->lpVtbl->SetFolder(fdlgIf, dirIf); /* Ignore errors */
+ Tcl_Obj *normPath, *iniDirPath;
+ iniDirPath = Tcl_NewStringObj(Tcl_DStringValue(&optsPtr->utfDirString), -1);
+ Tcl_IncrRefCount(iniDirPath);
+ normPath = Tcl_FSGetNormalizedPath(interp, iniDirPath);
+ /* XXX - Note on failures do not raise error, simply ignore ini dir */
+ if (normPath) {
+ const WCHAR *nativePath;
+ Tcl_IncrRefCount(normPath);
+ nativePath = Tcl_FSGetNativePath(normPath); /* Points INTO normPath*/
+ if (nativePath) {
+ hr = ShellProcs.SHCreateItemFromParsingName(
+ nativePath, NULL,
+ &IIDIShellItem, (void **) &dirIf);
+ if (SUCCEEDED(hr)) {
+ /* Note we use SetFolder, not SetDefaultFolder - see MSDN */
+ fdlgIf->lpVtbl->SetFolder(fdlgIf, dirIf); /* Ignore errors */
+ }
+ }
+ Tcl_DecrRefCount(normPath); /* ALSO INVALIDATES nativePath !! */
}
- Tcl_DStringFree(&dirString);
+ Tcl_DecrRefCount(iniDirPath);
}
oldMode = Tcl_SetServiceMode(TCL_SERVICE_ALL);
hr = fdlgIf->lpVtbl->Show(fdlgIf, hWnd);
Tcl_SetServiceMode(oldMode);
+ EatSpuriousMessageBugFix();
/*
* Ensure that hWnd is enabled, because it can happen that we have updated
@@ -3126,13 +3148,13 @@ HookProc(
if (IsWindow(hwndCtrl)) {
EnableWindow(hwndCtrl, FALSE);
}
- TkSendVirtualEvent(phd->parent, "TkFontchooserVisibility");
+ TkSendVirtualEvent(phd->parent, "TkFontchooserVisibility", NULL);
return 1; /* we handled the message */
}
if (WM_DESTROY == msg) {
phd->hwnd = NULL;
- TkSendVirtualEvent(phd->parent, "TkFontchooserVisibility");
+ TkSendVirtualEvent(phd->parent, "TkFontchooserVisibility", NULL);
return 0;
}
@@ -3150,7 +3172,7 @@ HookProc(
ApplyLogfont(phd->interp, phd->cmdObj, hdc, &lf);
}
if (phd && phd->parent) {
- TkSendVirtualEvent(phd->parent, "TkFontchooserFontChanged");
+ TkSendVirtualEvent(phd->parent, "TkFontchooserFontChanged", NULL);
}
return 1;
}
@@ -3462,7 +3484,7 @@ FontchooserShowCmd(
ApplyLogfont(hdPtr->interp, hdPtr->cmdObj, hdc, &lf);
}
if (hdPtr->parent) {
- TkSendVirtualEvent(hdPtr->parent, "TkFontchooserFontChanged");
+ TkSendVirtualEvent(hdPtr->parent, "TkFontchooserFontChanged", NULL);
}
}
Tcl_SetServiceMode(oldMode);
diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c
index 42809cc..8bfd295 100644
--- a/win/tkWinEmbed.c
+++ b/win/tkWinEmbed.c
@@ -257,10 +257,13 @@ TkpUseWindow(
return TCL_OK;
}
- if (Tcl_GetInt(interp, string, &id) != TCL_OK) {
+ if (
+#ifdef _WIN64
+ (sscanf(string, "0x%p", &hwnd) != 1) &&
+#endif
+ Tcl_GetInt(interp, string, (int *) &hwnd) != TCL_OK) {
return TCL_ERROR;
}
- hwnd = (HWND) INT2PTR(id);
if ((HWND)winPtr->privatePtr == hwnd) {
return TCL_OK;
}
diff --git a/win/tkWinFont.c b/win/tkWinFont.c
index 86f63ac..021ae1c 100644
--- a/win/tkWinFont.c
+++ b/win/tkWinFont.c
@@ -26,14 +26,14 @@
* Under Windows, a "font family" is uniquely identified by its face name.
*/
-#define FONTMAP_SHIFT 10
+#define FONTMAP_SHIFT 12
-#define FONTMAP_PAGES (1 << (sizeof(Tcl_UniChar)*8 - FONTMAP_SHIFT))
+#define FONTMAP_PAGES (1 << (21 - FONTMAP_SHIFT))
#define FONTMAP_BITSPERPAGE (1 << FONTMAP_SHIFT)
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. */
/*
@@ -743,7 +743,7 @@ void
TkpGetFontAttrsForChar(
Tk_Window tkwin, /* Window on the font's display */
Tk_Font tkfont, /* Font to query */
- Tcl_UniChar c, /* Character of interest */
+ int c, /* Character of interest */
TkFontAttributes *faPtr) /* Output: Font attributes */
{
WinFont *fontPtr = (WinFont *) tkfont;
@@ -828,7 +828,7 @@ Tk_MeasureChars(
HFONT oldFont;
WinFont *fontPtr;
int curX, moretomeasure;
- Tcl_UniChar ch;
+ int ch;
SIZE size;
FontFamily *familyPtr;
Tcl_DString runString;
@@ -859,7 +859,7 @@ Tk_MeasureChars(
start = source;
end = start + numBytes;
for (p = start; p < end; ) {
- next = p + Tcl_UtfToUniChar(p, &ch);
+ next = p + TkUtfToUniChar(p, &ch);
thisSubFontPtr = FindSubFontForChar(fontPtr, ch, &lastSubFontPtr);
if (thisSubFontPtr != lastSubFontPtr) {
familyPtr = lastSubFontPtr->familyPtr;
@@ -921,7 +921,7 @@ Tk_MeasureChars(
familyPtr = lastSubFontPtr->familyPtr;
Tcl_DStringInit(&runString);
for (p = start; p < end; ) {
- next = p + Tcl_UtfToUniChar(p, &ch);
+ next = p + TkUtfToUniChar(p, &ch);
Tcl_UtfToExternal(NULL, familyPtr->encoding, p,
(int) (next - p), 0, NULL, buf, sizeof(buf), NULL,
&dstWrote, NULL);
@@ -970,13 +970,13 @@ Tk_MeasureChars(
*/
const char *lastWordBreak = NULL;
- Tcl_UniChar ch2;
+ int ch2;
end = p;
p = source;
ch = ' ';
while (p < end) {
- next = p + Tcl_UtfToUniChar(p, &ch2);
+ next = p + TkUtfToUniChar(p, &ch2);
if ((ch != ' ') && (ch2 == ' ')) {
lastWordBreak = p;
}
@@ -1443,7 +1443,7 @@ MultiFontTextOut(
* string when drawing. */
double angle)
{
- Tcl_UniChar ch;
+ int ch;
SIZE size;
HFONT oldFont;
FontFamily *familyPtr;
@@ -1458,7 +1458,7 @@ MultiFontTextOut(
end = source + numBytes;
for (p = source; p < end; ) {
- next = p + Tcl_UtfToUniChar(p, &ch);
+ next = p + TkUtfToUniChar(p, &ch);
thisSubFontPtr = FindSubFontForChar(fontPtr, ch, &lastSubFontPtr);
if (thisSubFontPtr != lastSubFontPtr) {
if (p > source) {
@@ -1869,8 +1869,7 @@ FreeFontFamily(
if (familyPtr == NULL) {
return;
}
- familyPtr->refCount--;
- if (familyPtr->refCount > 0) {
+ if (familyPtr->refCount-- > 1) {
return;
}
for (i = 0; i < FONTMAP_PAGES; i++) {
@@ -2189,7 +2188,7 @@ FontMapLoadPage(
{
FontFamily *familyPtr;
Tcl_Encoding encoding;
- char src[TCL_UTF_MAX], buf[16];
+ char src[XMaxTransChars], buf[16];
USHORT *startCount, *endCount;
int i, j, bitOffset, end, segCount;
diff --git a/win/tkWinKey.c b/win/tkWinKey.c
index ed546f7..31faea0 100644
--- a/win/tkWinKey.c
+++ b/win/tkWinKey.c
@@ -88,6 +88,8 @@ TkpGetString(
* result. */
{
XKeyEvent *keyEv = &eventPtr->xkey;
+ char buf[6];
+ int len;
Tcl_DStringInit(dsPtr);
if (keyEv->send_event == -1) {
@@ -95,30 +97,14 @@ TkpGetString(
Tcl_ExternalToUtfDString(TkWinGetKeyInputEncoding(),
keyEv->trans_chars, keyEv->nbytes, dsPtr);
}
- } else if (keyEv->send_event == -2) {
- /*
- * Special case for win2000 multi-lingal IME input. xkey.trans_chars[]
- * already contains a UNICODE char.
- */
-
- int unichar;
- char buf[TCL_UTF_MAX];
- int len;
-
- unichar = keyEv->trans_chars[1] & 0xff;
- unichar <<= 8;
- unichar |= keyEv->trans_chars[0] & 0xff;
-
- len = Tcl_UniCharToUtf((Tcl_UniChar) unichar, buf);
-
- Tcl_DStringAppend(dsPtr, buf, len);
} else if (keyEv->send_event == -3) {
+
/*
- * Special case for WM_UNICHAR. xkey.trans_chars[] already contains a
- * UTF-8 char.
+ * Special case for WM_UNICHAR and win2000 multi-lingal IME input
*/
- Tcl_DStringAppend(dsPtr, keyEv->trans_chars, keyEv->nbytes);
+ len = TkUniCharToUtf(keyEv->keycode, buf);
+ Tcl_DStringAppend(dsPtr, buf, len);
} else {
/*
* This is an event generated from generic code. It has no nchars or
@@ -129,9 +115,6 @@ TkpGetString(
if (((keysym != NoSymbol) && (keysym > 0) && (keysym < 256))
|| (keysym == XK_Return) || (keysym == XK_Tab)) {
- char buf[TCL_UTF_MAX];
- int len;
-
len = Tcl_UniCharToUtf((Tcl_UniChar) (keysym & 255), buf);
Tcl_DStringAppend(dsPtr, buf, len);
}
@@ -335,18 +318,24 @@ KeycodeToKeysym(
/*
* Windows only gives us an undifferentiated VK_CONTROL code (for
* example) when either Control key is pressed. To distinguish between
- * left and right, we have to query the state of one of the two to
- * determine which was actually pressed. So if the keycode indicates
- * Control, Shift, or Menu (the key that everybody else calls Alt), do
- * this extra test. If the right-side key was pressed, return the
- * appropriate keycode. Otherwise, we fall through and rely on the
- * keymap table to hold the correct keysym value.
+ * left and right, we use the Extended flag. Indeed, the right Control
+ * and Alt (aka Menu) keys are such extended keys (which their left
+ * counterparts are not).
+ * Regarding the shift case, Windows does not set the Extended flag for
+ * the neither the left nor the right shift key. As a consequence another
+ * way to distinguish between the two keys is to query the state of one
+ * of the two to determine which was actually pressed. So if the keycode
+ * indicates Shift, do this extra test. If the right-side key was
+ * pressed, return the appropriate keycode. Otherwise, we fall through
+ * and rely on the keymap table to hold the correct keysym value.
+ * Note: this little trick only works for KeyPress, not for KeyRelease,
+ * for reasons stated in bug [2945130]
*/
case VK_CONTROL:
- if (GetKeyState(VK_RCONTROL) & 0x80) {
- return XK_Control_R;
- }
+ if (state & EXTENDED_MASK) {
+ return XK_Control_R;
+ }
break;
case VK_SHIFT:
if (GetKeyState(VK_RSHIFT) & 0x80) {
@@ -354,9 +343,9 @@ KeycodeToKeysym(
}
break;
case VK_MENU:
- if (GetKeyState(VK_RMENU) & 0x80) {
- return XK_Alt_R;
- }
+ if (state & EXTENDED_MASK) {
+ return XK_Alt_R;
+ }
break;
}
return keymap[keycode];
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index 4593928..8e14669 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -155,7 +155,7 @@ static void DrawWindowsSystemBitmap(Display *display,
Drawable drawable, GC gc, const RECT *rectPtr,
int bitmapID, int alignFlags);
static void FreeID(WORD commandID);
-static char * GetEntryText(TkMenuEntry *mePtr);
+static char * GetEntryText(TkMenu *menuPtr, TkMenuEntry *mePtr);
static void GetMenuAccelGeometry(TkMenu *menuPtr,
TkMenuEntry *mePtr, Tk_Font tkfont,
const Tk_FontMetrics *fmPtr, int *widthPtr,
@@ -486,6 +486,7 @@ TkpDestroyMenuEntry(
static char *
GetEntryText(
+ TkMenu *menuPtr, /* The menu considered. */
TkMenuEntry *mePtr) /* A pointer to the menu entry. */
{
char *itemText;
@@ -506,7 +507,7 @@ GetEntryText(
int i;
const char *label = (mePtr->labelPtr == NULL) ? ""
: Tcl_GetString(mePtr->labelPtr);
- const char *accel = (mePtr->accelPtr == NULL) ? ""
+ const char *accel = ((menuPtr->menuType == MENUBAR) || (mePtr->accelPtr == NULL)) ? ""
: Tcl_GetString(mePtr->accelPtr);
const char *p, *next;
Tcl_DString itemString;
@@ -605,7 +606,7 @@ ReconfigureWindowsMenu(
continue;
}
- itemText = GetEntryText(mePtr);
+ itemText = GetEntryText(menuPtr, mePtr);
if ((menuPtr->menuType == MENUBAR)
|| (menuPtr->menuFlags & MENU_SYSTEM_MENU)) {
Tcl_WinUtfToTChar(itemText, -1, &translatedText);
@@ -1287,7 +1288,17 @@ TkWinHandleMenuEvent(
if (menuPtr != NULL) {
long entryIndex = LOWORD(*pwParam);
- mePtr = NULL;
+ if ((menuPtr->menuType == MENUBAR) && menuPtr->tearoff) {
+ /*
+ * Windows passes the entry index starting at 0 for
+ * the first menu entry. However this entry #0 is the
+ * tearoff entry for Tk (the menu has -tearoff 1),
+ * which is ignored for MENUBAR menues on Windows.
+ */
+
+ entryIndex++;
+ }
+ mePtr = NULL;
if (flags != 0xFFFF) {
if ((flags&MF_POPUP) && (entryIndex<menuPtr->numEntries)) {
mePtr = menuPtr->entries[entryIndex];
@@ -1502,12 +1513,12 @@ GetMenuAccelGeometry(
*heightPtr = fmPtr->linespace;
if (mePtr->type == CASCADE_ENTRY) {
*widthPtr = 0;
- } else if (mePtr->accelPtr == NULL) {
- *widthPtr = 0;
- } else {
+ } else if ((menuPtr->menuType != MENUBAR) && (mePtr->accelPtr != NULL)) {
const char *accel = Tcl_GetString(mePtr->accelPtr);
*widthPtr = Tk_TextWidth(tkfont, accel, mePtr->accelLength);
+ } else {
+ *widthPtr = 0;
}
}
@@ -1763,6 +1774,10 @@ DrawMenuEntryAccelerator(
int leftEdge = x + mePtr->indicatorSpace + mePtr->labelWidth;
const char *accel;
+ if (menuPtr->menuType == MENUBAR) {
+ return;
+ }
+
if (mePtr->accelPtr != NULL) {
accel = Tcl_GetString(mePtr->accelPtr);
} else {
diff --git a/win/tkWinPort.h b/win/tkWinPort.h
index 9f5fa9c..965dbc5 100644
--- a/win/tkWinPort.h
+++ b/win/tkWinPort.h
@@ -87,6 +87,13 @@
#define REDO_KEYSYM_LOOKUP
/*
+ * See ticket [916c1095438eae56]: GetVersionExW triggers warnings
+ */
+#if defined(_MSC_VER)
+# pragma warning(disable:4996)
+#endif
+
+/*
* The following macro checks to see whether there is buffered
* input data available for a stdio FILE.
*/
diff --git a/win/tkWinScrlbr.c b/win/tkWinScrlbr.c
index a280626..1b3717e 100644
--- a/win/tkWinScrlbr.c
+++ b/win/tkWinScrlbr.c
@@ -217,10 +217,10 @@ CreateProc(
if (scrollPtr->info.vertical) {
style = WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS
- | SBS_VERT | SBS_RIGHTALIGN;
+ | SBS_VERT;
} else {
style = WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS
- | SBS_HORZ | SBS_BOTTOMALIGN;
+ | SBS_HORZ;
}
scrollPtr->hwnd = CreateWindow(TEXT("SCROLLBAR"), NULL, style,
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 017cba9..4e7618d 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -148,7 +148,7 @@ typedef struct {
*/
typedef struct WinIconInstance {
- int refCount; /* Number of instances that share this data
+ size_t refCount; /* Number of instances that share this data
* structure. */
BlockOfIconImagesPtr iconBlock;
/* Pointer to icon resource data for image */
@@ -1421,9 +1421,7 @@ static void
DecrIconRefCount(
WinIconPtr titlebaricon)
{
- titlebaricon->refCount--;
-
- if (titlebaricon->refCount <= 0) {
+ if (titlebaricon->refCount-- <= 1) {
if (titlebaricon->iconBlock != NULL) {
FreeIconBlock(titlebaricon->iconBlock);
}
@@ -3675,6 +3673,12 @@ WmForgetCmd(
winPtr->flags &= ~(TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED);
Tk_MakeWindowExist((Tk_Window)winPtr->parentPtr);
RemapWindows(winPtr, Tk_GetHWND(winPtr->parentPtr->window));
+
+ /*
+ * Make sure wm no longer manages this window
+ */
+ Tk_ManageGeometry(frameWin, NULL, NULL);
+
TkWmDeadWindow(winPtr);
/* flags (above) must be cleared before calling */
/* TkMapTopFrame (below) */
@@ -5730,7 +5734,7 @@ WmWaitVisibilityOrMapProc(
* This function is invoked by a widget when it wishes to set a grid
* coordinate system that controls the size of a top-level window. It
* provides a C interface equivalent to the "wm grid" command and is
- * usually asscoiated with the -setgrid option.
+ * usually associated with the -setgrid option.
*
* Results:
* None.
diff --git a/win/tkWinX.c b/win/tkWinX.c
index 6c44059..2dc3b63 100644
--- a/win/tkWinX.c
+++ b/win/tkWinX.c
@@ -81,6 +81,7 @@ typedef struct ThreadSpecificData {
TkDisplay *winDisplay; /* TkDisplay structure that represents Windows
* screen. */
int updatingClipboard; /* If 1, we are updating the clipboard. */
+ int surrogateBuffer; /* Buffer for first of surrogate pair. */
} ThreadSpecificData;
static Tcl_ThreadDataKey dataKey;
@@ -91,7 +92,7 @@ static Tcl_ThreadDataKey dataKey;
static void GenerateXEvent(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam);
static unsigned int GetState(UINT message, WPARAM wParam, LPARAM lParam);
-static void GetTranslatedKey(XKeyEvent *xkey);
+static void GetTranslatedKey(XKeyEvent *xkey, UINT type);
static void UpdateInputLanguage(int charset);
static int HandleIMEComposition(HWND hwnd, LPARAM lParam);
@@ -911,15 +912,24 @@ Tk_TranslateWinEvent(
Tk_PointerEvent(hwnd, (short) LOWORD(lParam), (short) HIWORD(lParam));
return 1;
+ case WM_SYSKEYDOWN:
+ case WM_KEYDOWN:
+ if (wParam == VK_PACKET) {
+ /*
+ * This will trigger WM_CHAR event(s) with unicode data.
+ */
+ *resultPtr =
+ PostMessageW(hwnd, message, HIWORD(lParam), LOWORD(lParam));
+ return 1;
+ }
+ /* else fall through */
case WM_CLOSE:
case WM_SETFOCUS:
case WM_KILLFOCUS:
case WM_DESTROYCLIPBOARD:
case WM_UNICHAR:
case WM_CHAR:
- case WM_SYSKEYDOWN:
case WM_SYSKEYUP:
- case WM_KEYDOWN:
case WM_KEYUP:
case WM_MOUSEWHEEL:
GenerateXEvent(hwnd, message, wParam, lParam);
@@ -1147,7 +1157,8 @@ GenerateXEvent(
event.type = KeyPress;
event.xany.send_event = -1;
event.xkey.keycode = wParam;
- GetTranslatedKey(&event.xkey);
+ GetTranslatedKey(&event.xkey, (message == WM_KEYDOWN) ? WM_CHAR :
+ WM_SYSCHAR);
break;
case WM_SYSKEYUP:
@@ -1197,17 +1208,35 @@ GenerateXEvent(
event.type = KeyPress;
event.xany.send_event = -1;
event.xkey.keycode = 0;
- event.xkey.nbytes = 1;
- event.xkey.trans_chars[0] = (char) wParam;
+ if ((int)wParam & 0xff00) {
+ int ch1 = wParam & 0xffff;
- if (IsDBCSLeadByte((BYTE) wParam)) {
- MSG msg;
-
- if ((PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) != 0)
- && (msg.message == WM_CHAR)) {
- GetMessage(&msg, NULL, 0, 0);
- event.xkey.nbytes = 2;
- event.xkey.trans_chars[1] = (char) msg.wParam;
+ if ((ch1 & 0xfc00) == 0xd800) {
+ tsdPtr->surrogateBuffer = ch1;
+ return;
+ }
+ if ((ch1 & 0xfc00) == 0xdc00) {
+ ch1 = ((tsdPtr->surrogateBuffer & 0x3ff) << 10) |
+ (ch1 & 0x3ff) | 0x10000;
+ tsdPtr->surrogateBuffer = 0;
+ }
+ event.xany.send_event = -3;
+ event.xkey.nbytes = 0;
+ event.xkey.keycode = ch1;
+ } else {
+ event.xkey.nbytes = 1;
+ event.xkey.trans_chars[0] = (char) wParam;
+
+ if (IsDBCSLeadByte((BYTE) wParam)) {
+ MSG msg;
+
+ if ((PeekMessage(&msg, NULL, WM_CHAR, WM_CHAR,
+ PM_NOREMOVE) != 0)
+ && (msg.message == WM_CHAR)) {
+ GetMessage(&msg, NULL, WM_CHAR, WM_CHAR);
+ event.xkey.nbytes = 2;
+ event.xkey.trans_chars[1] = (char) msg.wParam;
+ }
}
}
Tk_QueueWindowEvent(&event, TCL_QUEUE_TAIL);
@@ -1215,15 +1244,10 @@ GenerateXEvent(
break;
case WM_UNICHAR: {
- char buffer[TCL_UTF_MAX+1];
- int i;
event.type = KeyPress;
event.xany.send_event = -3;
event.xkey.keycode = wParam;
- event.xkey.nbytes = Tcl_UniCharToUtf((int)wParam, buffer);
- for (i=0; i<event.xkey.nbytes && i<TCL_UTF_MAX; ++i) {
- event.xkey.trans_chars[i] = buffer[i];
- }
+ event.xkey.nbytes = 0;
Tk_QueueWindowEvent(&event, TCL_QUEUE_TAIL);
event.type = KeyRelease;
break;
@@ -1321,11 +1345,7 @@ GetState(
state &= ~mask;
}
if (HIWORD(lParam) & KF_EXTENDED) {
- if (message == WM_SYSKEYDOWN || message == WM_KEYDOWN) {
- state |= EXTENDED_MASK;
- } else {
- state &= ~EXTENDED_MASK;
- }
+ state |= EXTENDED_MASK;
}
}
return state;
@@ -1352,19 +1372,20 @@ GetState(
static void
GetTranslatedKey(
- XKeyEvent *xkey)
+ XKeyEvent *xkey,
+ UINT type)
{
MSG msg;
xkey->nbytes = 0;
while ((xkey->nbytes < XMaxTransChars)
- && PeekMessageA(&msg, NULL, 0, 0, PM_NOREMOVE)) {
- if ((msg.message != WM_CHAR) && (msg.message != WM_SYSCHAR)) {
+ && (PeekMessageA(&msg, NULL, type, type, PM_NOREMOVE) != 0)) {
+ if (msg.message != type) {
break;
}
- GetMessageA(&msg, NULL, 0, 0);
+ GetMessageA(&msg, NULL, type, type);
/*
* If this is a normal character message, we may need to strip off the
@@ -1505,7 +1526,7 @@ TkWinGetUnicodeEncoding(void)
*
* HandleIMEComposition --
*
- * This function works around a definciency in some versions of Windows
+ * This function works around a deficiency in some versions of Windows
* 2000 to make it possible to entry multi-lingual characters under all
* versions of Windows 2000.
*
@@ -1535,6 +1556,7 @@ HandleIMEComposition(
{
HIMC hIMC;
int n;
+ int high = 0;
if ((lParam & GCS_RESULTSTR) == 0) {
/*
@@ -1552,18 +1574,18 @@ HandleIMEComposition(
n = ImmGetCompositionString(hIMC, GCS_RESULTSTR, NULL, 0);
if (n > 0) {
- char *buff = ckalloc(n);
+ WCHAR *buff = (WCHAR *) ckalloc(n);
TkWindow *winPtr;
XEvent event;
int i;
- n = ImmGetCompositionString(hIMC, GCS_RESULTSTR, buff, (unsigned) n);
+ n = ImmGetCompositionString(hIMC, GCS_RESULTSTR, buff, (unsigned) n) / 2;
/*
* Set up the fields pertinent to key event.
*
- * We set send_event to the special value of -2, so that TkpGetString
- * in tkWinKey.c knows that trans_chars[] already contains a UNICODE
+ * We set send_event to the special value of -3, so that TkpGetString
+ * in tkWinKey.c knows that keycode already contains a UNICODE
* char and there's no need to do encoding conversion.
*
* Note that the event *must* be zeroed out first; Tk plays cunning
@@ -1574,7 +1596,7 @@ HandleIMEComposition(
memset(&event, 0, sizeof(XEvent));
event.xkey.serial = winPtr->display->request++;
- event.xkey.send_event = -2;
+ event.xkey.send_event = -3;
event.xkey.display = winPtr->display;
event.xkey.window = winPtr->window;
event.xkey.root = RootWindow(winPtr->display, winPtr->screenNum);
@@ -1582,8 +1604,6 @@ HandleIMEComposition(
event.xkey.state = TkWinGetModifierState();
event.xkey.time = TkpGetMS();
event.xkey.same_screen = True;
- event.xkey.keycode = 0;
- event.xkey.nbytes = 2;
for (i=0; i<n; ) {
/*
@@ -1591,9 +1611,16 @@ HandleIMEComposition(
* UNICODE character in the composition.
*/
- event.xkey.trans_chars[0] = (char) buff[i++];
- event.xkey.trans_chars[1] = (char) buff[i++];
+ event.xkey.keycode = buff[i++];
+ if ((event.xkey.keycode & 0xfc00) == 0xd800) {
+ high = ((event.xkey.keycode & 0x3ff) << 10) + 0x10000;
+ break;
+ } else if (high && (event.xkey.keycode & 0xfc00) == 0xdc00) {
+ event.xkey.keycode &= 0x3ff;
+ event.xkey.keycode += high;
+ high = 0;
+ }
event.type = KeyPress;
Tk_QueueWindowEvent(&event, TCL_QUEUE_TAIL);
@@ -1610,30 +1637,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
diff --git a/xlib/X11/Xlib.h b/xlib/X11/Xlib.h
index 667bdc7..8d8ec68 100644
--- a/xlib/X11/Xlib.h
+++ b/xlib/X11/Xlib.h
@@ -330,6 +330,9 @@ typedef struct _XImage {
unsigned long green_mask;
unsigned long blue_mask;
XPointer obdata; /* hook for the object routines to hang on */
+#if defined(MAC_OSX_TK)
+ 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
diff --git a/xlib/X11/Xutil.h b/xlib/X11/Xutil.h
index 58124b0..bf372fb 100644
--- a/xlib/X11/Xutil.h
+++ b/xlib/X11/Xutil.h
@@ -535,7 +535,7 @@ extern Status XMatchVisualInfo(
#endif
);
-extern void XOffsetRegion(
+extern int XOffsetRegion(
#if NeedFunctionPrototypes
Region /* r */,
int /* dx */,
@@ -814,7 +814,7 @@ extern void XUnionRectWithRegion(
#endif
);
-extern void XUnionRegion(
+extern int XUnionRegion(
#if NeedFunctionPrototypes
Region /* sra */,
Region /* srb */,