Tk_Library_Source_Code000075500000000000000000000000001435605071100146715ustar00nobodynobodyTk_Library_Source_Code/.fossil-settings000075500000000000000000000000001435605071100201045ustar00nobodynobodyTk_Library_Source_Code/.fossil-settings/binary-glob000064400000000000000000000000441435605071100223110ustar00nobodynobody*.png *.jpg *.gif *.cur *.odt *.pdf Tk_Library_Source_Code/ChangeLog000064400000000000000000000266011435605071100165270ustar00nobodynobody2021-01-10 Csaba Nemethi * support/installation/actions.tcl: Proc _tab now passes 1 as 3rd argument to xcopy. 2020-02-09 0.7 * * Released and tagged Tklib 0.7 ======================== * 2013-10-30 Andreas Kupries (AS Senior Dev) * examples/canvas/crosshairs_for_axes.tcl: [Ticket [19721eff15]]. * examples/canvas/crosshairs_for_multixyplot.tcl: Updated canvas * examples/canvas/crosshairs_scaled.tcl: examples for runnability against an installed tklib. Patch by stu. 2013-10-30 Andreas Kupries * README: [Ticket [678c8ac255]]. Updated file references. Reported by Arjen Markus. 2013-04-03 Andreas Kupries * apps/diagram-viewer: Renamed 'dia' to avoid clashes with the * apps/diagram-viewer.man: Gnome 'dia' application. * support/installation/modules.tcl: 2013-03-25 Andreas Kupries * * Released and tagged Tklib 0.6 ======================== * 2012-08-27 Andreas Kupries * support/installation/modules.tcl: Added the new widgetl module. * support/installation/modules.tcl: Added the new widgetv module. 2012-06-21 Andreas Kupries * Makefile.in (install, install-libraries, install-doc): [Bug 3536133]: Added missing -app-path and -no-apps options. Thanks to Georgios Petasis . 2010-12-14 Rüdiger Härtel * support/devel/sak/doc/kwic.txt: added widget_dateentry.man * support/devel/sak/doc/manpages.txt: so that it is build and * support/devel/sak/doc/toc.txt: installed 2010-12-07 Csaba Nemethi * examples/mentry: Added the modules mentry and wcb, * examples/wcb: with examples. * modules/mentry: * modules/wcb: * support/installation/modules.tcl: 2010-08-23 Andreas Kupries * apps/bitmap-editor: Additional functionality by Keith (mouse stroking, cursor, rename, and undo), plus teapot meta data. 2010-08-20 Andreas Kupries * apps/bitmap-editor: New application, by Keith Vetter, added * apps/bitmap-editor.man: with permission. * support/installation/modules.tcl: 2010-08-10 Arjen Markus * support/installation/modules.tcl: Added the new controlwidget module 2010-07-07 Andreas Kupries * README.developer: New files to help the referenced people with * README.releasemgr: their work on Tklib. Copied from Tcllib, and modified to suit. 2009-11-25 Andreas Kupries * Makefile.in (test): [Bug 2903927]: Modified test target to behave like tcllib's test target. 2009-02-06 Andreas Kupries * modules/swaplist/swaplist.man: General cleanup of all the documentation * modules/ntext/ntextBindings.man: warnings reported for the packages. * modules/ntext/ntext.man: * modules/ntext/ntextIndent.man: * modules/ntext/ntextWordBreak.man: * modules/widget/widget_toolbar.man: * modules/widget/widget_calendar.man: * modules/ico/ico.man: * modules/khim/khim.man: * modules/tkpiechart/canvaslabel.man: * modules/tkpiechart/pieperipherallabeler.man: * modules/tkpiechart/pieboxlabeler.man: * modules/tkpiechart/pie.man: * modules/ipentry/ipentry.man: * modules/plotchart/plotchart.man: * modules/ctext/ctext.man: * modules/diagrams/draw_diagram.man: * modules/tooltip/tooltip.man: * modules/canvas/canvas_sqmap.man: * modules/canvas/canvas_zoom.man: * installer.tcl: Updated to use the installer and sak of tcllib * sak.tcl: head. * PACKAGES: Moved to new directory support/releases/ * tklib_version.tcl: Ditto. * README-0.4.txt: Moved to new directory support/releases/history/ * README-0.5.txt: Ditto. * all.tcl: Moved to new directory support/devel * install_action.tcl: Moved to new directory support/installation * installed_modules.tcl: Ditto. * main.tcl: Ditto. * man.macros: Ditto. * support/: New directory, mostly sak from Tcllib, and the renamed forms of the moved files, see above. 2009-02-05 Andreas Kupries * examples/ntext/ntextExample.tcl: Modified examples to assume * examples/tkpiechart/demo.tcl: that they are run by a tclsh * installed_modules.tcl: found on the PATH, and that this shell * modules/plotchart/plotpriv.tcl: has access to the packages of Tklib required by the example. The patches were provided by Stuart Cassoff as part of his work on making a Tklib OpenBSD port. Added the examples for a number of modules to the installer. Patch by Stuart, see above. 2009-01-21 Andreas Kupries * * Released and tagged Tklib 0.5 ======================== * 2008-11-22 Andreas Kupries * installed_modules.tcl: New module 'canvas' added, providing * modules/canvas: extended canvas widgets. 2008-11-04 Andreas Kupries * installed_modules.tcl: New module 'crosshair' added, providing * modules/crosshair: cross-hairs in canvas widgets. 2008-05-01 Andreas Kupries * sak.tcl (gd-gen-tap): Added hacks to get proper tap definitions for Tablelist and its related packages. 2008-02-21 Jeff Hobbs * installed_modules.tcl: * examples/widget/screenruler.tcl: Added widget::screenruler example 2007-10-19 Pat Thoyts * modules/chatwidget: Added a new widget: 'chatwidget' * installed_modules.tcl: 2007-09-26 Andreas Kupries * installed_modules.tcl: Added 'diagrams' to the list of installed modules. 2007-06-25 Jeff Hobbs * examples/ntext/*.tcl (new): examples for ntext module 2007-06-21 Jeff Hobbs * installed_modules.tcl: added ntext module 2006-08-28 Andreas Kupries * PACKAGES: Reverted changes to the files describing * README-0.4.txt: the last release. At least PACKAGES is needed unchanged to enable the comparison of the last release to the current state. 2006-08-27 Kevin B. Kenny * PACKAGES: Added KHIM (Kevin's Hacky Input Method) * README-0.4.txt: to the module list for installation and * installed_modules.tcl: documentation. Added rules to * install_actions.tcl: 'install_actions' to install message catalogs. * configure: Regenerated. 2006-04-26 Andreas Kupries * sak.tcl (gd-gen-tap): modified to strip non-version characters out of version numbers. 2006-01-16 Csaba Nemethi * install_action.tcl: Removed the invocation of xcopy for the images directory from the _tab proc, because the contents of that Tablelist directory has been replaced with a new script file. 2005-12-02 Andreas Kupries * sak.tcl (validate_versions_cmp): Fixed typo causing the use of a wrong variable [SF Tcllib Bug 1371186]. Thanks to Wart. 2005-11-10 Andreas Kupries * * Released and tagged Tklib 0.4.1 ======================== * 2005-11-02 Andreas Kupries * * Released and tagged Tklib 0.4 ======================== * 2005-11-02 Andreas Kupries * sak.tcl (ppackages): Copied the impl. we have in Tcllib over for better detection. Does not help table list however. 2005-10-24 Andreas Kupries * sak.tcl: Added methods for release engineering: rstatus, release, desc, desc/2, better tap generation. * PACKAGES: New file, empty, will be filled when the release is committed. * README-0.4.txt: New file, summary changes for 0.4 release. * sak.tcl (ipackages): Strip code opening with brace after version number as well when extracting version numbers from package indices. * tklib_version.tcl: Bumped to 0.4. 2005-10-17 Andreas Kupries * install_action.tcl (_tab): Bugfix. Have to install the file 'tclIndex' as well to make the package fully-functional. 2005-10-03 Andreas Kupries * install_action.tcl (_tab): New command for tablelist installation. * installed_modules.tcl: New module: tablelist. Originator/Author: Csaba Nemethi 2005-08-24 Andreas Kupries * installer.tcl (write_out): Cross-ported the fix for [Tcllib SF Bug 899209] to tklib. Delete an existing file before trying to overwrite it. See Tcllib ChangeLog entry 2004-03-01. 2005-08-22 Jeff Hobbs * tklib_version.tcl: updated to 0.3 * installed_modules.tcl: Added module 'widget' to the list of installed modules. 2005-07-27 Andreas Kupries * installed_modules.tcl: Added module 'tooltip' to the list of installed modules. 2005-04-01 Andreas Kupries * installed_modules.tcl: Added new module 'swap_list' to the list of installed modules. 2005-03-31 Andreas Kupries * installed_modules.tcl: Added 'get'string' and 'history' to the list of installed modules. These are new modules added a few days ago, by Aaron Faupell. 2004-07-22 Jeff Hobbs * installed_modules.tcl: added ico to list of installed modules. * modules/ico/*: new 'ico' module for extracting icos from exe/ico files - works x-platform. 2004-06-29 Andreas Kupries * install_action.tcl: Added ctext and style to list of * installed_modules.tcl: installed modules. 2004-05-18 Andreas Kupries * New module 'tkpiechart'. This has been donated by Jean-Luc Fontaine. Thanks. It is based on his stoop OO package, found in our sibling 'Tcllib'. * installed_modules.tcl: Added tkpiechart to the list of installed modules. 2004-04-15 Andreas Kupries * New module 'plotchart', by Arjen Markus. Thanks for this donation. 2004-04-04 David N. Welton * New module 'style'. Various Tk styles/themes. 2004-04-15 Andreas Kupries * New module 'ctext', by George Peter Staplin. Thanks for this donation. 2003-11-28 Andreas Kupries * Reworked the entire build system to use the same framework as tcllib does. IOW tklib now uses a swiss army knife tool (sak.tcl, with all attendant files), and configure/Makefile are based on that. Generation of distributions, and installer now also work in the same way as for tcllib. * Replaced existing nroff documentation with doctools manpages, and wrote doctools manpages for the modules which had none. All (four) modules now have documentation. 2003-07-21 Aaron Faupell * imported ipentry into tklib 2002-09-25 Jeff Hobbs * Makefile.in: better DESTDIR/libdir support (steffen) 2001-11-07 Jeff Hobbs * created tklib in CVS Tk_Library_Source_Code/DESCRIPTION.txt000064400000000000000000000026601435605071100173000ustar00nobodynobodyIdentifier: tklib Title: Tk Standard Library Description: This package is intended to be a collection of Tcl packages that provide utility functions useful to a large collection of Tk programmers. Rights: BSD Version: 0.7 URL: http://core.tcl.tk/tklib/ Architecture: tcl Contributor: Aaron Faupell Contributor: Andreas Kupries Contributor: Andreas Kupries (AS Senior Dev) Contributor: Arjen Markus Contributor: Csaba Nemethi Contributor: David N. Welton Contributor: George Peter Staplin Contributor: Jean-Luc Fontaine Contributor: Jeff Hobbs Contributor: Keith Nash Contributor: Keith Vetter Contributor: Kevin B. Kenny Contributor: Kevin Kenny Contributor: Marty Backe Contributor: Nemethi Contributor: Pat Thoyts Contributor: Ruediger Haertel Contributor: Rüdiger Härtel Contributor: Torsten Berg Tk_Library_Source_Code/INSTALL.txt000064400000000000000000000053071435605071100166240ustar00nobodynobodyHow to install Tklib ===================== Introduction ------------ The tklib distribution, whether a snapshot directly from CVS, or officially released, offers a single method for installing tklib, based on Tcl itself. This is based on the assumption that for tklib to be of use Tcl has to be present, and therefore can be used. This single method however can be used in a variety of ways. 0 For an unwrapped (= directory) distribution or CVS snapshot a. either call the application 'installer.tcl' directly, b or use % configure ; make install The latter is provided for people which are used to this method and more comfortable with it. In end this boils down into a call of 'installer.tcl' too. 1. A starpack distribution (window-only) is a self-extracting installer which internally uses the aforementioned installer. 2. A starkit distribution is very much like a starpack, but required an external interpreyter to run. This can be any tcl interpreter which has all the packages to support starkits (tclvfs, memchan, trf). 3. A distribution in a tarball has to be unpacked first, then any of the methods described in (0) can be used. Usage of the installer ---------------------- The installer selects automatically either a gui based mode, or a command line based mode. If the package Tk is present and can be loaded, then the GUI mode is entered, else the system falls back to the command line. Note that it is possible to specify options on the command line even if the installer ultimatively selects a gui mode. In that case the hardwired defaults and the options determine the data presented to the user for editing. Command line help can be asked for by using the option -help when running the installer (3) or the distribution itself in the case of (1) or (2). The installer will select a number of defaults for the locations of packages, examples, and documentation, and also the format of the documentation. The user can overide these defaults in the GUI, or by specifying additional options. The defaults depend on the platform detected (unix/windows) and the executable used to run the installer. In the case of a starpack distribution (1) this means that _no defaults_ are possible for the various locations as the executable is part of the distribution and has no knowledge of its environment. In all other cases the intepreter executable is outside of the distribution, which means that its location can be used to determine sensible defaults. Notes ----- The installer will overwrite an existing installation of tklib 0.2 without asking back after the initial confirmation is given. And if the user chooses the same directory as for tklib 0.1, or 0.0, etc. then the installer will overwrite that too. Tk_Library_Source_Code/Makefile.in000064400000000000000000000066711435605071100170270ustar00nobodynobody# Makefile.in -- # # This file is a Makefile for the tklib standard tcl library. If this # is "Makefile.in" then it is a template for a Makefile; to generate # the actual Makefile, run "./configure", which is a configuration script # generated by the "autoconf" program (constructs like "@foo@" will get # replaced in the actual Makefile. # # Copyright (c) 1999-2000 Ajuba Solutions # Copyright (c) 2001 ActiveState Tool Corp. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: Makefile.in,v 1.8 2012/06/21 18:15:24 andreas_kupries Exp $ #======================================================================== # Nothing of the variables below this line need to be changed. Please # check the TARGETS section below to make sure the make targets are # correct. #======================================================================== SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ libdir = @libdir@ mandir = @mandir@ DESTDIR = pkglibdir = $(libdir)/@PACKAGE@@VERSION@ top_builddir = . PACKAGE = @PACKAGE@ VERSION = @VERSION@ CYGPATH = @CYGPATH@ TCLSH_PROG = @TCLSH_PROG@ CONFIG_CLEAN_FILES = #======================================================================== # Start of user-definable TARGETS section #======================================================================== all: doc: html-doc nroff-doc install: $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/installer.tcl` \ -no-examples -no-html \ -pkg-path $(DESTDIR)$(pkglibdir) \ -app-path $(DESTDIR)$(bindir) \ -nroff-path $(DESTDIR)$(mandir)/mann \ -no-wait -no-gui install-libraries: $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/installer.tcl` \ -pkg-path $(DESTDIR)$(pkglibdir) \ -no-apps -no-examples -no-html -no-nroff \ -no-wait -no-gui install-doc: $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/installer.tcl` \ -nroff-path $(DESTDIR)$(mandir)/mann \ -no-apps -no-examples -no-pkgs -no-html \ -no-wait -no-gui test: if test -t 1 ; \ then $(MAKE) test_interactive ; \ else $(MAKE) test_batch ; \ fi test_batch: $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` test run -v -s "$(TCLSH_PROG)" test_interactive: $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` test run -s "$(TCLSH_PROG)" depend: dist: $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` gendist clean: rm -rf doc *-doc distclean: clean -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* -rm -f config.status Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status uninstall-binaries: html-doc: $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` doc html nroff-doc: $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` doc nroff tmml-doc: $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` doc tmml wiki-doc: $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` doc wiki latex-doc: $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` doc ps list-doc: $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` doc list check: $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` validate sak-help: $(TCLSH_PROG) `$(CYGPATH) $(srcdir)/sak.tcl` help .PHONY: all binaries clean depend distclean doc install installdirs libraries test # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Tk_Library_Source_Code/README000064400000000000000000000074531435605071100156410ustar00nobodynobodyRCS: @(#) $Id: README,v 1.3 2003/11/28 22:42:03 andreas_kupries Exp $ Welcome to the tklib, the Tk Standard Library. This package is intended to be a collection of Tcl packages that provide utility functions useful to a large collection of Tcl programmers. The home web site for this code is http://core.tcl.tk/tklib/ At this web site, you will find mailing lists, web forums, databases for bug reports and feature requests, the CVS repository (browsable on the web, or read-only accessible via CVS ), and more. Please note that tklib depends on tcllib, the Tcl Standard Library. This is true for both installation and runtime. The structure of the tklib source hierarchy is: tklib +- modules +- +- +- ... The install hierarchy is: .../lib/tklib +- +- +- ... There are some base requirements that a module must meet before it will be added to tklib: * the module must be a proper Tcl package * the module must use a namespace for its commands and variables * the name of the package must be the same as the name of the namespace * the module must reside in a subdirectory of the modules directory in the source hierarchy, and that subdirectory must have the same name as the package and namespace * the module must be released under the BSD License, the terms of which can be found in the toplevel tklib source directory in the file license.terms * the module should have both documentation ([*]) and a test suite (in the form of a group of *.test files in the module directory). [*] Possible forms: doctools, TMML/XML, nroff (man), or HTML. The first format is the most prefered as it can be processed with tools provided by tcllib (See module doctools there). The first two are prefered in general as they are semantic markup and thus easier to convert into other formats. * the module must have either documentation or a test suite. It can not have neither. * the module should adhere to Tcl coding standards When adding a module to tklib, be sure to add it to the files listed below. * support/installation/modules.tcl contains a table listing all modules to be installed, modules excluded, and names the actions to be taken during installation of each module. Add a line to this table naming your module and its actions. Three actions have to be specified, for the package itself, its documentation, and the examples demonstrating it. The _null action can be used everywhere and signals that there is nothing to do. Although it is possible to use it for the package action it does make no sense there, as that means that no package code is installed. Other package actions are _tcl, _tci, and _text. The first causes the installer to copy all .tcl files from the source directory for the module into the appropriate module directory. _tci does all that and also expects a tclIndex file to copy. _tex is like _tcl, however it also copies all .tex files found in the source directory for the module. There is currently only one true documentation action. This action is _doc. It converts all documentation in doctools format into the format chosen by the user for installation and copies the result into the appropriate directory. There is currently one true action for examples, _exa. It copies all files in the source directory for examples into the directory chosen by the user as destination for examples. Each module source directory should have no subdirectories (other than the CVS directory), and should contain the following files: * source code *.tcl * package index pkgIndex.tcl * tests *.test * documentation *.man (doctools, prefered), *.n, *.xml If you do not follow this directory structure, the tklib Makefile will fail to locate the files from the new module. Tk_Library_Source_Code/README.developer000064400000000000000000000326651435605071100176300ustar00nobodynobodyRCS: @(#) $Id: README.developer,v 1.1 2010/07/07 15:15:17 andreas_kupries Exp $ Welcome to the tklib, the Tk Standard Library. ================================================ Introduction ------------ This README is intended to be a guide to the tools available to a Developer working on Tklib to help him with his tasks, i.e. making the tasks easier to perform. It is our hope that this will improve the quality of even non-released revisions of Tklib, and make the work of the release manager easier as well. Audience -------- The intended audience are, first and foremost, developers beginning to work on Tklib. To an experienced developer this document will be less of a guide and more of a reference. Anybody else interested in working on Tklib is invited as well. Directory hierarchy and file basics ------------------------------------ The main directories under the tklib top directory are modules/ examples/ and apps/ Each directory FOO under modules/ represents one package, sometimes more. In the case of the latter the packages are usually related in some way. Examples are the base64, math, and struct modules, with loose (base64) to strong (math) relations between the packages. Examples associated with a module FOO, if there are any, are placed into the directory examples/FOO Any type of distributable application can be found under apps/, together with their documentation, if any. Note that the apps/ directory is currently not split into sub-directories. Regarding the files in Tklib, the most common types found are .tcl Tcl code for a package. .man Documentation for a package, in doctools format. .test Test suite for a package, or part of. Based on tcltest. .bench Performance benchmarks for a package, or part of. Based on modules/bench .pcx Syntax rules for TclDevKit's tclchecker. Using these rules allows tclchecker to check the use of commands of a Tklib package X without having to scan the implementation of X, i.e. its .tcl files. Adding a new module ------------------- Assuming that FOO is the name of the new module, and T is the toplevel directory of the Tklib sources (1) Create the directory T/modules/FOO and put all the files of the module into it. Note: * The file 'pkgIndex.tcl' is required. * Implementation files should have the extension '.tcl', naturally. * If available, documentation should be in doctools format, and the files should have the extension '.man' for SAK to recognize them. * If available the testsuite(s) should use 'tcltest' and the general format as used by the other modules in Tklib (declaration of minimally needed Tcl, tcltest, supporting packages, etc.). The file(s) should have the extension '.test' for SAK to recognize them. Note that an empty testsuite, or a testsuite which does not perform any tests is less than useful and will not be accepted. * If available the benchmark(s) should use 'bench' and the general format as used by the other modules in Tklib. The file(s) should have the extension '.bench' for SAK to recognize them. * Other files can be named and placed as the module sees fit. (2) If the new module has an example application A which is polished enough for general use, put this application into the file "T/apps/A.tcl", and its documentation into the file "T/apps/A.man". While documentation for the application is optional, it is preferred. For examples which are not full-fledged applications, a skeleton, or not really polished for use, etc., create the directory T/examples/FOO/ and put them there. A key difference is what happens to them on installation, and what the target audience is. The examples are for developers using packages in Tklib, whereas the applications are also for users of Tklib which do not have an interest in developing for and with it. As such, they are installed as regular commands, accessible through the PATH, and example files are not installed. (3) To make Tklib's installer aware of FOO, edit the file T/support/installation/modules.tcl Add a line 'Module FOO $impaction $docaction $exaction'. The various actions describe to the installer how to install the implementation files, the documentation, and the examples. Add a line 'Application A' for any application A which was added to T/apps for FOO. The following actions are available: Implementation _tcl - Copy all .tcl files in T/modules/FOO into the installation. _tcr - See above, does it for .tcl files in subdirectories as well. _tci - _tcl + Copying of a tclIndex - special to modules 'math', 'control'. _msg - _tcl + Copying of subdir 'msgs' - special to modules 'dns', 'log'. _doc - _tcl + Copying of subdir 'mpformats' - special to module 'doctools'. _tex - _tcl + Copying of .tex files - special to module 'textutil'. The _null action, see below, is available in principle too, but a module without implementation does not make sense. Documentation _null - Module has no documentation, do nothing. _man - Process the .man files in T/modules/FOO and install the results (nroff and/or HTML) in the proper location, as given to the installer. Examples _null - Module has no examples, do nothing _exa - Copy the directory T/examples/FOO (recursively) to the install location for examples. Testing modules --------------- To run the testsuite of a module FOO in tklib use the 'test run' argument of sak.tcl, like so: % pwd /the/tklib/toplevel/directory % ./sak.tcl test run FOO or % ./sak.tcl test run modules/FOO To run the testsuites of all modules either invoke 'test run' without a module name, or use 'make test'. The latter assumes that configure was run for Tklib before, i.e.: % ./sak.tcl test run or % ./sak.tcl test run % make test In all of the above cases the result will be a combination of progress display and testsuite log, showing for each module the tests that pass or failed and how many of each in a summary at the end. To get a detailed log, it is necessary to invoke 'test run' with additional options. First example: % ./sak.tcl test run -l LOG FOO This shows the same short log on the terminal, and writes a detailed log to the file LOG.log, and excerpts to other files (LOG.summary, LOG.failures, etc.). Second example: % ./sak.tcl test run -v FOO % make test > LOG This writes the detailed log to stdout, or to the file LOG, instead of the short log. In all cases, the detailed log contains a list of all test cases executed, which failed, and how they failed (expected versus actual results). Note: The commands % make test and % make test > LOG are able to generate different output (short vs long log) because the Makefile target contains code which detects that stdout has been redirected to a file and acts accordingly. Non-developers should reports problems in Tklib's bug tracker. Information about its location and the relevant category can be found in the section 'BUGS, IDEAS, FEEDBACK' of the manpage of the module and/or package. Module documentation -------------------- The main format used for the documentation of packages in Tklib is 'doctools', the support packages of which are part of Tklib, see the module 'doctools'. To convert this documentation to HTML or nroff manpages, or some other format use the 'doc' argument of sak.tcl, like so: % pwd /the/tklib/toplevel/directory % ./sak.tcl doc html FOO or % ./sak.tcl doc html modules/FOO The result of the conversion can be found in the newly-created 'doc' directory in the current working directory. The set of formats the documentation can be converted into can be queried via % ./sak.tcl help doc To convert the documentation of all modules either invoke 'test run' without a module name, or use 'make html-doc', etc.. The latter assumes that configure was run for Tklib before, i.e.: % ./sak.tcl doc html % make html-doc Note the special format 'validate'. Using this format does not convert the documentation to anything (and the sub-directory 'doc' will not be created), it just checks that the documentation is syntactically correct. I.e. % ./sak.tcldoc validate modules/FOO % ./sak.tcldoc validate Validating modules ------------------ Running the testsuite of a module, or checking the syntax of its documentation (see the previous sections) are two forms of validation. The 'validate' command of sak.tcl provides a few more. The online documentation of this command is available via % ./sak.tcl help validate The validated parts are man pages, testsuites, version information, and syntax. The latter only if various static syntax checkers are available on the PATH, like TclDevKit's tclchecker. Note that testsuite validation is not the execution of the testsuites, only if a package has a testsuite or not. It is strongly recommended to validate a module before committing any type of change made to it. It is recommended to validate all modules before committing any type of change made to one of them. We have package inter-dependencies between packages in Tklib, thus changing one package may break others, and just validating the changed package will not catch such problems. Writing Tests ------------- While a previous section talked about running the testsuite for a module and the packages therein this has no meaning if the module in question has no testsuites at all. This section gives a very basic overview on methodologies for writing tests and testsuites. First there are "drudgery" tests. Written to check absolutely basic assumptions which should never fail. Example: For a command FOO taking two arguments, three tests calling it with zero, one, and three arguments. The basic checks that the command fails if it has not enough arguments, or too many. After that come the tests checking things based on our knowledge of the command, about its properties and assumptions. Some examples based on the graph operations added during Google's Summer of Code 2009. ** The BellmanFord command in struct::graph::ops takes a _startnode_ as argument, and this node should be a node of the graph. equals one test case checking the behavior when the specified node is not a node a graph. This often gives rise to code in the implementation which explicitly checks the assumption and throws a nice error. Instead of letting the algorithm fails later in some weird non-deterministic way. Such checks cannot be done always. The graph argument for example is just a command in itself, and while we expect it to exhibit a certain interface, i.e. set of sub-commands aka methods, we cannot check that it has them, except by actually trying to use them. That is done by the algorithm anyway, so an explicit check is just overhead we can get by without. ** IIRC one of the distinguishing characteristic of either BellmanFord and/or Johnson is that they are able to handle negative weights. Whereas Dijkstra requires positive weights. This induces (at least) three testcases ... Graph with all positive weights, all negative, and a mix of positive and negative weights. Thinking further does the algorithm handle the weight '0' as well ? Another test case, or several, if we mix zero with positive and negative weights. ** The two algorithms we are currently thinking about are about distances between nodes, and distance can be 'Inf'inity, i.e. nodes may not be connected. This means that good test cases are (1) Strongly connected graph (2) Connected graph (3) Disconnected graph. At the extremes of (1) and (3) we have the fully connected graphs and graphs without edges, only nodes, i.e. completely disconnected. ** IIRC both of the algorithms take weighted arcs, and fill in a default if arcs are left unweighted in the input graph. This also induces three test cases: (1) Graph will all arcs with explicit weights. (2) Graph without weights at all. (3) Graph with mixture of weighted and unweighted graphs. What was described above via examples is called 'black-box' testing. Test cases are designed and written based on our knowledge of the properties of the algorithm and its inputs, without referencing a particular implementation. Going further, a complement to 'black-box' testing is 'white-box'. For this we know the implementation of the algorithm, we look at it and design our tests cases so that they force the code through all possible paths in the implementation. Wherever a decision is made we have a test cases forcing a specific direction of the decision, for all possible directions. In practice I often hope that the black-box tests I have made are enough to cover all the paths, obviating the need for white-box tests. So, if you, dear reader, now believe that writing tests for an algorithm takes at least as much time as coding the algorithm, and often more time, then you are completely right. It does. Much more time. See for example also http://sqlite.org/testing.html, a writeup on how the Sqlite database engine is tested. An interesting connection is to documentation. In one direction, the properties you are checking with black-box testing are properties which should be documented in the algorithm man page. And conversely, if you have documentation of properties of an algorithm then this is a good reference to base black-box tests on. In practice test cases and documentation often get written together, cross-influencing each other. And the actual writing of test cases is a mix of black and white box, possibly influencing the implementation while writing the tests. Like writing test for 'startnode not in input graph' serving as reminder to put in a check for this into the code. Tk_Library_Source_Code/README.releasemgr000064400000000000000000000015331435605071100177570ustar00nobodynobodyRCS: @(#) $Id: README.releasemgr,v 1.1 2010/07/07 15:15:17 andreas_kupries Exp $ Welcome to the tklib, the Tk Standard Library. ================================================ Introduction ------------ This README is intended to be a guide to the tools available to a Release manager working on the creation of a release of Tklib. Audience -------- The intended audience is the release manager of Tklib, his deputies, and anybody else interested in the task. Basics ------ < Flesh this out > sak.tcl < Tasks, and how to perform them > Uploading and releasing files to SourceForge -------------------------------------------- The main form to upload files is https://frs.sourceforge.net/webupload This is WebDAV. The place to manage the releases the files are for is https://sourceforge.net/project/admin/editpackages.php?group_id=12883 Tk_Library_Source_Code/aclocal.m4000064400000000000000000001753411435605071100166230ustar00nobodynobody# tcl.m4 -- # # This file provides a set of autoconf macros to help TEA-enable # a Tcl extension. # # Copyright (c) 1999-2000 Ajuba Solutions. # All rights reserved. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. #------------------------------------------------------------------------ # SC_PATH_TCLCONFIG -- # # Locate the tclConfig.sh file and perform a sanity check on # the Tcl compile flags # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-tcl=... # # Defines the following vars: # TCL_BIN_DIR Full path to the directory containing # the tclConfig.sh file #------------------------------------------------------------------------ AC_DEFUN(SC_PATH_TCLCONFIG, [ # # Ok, lets find the tcl configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tcl # if test x"${no_tcl}" = x ; then # we reset no_tcl in case something fails here no_tcl=true AC_ARG_WITH(tcl, [ --with-tcl directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval}) AC_MSG_CHECKING([for Tcl configuration]) AC_CACHE_VAL(ac_cv_c_tclconfig,[ # First check to see if --with-tcl was specified. if test x"${with_tclconfig}" != x ; then if test -f "${with_tclconfig}/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` else AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh]) fi fi # then check for a private Tcl installation if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ../tcl \ `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ ../../tcl \ `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ ../../../tcl \ `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break fi done fi # check in a few common install locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i; pwd)` break fi done fi # check in a few other private locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ${srcdir}/../tcl \ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break fi done fi ]) if test x"${ac_cv_c_tclconfig}" = x ; then TCL_BIN_DIR="# no Tcl configs found" AC_MSG_WARN(Can't find Tcl configuration definitions) exit 0 else no_tcl= TCL_BIN_DIR=${ac_cv_c_tclconfig} AC_MSG_RESULT(found $TCL_BIN_DIR/tclConfig.sh) fi fi ]) #------------------------------------------------------------------------ # SC_PATH_TKCONFIG -- # # Locate the tkConfig.sh file # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-tk=... # # Defines the following vars: # TK_BIN_DIR Full path to the directory containing # the tkConfig.sh file #------------------------------------------------------------------------ AC_DEFUN(SC_PATH_TKCONFIG, [ # # Ok, lets find the tk configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tk # if test x"${no_tk}" = x ; then # we reset no_tk in case something fails here no_tk=true AC_ARG_WITH(tk, [ --with-tk directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval}) AC_MSG_CHECKING([for Tk configuration]) AC_CACHE_VAL(ac_cv_c_tkconfig,[ # First check to see if --with-tkconfig was specified. if test x"${with_tkconfig}" != x ; then if test -f "${with_tkconfig}/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` else AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh]) fi fi # then check for a private Tk library if test x"${ac_cv_c_tkconfig}" = x ; then for i in \ ../tk \ `ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \ ../../tk \ `ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \ ../../../tk \ `ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/unix; pwd)` break fi done fi # check in a few common install locations if test x"${ac_cv_c_tkconfig}" = x ; then for i in `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` ; do if test -f "$i/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i; pwd)` break fi done fi # check in a few other private locations if test x"${ac_cv_c_tkconfig}" = x ; then for i in \ ${srcdir}/../tk \ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/unix; pwd)` break fi done fi ]) if test x"${ac_cv_c_tkconfig}" = x ; then TK_BIN_DIR="# no Tk configs found" AC_MSG_WARN(Can't find Tk configuration definitions) exit 0 else no_tk= TK_BIN_DIR=${ac_cv_c_tkconfig} AC_MSG_RESULT(found $TK_BIN_DIR/tkConfig.sh) fi fi ]) #------------------------------------------------------------------------ # SC_LOAD_TCLCONFIG -- # # Load the tclConfig.sh file # # Arguments: # # Requires the following vars to be set: # TCL_BIN_DIR # # Results: # # Subst the following vars: # TCL_BIN_DIR # TCL_SRC_DIR # TCL_LIB_FILE # #------------------------------------------------------------------------ AC_DEFUN(SC_LOAD_TCLCONFIG, [ AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh]) if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then AC_MSG_RESULT([loading]) . $TCL_BIN_DIR/tclConfig.sh else AC_MSG_RESULT([file not found]) fi # # The eval is required to do the TCL_DBGX substitution in the # TCL_LIB_FILE variable # eval TCL_LIB_FILE=${TCL_LIB_FILE} eval TCL_LIB_FLAG=${TCL_LIB_FLAG} AC_SUBST(TCL_DBGX) AC_SUBST(TCL_BIN_DIR) AC_SUBST(TCL_SRC_DIR) AC_SUBST(TCL_LIB_FILE) AC_SUBST(TCL_LIBS) AC_SUBST(TCL_DEFS) AC_SUBST(TCL_SHLIB_LD_LIBS) AC_SUBST(TCL_EXTRA_CFLAGS) AC_SUBST(TCL_LD_FLAGS) AC_SUBST(TCL_LIB_FILE) AC_SUBST(TCL_STUB_LIB_FILE) AC_SUBST(TCL_LIB_SPEC) AC_SUBST(TCL_BUILD_LIB_SPEC) AC_SUBST(TCL_STUB_LIB_SPEC) AC_SUBST(TCL_BUILD_STUB_LIB_SPEC) ]) #------------------------------------------------------------------------ # SC_LOAD_TKCONFIG -- # # Load the tkConfig.sh file # # Arguments: # # Requires the following vars to be set: # TK_BIN_DIR # # Results: # # Sets the following vars that should be in tkConfig.sh: # TK_BIN_DIR #------------------------------------------------------------------------ AC_DEFUN(SC_LOAD_TKCONFIG, [ AC_MSG_CHECKING([for existence of $TK_BIN_DIR/tkConfig.sh]) if test -f "$TK_BIN_DIR/tkConfig.sh" ; then AC_MSG_RESULT([loading]) . $TK_BIN_DIR/tkConfig.sh else AC_MSG_RESULT([could not find $TK_BIN_DIR/tkConfig.sh]) fi AC_SUBST(TK_BIN_DIR) AC_SUBST(TK_SRC_DIR) AC_SUBST(TK_LIB_FILE) AC_SUBST(TK_XINCLUDES) ]) #------------------------------------------------------------------------ # SC_ENABLE_GCC -- # # Allows the use of GCC if available # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-gcc # # Sets the following vars: # CC Command to use for the compiler #------------------------------------------------------------------------ AC_DEFUN(SC_ENABLE_GCC, [ AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available [--disable-gcc]], [ok=$enableval], [ok=no]) if test "$ok" = "yes"; then CC=gcc else case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) CC=cl ;; *) CC=${CC-cc} ;; esac fi AC_PROG_CC ]) #------------------------------------------------------------------------ # SC_ENABLE_SHARED -- # # Allows the building of shared libraries # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-shared=yes|no # # Defines the following vars: # STATIC_BUILD Used for building import/export libraries # on Windows. # # Sets the following vars: # SHARED_BUILD Value of 1 or 0 #------------------------------------------------------------------------ AC_DEFUN(SC_ENABLE_SHARED, [ AC_MSG_CHECKING([how to build libraries]) AC_ARG_ENABLE(shared, [ --enable-shared build and link with shared libraries [--enable-shared]], [tcl_ok=$enableval], [tcl_ok=yes]) if test "${enable_shared+set}" = set; then enableval="$enable_shared" tcl_ok=$enableval else tcl_ok=yes fi if test "$tcl_ok" = "yes" ; then AC_MSG_RESULT([shared]) SHARED_BUILD=1 else AC_MSG_RESULT([static]) SHARED_BUILD=0 AC_DEFINE(STATIC_BUILD) fi ]) #------------------------------------------------------------------------ # SC_ENABLE_THREADS -- # # Specify if thread support should be enabled # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-threads # # Sets the following vars: # THREADS_LIBS Thread library(s) # # Defines the following vars: # TCL_THREADS # _REENTRANT # #------------------------------------------------------------------------ AC_DEFUN(SC_ENABLE_THREADS, [ AC_MSG_CHECKING(for building with threads) AC_ARG_ENABLE(threads, [ --enable-threads build with threads], [tcl_ok=$enableval], [tcl_ok=no]) if test "$tcl_ok" = "yes"; then TCL_THREADS=1 AC_DEFINE(TCL_THREADS) AC_DEFINE(_REENTRANT) case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) AC_MSG_RESULT(yes) ;; *) AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no) if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -lpthread" AC_MSG_RESULT(yes) else TCL_THREADS=0 AC_MSG_RESULT(no) AC_MSG_WARN("Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...") fi ;; esac else TCL_THREADS=0 AC_MSG_RESULT(no (default)) fi ]) #------------------------------------------------------------------------ # SC_ENABLE_SYMBOLS -- # # Specify if debugging symbols should be used # # Arguments: # none # # Requires the following vars to be set: # CFLAGS_DEBUG # CFLAGS_OPTIMIZE # LDFLAGS_DEBUG # LDFLAGS_OPTIMIZE # # Results: # # Adds the following arguments to configure: # --enable-symbols # # Defines the following vars: # CFLAGS_DEFAULT Sets to CFLAGS_DEBUG if true # Sets to CFLAGS_OPTIMIZE if false # LDFLAGS_DEFAULT Sets to LDFLAGS_DEBUG if true # Sets to LDFLAGS_OPTIMIZE if false # DBGX Debug library extension # #------------------------------------------------------------------------ AC_DEFUN(SC_ENABLE_SYMBOLS, [ case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) tcl_dbgx=d ;; *) tcl_dbgx=g ;; esac AC_MSG_CHECKING([for build with symbols]) AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols [--disable-symbols]], [tcl_ok=$enableval], [tcl_ok=no]) if test "$tcl_ok" = "yes"; then CFLAGS_DEFAULT="${CFLAGS_DEBUG}" LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}" DBGX=${tcl_dbgx} TCL_DBGX=${tcl_dbgx} AC_MSG_RESULT([yes]) else CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" DBGX="" TCL_DBGX="" AC_MSG_RESULT([no]) fi AC_SUBST(TCL_DBGX) AC_SUBST(CFLAGS_DEFAULT) AC_SUBST(LDFLAGS_DEFAULT) ]) #-------------------------------------------------------------------- # SC_CONFIG_CFLAGS # # Try to determine the proper flags to pass to the compiler # for building shared libraries and other such nonsense. # # Arguments: # none # # Results: # # Defines the following vars: # # DL_OBJS - Name of the object file that implements dynamic # loading for Tcl on this system. # DL_LIBS - Library file(s) to include in tclsh and other base # applications in order for the "load" command to work. # LDFLAGS - Flags to pass to the compiler when linking object # files into an executable application binary such # as tclsh. # LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib", # that tell the run-time dynamic linker where to look # for shared libraries such as libtcl.so. Depends on # the variable LIB_RUNTIME_DIR in the Makefile. # MAKE_LIB - Command to execute to build the Tcl library; # differs depending on whether or not Tcl is being # compiled as a shared library. # SHLIB_CFLAGS - Flags to pass to cc when compiling the components # of a shared library (may request position-independent # code, among other things). # SHLIB_LD - Base command to use for combining object files # into a shared library. # SHLIB_LD_LIBS - Dependent libraries for the linker to scan when # creating shared libraries. This symbol typically # goes at the end of the "ld" commands that build # shared libraries. The value of the symbol is # "${LIBS}" if all of the dependent libraries should # be specified when creating a shared library. If # dependent libraries should not be specified (as on # SunOS 4.x, where they cause the link to fail, or in # general if Tcl and Tk aren't themselves shared # libraries), then this symbol has an empty string # as its value. # SHLIB_SUFFIX - Suffix to use for the names of dynamically loadable # extensions. An empty string means we don't know how # to use shared libraries on this platform. # TCL_LIB_FILE - Name of the file that contains the Tcl library, such # as libtcl7.8.so or libtcl7.8.a. # TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl" # in the shared library name, using the $VERSION variable # to put the version in the right place. This is used # by platforms that need non-standard library names. # Examples: ${VERSION}.so.1.1 on NetBSD, since it needs # to have a version after the .so, and ${VERSION}.a # on AIX, since the Tcl shared library needs to have # a .a extension whereas shared objects for loadable # extensions have a .so extension. Defaults to # ${VERSION}${SHLIB_SUFFIX}. # TCL_NEEDS_EXP_FILE - # 1 means that an export file is needed to link to a # shared library. # TCL_EXP_FILE - The name of the installed export / import file which # should be used to link to the Tcl shared library. # Empty if Tcl is unshared. # TCL_BUILD_EXP_FILE - # The name of the built export / import file which # should be used to link to the Tcl shared library. # Empty if Tcl is unshared. # CFLAGS_DEBUG - # Flags used when running the compiler in debug mode # CFLAGS_OPTIMIZE - # Flags used when running the compiler in optimize mode # # EXTRA_CFLAGS # # Subst's the following vars: # DL_LIBS # CFLAGS_DEBUG # CFLAGS_OPTIMIZE #-------------------------------------------------------------------- AC_DEFUN(SC_CONFIG_CFLAGS, [ # Step 0: Enable 64 bit support? AC_MSG_CHECKING([if 64bit support is enabled]) AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support],,enableval="no") if test "$enableval" = "yes"; then AC_MSG_RESULT(Will compile with 64bit support) do64bit=yes else do64bit=no fi AC_MSG_RESULT($do64bit) # Step 1: set the variable "system" to hold the name and version number # for the system. This can usually be done via the "uname" command, but # there are a few systems, like Next, where this doesn't work. AC_MSG_CHECKING([system version (for dynamic loading)]) if test -f /usr/lib/NextStep/software_version; then system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` else system=`uname -s`-`uname -r` if test "$?" -ne 0 ; then AC_MSG_RESULT([unknown (can't find uname command)]) system=unknown else # Special check for weird MP-RAS system (uname returns weird # results, and the version is kept in special file). if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then system=MP-RAS-`awk '{print $3}' /etc/.relid'` fi if test "`uname -s`" = "AIX" ; then system=AIX-`uname -v`.`uname -r` fi AC_MSG_RESULT($system) fi fi # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no) # Step 3: set configuration options based on system name and version. do64bit_ok=no fullSrcDir=`cd $srcdir; pwd` EXTRA_CFLAGS="" TCL_EXPORT_FILE_SUFFIX="" UNSHARED_LIB_SUFFIX="" TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`' ECHO_VERSION='`echo ${VERSION}`' TCL_LIB_VERSIONS_OK=ok CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE=-O TCL_NEEDS_EXP_FILE=0 TCL_BUILD_EXP_FILE="" TCL_EXP_FILE="" STLIB_LD="ar cr" case $system in AIX-4.[[2-9]]) SHLIB_CFLAGS="" SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' TCL_NEEDS_EXP_FILE=1 TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' ;; AIX-*) SHLIB_CFLAGS="" SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" LIBOBJS="$LIBOBJS tclLoadAix.o" DL_LIBS="-lld" LDFLAGS="" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' TCL_NEEDS_EXP_FILE=1 TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' ;; BSD/OS-2.1*|BSD/OS-3*) SHLIB_CFLAGS="" SHLIB_LD="shlicc -r" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="" LD_SEARCH_FLAGS="" ;; BSD/OS-4.*) SHLIB_CFLAGS="-export-dynamic -fPIC" SHLIB_LD="cc -shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="-export-dynamic" LD_SEARCH_FLAGS="" ;; *win32*|*WIN32*|CYGWIN_NT*|cygwin_nt*|*CYGWIN_98*|*CYGWIN_95*) CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d" CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}" LDFLAGS_CONSOLE="-subsystem:console" LDFLAGS_WINDOW="-subsystem:windows" LDFLAGS_DEBUG="-debug:full -debugtype:cv" LDFLAGS_OPTIMIZE="-release" EXTRA_CFLAGS="-YX" PATHTYPE=-w STLIB_LD="lib -nologo" SHLIB_LD="link -dll -nologo" SHLIB_LD_LIBS="user32.lib advapi32.lib" RC="rc" ;; dgux*) SHLIB_CFLAGS="-K PIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="" LD_SEARCH_FLAGS="" ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*|HP-UX-*.11.*) SHLIB_SUFFIX=".sl" AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = yes; then SHLIB_CFLAGS="+z" SHLIB_LD="ld -b" SHLIB_LD_LIBS="" DL_OBJS="tclLoadShl.o" DL_LIBS="-ldld" LDFLAGS="-Wl,-E" LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' fi ;; IRIX-4.*) SHLIB_CFLAGS="-G 0" SHLIB_SUFFIX=".a" SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadAout.o" DL_LIBS="" LDFLAGS="-Wl,-D,08000000" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' ;; IRIX-5.*|IRIX-6.*|IRIX64-6.5*) SHLIB_CFLAGS="" SHLIB_LD="ld -n32 -shared -rdata_shared" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then EXTRA_CFLAGS="-mabi=n32" LDFLAGS="-mabi=n32" else case $system in IRIX-6.3) # Use to build 6.2 compatible binaries on 6.3. EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS" ;; *) EXTRA_CFLAGS="-n32" ;; esac LDFLAGS="-n32" fi ;; IRIX64-6.*) SHLIB_CFLAGS="" SHLIB_LD="ld -32 -shared -rdata_shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' ;; Linux*) SHLIB_CFLAGS="-fPIC" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings # when you inline the string and math operations. Turn this off to # get rid of the warnings. CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" if test "$have_dl" = yes; then SHLIB_LD="${CC} -shared" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="-rdynamic" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' else AC_CHECK_HEADER(dld.h, [ SHLIB_LD="ld -shared" DL_OBJS="tclLoadDld.o" DL_LIBS="-ldld" LDFLAGS="" LD_SEARCH_FLAGS=""]) fi if test "`uname -m`" = "alpha" ; then EXTRA_CFLAGS="-mieee" fi ;; MP-RAS-02*) SHLIB_CFLAGS="-K PIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="" LD_SEARCH_FLAGS="" ;; MP-RAS-*) SHLIB_CFLAGS="-K PIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="-Wl,-Bexport" LD_SEARCH_FLAGS="" ;; NetBSD-*|FreeBSD-[[12]].*|OpenBSD-*) # Not available on all versions: check for include file. AC_CHECK_HEADER(dlfcn.h, [ SHLIB_CFLAGS="-fpic" SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS="" SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' ], [ SHLIB_CFLAGS="" SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".a" DL_OBJS="tclLoadAout.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' ]) # FreeBSD doesn't handle version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' TCL_LIB_VERSIONS_OK=nodots ;; FreeBSD-*) # FreeBSD 3.* and greater have ELF. SHLIB_CFLAGS="-fpic" SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS="" ;; NEXTSTEP-*) SHLIB_CFLAGS="" SHLIB_LD="cc -nostdlib -r" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadNext.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS="" ;; OS/390-*) CFLAGS_OPTIMIZE="" # Optimizer is buggy AC_DEFINE(_OE_SOCKETS) # needed in sys/socket.h ;; OSF1-1.0|OSF1-1.1|OSF1-1.2) # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 SHLIB_CFLAGS="" # Hack: make package name same as library name SHLIB_LD='ld -R -export $@:' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadOSF.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS="" ;; OSF1-1.*) # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 SHLIB_CFLAGS="-fpic" SHLIB_LD="ld -shared" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS="" ;; OSF1-V*) # Digital OSF/1 SHLIB_CFLAGS="" SHLIB_LD='ld -shared -expect_unresolved "*"' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' ;; RISCos-*) SHLIB_CFLAGS="-G 0" SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".a" DL_OBJS="tclLoadAout.o" DL_LIBS="" LDFLAGS="-Wl,-D,08000000" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' ;; SCO_SV-3.2*) # 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. SHLIB_CFLAGS="-Kpic -belf" SHLIB_LD="ld -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="-belf -Wl,-Bexport" LD_SEARCH_FLAGS="" ;; SINIX*5.4*) SHLIB_CFLAGS="-K PIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="" LD_SEARCH_FLAGS="" ;; SunOS-4*) SHLIB_CFLAGS="-PIC" SHLIB_LD="ld" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' # SunOS can't handle version numbers with dots in them in library # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it # requires an extra version number at the end of .so file names. # So, the library has to have a name like libtcl75.so.1.0 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' TCL_LIB_VERSIONS_OK=nodots ;; SunOS-5.[[0-6]]*) SHLIB_CFLAGS="-KPIC" SHLIB_LD="/usr/ccs/bin/ld -G -z text" # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="" LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' ;; SunOS-5*) SHLIB_CFLAGS="-KPIC" SHLIB_LD="/usr/ccs/bin/ld -G -z text" LDFLAGS="" do64bit_ok=no if test "$do64bit" = "yes" ; then arch=`isainfo` if test "$arch" = "sparcv9 sparc" ; then if test "$CC" != "gcc" -a `$CC -v 2>&1 | grep -c gcc` = "0" ; then do64bit_ok=yes EXTRA_CFLAGS="-xarch=v9" LDFLAGS="-xarch=v9" else AC_MSG_WARN("64bit mode not supported using GCC on $system") fi else AC_MSG_WARN("64bit mode only supported sparcv9 system") fi fi # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' else LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' fi ;; ULTRIX-4.*) SHLIB_CFLAGS="-G 0" SHLIB_SUFFIX=".a" SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadAout.o" DL_LIBS="" LDFLAGS="-Wl,-D,08000000" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' ;; UNIX_SV* | UnixWare-5*) SHLIB_CFLAGS="-KPIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" 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. hold_ldflags=$LDFLAGS AC_MSG_CHECKING(for ld accepts -Bexport flag) LDFLAGS="${LDFLAGS} -Wl,-Bexport" AC_TRY_LINK(, [int i;], found=yes, found=no) LDFLAGS=$hold_ldflags AC_MSG_RESULT($found) if test $found = yes; then LDFLAGS="-Wl,-Bexport" else LDFLAGS="" fi LD_SEARCH_FLAGS="" ;; esac if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then AC_MSG_WARN("64bit support being disabled -- not supported on this platform") fi # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic # Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop, # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need # to determine which of several header files defines the a.out file # format (a.out.h, sys/exec.h, or sys/exec_aout.h). At present, we # support only a file format that is more or less version-7-compatible. # In particular, # - a.out files must begin with `struct exec'. # - the N_TXTOFF on the `struct exec' must compute the seek address # of the text segment # - The `struct exec' must contain a_magic, a_text, a_data, a_bss # and a_entry fields. # The following compilation should succeed if and only if either sys/exec.h # or a.out.h is usable for the purpose. # # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the # `struct exec' includes a second header that contains information that # duplicates the v7 fields that are needed. if test "x$DL_OBJS" = "xtclLoadAout.o" ; then AC_MSG_CHECKING(sys/exec.h) AC_TRY_COMPILE([#include ],[ struct exec foo; unsigned long seek; int flag; #if defined(__mips) || defined(mips) seek = N_TXTOFF (foo.ex_f, foo.ex_o); #else seek = N_TXTOFF (foo); #endif flag = (foo.a_magic == OMAGIC); return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; ], tcl_ok=usable, tcl_ok=unusable) AC_MSG_RESULT($tcl_ok) if test $tcl_ok = usable; then AC_DEFINE(USE_SYS_EXEC_H) else AC_MSG_CHECKING(a.out.h) AC_TRY_COMPILE([#include ],[ struct exec foo; unsigned long seek; int flag; #if defined(__mips) || defined(mips) seek = N_TXTOFF (foo.ex_f, foo.ex_o); #else seek = N_TXTOFF (foo); #endif flag = (foo.a_magic == OMAGIC); return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; ], tcl_ok=usable, tcl_ok=unusable) AC_MSG_RESULT($tcl_ok) if test $tcl_ok = usable; then AC_DEFINE(USE_A_OUT_H) else AC_MSG_CHECKING(sys/exec_aout.h) AC_TRY_COMPILE([#include ],[ struct exec foo; unsigned long seek; int flag; #if defined(__mips) || defined(mips) seek = N_TXTOFF (foo.ex_f, foo.ex_o); #else seek = N_TXTOFF (foo); #endif flag = (foo.a_midmag == OMAGIC); return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; ], tcl_ok=usable, tcl_ok=unusable) AC_MSG_RESULT($tcl_ok) if test $tcl_ok = usable; then AC_DEFINE(USE_SYS_EXEC_AOUT_H) else DL_OBJS="" fi fi fi fi # Step 5: disable dynamic loading if requested via a command-line switch. AC_ARG_ENABLE(load, [ --disable-load disallow dynamic loading and "load" command], [tcl_ok=$enableval], [tcl_ok=yes]) if test "$tcl_ok" = "no"; then DL_OBJS="" fi if test "x$DL_OBJS" != "x" ; then BUILD_DLTEST="\$(DLTEST_TARGETS)" else echo "Can't figure out how to do dynamic loading or shared libraries" echo "on this system." SHLIB_CFLAGS="" SHLIB_LD="" SHLIB_SUFFIX="" DL_OBJS="tclLoadNone.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS="" BUILD_DLTEST="" fi # 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" ; then if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then case $system in AIX-*) ;; BSD/OS*) ;; IRIX*) ;; NetBSD-*|FreeBSD-*|OpenBSD-*) ;; RISCos-*) ;; ULTRIX-4.*) ;; *) SHLIB_CFLAGS="-fPIC" ;; esac fi fi if test "$SHARED_LIB_SUFFIX" = "" ; then SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}' fi if test "$UNSHARED_LIB_SUFFIX" = "" ; then UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' fi AC_SUBST(STLIB_LD) AC_SUBST(SHLIB_LD) AC_SUBST(SHLIB_CFLAGS) AC_SUBST(SHLIB_LDFLAGS) AC_SUBST(DL_LIBS) AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(LDFLAGS_DEBUG) AC_SUBST(LDFLAGS_OPTIMIZE) ]) #-------------------------------------------------------------------- # SC_SERIAL_PORT # # Determine which interface to use to talk to the serial port. # Note that #include lines must begin in leftmost column for # some compilers to recognize them as preprocessor directives. # # Arguments: # none # # Results: # # Defines only one of the following vars: # USE_TERMIOS # USE_TERMIO # USE_SGTTY # #-------------------------------------------------------------------- AC_DEFUN(SC_SERIAL_PORT, [ AC_MSG_CHECKING([termios vs. termio vs. sgtty]) AC_TRY_RUN([ #include main() { struct termios t; if (tcgetattr(0, &t) == 0) { cfsetospeed(&t, 0); t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tk_ok=termios, tk_ok=no, tk_ok=no) if test $tk_ok = termios; then AC_DEFINE(USE_TERMIOS) else AC_TRY_RUN([ #include main() { struct termio t; if (ioctl(0, TCGETA, &t) == 0) { t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tk_ok=termio, tk_ok=no, tk_ok=no) if test $tk_ok = termio; then AC_DEFINE(USE_TERMIO) else AC_TRY_RUN([ #include main() { struct sgttyb t; if (ioctl(0, TIOCGETP, &t) == 0) { t.sg_ospeed = 0; t.sg_flags |= ODDP | EVENP | RAW; return 0; } return 1; }], tk_ok=sgtty, tk_ok=none, tk_ok=none) if test $tk_ok = sgtty; then AC_DEFINE(USE_SGTTY) fi fi fi AC_MSG_RESULT($tk_ok) ]) #-------------------------------------------------------------------- # SC_MISSING_POSIX_HEADERS # # Supply substitutes for missing POSIX header files. Special # notes: # - stdlib.h doesn't define strtol, strtoul, or # strtod insome versions of SunOS # - some versions of string.h don't declare procedures such # as strstr # # Arguments: # none # # Results: # # Defines some of the following vars: # NO_DIRENT_H # NO_ERRNO_H # NO_VALUES_H # NO_LIMITS_H # NO_STDLIB_H # NO_STRING_H # NO_SYS_WAIT_H # NO_DLFCN_H # HAVE_UNISTD_H # HAVE_SYS_PARAM_H # # HAVE_STRING_H ? # #-------------------------------------------------------------------- AC_DEFUN(SC_MISSING_POSIX_HEADERS, [ AC_MSG_CHECKING(dirent.h) AC_TRY_LINK([#include #include ], [ #ifndef _POSIX_SOURCE # ifdef __Lynx__ /* * Generate compilation error to make the test fail: Lynx headers * are only valid if really in the POSIX environment. */ missing_procedure(); # endif #endif DIR *d; struct dirent *entryPtr; char *p; d = opendir("foobar"); entryPtr = readdir(d); p = entryPtr->d_name; closedir(d); ], tcl_ok=yes, tcl_ok=no) if test $tcl_ok = no; then AC_DEFINE(NO_DIRENT_H) fi AC_MSG_RESULT($tcl_ok) AC_CHECK_HEADER(errno.h, , AC_DEFINE(NO_ERRNO_H)) AC_CHECK_HEADER(float.h, , AC_DEFINE(NO_FLOAT_H)) AC_CHECK_HEADER(values.h, , AC_DEFINE(NO_VALUES_H)) AC_CHECK_HEADER(limits.h, , AC_DEFINE(NO_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) AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0) if test $tcl_ok = 0; then AC_DEFINE(NO_STDLIB_H) fi AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0) AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0) AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0) # See also memmove check below for a place where NO_STRING_H can be # set and why. if test $tcl_ok = 0; then AC_DEFINE(NO_STRING_H) fi AC_CHECK_HEADER(sys/wait.h, , AC_DEFINE(NO_SYS_WAIT_H)) AC_CHECK_HEADER(dlfcn.h, , AC_DEFINE(NO_DLFCN_H)) # OS/390 lacks sys/param.h (and doesn't need it, by chance). AC_HAVE_HEADERS(unistd.h sys/param.h) ]) #-------------------------------------------------------------------- # SC_PATH_X # # Locate the X11 header files and the X11 library archive. Try # the ac_path_x macro first, but if it doesn't find the X stuff # (e.g. because there's no xmkmf program) then check through # a list of possible directories. Under some conditions the # autoconf macro will return an include directory that contains # no include files, so double-check its result just to be safe. # # Arguments: # none # # Results: # # Sets the the following vars: # XINCLUDES # XLIBSW # #-------------------------------------------------------------------- AC_DEFUN(SC_PATH_X, [ AC_PATH_X not_really_there="" if test "$no_x" = ""; then if test "$x_includes" = ""; then AC_TRY_CPP([#include ], , not_really_there="yes") else if test ! -r $x_includes/X11/Intrinsic.h; then not_really_there="yes" fi fi fi if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then AC_MSG_CHECKING(for X11 header files) XINCLUDES="# no special path needed" AC_TRY_CPP([#include ], , XINCLUDES="nope") if test "$XINCLUDES" = nope; 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/Intrinsic.h; then AC_MSG_RESULT($i) XINCLUDES=" -I$i" break fi done fi else if test "$x_includes" != ""; then XINCLUDES=-I$x_includes else XINCLUDES="# no special path needed" fi fi if test "$XINCLUDES" = nope; then AC_MSG_RESULT(couldn't find any!) XINCLUDES="# no include files found" fi if test "$no_x" = yes; then AC_MSG_CHECKING(for X11 libraries) 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; then AC_MSG_RESULT($i) XLIBSW="-L$i -lX11" x_libraries="$i" break fi done else if test "$x_libraries" = ""; then XLIBSW=-lX11 else XLIBSW="-L$x_libraries -lX11" fi fi if test "$XLIBSW" = nope ; then AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow) fi if test "$XLIBSW" = nope ; then AC_MSG_RESULT(couldn't find any! Using -lX11.) XLIBSW=-lX11 fi ]) #-------------------------------------------------------------------- # SC_BLOCKING_STYLE # # The statements below check for systems where POSIX-style # non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. # On these systems (mostly older ones), use the old BSD-style # FIONBIO approach instead. # # Arguments: # none # # Results: # # Defines some of the following vars: # HAVE_SYS_IOCTL_H # HAVE_SYS_FILIO_H # USE_FIONBIO # O_NONBLOCK # #-------------------------------------------------------------------- AC_DEFUN(SC_BLOCKING_STYLE, [ AC_CHECK_HEADERS(sys/ioctl.h) AC_CHECK_HEADERS(sys/filio.h) AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O]) if test -f /usr/lib/NextStep/software_version; then system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` else system=`uname -s`-`uname -r` if test "$?" -ne 0 ; then system=unknown else # Special check for weird MP-RAS system (uname returns weird # results, and the version is kept in special file). if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then system=MP-RAS-`awk '{print $3}' /etc/.relid'` fi if test "`uname -s`" = "AIX" ; then system=AIX-`uname -v`.`uname -r` fi fi fi case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since # using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO # code (JO, 5/31/97). OSF*) AC_DEFINE(USE_FIONBIO) AC_MSG_RESULT(FIONBIO) ;; SunOS-4*) AC_DEFINE(USE_FIONBIO) AC_MSG_RESULT(FIONBIO) ;; ULTRIX-4.*) AC_DEFINE(USE_FIONBIO) AC_MSG_RESULT(FIONBIO) ;; *) AC_MSG_RESULT(O_NONBLOCK) ;; esac ]) #-------------------------------------------------------------------- # SC_HAVE_VFORK # # Check to see whether the system provides a vfork kernel call. # If not, then use fork instead. Also, check for a problem with # vforks and signals that can cause core dumps if a vforked child # resets a signal handler. If the problem exists, then use fork # instead of vfork. # # Arguments: # none # # Results: # # Defines some of the following vars: # vfork (=fork) # #-------------------------------------------------------------------- AC_DEFUN(SC_HAVE_VFORK, [ AC_TYPE_SIGNAL() AC_CHECK_FUNC(vfork, tcl_ok=1, tcl_ok=0) if test "$tcl_ok" = 1; then AC_MSG_CHECKING([vfork/signal bug]); AC_TRY_RUN([ #include #include #include int gotSignal = 0; sigProc(sig) int sig; { gotSignal = 1; } main() { int pid, sts; (void) signal(SIGCHLD, sigProc); pid = vfork(); if (pid < 0) { exit(1); } else if (pid == 0) { (void) signal(SIGCHLD, SIG_DFL); _exit(0); } else { (void) wait(&sts); } exit((gotSignal) ? 0 : 1); }], tcl_ok=1, tcl_ok=0, tcl_ok=0) if test "$tcl_ok" = 1; then AC_MSG_RESULT(ok) else AC_MSG_RESULT([buggy, using fork instead]) fi fi rm -f core if test "$tcl_ok" = 0; then AC_DEFINE(vfork, fork) fi ]) #-------------------------------------------------------------------- # SC_TIME_HANLDER # # Checks how the system deals with time.h, what time structures # are used on the system, and what fields the structures have. # # Arguments: # none # # Results: # # Defines some of the following vars: # USE_DELTA_FOR_TZ # HAVE_TM_GMTOFF # HAVE_TM_TZADJ # HAVE_TIMEZONE_VAR # #-------------------------------------------------------------------- AC_DEFUN(SC_TIME_HANDLER, [ AC_CHECK_HEADERS(sys/time.h) AC_HEADER_TIME AC_STRUCT_TIMEZONE AC_MSG_CHECKING([tm_tzadj in struct tm]) AC_TRY_COMPILE([#include ], [struct tm tm; tm.tm_tzadj;], [AC_DEFINE(HAVE_TM_TZADJ) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) AC_MSG_CHECKING([tm_gmtoff in struct tm]) AC_TRY_COMPILE([#include ], [struct tm tm; tm.tm_gmtoff;], [AC_DEFINE(HAVE_TM_GMTOFF) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) # # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # have_timezone=no AC_MSG_CHECKING([long timezone variable]) AC_TRY_COMPILE([#include ], [extern long timezone; timezone += 1; exit (0);], [have_timezone=yes AC_DEFINE(HAVE_TIMEZONE_VAR) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # if test "$have_timezone" = no; then AC_MSG_CHECKING([time_t timezone variable]) AC_TRY_COMPILE([#include ], [extern time_t timezone; timezone += 1; exit (0);], [AC_DEFINE(HAVE_TIMEZONE_VAR) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) fi # # AIX does not have a timezone field in struct tm. When the AIX bsd # library is used, the timezone global and the gettimeofday methods are # to be avoided for timezone deduction instead, we deduce the timezone # by comparing the localtime result on a known GMT value. # if test "`uname -s`" = "AIX" ; then AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes) if test $libbsd = yes; then AC_DEFINE(USE_DELTA_FOR_TZ) fi fi ]) #-------------------------------------------------------------------- # SC_BUGGY_STRTOD # # Under Solaris 2.4, strtod returns the wrong value for the # terminating character under some conditions. Check for this # and if the problem exists use a substitute procedure # "fixstrtod" (provided by Tcl) that corrects the error. # # Arguments: # none # # Results: # # Might defines some of the following vars: # strtod (=fixstrtod) # #-------------------------------------------------------------------- AC_DEFUN(SC_BUGGY_STRTOD, [ AC_CHECK_FUNC(strtod, tk_strtod=1, tk_strtod=0) if test "$tk_strtod" = 1; then AC_MSG_CHECKING([for Solaris 2.4 strtod bug]) AC_TRY_RUN([ extern double strtod(); int main() { char *string = "NaN"; char *term; strtod(string, &term); if ((term != string) && (term[-1] == 0)) { exit(1); } exit(0); }], tk_ok=1, tk_ok=0, tk_ok=0) if test "$tk_ok" = 1; then AC_MSG_RESULT(ok) else AC_MSG_RESULT(buggy) AC_DEFINE(strtod, fixstrtod) fi fi ]) #-------------------------------------------------------------------- # SC_TCL_LINK_LIBS # # Search for the libraries needed to link the Tcl shell. # Things like the math library (-lm) and socket stuff (-lsocket vs. # -lnsl) are dealt with here. # # Arguments: # Requires the following vars to be set in the Makefile: # DL_LIBS # LIBS # MATH_LIBS # # Results: # # Subst's the following var: # TCL_LIBS # MATH_LIBS # # Might append to the following vars: # LIBS # # Might define the following vars: # HAVE_NET_ERRNO_H # #-------------------------------------------------------------------- AC_DEFUN(SC_TCL_LINK_LIBS, [ #-------------------------------------------------------------------- # On a few very rare systems, all of the libm.a stuff is # already in libc.a. Set compiler flags accordingly. # Also, Linux requires the "ieee" library for math to work # right (and it must appear before "-lm"). #-------------------------------------------------------------------- AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm") AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"]) #-------------------------------------------------------------------- # On AIX systems, libbsd.a has to be linked in to support # non-blocking file IO. This library has to be linked in after # the MATH_LIBS or it breaks the pow() function. The way to # insure proper sequencing, is to add it to the tail of MATH_LIBS. # This library also supplies gettimeofday. #-------------------------------------------------------------------- libbsd=no if test "`uname -s`" = "AIX" ; then AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes) if test $libbsd = yes; then MATH_LIBS="$MATH_LIBS -lbsd" fi fi #-------------------------------------------------------------------- # Interactive UNIX requires -linet instead of -lsocket, plus it # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"]) AC_CHECK_HEADER(net/errno.h, AC_DEFINE(HAVE_NET_ERRNO_H)) #-------------------------------------------------------------------- # Check for the existence of the -lsocket and -lnsl libraries. # The order here is important, so that they end up in the right # order in the command line generated by make. Here are some # special considerations: # 1. Use "connect" and "accept" to check for -lsocket, and # "gethostbyname" to check for -lnsl. # 2. Use each function name only once: can't redo a check because # autoconf caches the results of the last check and won't redo it. # 3. Use -lnsl and -lsocket only if they supply procedures that # aren't already present in the normal libraries. This is because # IRIX 5.2 has libraries, but they aren't needed and they're # bogus: they goof up name resolution if used. # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. # To get around this problem, check for both libraries together # if -lsocket doesn't work by itself. #-------------------------------------------------------------------- tcl_checkBoth=0 AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1) if test "$tcl_checkSocket" = 1; then AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", tcl_checkBoth=1) fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs]) fi AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"])) # Don't perform the eval of the libraries here because DL_LIBS # won't be set until we call SC_CONFIG_CFLAGS TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}' AC_SUBST(TCL_LIBS) AC_SUBST(MATH_LIBS) ]) #------------------------------------------------------------------------ # SC_MAKE_LIB -- # # Generate a line that can be used to build a shared/unshared library # in a platform independent manner. # # Arguments: # none # # Requires: # # Results: # # Defines the following vars: # MAKE_LIB Makefile rule for building a library # MAKE_SHARED_LIB Makefile rule for building a shared library # MAKE_UNSHARED_LIB Makefile rule for building a static # library #------------------------------------------------------------------------ AC_DEFUN(SC_MAKE_LIB, [ case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) if test "${CC-cc}" = "cl"; then MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$]@_OBJECTS) " MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@ \$(\[$]@_OBJECTS) " fi ;; *) MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(\[$]@_OBJECTS)" MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(\[$]@_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}" ;; esac if test "${SHARED_BUILD}" = "1" ; then MAKE_LIB=${MAKE_SHARED_LIB} else MAKE_LIB=${MAKE_STATIC_LIB} fi AC_SUBST(MAKE_LIB) AC_SUBST(MAKE_SHARED_LIB) AC_SUBST(MAKE_STATIC_LIB) ]) #------------------------------------------------------------------------ # SC_LIB_SPEC -- # # Compute the name of an existing object library located in libdir # from the given base name and produce the appropriate linker flags. # # Arguments: # basename The base name of the library without version # numbers, extensions, or "lib" prefixes. # extra_dir Extra directory in which to search for the # library. This location is used first, then # $prefix/$exec-prefix, then some defaults. # # Requires: # CYGPATH command used to generate native style paths # # Results: # # Defines the following vars: # ${basename}_LIB_NAME The computed library name. # ${basename}_LIB_SPEC The computed linker flags. #------------------------------------------------------------------------ AC_DEFUN(SC_LIB_SPEC, [ AC_MSG_CHECKING(for $1 library) # Look in exec-prefix and prefix for the library. If neither of # these were specified, look in libdir. It doesn't matter if libdir # wasn't specified since a search in the unspecified directory will # fail (NONE/lib) if test x"${exec_prefix}" != x"NONE" ; then sc_lib_name_dir="${exec_prefix}/lib" elif test x"${prefix}" != "NONE" ; then sc_lib_name_dir="${prefix}/lib" else eval "sc_lib_name_dir=${libdir}" fi if test x"$2" != x ; then sc_extra_lib_dir=$2 else sc_extra_lib_dir=NONE fi for i in \ `ls -dr ${sc_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr ${sc_extra_lib_dir}/$1.lib 2>/dev/null ` \ `ls -dr ${sc_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \ `ls -dr ${sc_extra_lib_dir}/lib$1.* 2>/dev/null ` \ `ls -dr ${sc_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr ${sc_lib_name_dir}/$1.lib 2>/dev/null ` \ `ls -dr ${sc_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \ `ls -dr ${sc_lib_name_dir}/lib$1.* 2>/dev/null ` \ `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr /usr/lib/$1.lib 2>/dev/null ` \ `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \ `ls -dr /usr/lib/lib$1.* 2>/dev/null ` \ `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr /usr/local/lib/$1.lib 2>/dev/null ` \ `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` \ `ls -dr /usr/local/lib/lib$1.* 2>/dev/null ` ; do if test -f "$i" ; then sc_lib_name_dir=`dirname $i` $1_LIB_NAME=`basename $i` $1_LIB_PATH_NAME=$i break fi done case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) $1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME}`\" ;; *) # Strip off the leading "lib" and trailing ".a" or ".so" sc_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'` $1_LIB_SPEC="-L${sc_lib_name_dir} -l${sc_lib_name_lib}" ;; esac if test "x${$1_LIB_NAME}" = x ; then AC_MSG_ERROR(not found) else AC_MSG_RESULT(${$1_LIB_SPEC}) fi ]) #------------------------------------------------------------------------ # SC_PRIVATE_TCL_HEADERS -- # # Locate the private Tcl include files # # Arguments: # # Requires: # TCL_SRC_DIR Assumes that SC_LOAD_TCLCONFIG has # already been called. # # Results: # # Substs the following vars: # TCL_TOP_DIR_NATIVE # TCL_GENERIC_DIR_NATIVE # TCL_UNIX_DIR_NATIVE # TCL_WIN_DIR_NATIVE # TCL_BMAP_DIR_NATIVE # TCL_TOOL_DIR_NATIVE # TCL_PLATFORM_DIR_NATIVE # TCL_BIN_DIR_NATIVE # TCL_INCLUDES #------------------------------------------------------------------------ AC_DEFUN(SC_PRIVATE_TCL_HEADERS, [ AC_MSG_CHECKING(for Tcl private include files) case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\" TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\" TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\" TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\" TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\" TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\" TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\" TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE} ;; *) TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)' TCL_GENERIC_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/generic' TCL_UNIX_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/unix' TCL_WIN_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/win' TCL_BMAP_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/bitmaps' TCL_TOOL_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/tools' TCL_COMPAT_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/compat' TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE} ;; esac AC_SUBST(TCL_TOP_DIR_NATIVE) AC_SUBST(TCL_GENERIC_DIR_NATIVE) AC_SUBST(TCL_UNIX_DIR_NATIVE) AC_SUBST(TCL_WIN_DIR_NATIVE) AC_SUBST(TCL_BMAP_DIR_NATIVE) AC_SUBST(TCL_TOOL_DIR_NATIVE) AC_SUBST(TCL_PLATFORM_DIR_NATIVE) TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}" AC_SUBST(TCL_INCLUDES) AC_MSG_RESULT(Using srcdir found in tclConfig.sh) ]) #------------------------------------------------------------------------ # SC_PUBLIC_TCL_HEADERS -- # # Locate the installed public Tcl header files # # Arguments: # None. # # Requires: # CYGPATH must be set # # Results: # # Adds a --with-tclinclude switch to configure. # Result is cached. # # Substs the following vars: # TCL_INCLUDES #------------------------------------------------------------------------ AC_DEFUN(SC_PUBLIC_TCL_HEADERS, [ AC_MSG_CHECKING(for Tcl public headers) AC_ARG_WITH(tclinclude, [ --with-tclinclude directory containing the public Tcl header files.], with_tclinclude=${withval}) if test x"${with_tclinclude}" != x ; then if test -f "${with_tclinclude}/tcl.h" ; then ac_cv_c_tclh=${with_tclinclude} else AC_MSG_ERROR([${with_tclinclude} directory does not contain Tcl public header file tcl.h]) fi else AC_CACHE_VAL(ac_cv_c_tclh, [ # Use the value from --with-tclinclude, if it was given if test x"${with_tclinclude}" != x ; then ac_cv_c_tclh=${with_tclinclude} else # Check in the includedir, if --prefix was specified eval "temp_includedir=${includedir}" for i in \ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ `ls -d ${temp_includedir} 2>/dev/null` \ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \ /usr/local/include /usr/include ; do if test -f "$i/tcl.h" ; then ac_cv_c_tclh=$i break fi done fi ]) fi # Print a message based on how we determined the include path if test x"${ac_cv_c_tclh}" = x ; then AC_MSG_ERROR(tcl.h not found. Please specify its location with --with-tclinclude) else AC_MSG_RESULT(${ac_cv_c_tclh}) fi # Convert to a native path and substitute into the output files. INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}` TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" AC_SUBST(TCL_INCLUDES) ]) #------------------------------------------------------------------------ # SC_PRIVATE_TK_HEADERS -- # # Locate the private Tk include files # # Arguments: # # Requires: # TK_SRC_DIR Assumes that SC_LOAD_TKCONFIG has # already been called. # # Results: # # Substs the following vars: # TK_INCLUDES #------------------------------------------------------------------------ AC_DEFUN(SC_PRIVATE_TK_HEADERS, [ AC_MSG_CHECKING(for Tk private include files) case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) TK_TOP_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}`\" TK_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/unix`\" TK_WIN_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/win`\" TK_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/generic`\" TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\" TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE} TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}" ;; *) TK_TOP_DIR_NATIVE='$(TK_SRC_DIR)' TK_GENERIC_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/generic' TK_UNIX_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/unix' TK_WIN_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/win' TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE} TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}" ;; esac AC_SUBST(TK_TOP_DIR_NATIVE) AC_SUBST(TK_UNIX_DIR_NATIVE) AC_SUBST(TK_WIN_DIR_NATIVE) AC_SUBST(TK_GENERIC_DIR_NATIVE) AC_SUBST(TK_XLIB_DIR_NATIVE) AC_SUBST(TK_PLATFORM_DIR_NATIVE) AC_SUBST(TK_INCLUDES) AC_MSG_RESULT(Using srcdir found in tkConfig.sh) ]) #------------------------------------------------------------------------ # SC_PUBLIC_TK_HEADERS -- # # Locate the installed public Tk header files # # Arguments: # None. # # Requires: # CYGPATH must be set # # Results: # # Adds a --with-tkinclude switch to configure. # Result is cached. # # Substs the following vars: # TK_INCLUDES #------------------------------------------------------------------------ AC_DEFUN(SC_PUBLIC_TK_HEADERS, [ AC_MSG_CHECKING(for Tk public headers) AC_ARG_WITH(tkinclude, [ --with-tkinclude directory containing the public Tk header files.], with_tkinclude=${withval}) if test x"${with_tkinclude}" != x ; then if test -f "${with_tkinclude}/tk.h" ; then ac_cv_c_tkh=${with_tkinclude} else AC_MSG_ERROR([${with_tkinclude} directory does not contain Tk public header file tk.h]) fi else AC_CACHE_VAL(ac_cv_c_tkh, [ # Use the value from --with-tkinclude, if it was given if test x"${with_tkinclude}" != x ; then ac_cv_c_tkh=${with_tkinclude} else # Check in the includedir, if --prefix was specified eval "temp_includedir=${includedir}" for i in \ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ `ls -d ${temp_includedir} 2>/dev/null` \ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \ /usr/local/include /usr/include ; do if test -f "$i/tk.h" ; then ac_cv_c_tkh=$i break fi done fi ]) fi # Print a message based on how we determined the include path if test x"${ac_cv_c_tkh}" = x ; then AC_MSG_ERROR(tk.h not found. Please specify its location with --with-tkinclude) else AC_MSG_RESULT(${ac_cv_c_tkh}) fi # Convert to a native path and substitute into the output files. INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}` TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" AC_SUBST(TK_INCLUDES) ]) #------------------------------------------------------------------------ # SC_SIMPLE_EXEEXT # Select the executable extension based on the host type. This # is a lightweight replacement for AC_EXEEXT that doesn't require # a compiler. # # Arguments # none # # Results # Subst's the following values: # EXEEXT #------------------------------------------------------------------------ AC_DEFUN(SC_SIMPLE_EXEEXT, [ AC_MSG_CHECKING(executable extension based on host type) case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) EXEEXT=".exe" ;; *) EXEEXT="" ;; esac AC_MSG_RESULT(${EXEEXT}) AC_SUBST(EXEEXT) ]) #------------------------------------------------------------------------ # SC_PROG_TCLSH # Locate a tclsh shell in the following directories: # ${exec_prefix}/bin # ${prefix}/bin # ${TCL_BIN_DIR} # ${TCL_BIN_DIR}/../bin # ${PATH} # # Arguments # none # # Results # Subst's the following values: # TCLSH_PROG #------------------------------------------------------------------------ AC_DEFUN(SC_PROG_TCLSH, [ AC_MSG_CHECKING([for tclsh]) AC_CACHE_VAL(ac_cv_path_tclsh, [ search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'` for dir in $search_path ; do for j in `ls -r $dir/tclsh[[8-9]]*${EXEEXT} 2> /dev/null` \ `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do if test x"$ac_cv_path_tclsh" = x ; then if test -f "$j" ; then ac_cv_path_tclsh=$j break fi fi done done ]) if test -f "$ac_cv_path_tclsh" ; then TCLSH_PROG=$ac_cv_path_tclsh AC_MSG_RESULT($TCLSH_PROG) else AC_MSG_ERROR(No tclsh found in PATH: $search_path) fi AC_SUBST(TCLSH_PROG) ]) #------------------------------------------------------------------------ # SC_PROG_WISH # Locate a wish shell in the following directories: # ${exec_prefix}/bin # ${prefix}/bin # ${TCL_BIN_DIR} # ${TCL_BIN_DIR}/../bin # ${PATH} # # Arguments # none # # Results # Subst's the following values: # WISH_PROG #------------------------------------------------------------------------ AC_DEFUN(SC_PROG_WISH, [ AC_MSG_CHECKING([for wish]) AC_CACHE_VAL(ac_cv_path_wish, [ search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'` for dir in $search_path ; do for j in `ls -r $dir/wish[[8-9]]*${EXEEXT} 2> /dev/null` \ `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do if test x"$ac_cv_path_wish" = x ; then if test -f "$j" ; then ac_cv_path_wish=$j break fi fi done done ]) if test -f "$ac_cv_path_wish" ; then WISH_PROG=$ac_cv_path_wish AC_MSG_RESULT($WISH_PROG) else AC_MSG_ERROR(No wish found in PATH: $search_path) fi AC_SUBST(WISH_PROG) ]) Tk_Library_Source_Code/apps000075500000000000000000000000001435605071100156345ustar00nobodynobodyTk_Library_Source_Code/apps/bitmap-editor000075500000000000000000000525621435605071100204130ustar00nobodynobody#!/usr/bin/env wish ## -*- tcl -*- package require Tcl 8.4 # @@ Meta Begin # Application bitmap-editor 1.0 # Meta platform tcl # Meta summary Bitmap Editor # Meta description This application is an editor for bitmaps, read from and # Meta description written to files in XBM format (X Bitmap). # Meta category Editing bitmaps # Meta subject bitmap xbm editor # Meta require {Tcl 8.4} # Meta require Tk # Meta author Keith Vetter # Meta license BSD # @@ Meta End ##+########################################################################## # # bitmap.tcl -- simple bitmap editor # by Keith Vetter (http://wiki.tcl.tk/606) # # Revisions: # KPV Jan 15, 2003 - initial revision # KPV Mar 06, 2003 - added functions like shift, clear, invert and resize # KPV Aug 20, 2010 - added mouse stroking, cursor, rename and undo # Syntax: bitmap-editor ?xbm-file? package require Tk # Data Structures :: 3 global arrays. # # S - Application state and configuration # # * cell - Size of a pixel cel drawn in the UI # * prog - Application name. # * fname - xbm file currently edited, after loaded/saved # BM - Bitmap currently being edited. # # * b,, - UI cell storage - pixel is set if exists and 1. # * bits - XBM Parse Result: hexadecimal bit string of pixels. # * height - XBM Parse Result: bitmap height # * name - XBM Parse Result: bitmap name # * raw - xbm data of the bitmap, suitable for use with option # -data of a Tk bitmap image. Generated from the b,*,* # keys. See UnparseBMP. # * width - XBM Parse Result: bitmap width # * xhot - XBM Parse Result: column of the hot point # * yhot - XBM Parse Result: row of the hot point # UNDO - Undo information # # * last - last action done # * all - all previous actions set S(cell) 10 set S(prog) "Bitmap Editor" set S(fname) "" set UNDO(last) {} set UNDO(all) {} # Table for conversion from hexadecimal nibbles to binary bit # strings. Used to convert BM(bits) to b,*,* keys in ShowBits. array set bits { 0 0000 1 1000 2 0100 3 1100 4 0010 5 1010 6 0110 7 1110 8 0001 9 1001 a 0101 b 1101 c 0011 d 1011 e 0111 f 1111 } # Initial bitmap to show upon starting. set bitmap { #define bullet_width 11 #define bullet_height 9 static char bullet_bits[] = { 0x00,0x00, 0x00,0x00, 0x70,0x00, 0xf8,0x00, 0xf8,0x00, 0xf8,0x00, 0x70,0x00, 0x00,0x00, 0x00,0x00 } } ##+########################################################################## # # DoDisplay -- sets up our display # proc DoDisplay {} { wm title . $::S(prog) canvas .c -width 500 -height 500 -bd 2 -relief ridge -highlightthickness 0 .c xview moveto 0 ; .c yview moveto 0 bind .c <2> [bind Text <2>] ;# Enable button 2 paning bind .c [bind Text ] bind .c <1> [list Click down 1 %x %y] bind .c [list Click move 1 %x %y] bind .c [list Click up 1 %x %y] bind .c <3> [list Click down 0 %x %y] bind .c [list Click move 0 %x %y] bind .c [list Click up 0 %x %y] bind all Undo frame .fctrl -bd 2 -relief ridge label .info -text "Left button to set Right button to clear" -anchor c \ -bd 2 -relief ridge grid .c .fctrl -sticky news -row 0 grid .info ^ -sticky ew grid rowconfigure . 0 -weight 1 grid columnconfigure . 0 -weight 1 DoControl DoMenus update } ##+########################################################################## # # DoMenus -- sets up our menus # proc DoMenus {} { . configure -menu [menu .m -tearoff 0] .m add cascade -menu [menu .m.file -tearoff 0] -label "File" -underline 0 .m add cascade -menu [menu .m.image -tearoff 0] -label "Image" -underline 0 .m add cascade -menu [menu .m.help -tearoff 0] -label "Help" -underline 0 .m.file add command -label "New" -under 0 -command NewBMP .m.file add command -label "Open" -under 0 -command OpenBMP .m.file add command -label "Save" -under 0 -command SaveBMP .m.file add separator .m.file add command -label "Copy" -under 0 -command CopyBMP .m.file add separator .m.file add command -label Exit -under 1 -command exit .m.image add command -label "Clear" -under 0 -command {BitFunc clear} .m.image add command -label "Invert" -under 0 -command {BitFunc invert} .m.image add command -label "Shift left" -under 6 -command {BitFunc sleft} .m.image add command -label "Shift right" -under 6 -command {BitFunc sright} .m.image add command -label "Shift up" -under 6 -command {BitFunc sup} .m.image add command -label "Shift down" -under 6 -command {BitFunc sdown} .m.image add separator .m.image add command -label "Undo" -under 0 -command Undo .m.image add command -label "Resize" -under 0 -command ResizeBMP .m.help add command -label About -under 0 -command About } ##+########################################################################## # # DoControl -- draws the control panel # proc DoControl {} { grid rowconfigure .fctrl 0 -minsize 10 grid rowconfigure .fctrl 100 -weight 1 frame .fctop grid .fctop - - -in .fctrl -row 1 set row 0 foreach a {Name Width Height} { set a2 [string map {" " ""} [string tolower $a]] label .l$a2 -text "$a:" entry .e$a2 -textvariable BM($a2) -width 8 -state disabled grid .l$a2 .e$a2 -in .fctop -row [incr row] } image create bitmap ::img::current frame .fimg -bd 2 -relief sunken -padx 10 -pady 10 label .limg -image ::img::current -bg white grid rowconfigure .fctrl 40 -minsize 50 grid .fimg - - -in .fctrl -row 41 pack .limg -in .fimg -expand 1 } ##+########################################################################## # # ShowBMP -- computes grid size then draws in the current bitmap # proc ShowBMP {} { global S BM if {! [info exists BM(raw)]} return set w [winfo width .c] ; set h [winfo height .c] set cw [expr {int((($w - 20) / $BM(width)))}] set ch [expr {int((($h - 20) / $BM(height)))}] set S(cell) [expr {$cw < $ch ? $cw : $ch}] if {$S(cell) > 40} { set S(cell) 40} if {$S(cell) < 5} { set S(cell) 5} DrawGrid ShowBits unset BM(bits) ::img::current config -data $BM(raw) ;# Update current bitmap display } ##+########################################################################## # # ClearBMP -- clears everything for a new bitmap # proc ClearBMP {} { global BM .c delete all ::img::current config -data {} array unset BM foreach arr [array names BM] { set BM($arr) ""} set UNDO(last) {} set UNDO(all) {} } ##+########################################################################## # # DrawGrid -- draws the grid of rectangles--each one with proper bindings # proc DrawGrid {} { global BM .c delete all foreach {l t} [CellXY 0 0] break foreach {b r} [CellXY $BM(height) $BM(width)] break .c create rect $l $t $b $r -tag outline -width 2 set bg [.c cget -bg] for {set r 0} {$r < $BM(height)} {incr r} { for {set c 0} {$c < $BM(width)} {incr c} { .c create rect [CellXY $r $c] -tag [list grid c($r,$c)] -fill $bg } } .c config -scrollregion [.c bbox all] } ##+########################################################################## # # Click -- handles left and right mouse click in a grid cell # proc Click {action onoff x y} { global BM UNDO if {$action eq "up"} { .c config -cursor [lindex [.c config -cursor] 3] return } if {$action eq "down"} { .c config -cursor pencil if {$UNDO(last) ne ""} { lappend UNDO(all) $UNDO(last) } set UNDO(last) [list $onoff ":"] } foreach {row col} [XY2Cell [.c canvasx $x] [.c canvasy $y]] break if {$row < 0 || $row >= $BM(height) || $col < 0 || $col >= $BM(width)} return if {$onoff == 1} { ;# Set the pixel if {$BM(b,$row,$col)} return ;# Already set set BM(b,$row,$col) 1 ShowBitCell $row $col } else { ;# Clear the pixel if {! $BM(b,$row,$col)} return ;# Already cleared set BM(b,$row,$col) 0 .c delete o($row,$col) } lappend UNDO(last) $row $col set BM(raw) [UnparseBMP] ::img::current config -data $BM(raw) } ##+########################################################################## # # Undo -- Implements undo # proc Undo {} { global UNDO BM set what $UNDO(last) set UNDO(last) "" if {$what eq ""} { set what [lindex $UNDO(all) end] set UNDO(all) [lrange $UNDO(all) 0 end-1] } if {$what eq ""} return set onoff [lindex $what 0] set what [lrange $what 2 end] set onoff [expr {! $onoff}] foreach {row col} $what { if {$onoff == 1} { ;# Set the pixel if {$BM(b,$row,$col)} continue ;# Already set set BM(b,$row,$col) 1 ShowBitCell $row $col } else { ;# Clear the pixel if {! $BM(b,$row,$col)} continue ;# Already cleared set BM(b,$row,$col) 0 .c delete o($row,$col) } } set BM(raw) [UnparseBMP] ::img::current config -data $BM(raw) } ##+########################################################################## # # ShowBits -- draws dots in all "on" cells in the current bitmap, # only valid after ParseBMP fills in the BM(bits) variable. # proc ShowBits {} { global BM bits set row 0 set col 0 foreach byte $BM(bits) { foreach {n1 n2} [split $byte ""] break ;# Get each nibble foreach bit [split "$bits($n2)$bits($n1)" ""] { ;# Note the endian set BM(b,$row,$col) $bit if {$bit} { ShowBitCell $row $col } if {[incr col] >= $BM(width)} { ;# Do we past the last column? incr row set col 0 break } } } } ##+########################################################################## # # ShowBitCell -- draws the "on" bit in a specified cell # proc ShowBitCell {row col} { .c create oval [CellXY $row $col] -fill black -tag [list bit o($row,$col)] } ##+########################################################################## # # CellXY -- returns the coordinates of a grid cell # proc CellXY {r c} { global S set x1 [expr {10 + $c * $S(cell)}] set y1 [expr {10 + $r * $S(cell)}] set x2 [expr {$x1 + $S(cell)}] set y2 [expr {$y1 + $S(cell)}] return [list $x1 $y1 $x2 $y2] } ##+########################################################################## # # XY2Cell -- returns cell based on canvas position # proc XY2Cell {x y} { set c [expr {(int($x) - 10) / $::S(cell)}] set r [expr {(int($y) - 10) / $::S(cell)}] return [list $r $c] } ##+########################################################################## # # ParseBMP -- reads the raw bitmap data into our BM data structure # NB. face.bmp in demo directory had defines for x_hot and y_hot # proc ParseBMP {raw} { global S BM ClearBMP set BM(raw) $raw while {1} { if {! [regexp {\#define\s+(.*)_width} $raw => BM(name)]} break if {! [regexp {\#define\s+.*_width\s*(\d*)} $raw => BM(width)]} break if {! [regexp {\#define\s+.*_height\s*(\d*)} $raw => BM(height)]} break regexp {\#define\s+.*_x_hot\s*(\d*)} $raw => BM(xhot) regexp {\#define\s+.*_y_hot\s*(\d*)} $raw => BM(yhot) if {! [regexp {(0x.*)\}} $raw => BM(bits)]} break if {! [regsub -all {0x|,} $BM(bits) { } BM(bits)]} break if {! [regsub -all {\s+} $BM(bits) { } BM(bits)]} break set BM(bits) [string tolower $BM(bits)] return ;# Everything ok, get out } ERROR "$S(fname) is not a proper bmp file" ClearBMP } ##+########################################################################## # # OpenBMP -- opens and reads a BMP file # proc OpenBMP {} { global S set types { {{BMP Files} {.bmp}} {{All Files} * }} set fname [tk_getOpenFile -defaultextension ".bmp" -initialfile $S(fname) \ -filetypes $types] if {$fname == ""} return DisplayBMPFile $fname } proc DisplayBMPFile {fname} { global S if {[catch {set FIN [open $fname r]} emsg]} { ERROR "Cannot open $fname\n$emsg" return } set raw [read $FIN] close $FIN set S(fname) $fname DisplayBMP $raw } proc DisplayBMP {data} { ParseBMP $data ShowBMP } ##+########################################################################## # # SaveBMP -- saves the current bitmap to a file # proc SaveBMP {} { global S BM if {! [info exists BM(raw)]} return set types {{{BMP Files} {.bmp}} {{All Files} *}} set fname [tk_getSaveFile -defaultextension ".bmp" -initialfile $S(fname) \ -filetypes $types] if {$fname == ""} return if {[catch {set FOUT [open $fname w]} emsg]} { ERROR "Cannot open $fname\n$emsg" return } puts $FOUT $BM(raw) close $FOUT set S(fname) $fname } ##+########################################################################## # # UnparseBMP -- converts our internal BM into a proper bitmap data string # proc UnparseBMP {} { global BM set name $BM(name) set bmp "\#define ${name}_width $BM(width)\n" append bmp "\#define ${name}_height $BM(height)\n" if {[info exists BM(xhot)]} { append bmp "\#define ${name}_x_hot $BM(xhot)\n" append bmp "\#define ${name}_y_hot $BM(yhot)\n" } append bmp "static char ${name}_bits[] = \{\n" set bytes {} for {set r 0} {$r < $BM(height)} {incr r} { for {set c 0} {$c < $BM(width)} {incr c 8} { set byte 0 for {set cc [expr {$c + 7}]} {$cc >= $c} {incr cc -1} { set byte [expr {2 * $byte}] if {[info exists BM(b,$r,$cc)] && $BM(b,$r,$cc)} { incr byte } } lappend bytes [format 0x%02x $byte] } } append bmp " " [join $bytes ", "] append bmp "\n\}" return $bmp } ##+########################################################################## # # CopyBMP -- copies current bitmap to the clipboard # proc CopyBMP {} { global BM S if {! [info exists BM(raw)]} return clipboard clear clipboard append $BM(raw) tk_messageBox -icon info -title "$S(prog) Info" \ -message "Bitmap copied to the clipboard" } ##+########################################################################## # # NewBMP -- creates a blank, new bitmap with sizes specified by the user # proc NewBMP {} { global BM set n [NewDlg] if {$n == {}} return foreach {name width height} $n break ClearBMP set BM(name) $name set BM(width) $width set BM(height) $height for {set r 0} {$r < $BM(height)} {incr r} { for {set c 0} {$c < $BM(width)} {incr c} { set BM(b,$r,$c) 0 } } ParseBMP [UnparseBMP] ShowBMP } proc ResizeBMP {} { global BMP set n [NewDlg 1] if {$n == {}} return foreach {nName nwidth nheight} $n break if {$nName ne ""} { set ::BM(name) $nName } WidenBMP $nwidth HeightenBMP $nheight ParseBMP [UnparseBMP] ShowBMP } proc WidenBMP {nwidth} { global BM if {$BM(width) == $nwidth} return if {$nwidth > $BM(width)} { foreach {low high delete} [list $BM(width) $nwidth 0] break } else { foreach {low high delete} [list $nwidth $BM(width) 1] break } for {set row 0} {$row < $BM(height)} {incr row} { for {set col $low} {$col < $high} {incr col} { set BM(b,$row,$col) 0 if {$delete} { unset BM(b,$row,$col) } } } set BM(width) $nwidth } proc HeightenBMP {nheight} { global BM if {$BM(height) == $nheight} return if {$nheight > $BM(height)} { foreach {low high delete} [list $BM(height) $nheight 0] break } else { foreach {low high delete} [list $nheight $BM(height) 1] break } for {set col 0} {$col < $BM(width)} {incr col} { for {set row $low} {$row < $high} {incr row} { set BM(b,$row,$col) 0 if {$delete} { unset BM(b,$row,$col) } } } set BM(height) $nheight } ##+########################################################################## # # NewDlg -- asks the user for bitmap parameters # proc NewDlg {{resize 0}} { global S NEW BM destroy .new toplevel .new -padx 10 -pady 5 wm title .new "New Bitmap" if {$resize} {wm title .new "Resize Bitmap"} wm geom .new "+[expr {[winfo x .] + 150}]+[expr {[winfo y .] + 100}]" set NEW(ok) 0 set NEW(name) $BM(name) set NEW(width) $BM(width) set NEW(height) $BM(height) frame .new.top -bd 2 -relief raised -padx 10 -pady 10 grid columnconfigure .new.top 1 -weight 1 set widgets {name width height} foreach a $widgets { set a1 [string totitle $a] label .new.l$a -text "$a1:" entry .new.e$a -textvariable NEW($a) grid .new.l$a .new.e$a -in .new.top -sticky ew } frame .new.buttons button .new.ok -text Ok -width 10 -command ValidForm button .new.cancel -text Cancel -width 10 -command {destroy .new} pack .new.buttons -side bottom -pady 10 pack .new.top -side top -fill x pack .new.cancel .new.ok -in .new.buttons -side right -padx 10 -expand 1 raise .new set w ".new.e[lindex $widgets 0]" focus $w $w icursor end $w selection range 0 end tkwait window .new if {$NEW(ok)} { return [list $NEW(name) $NEW(width) $NEW(height)] } return {} } ##+########################################################################## # # ValidForm -- validates the NewDlg and then destroys it if it is ok # proc ValidForm {} { global NEW foreach n {name width height} { set NEW($n) [string trim $NEW($n)] if {$NEW($n) == ""} return } if {![string is integer $NEW(width)]} return if {![string is integer $NEW(height)]} return set NEW(ok) 1 destroy .new } proc ERROR {msg} { tk_messageBox -icon error -title "$::S(prog) Error" -message $msg } proc About {} { set msg "$::S(prog)\n\nby Keith Vetter\nJanuary 2003" tk_messageBox -title "About $::S(prog)" -message $msg -icon info } proc BitFunc {what} { global BM if {$what == "clear"} { foreach arr [array names BM b,*] { set BM($arr) 0 } } elseif {$what == "invert"} { foreach arr [array names BM b,*] { set BM($arr) [expr {! $BM($arr)}] } } elseif {$what == "sleft"} { ;# Shift left for {set col 0} {$col < $BM(width)} {incr col} { set col2 [expr {$col + 1}] for {set row 0} {$row < $BM(height)} {incr row} { if {[info exists BM(b,$row,$col2)]} { set BM(b,$row,$col) $BM(b,$row,$col2) } else { set BM(b,$row,$col) 0 } } } } elseif {$what == "sright"} { ;# Shift right for {set col [expr {$BM(width) - 1}]} {$col >= 0} {incr col -1} { set col2 [expr {$col - 1}] for {set row 0} {$row < $BM(height)} {incr row} { if {[info exists BM(b,$row,$col2)]} { set BM(b,$row,$col) $BM(b,$row,$col2) } else { set BM(b,$row,$col) 0 } } } } elseif {$what == "sup"} { ;# Shift up for {set row 0} {$row < $BM(height)} {incr row} { set row2 [expr {$row + 1}] for {set col 0} {$col < $BM(width)} {incr col} { if {[info exists BM(b,$row2,$col)]} { set BM(b,$row,$col) $BM(b,$row2,$col) } else { set BM(b,$row,$col) 0 } } } } elseif {$what == "sdown"} { ;# Shift down for {set row [expr {$BM(height) - 1}]} {$row >= 0} {incr row -1} { set row2 [expr {$row - 1}] for {set col 0} {$col < $BM(width)} {incr col} { if {[info exists BM(b,$row2,$col)]} { set BM(b,$row,$col) $BM(b,$row2,$col) } else { set BM(b,$row,$col) 0 } } } } set BM(raw) [UnparseBMP] RedrawBits ::img::current config -data $BM(raw) } proc RedrawBits {} { global BM .c delete bit for {set row 0} {$row < $BM(height)} {incr row} { for {set col 0} {$col < $BM(width)} {incr col} { if {$BM(b,$row,$col)} {ShowBitCell $row $col} } } } ################################################################ ################################################################ ################################################################ DoDisplay if {[llength $argv] > 1} { DisplayBMP $bitmap ERROR "Too many files specified, expected only one" } elseif {[llength $argv] == 1} { DisplayBMPFile [lindex $argv 0] } else { DisplayBMP $bitmap } Tk_Library_Source_Code/apps/bitmap-editor.man000064400000000000000000000027231435605071100211540ustar00nobodynobody[comment {-*- tcl -*- doctools manpage}] [manpage_begin bitmap-editor n 1.0] [keywords bitmap] [keywords editor] [keywords image] [keywords pixel] [keywords xbm] [copyright {}] [titledesc {Editor for XBM images}] [moddesc {Bitmap handling}] [category {Image processing}] [description] [para] The application described by this document, [syscmd bitmap-editor], is a simple editor for XBM based bitmap images. Written by Keith Vetter the original code can be found at [uri http://wiki.tcl.tk/6298]. [subsection {COMMAND LINE}] [list_begin definitions] [call [cmd bitmap-editor] [opt [arg xbmfile]]] Invoked without argument the editor GUI will be opened and show a standard bitmap to edit. Invoked with an argument it is expected to be the path to a bitmap file in XBM format, and the contained bitmap is shown. [list_begin arguments] [arg_def path xbmfile in/out] This argument specifies the path to a bitmap file in XBM format, whose contents is to shown and edited by the application. [list_end] [para] [list_end] [section {BUGS, IDEAS, FEEDBACK}] This document, and the application it describes, will undoubtedly contain bugs and other problems. Please report such in the category [emph bitmap] of the [uri {http://sourceforge.net/tracker/?group_id=12883} {Tcllib SF Trackers}]. Please also report any ideas for enhancements you may have for either application and/or documentation. [vset CATEGORY bitmap-editor] [include ../support/devel/doc/feedback.inc] [manpage_end] Tk_Library_Source_Code/apps/diagram-viewer000075500000000000000000000022511435605071100205440ustar00nobodynobody#!/usr/bin/env tclsh ## -*- tcl -*- # @@ Meta Begin # Application diagram-viewer 1.0 # Meta platform tcl # Meta summary Lightweight Diagram Processor # Meta description This application is a processor for documents # Meta description written in the tklib diagram language. It # Meta description should cover the most common use cases, # Meta description rendering to canvas for display, and batch # Meta description conversion to raster images. # Meta category Processing tklib diagrams # Meta subject diagram drawing point line spline arrow ellipse box circle # Meta subject intersection interpolation picture drum arc diamond text # Meta subject ellipse plotting vector {plane geometry} {2D geometry} move # Meta subject canvas image {raster image} # Meta require diagram::application # Meta author Andreas Kupries # Meta license BSD # @@ Meta End # # ## ### ##### ######## ############# ##################### package require diagram::application if {[catch { diagram::application $argv } msg]} { #puts $::errorInfo diagram::application::showerror $msg } # # ## ### ##### ######## ############# ##################### exit Tk_Library_Source_Code/apps/diagram-viewer.man000064400000000000000000000055701435605071100213220ustar00nobodynobody[comment {-*- tcl -*- doctools manpage}] [manpage_begin diagram-viewer n 1.0] [keywords canvas] [keywords conversion] [keywords diagram] [keywords vector] [copyright {2010 Andreas Kupries }] [titledesc {Lightweight Diagram Processor}] [moddesc {Documentation toolbox}] [category {Documentation tools}] [description] [para] The application described by this document, [syscmd diagram-viewer], is a lightweight processor for tklib diagram files [para] [syscmd diagram-viewer] is based upon the package [package diagram]. See it for examples and language reference. [subsection {USE CASES}] [syscmd diagram-viewer] was written with the following two use cases in mind. [para] [list_begin enumerated] [enum] Processing and display of one or more diagram files. [enum] Batch conversion of one or more diagram files into raster image files. [list_end] [para] [subsection {COMMAND LINE}] [list_begin definitions] [call [cmd diagram-viewer] [method show] [arg inputfile]...] This is the form for use case [lb]1[rb]. The application opens a gui showing the list of input files to the left, allowing the user to choose which of them to render to the canvas on the right. [call [cmd diagram-viewer] [method convert] [option -o] [arg output] [arg format] [arg inputfile]...] This is the form for use case [lb]2[rb]. The application converts the input files into raster image of the specified [arg format]. [list_begin arguments] [arg_def path output in] This argument specifies where to write the generated image. It can be the path to a file or directory. [para] If the [arg output] does not exist then [lb]file dirname $output[rb] has to exist and must be a writable directory. [para] In case of multiple input files the generated image will be written to a file in the directory, and the name of that file will be derived from the [arg inputfile], and [arg format]. [para] In case of a single input file the generated image will be written to the file. [arg_def (handle) format in] This argument specifies the image format to convert the diagrams into when processing the input. The application recognizes all formats supported by the [package Img] package, i.e. for which it can load a package [package img::[var format]] [arg_def path inputfile in] This argument specifies the path to the diagram file to process. It has to exist, must be readable, and written in [term diagram] format. [list_end] [para] [list_end] [section {BUGS, IDEAS, FEEDBACK}] This document, and the application it describes, will undoubtedly contain bugs and other problems. Please report such in the category [emph diagram] of the [uri {http://sourceforge.net/tracker/?group_id=12883} {Tcllib SF Trackers}]. Please also report any ideas for enhancements you may have for either application and/or documentation. [vset CATEGORY diagram] [include ../support/devel/doc/feedback.inc] [manpage_end] Tk_Library_Source_Code/apps/shtmlview000075500000000000000000000054441435605071100176720ustar00nobodynobody#!/usr/bin/env wish ## -*- tcl -*- # @@ Meta Begin # Application shtmlview 1.1.0 # Meta platform tcl # Meta summary Simple HMTL Viewer (plus Markdown) # Meta description A viewer for simple HTML, and also Markdown files. # Meta description # Meta category HTML/Markdown viewer # Meta subject html markdown # Meta require {Tcl 8.5} # Meta require Tk # Meta require shtmlview # Meta author Stephen Uhler # Meta author Clif Flynt # Meta author Robert Heller # Meta author Detlef Groth # Meta license BSD # @@ Meta End package require Tcl 8.5 package require Tk package require shtmlview::shtmlview # Support various non-HTML formats, if possible catch { package require shtmlview::doctools } catch { package require shtmlview::mkdoc } option add *Font TkDefaultFont option add *selectBackground #678db2 option add *selectForeground white proc usage {} { puts stderr "shtmlview: Markdown and HTML file viewer\n" puts stderr "Usage as application: $::argv0 \[OPTION\] \[FILENAME\]\n" puts stderr " FILENAME: HTML file or Markdown file" puts stderr " OPTION:" puts stderr " --help - display this help message" puts stderr " --version - display current version of the package/application" puts stderr " --render text - renders the specified HTML or Markdown string" puts stderr " --render - - renders the HTML or Markdown read from stdin" exit 1 } proc atExit {} { file delete ${::tmpfile}.html exit 0 } if {[llength $argv] == 0} { usage } if {[llength $argv] >= 1 && [lsearch -regexp $argv --help] > -1} { usage } if {[llength $argv] == 1 && [lindex $argv 0] eq "--version"} { puts [package present shtmlview::shtmlview] exit 0 } if {[lindex $argv 0] eq "--render"} { set help [::shtmlview::shtmlview .help \ -tablesupport false \ -toolbar false ] if {[llength $argv] == 2 && [lindex $argv 1] ne "-"} { $help render [regsub -all {\\n} [lindex $argv 1] "\n"] } elseif {[llength $argv] == 1 || [lindex $argv 1] eq "-"} { $help render [read stdin] } else { $help render "Hello World" } pack $help -fill both -expand true -side top } elseif {[file exists [lindex $argv 0]]} { set file [lindex $argv 0] set help [::shtmlview::shtmlview .help \ -historycombo true \ -tablesupport true ] pack $help -side top -fill both -expand true $help configure -home $file $help browse {*}$argv [$help getTextWidget] tag configure divblue -foreground blue update idletasks } else { set file [lindex $argv 0] puts stderr "Error: file $file does not exist, or unknown option $file" usage } vwait __forever__ exit Tk_Library_Source_Code/apps/shtmlview.man000064400000000000000000000043011435605071100204300ustar00nobodynobody[comment {-*- tcl -*- doctools manpage}] [manpage_begin shtmlview n 1.1.0] [keywords html markdown doctools mkdoc] [keywords viewer] [copyright {}] [titledesc {Basic HTML and Markdown viewer application}] [moddesc {Basic HTML and Markdown viewer}] [category {Document display}] [description] [para] The application described by this document, [syscmd shtmlview], is a simple viewer for HTML files. Further supported are documents written in [term Markdown], [term doctools], or [term mkdoc] format, if various supporting packages are available. See section [sectref {Beyond HTML}]. [subsection {COMMAND LINE}] [list_begin definitions] [call [cmd shtmlview]] [call [cmd shtmlview] [option --help]] Prints usage information to standard error. [call [cmd shtmlview] [option --version]] Prints the application version to standard output. [call [cmd shtmlview] [option --render] [arg text]] Displays the provided text in a viewer window. Treats the text as Markdown except if it starts with a recognized HTML tag. In that case it assumes and renders as HTML. [call [cmd shtmlview] [option --render] [const -]] As before, except it reads the text to render from standard input. [call [cmd shtmlview] [arg filename]] Reads and renders the named file in a viewer widget. [list_end] [section {Beyond HTML}] Documents in any other format than HTML require the presence of various supporting packages to enable the application to display them. [list_begin definitions] [def Markdown] [list_begin itemized] [item] [package Markdown] [list_end] [def doctools] [list_begin itemized] [item] [package shtmlview::doctools] [item] [package dtplite] [list_end] [def mkdoc] [list_begin itemized] [item] [package shtmlview::mkdoc] [item] [package mkdoc::mkdoc] [list_end] [list_end] [section {BUGS, IDEAS, FEEDBACK}] This document, and the application it describes, will undoubtedly contain bugs and other problems. Please report such in the category [emph shtmlview] of the [uri {https://core.tcl-lang.org/tklib/ticket} {Tklib Trackers}]. Please also report any ideas for enhancements you may have for either application and/or documentation. [vset CATEGORY shtmlview] [include ../support/devel/doc/feedback.inc] [manpage_end] Tk_Library_Source_Code/config000075500000000000000000000000001435605071100161365ustar00nobodynobodyTk_Library_Source_Code/config/ChangeLog000064400000000000000000000022161435605071100177700ustar00nobodynobody2001-03-15 Karl Lehenbauer * installFile.tcl: Added updating of the modification time of the target file whether we overwrote it or decided that it hadn't changed. This was necessary for us to be able to determine whether or not a module install touched the file. 2001-03-08 Karl Lehenbauer * installFile.tcl: Added support for converting new-style (1.1+) Cygnus drive paths to Tcl-style. 2001-01-15 * tcl.m4: Added FreeBSD clause. 2001-01-03 * tcl.m4: Fixed typo in SC_LIB_SPEC where it is checking for exec-prefix. 2000-12-01 * tcl.m4: Concatenated most of the Ajuba acsite.m4 file so we don't need to modify the autoconf installation. * config.guess: * config.sub: * installFile.tcl: Added files from the itcl config subdirectory, which should go away. 2000-7-29 * Fixed the use of TCL_SRC_DIR and TK_SRC_DIR within TCL_PRIVATE_INCLUDES and TK_PRIVATE_INCLUDES to match their recent change from $(srcdir) to $(srcdir)/.. Tk_Library_Source_Code/config/config.guess000064400000000000000000001224711435605071100205410ustar00nobodynobody#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-10-07' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha*:OpenVMS:*:*) echo alpha-hp-vms exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then # avoid double evaluation of $set_cc_for_build test -n "$CC_FOR_BUILD" || eval $set_cc_for_build if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) # Determine whether the default compiler uses glibc. eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #if __GLIBC__ >= 2 LIBC=gnu #else LIBC= #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` # GNU/KFreeBSD systems have a "k" prefix to indicate we are using # FreeBSD's kernel, but not the complete OS. case ${LIBC} in gnu) kernel_only='k' ;; esac echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) case `uname -p` in *86) UNAME_PROCESSOR=i686 ;; powerpc) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: Tk_Library_Source_Code/config/config.sub000064400000000000000000000734421435605071100202070ustar00nobodynobody#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-10-07' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | msp430-* \ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nv1) basic_machine=nv1-cray os=-unicosmp ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: Tk_Library_Source_Code/config/install-sh000075500000000000000000000042121435605071100202200ustar00nobodynobody#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5; it is not part of GNU. # # $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ # # This script is compatible with the BSD install script, but was written # from scratch. # # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" instcmd="$mvprog" chmodcmd="" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; *) if [ x"$src" = x ] then src=$1 else dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` fi # Make a temp file name in the proper directory. dstdir=`dirname $dst` dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp # and set any options; do chmod last to preserve setuid bits if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi # Now rename the file to the real destination. $doit $rmcmd $dst $doit $mvcmd $dsttmp $dst exit 0 Tk_Library_Source_Code/config/installFile.tcl000075500000000000000000000054731435605071100212030ustar00nobodynobody#!/bin/sh # # installFile.tcl - a Tcl version of install-sh # that copies a file and preserves its permission bits. # This also optimizes out installation of existing files # that have the same size and time stamp as the source. # # \ exec tclsh8.3 "$0" ${1+"$@"} set doCopy 0 ;# Rename files instead of copy set doStrip 0 ;# Strip the symbols from installed copy set verbose 0 set src "" set dst "" # Process command line arguments, compatible with install-sh for {set i 0} {$i < $argc} {incr i} { set arg [lindex $argv $i] switch -- $arg { -c { set doCopy 1 } -m { incr i # Assume UNIX standard "644", etc, so force Tcl to think octal set permissions 0[lindex $argv $i] } -o { incr i set owner [lindex $argv $i] } -g { incr i set group [lindex $argv $i] } -s { set doStrip 1 } -v { set verbose 1 } default { set src $arg incr i set dst [lindex $argv $i] break } } } if {[string length $src] == 0} { puts stderr "$argv0: no input file specified" exit 1 } if {[string length $dst] == 0} { puts stderr "$argv0: no destination file specified" exit 1 } # Compatibility with CYGNUS-style pathnames regsub {^/(cygdrive)?/(.)/(.*)} $src {\2:/\3} src regsub {^/(cygdrive)?/(.)/(.*)} $dst {\2:/\3} dst if {$verbose && $doStrip} { puts stderr "Ignoring -s (strip) option for $dst" } if {[file isdirectory $dst]} { set dst [file join $dst [file tail $src]] } # Temporary file name set dsttmp [file join [file dirname $dst] #inst.[pid]#] # Optimize out install if the file already exists set actions "" if {[file exists $dst] && ([file mtime $src] == [file mtime $dst]) && ([file size $src] == [file size $dst])} { # Looks like the same file, so don't bother to copy. # Set dsttmp in case we still need to tweak mode, group, etc. set dsttmp $dst lappend actions "already installed" } else { if {"[file type $src]" == "link"} { # Perfom a true copy. set in [open $src r] set out [open $dsttmp w] fcopy $in $out close $in close $out } else { file copy -force $src $dsttmp } lappend actions copied } # update the modification time of the target file file mtime $dsttmp [clock seconds] # At this point "$dsttmp" is installed, but might not have the # right permissions and may need to be renamed. foreach attrName {owner group permissions} { upvar 0 $attrName attr if {[info exists attr]} { if {![catch {file attributes $dsttmp -$attrName} dstattr]} { # This system supports "$attrName" kind of attributes if {($attr != $dstattr)} { file attributes $dsttmp -$attrName $attr lappend actions "set $attrName to $attr" } } } } if {[string compare $dst $dsttmp] != 0} { file rename -force $dsttmp $dst } if {$verbose} { puts stderr "$dst: [join $actions ", "]" } exit 0 Tk_Library_Source_Code/config/mkinstalldirs000075500000000000000000000013271435605071100210260ustar00nobodynobody#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.1.1.1 2001/11/07 20:51:21 hobbs Exp $ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here Tk_Library_Source_Code/config/tcl.m4000064400000000000000000002225631435605071100172530ustar00nobodynobody# tcl.m4 -- # # This file provides a set of autoconf macros to help TEA-enable # a Tcl extension. # # Copyright (c) 1999-2000 Ajuba Solutions. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. #------------------------------------------------------------------------ # SC_PATH_TCLCONFIG -- # # Locate the tclConfig.sh file and perform a sanity check on # the Tcl compile flags # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-tcl=... # # Defines the following vars: # TCL_BIN_DIR Full path to the directory containing # the tclConfig.sh file #------------------------------------------------------------------------ AC_DEFUN(SC_PATH_TCLCONFIG, [ # # Ok, lets find the tcl configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tcl # if test x"${no_tcl}" = x ; then # we reset no_tcl in case something fails here no_tcl=true AC_ARG_WITH(tcl, [ --with-tcl directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval}) AC_MSG_CHECKING([for Tcl configuration]) AC_CACHE_VAL(ac_cv_c_tclconfig,[ # First check to see if --with-tcl was specified. if test x"${with_tclconfig}" != x ; then if test -f "${with_tclconfig}/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` else AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh]) fi fi # then check for a private Tcl installation if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ../tcl \ `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ ../../tcl \ `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ ../../../tcl \ `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break fi done fi # check in a few common install locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i; pwd)` break fi done fi # check in a few other private locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ${srcdir}/../tcl \ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break fi done fi ]) if test x"${ac_cv_c_tclconfig}" = x ; then TCL_BIN_DIR="# no Tcl configs found" AC_MSG_WARN(Can't find Tcl configuration definitions) exit 0 else no_tcl= TCL_BIN_DIR=${ac_cv_c_tclconfig} AC_MSG_RESULT(found $TCL_BIN_DIR/tclConfig.sh) fi fi ]) #------------------------------------------------------------------------ # SC_PATH_TKCONFIG -- # # Locate the tkConfig.sh file # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-tk=... # # Defines the following vars: # TK_BIN_DIR Full path to the directory containing # the tkConfig.sh file #------------------------------------------------------------------------ AC_DEFUN(SC_PATH_TKCONFIG, [ # # Ok, lets find the tk configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tk # if test x"${no_tk}" = x ; then # we reset no_tk in case something fails here no_tk=true AC_ARG_WITH(tk, [ --with-tk directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval}) AC_MSG_CHECKING([for Tk configuration]) AC_CACHE_VAL(ac_cv_c_tkconfig,[ # First check to see if --with-tkconfig was specified. if test x"${with_tkconfig}" != x ; then if test -f "${with_tkconfig}/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` else AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh]) fi fi # then check for a private Tk library if test x"${ac_cv_c_tkconfig}" = x ; then for i in \ ../tk \ `ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \ ../../tk \ `ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \ ../../../tk \ `ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/unix; pwd)` break fi done fi # check in a few common install locations if test x"${ac_cv_c_tkconfig}" = x ; then for i in `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` ; do if test -f "$i/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i; pwd)` break fi done fi # check in a few other private locations if test x"${ac_cv_c_tkconfig}" = x ; then for i in \ ${srcdir}/../tk \ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/unix; pwd)` break fi done fi ]) if test x"${ac_cv_c_tkconfig}" = x ; then TK_BIN_DIR="# no Tk configs found" AC_MSG_WARN(Can't find Tk configuration definitions) exit 0 else no_tk= TK_BIN_DIR=${ac_cv_c_tkconfig} AC_MSG_RESULT(found $TK_BIN_DIR/tkConfig.sh) fi fi ]) #------------------------------------------------------------------------ # SC_LOAD_TCLCONFIG -- # # Load the tclConfig.sh file # # Arguments: # # Requires the following vars to be set: # TCL_BIN_DIR # # Results: # # Subst the following vars: # TCL_BIN_DIR # TCL_SRC_DIR # TCL_LIB_FILE # #------------------------------------------------------------------------ AC_DEFUN(SC_LOAD_TCLCONFIG, [ AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh]) if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then AC_MSG_RESULT([loading]) . $TCL_BIN_DIR/tclConfig.sh else AC_MSG_RESULT([file not found]) fi # # The eval is required to do the TCL_DBGX substitution in the # TCL_LIB_FILE variable # eval TCL_LIB_FILE=${TCL_LIB_FILE} eval TCL_LIB_FLAG=${TCL_LIB_FLAG} AC_SUBST(TCL_DBGX) AC_SUBST(TCL_BIN_DIR) AC_SUBST(TCL_SRC_DIR) AC_SUBST(TCL_LIB_FILE) AC_SUBST(TCL_LIBS) AC_SUBST(TCL_DEFS) AC_SUBST(TCL_SHLIB_LD_LIBS) AC_SUBST(TCL_EXTRA_CFLAGS) AC_SUBST(TCL_LD_FLAGS) AC_SUBST(TCL_LIB_FILE) AC_SUBST(TCL_STUB_LIB_FILE) AC_SUBST(TCL_LIB_SPEC) AC_SUBST(TCL_BUILD_LIB_SPEC) AC_SUBST(TCL_STUB_LIB_SPEC) AC_SUBST(TCL_BUILD_STUB_LIB_SPEC) ]) #------------------------------------------------------------------------ # SC_LOAD_TKCONFIG -- # # Load the tkConfig.sh file # # Arguments: # # Requires the following vars to be set: # TK_BIN_DIR # # Results: # # Sets the following vars that should be in tkConfig.sh: # TK_BIN_DIR #------------------------------------------------------------------------ AC_DEFUN(SC_LOAD_TKCONFIG, [ AC_MSG_CHECKING([for existence of $TK_BIN_DIR/tkConfig.sh]) if test -f "$TK_BIN_DIR/tkConfig.sh" ; then AC_MSG_RESULT([loading]) . $TK_BIN_DIR/tkConfig.sh else AC_MSG_RESULT([could not find $TK_BIN_DIR/tkConfig.sh]) fi AC_SUBST(TK_BIN_DIR) AC_SUBST(TK_SRC_DIR) AC_SUBST(TK_LIB_FILE) AC_SUBST(TK_XINCLUDES) ]) #------------------------------------------------------------------------ # SC_ENABLE_GCC -- # # Allows the use of GCC if available # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-gcc # # Sets the following vars: # CC Command to use for the compiler #------------------------------------------------------------------------ AC_DEFUN(SC_ENABLE_GCC, [ AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available [--disable-gcc]], [ok=$enableval], [ok=no]) if test "$ok" = "yes"; then CC=gcc else case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) CC=cl ;; *) CC=${CC-cc} ;; esac fi AC_PROG_CC ]) #------------------------------------------------------------------------ # SC_ENABLE_SHARED -- # # Allows the building of shared libraries # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-shared=yes|no # # Defines the following vars: # STATIC_BUILD Used for building import/export libraries # on Windows. # # Sets the following vars: # SHARED_BUILD Value of 1 or 0 #------------------------------------------------------------------------ AC_DEFUN(SC_ENABLE_SHARED, [ AC_MSG_CHECKING([how to build libraries]) AC_ARG_ENABLE(shared, [ --enable-shared build and link with shared libraries [--enable-shared]], [tcl_ok=$enableval], [tcl_ok=yes]) if test "${enable_shared+set}" = set; then enableval="$enable_shared" tcl_ok=$enableval else tcl_ok=yes fi if test "$tcl_ok" = "yes" ; then AC_MSG_RESULT([shared]) SHARED_BUILD=1 else AC_MSG_RESULT([static]) SHARED_BUILD=0 AC_DEFINE(STATIC_BUILD) fi ]) #------------------------------------------------------------------------ # SC_ENABLE_THREADS -- # # Specify if thread support should be enabled # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-threads # # Sets the following vars: # THREADS_LIBS Thread library(s) # # Defines the following vars: # TCL_THREADS # _REENTRANT # #------------------------------------------------------------------------ AC_DEFUN(SC_ENABLE_THREADS, [ AC_MSG_CHECKING(for building with threads) AC_ARG_ENABLE(threads, [ --enable-threads build with threads], [tcl_ok=$enableval], [tcl_ok=no]) if test "$tcl_ok" = "yes"; then TCL_THREADS=1 AC_DEFINE(TCL_THREADS) AC_DEFINE(_REENTRANT) case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) AC_MSG_RESULT(yes) ;; *) AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no) if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -lpthread" AC_MSG_RESULT(yes) else TCL_THREADS=0 AC_MSG_RESULT(no) AC_MSG_WARN("Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...") fi ;; esac else TCL_THREADS=0 AC_MSG_RESULT(no (default)) fi ]) #------------------------------------------------------------------------ # SC_ENABLE_SYMBOLS -- # # Specify if debugging symbols should be used # # Arguments: # none # # Requires the following vars to be set: # CFLAGS_DEBUG # CFLAGS_OPTIMIZE # LDFLAGS_DEBUG # LDFLAGS_OPTIMIZE # # Results: # # Adds the following arguments to configure: # --enable-symbols # # Defines the following vars: # CFLAGS_DEFAULT Sets to CFLAGS_DEBUG if true # Sets to CFLAGS_OPTIMIZE if false # LDFLAGS_DEFAULT Sets to LDFLAGS_DEBUG if true # Sets to LDFLAGS_OPTIMIZE if false # DBGX Debug library extension # #------------------------------------------------------------------------ AC_DEFUN(SC_ENABLE_SYMBOLS, [ case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) tcl_dbgx=d ;; *) tcl_dbgx=g ;; esac AC_MSG_CHECKING([for build with symbols]) AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols [--disable-symbols]], [tcl_ok=$enableval], [tcl_ok=no]) if test "$tcl_ok" = "yes"; then CFLAGS_DEFAULT="${CFLAGS_DEBUG}" LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}" DBGX=${tcl_dbgx} TCL_DBGX=${tcl_dbgx} AC_MSG_RESULT([yes]) else CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" DBGX="" TCL_DBGX="" AC_MSG_RESULT([no]) fi AC_SUBST(TCL_DBGX) AC_SUBST(CFLAGS_DEFAULT) AC_SUBST(LDFLAGS_DEFAULT) ]) #-------------------------------------------------------------------- # SC_CONFIG_CFLAGS # # Try to determine the proper flags to pass to the compiler # for building shared libraries and other such nonsense. # # Arguments: # none # # Results: # # Defines the following vars: # # DL_OBJS - Name of the object file that implements dynamic # loading for Tcl on this system. # DL_LIBS - Library file(s) to include in tclsh and other base # applications in order for the "load" command to work. # LDFLAGS - Flags to pass to the compiler when linking object # files into an executable application binary such # as tclsh. # LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib", # that tell the run-time dynamic linker where to look # for shared libraries such as libtcl.so. Depends on # the variable LIB_RUNTIME_DIR in the Makefile. # MAKE_LIB - Command to execute to build the Tcl library; # differs depending on whether or not Tcl is being # compiled as a shared library. # SHLIB_CFLAGS - Flags to pass to cc when compiling the components # of a shared library (may request position-independent # code, among other things). # SHLIB_LD - Base command to use for combining object files # into a shared library. # SHLIB_LD_LIBS - Dependent libraries for the linker to scan when # creating shared libraries. This symbol typically # goes at the end of the "ld" commands that build # shared libraries. The value of the symbol is # "${LIBS}" if all of the dependent libraries should # be specified when creating a shared library. If # dependent libraries should not be specified (as on # SunOS 4.x, where they cause the link to fail, or in # general if Tcl and Tk aren't themselves shared # libraries), then this symbol has an empty string # as its value. # SHLIB_SUFFIX - Suffix to use for the names of dynamically loadable # extensions. An empty string means we don't know how # to use shared libraries on this platform. # TCL_LIB_FILE - Name of the file that contains the Tcl library, such # as libtcl7.8.so or libtcl7.8.a. # TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl" # in the shared library name, using the $VERSION variable # to put the version in the right place. This is used # by platforms that need non-standard library names. # Examples: ${VERSION}.so.1.1 on NetBSD, since it needs # to have a version after the .so, and ${VERSION}.a # on AIX, since the Tcl shared library needs to have # a .a extension whereas shared objects for loadable # extensions have a .so extension. Defaults to # ${VERSION}${SHLIB_SUFFIX}. # TCL_NEEDS_EXP_FILE - # 1 means that an export file is needed to link to a # shared library. # TCL_EXP_FILE - The name of the installed export / import file which # should be used to link to the Tcl shared library. # Empty if Tcl is unshared. # TCL_BUILD_EXP_FILE - # The name of the built export / import file which # should be used to link to the Tcl shared library. # Empty if Tcl is unshared. # CFLAGS_DEBUG - # Flags used when running the compiler in debug mode # CFLAGS_OPTIMIZE - # Flags used when running the compiler in optimize mode # # EXTRA_CFLAGS # # Subst's the following vars: # DL_LIBS # CFLAGS_DEBUG # CFLAGS_OPTIMIZE #-------------------------------------------------------------------- AC_DEFUN(SC_CONFIG_CFLAGS, [ # Step 0: Enable 64 bit support? AC_MSG_CHECKING([if 64bit support is enabled]) AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support],,enableval="no") if test "$enableval" = "yes"; then AC_MSG_RESULT(Will compile with 64bit support) do64bit=yes else do64bit=no fi AC_MSG_RESULT($do64bit) # Step 1: set the variable "system" to hold the name and version number # for the system. This can usually be done via the "uname" command, but # there are a few systems, like Next, where this doesn't work. AC_MSG_CHECKING([system version (for dynamic loading)]) if test -f /usr/lib/NextStep/software_version; then system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` else system=`uname -s`-`uname -r` if test "$?" -ne 0 ; then AC_MSG_RESULT([unknown (can't find uname command)]) system=unknown else # Special check for weird MP-RAS system (uname returns weird # results, and the version is kept in special file). if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then system=MP-RAS-`awk '{print $3}' /etc/.relid'` fi if test "`uname -s`" = "AIX" ; then system=AIX-`uname -v`.`uname -r` fi AC_MSG_RESULT($system) fi fi # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no) # Step 3: set configuration options based on system name and version. do64bit_ok=no fullSrcDir=`cd $srcdir; pwd` EXTRA_CFLAGS="" TCL_EXPORT_FILE_SUFFIX="" UNSHARED_LIB_SUFFIX="" TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`' ECHO_VERSION='`echo ${VERSION}`' TCL_LIB_VERSIONS_OK=ok CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE=-O TCL_NEEDS_EXP_FILE=0 TCL_BUILD_EXP_FILE="" TCL_EXP_FILE="" STLIB_LD="ar cr" case $system in AIX-5.*) if test "${TCL_THREADS}" = "1" -a "$using_gcc" = "no" ; then # AIX requires the _r compiler when gcc isn't being used if test "${CC}" != "cc_r" ; then CC=${CC}_r fi AC_MSG_RESULT(Using $CC for compiling with threads) fi # AIX-5 uses ELF style dynamic libraries SHLIB_CFLAGS="" SHLIB_LD="/usr/ccs/bin/ld -G -z text" # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" # AIX-5 has dl* in libc.so DL_LIBS="" LDFLAGS="" if test "$using_gcc" = "yes" ; then LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' else LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' fi if test "$do64bit" = "yes" ; then if test "$using_gcc" = "no" ; then do64bit_ok=yes EXTRA_CFLAGS="-q64" LDFLAGS="-q64" else AC_MSG_WARN("64bit mode not supported with GCC on $system") fi fi ;; AIX-*) if test "${TCL_THREADS}" = "1" -a "$using_gcc" = "no" ; then # AIX requires the _r compiler when gcc isn't being used if test "${CC}" != "cc_r" ; then CC=${CC}_r fi AC_MSG_RESULT(Using $CC for compiling with threads) fi SHLIB_CFLAGS="" SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' TCL_NEEDS_EXP_FILE=1 TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then LIBOBJS="$LIBOBJS tclLoadAix.o" DL_LIBS="-lld" fi # On AIX <=v4 systems, libbsd.a has to be linked in to support # non-blocking file IO. This library has to be linked in after # the MATH_LIBS or it breaks the pow() function. The way to # insure proper sequencing, is to add it to the tail of MATH_LIBS. # This library also supplies gettimeofday. # # AIX does not have a timezone field in struct tm. When the AIX # bsd library is used, the timezone global and the gettimeofday # methods are to be avoided for timezone deduction instead, we # deduce the timezone by comparing the localtime result on a # known GMT value. AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no) if test $libbsd = yes; then MATH_LIBS="$MATH_LIBS -lbsd" AC_DEFINE(USE_DELTA_FOR_TZ) fi ;; BSD/OS-2.1*|BSD/OS-3*) SHLIB_CFLAGS="" SHLIB_LD="shlicc -r" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="" LD_SEARCH_FLAGS="" ;; BSD/OS-4.*) SHLIB_CFLAGS="-export-dynamic -fPIC" SHLIB_LD="cc -shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="-export-dynamic" LD_SEARCH_FLAGS="" ;; *win32*|*WIN32*|CYGWIN_NT*|cygwin_nt*|*CYGWIN_98*|*CYGWIN_95*) CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d" CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}" LDFLAGS_CONSOLE="-subsystem:console" LDFLAGS_WINDOW="-subsystem:windows" LDFLAGS_DEBUG="-debug:full -debugtype:cv" LDFLAGS_OPTIMIZE="-release" EXTRA_CFLAGS="-YX" PATHTYPE=-w STLIB_LD="lib -nologo" SHLIB_LD="link -dll -nologo -incremental:no" SHLIB_LD_LIBS="user32.lib advapi32.lib" RC="rc" ;; dgux*) SHLIB_CFLAGS="-K PIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="" LD_SEARCH_FLAGS="" ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*|HP-UX-*.11.*) SHLIB_SUFFIX=".sl" AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = yes; then SHLIB_CFLAGS="+z" SHLIB_LD="ld -b" SHLIB_LD_LIBS="" DL_OBJS="tclLoadShl.o" DL_LIBS="-ldld" LDFLAGS="-Wl,-E" LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' fi ;; IRIX-4.*) SHLIB_CFLAGS="-G 0" SHLIB_SUFFIX=".a" SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadAout.o" DL_LIBS="" LDFLAGS="-Wl,-D,08000000" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' ;; IRIX-5.*) SHLIB_CFLAGS="" SHLIB_LD="ld -shared -rdata_shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' EXTRA_CFLAGS="" LDFLAGS="" ;; IRIX-6.*|IRIX64-6.5*) SHLIB_CFLAGS="" SHLIB_LD="ld -n32 -shared -rdata_shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' if test "$using_gcc" = "yes" ; then EXTRA_CFLAGS="-mabi=n32" LDFLAGS="-mabi=n32" else case $system in IRIX-6.3) # Use to build 6.2 compatible binaries on 6.3. EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS" ;; *) EXTRA_CFLAGS="-n32" ;; esac LDFLAGS="-n32" fi ;; IRIX64-6.*) SHLIB_CFLAGS="" SHLIB_LD="ld -32 -shared -rdata_shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' ;; Linux*) SHLIB_CFLAGS="-fPIC" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings # when you inline the string and math operations. Turn this off to # get rid of the warnings. CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" if test "$have_dl" = yes; then SHLIB_LD="${CC} -shared" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="-rdynamic" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' else AC_CHECK_HEADER(dld.h, [ SHLIB_LD="ld -shared" DL_OBJS="tclLoadDld.o" DL_LIBS="-ldld" LDFLAGS="" LD_SEARCH_FLAGS=""]) fi if test "`uname -m`" = "alpha" ; then EXTRA_CFLAGS="-mieee" fi ;; MP-RAS-02*) SHLIB_CFLAGS="-K PIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="" LD_SEARCH_FLAGS="" ;; MP-RAS-*) SHLIB_CFLAGS="-K PIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="-Wl,-Bexport" LD_SEARCH_FLAGS="" ;; NetBSD-*|FreeBSD-[[12]].*|OpenBSD-*) # Not available on all versions: check for include file. AC_CHECK_HEADER(dlfcn.h, [ SHLIB_CFLAGS="-fpic" SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS="" SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' ], [ SHLIB_CFLAGS="" SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".a" DL_OBJS="tclLoadAout.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' ]) # FreeBSD doesn't handle version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' TCL_LIB_VERSIONS_OK=nodots ;; FreeBSD-*) # FreeBSD 3.* and greater have ELF. SHLIB_CFLAGS="-fpic" SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS="" ;; NEXTSTEP-*) SHLIB_CFLAGS="" SHLIB_LD="cc -nostdlib -r" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadNext.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS="" ;; OS/390-*) CFLAGS_OPTIMIZE="" # Optimizer is buggy AC_DEFINE(_OE_SOCKETS) # needed in sys/socket.h ;; OSF1-1.0|OSF1-1.1|OSF1-1.2) # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 SHLIB_CFLAGS="" # Hack: make package name same as library name SHLIB_LD='ld -R -export $@:' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadOSF.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS="" ;; OSF1-1.*) # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 SHLIB_CFLAGS="-fpic" SHLIB_LD="ld -shared" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS="" ;; OSF1-V*) # Digital OSF/1 SHLIB_CFLAGS="" SHLIB_LD='ld -shared -expect_unresolved "*"' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' ;; RISCos-*) SHLIB_CFLAGS="-G 0" SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".a" DL_OBJS="tclLoadAout.o" DL_LIBS="" LDFLAGS="-Wl,-D,08000000" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' ;; SCO_SV-3.2*) # 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. SHLIB_CFLAGS="-Kpic -belf" SHLIB_LD="ld -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="-belf -Wl,-Bexport" LD_SEARCH_FLAGS="" ;; SINIX*5.4*) SHLIB_CFLAGS="-K PIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="" LD_SEARCH_FLAGS="" ;; SunOS-4*) SHLIB_CFLAGS="-PIC" SHLIB_LD="ld" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' # SunOS can't handle version numbers with dots in them in library # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it # requires an extra version number at the end of .so file names. # So, the library has to have a name like libtcl75.so.1.0 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' TCL_LIB_VERSIONS_OK=nodots ;; SunOS-5.[[0-6]]*) SHLIB_CFLAGS="-KPIC" SHLIB_LD="/usr/ccs/bin/ld -G -z text" # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="" LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' ;; SunOS-5*) SHLIB_CFLAGS="-KPIC" SHLIB_LD="/usr/ccs/bin/ld -G -z text" LDFLAGS="" do64bit_ok=no if test "$do64bit" = "yes" ; then arch=`isainfo` if test "$arch" = "sparcv9 sparc" ; then if test "$CC" != "gcc" -a `$CC -v 2>&1 | grep -c gcc` = "0" ; then do64bit_ok=yes EXTRA_CFLAGS="-xarch=v9" LDFLAGS="-xarch=v9" else AC_MSG_WARN("64bit mode not supported using GCC on $system") fi else AC_MSG_WARN("64bit mode only supported sparcv9 system") fi fi # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' else LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' fi ;; ULTRIX-4.*) SHLIB_CFLAGS="-G 0" SHLIB_SUFFIX=".a" SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadAout.o" DL_LIBS="" LDFLAGS="-Wl,-D,08000000" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' ;; UNIX_SV* | UnixWare-5*) SHLIB_CFLAGS="-KPIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" 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. hold_ldflags=$LDFLAGS AC_MSG_CHECKING(for ld accepts -Bexport flag) LDFLAGS="${LDFLAGS} -Wl,-Bexport" AC_TRY_LINK(, [int i;], found=yes, found=no) LDFLAGS=$hold_ldflags AC_MSG_RESULT($found) if test $found = yes; then LDFLAGS="-Wl,-Bexport" else LDFLAGS="" fi LD_SEARCH_FLAGS="" ;; esac if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then AC_MSG_WARN("64bit support being disabled -- not supported on this platform") fi # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic # Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop, # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need # to determine which of several header files defines the a.out file # format (a.out.h, sys/exec.h, or sys/exec_aout.h). At present, we # support only a file format that is more or less version-7-compatible. # In particular, # - a.out files must begin with `struct exec'. # - the N_TXTOFF on the `struct exec' must compute the seek address # of the text segment # - The `struct exec' must contain a_magic, a_text, a_data, a_bss # and a_entry fields. # The following compilation should succeed if and only if either sys/exec.h # or a.out.h is usable for the purpose. # # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the # `struct exec' includes a second header that contains information that # duplicates the v7 fields that are needed. if test "x$DL_OBJS" = "xtclLoadAout.o" ; then AC_MSG_CHECKING(sys/exec.h) AC_TRY_COMPILE([#include ],[ struct exec foo; unsigned long seek; int flag; #if defined(__mips) || defined(mips) seek = N_TXTOFF (foo.ex_f, foo.ex_o); #else seek = N_TXTOFF (foo); #endif flag = (foo.a_magic == OMAGIC); return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; ], tcl_ok=usable, tcl_ok=unusable) AC_MSG_RESULT($tcl_ok) if test $tcl_ok = usable; then AC_DEFINE(USE_SYS_EXEC_H) else AC_MSG_CHECKING(a.out.h) AC_TRY_COMPILE([#include ],[ struct exec foo; unsigned long seek; int flag; #if defined(__mips) || defined(mips) seek = N_TXTOFF (foo.ex_f, foo.ex_o); #else seek = N_TXTOFF (foo); #endif flag = (foo.a_magic == OMAGIC); return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; ], tcl_ok=usable, tcl_ok=unusable) AC_MSG_RESULT($tcl_ok) if test $tcl_ok = usable; then AC_DEFINE(USE_A_OUT_H) else AC_MSG_CHECKING(sys/exec_aout.h) AC_TRY_COMPILE([#include ],[ struct exec foo; unsigned long seek; int flag; #if defined(__mips) || defined(mips) seek = N_TXTOFF (foo.ex_f, foo.ex_o); #else seek = N_TXTOFF (foo); #endif flag = (foo.a_midmag == OMAGIC); return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; ], tcl_ok=usable, tcl_ok=unusable) AC_MSG_RESULT($tcl_ok) if test $tcl_ok = usable; then AC_DEFINE(USE_SYS_EXEC_AOUT_H) else DL_OBJS="" fi fi fi fi # Step 5: disable dynamic loading if requested via a command-line switch. AC_ARG_ENABLE(load, [ --disable-load disallow dynamic loading and "load" command], [tcl_ok=$enableval], [tcl_ok=yes]) if test "$tcl_ok" = "no"; then DL_OBJS="" fi if test "x$DL_OBJS" != "x" ; then BUILD_DLTEST="\$(DLTEST_TARGETS)" else echo "Can't figure out how to do dynamic loading or shared libraries" echo "on this system." SHLIB_CFLAGS="" SHLIB_LD="" SHLIB_SUFFIX="" DL_OBJS="tclLoadNone.o" DL_LIBS="" LDFLAGS="" LD_SEARCH_FLAGS="" BUILD_DLTEST="" fi # 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" ; then if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then case $system in AIX-*) ;; BSD/OS*) ;; IRIX*) ;; NetBSD-*|FreeBSD-*|OpenBSD-*) ;; RISCos-*) ;; ULTRIX-4.*) ;; *) SHLIB_CFLAGS="-fPIC" ;; esac fi fi if test "$SHARED_LIB_SUFFIX" = "" ; then SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}' fi if test "$UNSHARED_LIB_SUFFIX" = "" ; then UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' fi AC_SUBST(STLIB_LD) AC_SUBST(SHLIB_LD) AC_SUBST(SHLIB_CFLAGS) AC_SUBST(SHLIB_LDFLAGS) AC_SUBST(DL_LIBS) AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(LDFLAGS_DEBUG) AC_SUBST(LDFLAGS_OPTIMIZE) ]) #-------------------------------------------------------------------- # SC_SERIAL_PORT # # Determine which interface to use to talk to the serial port. # Note that #include lines must begin in leftmost column for # some compilers to recognize them as preprocessor directives. # # Arguments: # none # # Results: # # Defines only one of the following vars: # USE_TERMIOS # USE_TERMIO # USE_SGTTY # #-------------------------------------------------------------------- AC_DEFUN(SC_SERIAL_PORT, [ AC_MSG_CHECKING([termios vs. termio vs. sgtty]) AC_TRY_RUN([ #include main() { struct termios t; if (tcgetattr(0, &t) == 0) { cfsetospeed(&t, 0); t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tk_ok=termios, tk_ok=no, tk_ok=no) if test $tk_ok = termios; then AC_DEFINE(USE_TERMIOS) else AC_TRY_RUN([ #include main() { struct termio t; if (ioctl(0, TCGETA, &t) == 0) { t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tk_ok=termio, tk_ok=no, tk_ok=no) if test $tk_ok = termio; then AC_DEFINE(USE_TERMIO) else AC_TRY_RUN([ #include main() { struct sgttyb t; if (ioctl(0, TIOCGETP, &t) == 0) { t.sg_ospeed = 0; t.sg_flags |= ODDP | EVENP | RAW; return 0; } return 1; }], tk_ok=sgtty, tk_ok=none, tk_ok=none) if test $tk_ok = sgtty; then AC_DEFINE(USE_SGTTY) else AC_TRY_RUN([ #include #include main() { struct termios t; if (tcgetattr(0, &t) == 0 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { cfsetospeed(&t, 0); t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tk_ok=termios, tk_ok=no, tk_ok=no) if test $tk_ok = termios; then AC_DEFINE(USE_TERMIOS) else AC_TRY_RUN([ #include #include main() { struct termio t; if (ioctl(0, TCGETA, &t) == 0 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tk_ok=termio, tk_ok=no, tk_ok=no) if test $tk_ok = termio; then AC_DEFINE(USE_TERMIO) else AC_TRY_RUN([ #include #include main() { struct sgttyb t; if (ioctl(0, TIOCGETP, &t) == 0 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { t.sg_ospeed = 0; t.sg_flags |= ODDP | EVENP | RAW; return 0; } return 1; }], tk_ok=sgtty, tk_ok=none, tk_ok=none) if test $tk_ok = sgtty; then AC_DEFINE(USE_SGTTY) fi fi fi fi fi fi AC_MSG_RESULT($tk_ok) ]) #-------------------------------------------------------------------- # SC_MISSING_POSIX_HEADERS # # Supply substitutes for missing POSIX header files. Special # notes: # - stdlib.h doesn't define strtol, strtoul, or # strtod insome versions of SunOS # - some versions of string.h don't declare procedures such # as strstr # # Arguments: # none # # Results: # # Defines some of the following vars: # NO_DIRENT_H # NO_ERRNO_H # NO_VALUES_H # NO_LIMITS_H # NO_STDLIB_H # NO_STRING_H # NO_SYS_WAIT_H # NO_DLFCN_H # HAVE_UNISTD_H # HAVE_SYS_PARAM_H # # HAVE_STRING_H ? # #-------------------------------------------------------------------- AC_DEFUN(SC_MISSING_POSIX_HEADERS, [ AC_MSG_CHECKING(dirent.h) AC_TRY_LINK([#include #include ], [ #ifndef _POSIX_SOURCE # ifdef __Lynx__ /* * Generate compilation error to make the test fail: Lynx headers * are only valid if really in the POSIX environment. */ missing_procedure(); # endif #endif DIR *d; struct dirent *entryPtr; char *p; d = opendir("foobar"); entryPtr = readdir(d); p = entryPtr->d_name; closedir(d); ], tcl_ok=yes, tcl_ok=no) if test $tcl_ok = no; then AC_DEFINE(NO_DIRENT_H) fi AC_MSG_RESULT($tcl_ok) AC_CHECK_HEADER(errno.h, , AC_DEFINE(NO_ERRNO_H)) AC_CHECK_HEADER(float.h, , AC_DEFINE(NO_FLOAT_H)) AC_CHECK_HEADER(values.h, , AC_DEFINE(NO_VALUES_H)) AC_CHECK_HEADER(limits.h, , AC_DEFINE(NO_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) AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0) if test $tcl_ok = 0; then AC_DEFINE(NO_STDLIB_H) fi AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0) AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0) AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0) # See also memmove check below for a place where NO_STRING_H can be # set and why. if test $tcl_ok = 0; then AC_DEFINE(NO_STRING_H) fi AC_CHECK_HEADER(sys/wait.h, , AC_DEFINE(NO_SYS_WAIT_H)) AC_CHECK_HEADER(dlfcn.h, , AC_DEFINE(NO_DLFCN_H)) # OS/390 lacks sys/param.h (and doesn't need it, by chance). AC_HAVE_HEADERS(unistd.h sys/param.h) ]) #-------------------------------------------------------------------- # SC_PATH_X # # Locate the X11 header files and the X11 library archive. Try # the ac_path_x macro first, but if it doesn't find the X stuff # (e.g. because there's no xmkmf program) then check through # a list of possible directories. Under some conditions the # autoconf macro will return an include directory that contains # no include files, so double-check its result just to be safe. # # Arguments: # none # # Results: # # Sets the the following vars: # XINCLUDES # XLIBSW # #-------------------------------------------------------------------- AC_DEFUN(SC_PATH_X, [ AC_PATH_X not_really_there="" if test "$no_x" = ""; then if test "$x_includes" = ""; then AC_TRY_CPP([#include ], , not_really_there="yes") else if test ! -r $x_includes/X11/Intrinsic.h; then not_really_there="yes" fi fi fi if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then AC_MSG_CHECKING(for X11 header files) XINCLUDES="# no special path needed" AC_TRY_CPP([#include ], , XINCLUDES="nope") if test "$XINCLUDES" = nope; 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/Intrinsic.h; then AC_MSG_RESULT($i) XINCLUDES=" -I$i" break fi done fi else if test "$x_includes" != ""; then XINCLUDES=-I$x_includes else XINCLUDES="# no special path needed" fi fi if test "$XINCLUDES" = nope; then AC_MSG_RESULT(couldn't find any!) XINCLUDES="# no include files found" fi if test "$no_x" = yes; then AC_MSG_CHECKING(for X11 libraries) 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; then AC_MSG_RESULT($i) XLIBSW="-L$i -lX11" x_libraries="$i" break fi done else if test "$x_libraries" = ""; then XLIBSW=-lX11 else XLIBSW="-L$x_libraries -lX11" fi fi if test "$XLIBSW" = nope ; then AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow) fi if test "$XLIBSW" = nope ; then AC_MSG_RESULT(couldn't find any! Using -lX11.) XLIBSW=-lX11 fi ]) #-------------------------------------------------------------------- # SC_BLOCKING_STYLE # # The statements below check for systems where POSIX-style # non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. # On these systems (mostly older ones), use the old BSD-style # FIONBIO approach instead. # # Arguments: # none # # Results: # # Defines some of the following vars: # HAVE_SYS_IOCTL_H # HAVE_SYS_FILIO_H # USE_FIONBIO # O_NONBLOCK # #-------------------------------------------------------------------- AC_DEFUN(SC_BLOCKING_STYLE, [ AC_CHECK_HEADERS(sys/ioctl.h) AC_CHECK_HEADERS(sys/filio.h) AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O]) if test -f /usr/lib/NextStep/software_version; then system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` else system=`uname -s`-`uname -r` if test "$?" -ne 0 ; then system=unknown else # Special check for weird MP-RAS system (uname returns weird # results, and the version is kept in special file). if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then system=MP-RAS-`awk '{print $3}' /etc/.relid'` fi if test "`uname -s`" = "AIX" ; then system=AIX-`uname -v`.`uname -r` fi fi fi case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since # using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO # code (JO, 5/31/97). OSF*) AC_DEFINE(USE_FIONBIO) AC_MSG_RESULT(FIONBIO) ;; SunOS-4*) AC_DEFINE(USE_FIONBIO) AC_MSG_RESULT(FIONBIO) ;; ULTRIX-4.*) AC_DEFINE(USE_FIONBIO) AC_MSG_RESULT(FIONBIO) ;; *) AC_MSG_RESULT(O_NONBLOCK) ;; esac ]) #-------------------------------------------------------------------- # SC_HAVE_VFORK # # Check to see whether the system provides a vfork kernel call. # If not, then use fork instead. Also, check for a problem with # vforks and signals that can cause core dumps if a vforked child # resets a signal handler. If the problem exists, then use fork # instead of vfork. # # Arguments: # none # # Results: # # Defines some of the following vars: # vfork (=fork) # #-------------------------------------------------------------------- AC_DEFUN(SC_HAVE_VFORK, [ AC_TYPE_SIGNAL() AC_CHECK_FUNC(vfork, tcl_ok=1, tcl_ok=0) if test "$tcl_ok" = 1; then AC_MSG_CHECKING([vfork/signal bug]); AC_TRY_RUN([ #include #include #include int gotSignal = 0; sigProc(sig) int sig; { gotSignal = 1; } main() { int pid, sts; (void) signal(SIGCHLD, sigProc); pid = vfork(); if (pid < 0) { exit(1); } else if (pid == 0) { (void) signal(SIGCHLD, SIG_DFL); _exit(0); } else { (void) wait(&sts); } exit((gotSignal) ? 0 : 1); }], tcl_ok=1, tcl_ok=0, tcl_ok=0) if test "$tcl_ok" = 1; then AC_MSG_RESULT(ok) else AC_MSG_RESULT([buggy, using fork instead]) fi fi rm -f core if test "$tcl_ok" = 0; then AC_DEFINE(vfork, fork) fi ]) #-------------------------------------------------------------------- # SC_TIME_HANLDER # # Checks how the system deals with time.h, what time structures # are used on the system, and what fields the structures have. # # Arguments: # none # # Results: # # Defines some of the following vars: # USE_DELTA_FOR_TZ # HAVE_TM_GMTOFF # HAVE_TM_TZADJ # HAVE_TIMEZONE_VAR # #-------------------------------------------------------------------- AC_DEFUN(SC_TIME_HANDLER, [ AC_CHECK_HEADERS(sys/time.h) AC_HEADER_TIME AC_STRUCT_TIMEZONE AC_MSG_CHECKING([tm_tzadj in struct tm]) AC_TRY_COMPILE([#include ], [struct tm tm; tm.tm_tzadj;], [AC_DEFINE(HAVE_TM_TZADJ) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) AC_MSG_CHECKING([tm_gmtoff in struct tm]) AC_TRY_COMPILE([#include ], [struct tm tm; tm.tm_gmtoff;], [AC_DEFINE(HAVE_TM_GMTOFF) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) # # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # have_timezone=no AC_MSG_CHECKING([long timezone variable]) AC_TRY_COMPILE([#include ], [extern long timezone; timezone += 1; exit (0);], [have_timezone=yes AC_DEFINE(HAVE_TIMEZONE_VAR) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # if test "$have_timezone" = no; then AC_MSG_CHECKING([time_t timezone variable]) AC_TRY_COMPILE([#include ], [extern time_t timezone; timezone += 1; exit (0);], [AC_DEFINE(HAVE_TIMEZONE_VAR) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) fi # # AIX does not have a timezone field in struct tm. When the AIX bsd # library is used, the timezone global and the gettimeofday methods are # to be avoided for timezone deduction instead, we deduce the timezone # by comparing the localtime result on a known GMT value. # if test "`uname -s`" = "AIX" ; then AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes) if test $libbsd = yes; then AC_DEFINE(USE_DELTA_FOR_TZ) fi fi ]) #-------------------------------------------------------------------- # SC_BUGGY_STRTOD # # Under Solaris 2.4, strtod returns the wrong value for the # terminating character under some conditions. Check for this # and if the problem exists use a substitute procedure # "fixstrtod" (provided by Tcl) that corrects the error. # # Arguments: # none # # Results: # # Might defines some of the following vars: # strtod (=fixstrtod) # #-------------------------------------------------------------------- AC_DEFUN(SC_BUGGY_STRTOD, [ AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0) if test "$tcl_strtod" = 1; then AC_MSG_CHECKING([for Solaris2.4/Tru64 strtod bugs]) AC_TRY_RUN([ extern double strtod(); int main() { char *string = "NaN", *spaceString = " "; char *term; double value; value = strtod(string, &term); if ((term != string) && (term[-1] == 0)) { exit(1); } value = strtod(spaceString, &term); if (term == (spaceString+1)) { exit(1); } exit(0); }], tcl_ok=1, tcl_ok=0, tcl_ok=0) if test "$tcl_ok" = 1; then AC_MSG_RESULT(ok) else AC_MSG_RESULT(buggy) LIBOBJS="$LIBOBJS fixstrtod.o" AC_DEFINE(strtod, fixstrtod) fi fi ]) #-------------------------------------------------------------------- # SC_TCL_LINK_LIBS # # Search for the libraries needed to link the Tcl shell. # Things like the math library (-lm) and socket stuff (-lsocket vs. # -lnsl) are dealt with here. # # Arguments: # Requires the following vars to be set in the Makefile: # DL_LIBS # LIBS # MATH_LIBS # # Results: # # Subst's the following var: # TCL_LIBS # MATH_LIBS # # Might append to the following vars: # LIBS # # Might define the following vars: # HAVE_NET_ERRNO_H # #-------------------------------------------------------------------- AC_DEFUN(SC_TCL_LINK_LIBS, [ #-------------------------------------------------------------------- # On a few very rare systems, all of the libm.a stuff is # already in libc.a. Set compiler flags accordingly. # Also, Linux requires the "ieee" library for math to work # right (and it must appear before "-lm"). #-------------------------------------------------------------------- AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm") AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"]) #-------------------------------------------------------------------- # On AIX systems, libbsd.a has to be linked in to support # non-blocking file IO. This library has to be linked in after # the MATH_LIBS or it breaks the pow() function. The way to # insure proper sequencing, is to add it to the tail of MATH_LIBS. # This library also supplies gettimeofday. #-------------------------------------------------------------------- libbsd=no if test "`uname -s`" = "AIX" ; then AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes) if test $libbsd = yes; then MATH_LIBS="$MATH_LIBS -lbsd" fi fi #-------------------------------------------------------------------- # Interactive UNIX requires -linet instead of -lsocket, plus it # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"]) AC_CHECK_HEADER(net/errno.h, AC_DEFINE(HAVE_NET_ERRNO_H)) #-------------------------------------------------------------------- # Check for the existence of the -lsocket and -lnsl libraries. # The order here is important, so that they end up in the right # order in the command line generated by make. Here are some # special considerations: # 1. Use "connect" and "accept" to check for -lsocket, and # "gethostbyname" to check for -lnsl. # 2. Use each function name only once: can't redo a check because # autoconf caches the results of the last check and won't redo it. # 3. Use -lnsl and -lsocket only if they supply procedures that # aren't already present in the normal libraries. This is because # IRIX 5.2 has libraries, but they aren't needed and they're # bogus: they goof up name resolution if used. # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. # To get around this problem, check for both libraries together # if -lsocket doesn't work by itself. #-------------------------------------------------------------------- tcl_checkBoth=0 AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1) if test "$tcl_checkSocket" = 1; then AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", tcl_checkBoth=1) fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs]) fi AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"])) # Don't perform the eval of the libraries here because DL_LIBS # won't be set until we call SC_CONFIG_CFLAGS TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}' AC_SUBST(TCL_LIBS) AC_SUBST(MATH_LIBS) ]) #------------------------------------------------------------------------ # SC_MAKE_LIB -- # # Generate a line that can be used to build a shared/unshared library # in a platform independent manner. # # Arguments: # none # # Requires: # # Results: # # Defines the following vars: # MAKE_LIB Makefile rule for building a library # MAKE_SHARED_LIB Makefile rule for building a shared library # MAKE_UNSHARED_LIB Makefile rule for building a static # library #------------------------------------------------------------------------ AC_DEFUN(SC_MAKE_LIB, [ case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) if test "${CC-cc}" = "cl"; then MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(${PACKAGE}_LIB_OBJECTS) " MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@ \$(${PACKAGE}_LIB_OBJECTS) " fi ;; *) MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(${PACKAGE}_LIB_OBJECTS)" MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(${PACKAGE}_LIB_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}" ;; esac if test "${SHARED_BUILD}" = "1" ; then MAKE_LIB=${MAKE_SHARED_LIB} else MAKE_LIB=${MAKE_STATIC_LIB} fi AC_SUBST(MAKE_LIB) AC_SUBST(MAKE_SHARED_LIB) AC_SUBST(MAKE_STATIC_LIB) ]) #------------------------------------------------------------------------ # SC_LIB_SPEC -- # # Compute the name of an existing object library located in libdir # from the given base name and produce the appropriate linker flags. # # Arguments: # basename The base name of the library without version # numbers, extensions, or "lib" prefixes. # extra_dir Extra directory in which to search for the # library. This location is used first, then # $prefix/$exec-prefix, then some defaults. # # Requires: # CYGPATH command used to generate native style paths # # Results: # # Defines the following vars: # ${basename}_LIB_NAME The computed library name. # ${basename}_LIB_SPEC The computed linker flags. #------------------------------------------------------------------------ AC_DEFUN(SC_LIB_SPEC, [ AC_MSG_CHECKING(for $1 library) # Look in exec-prefix and prefix for the library. If neither of # these were specified, look in libdir. It doesn't matter if libdir # wasn't specified since a search in the unspecified directory will # fail (NONE/lib) if test x"${exec_prefix}" != x"NONE" ; then sc_lib_name_dir="${exec_prefix}/lib" elif test x"${prefix}" != x"NONE" ; then sc_lib_name_dir="${prefix}/lib" else eval "sc_lib_name_dir=${libdir}" fi if test x"$2" != x ; then sc_extra_lib_dir=$2 else sc_extra_lib_dir=NONE fi for i in \ `ls -dr ${sc_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr ${sc_extra_lib_dir}/$1.lib 2>/dev/null ` \ `ls -dr ${sc_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \ `ls -dr ${sc_extra_lib_dir}/lib$1.* 2>/dev/null ` \ `ls -dr ${sc_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr ${sc_lib_name_dir}/$1.lib 2>/dev/null ` \ `ls -dr ${sc_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \ `ls -dr ${sc_lib_name_dir}/lib$1.* 2>/dev/null ` \ `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr /usr/lib/$1.lib 2>/dev/null ` \ `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \ `ls -dr /usr/lib/lib$1.* 2>/dev/null ` \ `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr /usr/local/lib/$1.lib 2>/dev/null ` \ `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` \ `ls -dr /usr/local/lib/lib$1.* 2>/dev/null ` ; do if test -f "$i" ; then sc_lib_name_dir=`dirname $i` $1_LIB_NAME=`basename $i` $1_LIB_PATH_NAME=$i break fi done case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) $1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME}`\" ;; *) # Strip off the leading "lib" and trailing ".a" or ".so" sc_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'` $1_LIB_SPEC="-L${sc_lib_name_dir} -l${sc_lib_name_lib}" ;; esac if test "x${$1_LIB_NAME}" = x ; then AC_MSG_ERROR(not found) else AC_MSG_RESULT(${$1_LIB_SPEC}) fi ]) #------------------------------------------------------------------------ # SC_PRIVATE_TCL_HEADERS -- # # Locate the private Tcl include files # # Arguments: # # Requires: # TCL_SRC_DIR Assumes that SC_LOAD_TCLCONFIG has # already been called. # # Results: # # Substs the following vars: # TCL_TOP_DIR_NATIVE # TCL_GENERIC_DIR_NATIVE # TCL_UNIX_DIR_NATIVE # TCL_WIN_DIR_NATIVE # TCL_BMAP_DIR_NATIVE # TCL_TOOL_DIR_NATIVE # TCL_PLATFORM_DIR_NATIVE # TCL_BIN_DIR_NATIVE # TCL_INCLUDES #------------------------------------------------------------------------ AC_DEFUN(SC_PRIVATE_TCL_HEADERS, [ AC_MSG_CHECKING(for Tcl private include files) case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\" TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\" TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\" TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\" TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\" TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\" TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\" TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE} ;; *) TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)' TCL_GENERIC_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/generic' TCL_UNIX_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/unix' TCL_WIN_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/win' TCL_BMAP_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/bitmaps' TCL_TOOL_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/tools' TCL_COMPAT_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/compat' TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE} ;; esac AC_SUBST(TCL_TOP_DIR_NATIVE) AC_SUBST(TCL_GENERIC_DIR_NATIVE) AC_SUBST(TCL_UNIX_DIR_NATIVE) AC_SUBST(TCL_WIN_DIR_NATIVE) AC_SUBST(TCL_BMAP_DIR_NATIVE) AC_SUBST(TCL_TOOL_DIR_NATIVE) AC_SUBST(TCL_PLATFORM_DIR_NATIVE) TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}" AC_SUBST(TCL_INCLUDES) AC_MSG_RESULT(Using srcdir found in tclConfig.sh) ]) #------------------------------------------------------------------------ # SC_PUBLIC_TCL_HEADERS -- # # Locate the installed public Tcl header files # # Arguments: # None. # # Requires: # CYGPATH must be set # # Results: # # Adds a --with-tclinclude switch to configure. # Result is cached. # # Substs the following vars: # TCL_INCLUDES #------------------------------------------------------------------------ AC_DEFUN(SC_PUBLIC_TCL_HEADERS, [ AC_MSG_CHECKING(for Tcl public headers) AC_ARG_WITH(tclinclude, [ --with-tclinclude directory containing the public Tcl header files.], with_tclinclude=${withval}) if test x"${with_tclinclude}" != x ; then if test -f "${with_tclinclude}/tcl.h" ; then ac_cv_c_tclh=${with_tclinclude} else AC_MSG_ERROR([${with_tclinclude} directory does not contain Tcl public header file tcl.h]) fi else AC_CACHE_VAL(ac_cv_c_tclh, [ # Use the value from --with-tclinclude, if it was given if test x"${with_tclinclude}" != x ; then ac_cv_c_tclh=${with_tclinclude} else # Check in the includedir, if --prefix was specified eval "temp_includedir=${includedir}" for i in \ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ `ls -d ${temp_includedir} 2>/dev/null` \ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \ /usr/local/include /usr/include ; do if test -f "$i/tcl.h" ; then ac_cv_c_tclh=$i break fi done fi ]) fi # Print a message based on how we determined the include path if test x"${ac_cv_c_tclh}" = x ; then AC_MSG_ERROR(tcl.h not found. Please specify its location with --with-tclinclude) else AC_MSG_RESULT(${ac_cv_c_tclh}) fi # Convert to a native path and substitute into the output files. INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}` TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" AC_SUBST(TCL_INCLUDES) ]) #------------------------------------------------------------------------ # SC_PRIVATE_TK_HEADERS -- # # Locate the private Tk include files # # Arguments: # # Requires: # TK_SRC_DIR Assumes that SC_LOAD_TKCONFIG has # already been called. # # Results: # # Substs the following vars: # TK_INCLUDES #------------------------------------------------------------------------ AC_DEFUN(SC_PRIVATE_TK_HEADERS, [ AC_MSG_CHECKING(for Tk private include files) case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) TK_TOP_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}`\" TK_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/unix`\" TK_WIN_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/win`\" TK_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/generic`\" TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\" TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE} TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}" ;; *) TK_TOP_DIR_NATIVE='$(TK_SRC_DIR)' TK_GENERIC_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/generic' TK_UNIX_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/unix' TK_WIN_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/win' TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE} TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}" ;; esac AC_SUBST(TK_TOP_DIR_NATIVE) AC_SUBST(TK_UNIX_DIR_NATIVE) AC_SUBST(TK_WIN_DIR_NATIVE) AC_SUBST(TK_GENERIC_DIR_NATIVE) AC_SUBST(TK_XLIB_DIR_NATIVE) AC_SUBST(TK_PLATFORM_DIR_NATIVE) AC_SUBST(TK_INCLUDES) AC_MSG_RESULT(Using srcdir found in tkConfig.sh) ]) #------------------------------------------------------------------------ # SC_PUBLIC_TK_HEADERS -- # # Locate the installed public Tk header files # # Arguments: # None. # # Requires: # CYGPATH must be set # # Results: # # Adds a --with-tkinclude switch to configure. # Result is cached. # # Substs the following vars: # TK_INCLUDES #------------------------------------------------------------------------ AC_DEFUN(SC_PUBLIC_TK_HEADERS, [ AC_MSG_CHECKING(for Tk public headers) AC_ARG_WITH(tkinclude, [ --with-tkinclude directory containing the public Tk header files.], with_tkinclude=${withval}) if test x"${with_tkinclude}" != x ; then if test -f "${with_tkinclude}/tk.h" ; then ac_cv_c_tkh=${with_tkinclude} else AC_MSG_ERROR([${with_tkinclude} directory does not contain Tk public header file tk.h]) fi else AC_CACHE_VAL(ac_cv_c_tkh, [ # Use the value from --with-tkinclude, if it was given if test x"${with_tkinclude}" != x ; then ac_cv_c_tkh=${with_tkinclude} else # Check in the includedir, if --prefix was specified eval "temp_includedir=${includedir}" for i in \ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ `ls -d ${temp_includedir} 2>/dev/null` \ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \ /usr/local/include /usr/include ; do if test -f "$i/tk.h" ; then ac_cv_c_tkh=$i break fi done fi ]) fi # Print a message based on how we determined the include path if test x"${ac_cv_c_tkh}" = x ; then AC_MSG_ERROR(tk.h not found. Please specify its location with --with-tkinclude) else AC_MSG_RESULT(${ac_cv_c_tkh}) fi # Convert to a native path and substitute into the output files. INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}` TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" AC_SUBST(TK_INCLUDES) ]) #------------------------------------------------------------------------ # SC_SIMPLE_EXEEXT # Select the executable extension based on the host type. This # is a lightweight replacement for AC_EXEEXT that doesn't require # a compiler. # # Arguments # none # # Results # Subst's the following values: # EXEEXT #------------------------------------------------------------------------ AC_DEFUN(SC_SIMPLE_EXEEXT, [ AC_MSG_CHECKING(executable extension based on host type) case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) EXEEXT=".exe" ;; *) EXEEXT="" ;; esac AC_MSG_RESULT(${EXEEXT}) AC_SUBST(EXEEXT) ]) #------------------------------------------------------------------------ # SC_PROG_TCLSH # Locate a tclsh shell in the following directories: # ${exec_prefix}/bin # ${prefix}/bin # ${TCL_BIN_DIR} # ${TCL_BIN_DIR}/../bin # ${PATH} # # Arguments # none # # Results # Subst's the following values: # TCLSH_PROG #------------------------------------------------------------------------ AC_DEFUN(SC_PROG_TCLSH, [ AC_MSG_CHECKING([for tclsh]) AC_CACHE_VAL(ac_cv_path_tclsh, [ search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'` for dir in $search_path ; do for j in `ls -r $dir/tclsh[[8-9]]*${EXEEXT} 2> /dev/null` \ `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do if test x"$ac_cv_path_tclsh" = x ; then if test -f "$j" ; then ac_cv_path_tclsh=$j break fi fi done done ]) if test -f "$ac_cv_path_tclsh" ; then TCLSH_PROG=$ac_cv_path_tclsh AC_MSG_RESULT($TCLSH_PROG) else AC_MSG_ERROR(No tclsh found in PATH: $search_path) fi AC_SUBST(TCLSH_PROG) ]) #------------------------------------------------------------------------ # SC_PROG_WISH # Locate a wish shell in the following directories: # ${exec_prefix}/bin # ${prefix}/bin # ${TCL_BIN_DIR} # ${TCL_BIN_DIR}/../bin # ${PATH} # # Arguments # none # # Results # Subst's the following values: # WISH_PROG #------------------------------------------------------------------------ AC_DEFUN(SC_PROG_WISH, [ AC_MSG_CHECKING([for wish]) AC_CACHE_VAL(ac_cv_path_wish, [ search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'` for dir in $search_path ; do for j in `ls -r $dir/wish[[8-9]]*${EXEEXT} 2> /dev/null` \ `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do if test x"$ac_cv_path_wish" = x ; then if test -f "$j" ; then ac_cv_path_wish=$j break fi fi done done ]) if test -f "$ac_cv_path_wish" ; then WISH_PROG=$ac_cv_path_wish AC_MSG_RESULT($WISH_PROG) else AC_MSG_ERROR(No wish found in PATH: $search_path) fi AC_SUBST(WISH_PROG) ]) #------------------------------------------------------------------------ # SC_SET_PLATFORM # Determine the common name of the platform we are using # # Arguments # none # # Results # Subst's the following values: # PLATFORM # CYGPATH #------------------------------------------------------------------------ AC_DEFUN(SC_SET_PLATFORM, [ AC_MSG_CHECKING(host platform) case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) CYGPATH="cygpath -w" PLATFORM=win32-ix86 ;; SunOS) CYGPATH=echo PLATFORM=solaris-sparc ;; Linux) CYGPATH=echo PLATFORM=linux-ix86 ;; FreeBSD) CYGPATH=echo PLATFORM=freebsd-ix86 ;; AIX) CYGPATH=echo PLATFORM=aix-risc ;; HP-UX) CYGPATH=echo PLATFORM=hpux-parisc ;; IRIX) CYGPATH=echo PLATFORM=irix-mips ;; *) CYGPATH=echo PLATFORM=UNSUPPORTED ;; esac if test x"${PLATFORM}" = x"UNSUPPORTED" ; then AC_MSG_ERROR(Can't figure out what platform you are using) else AC_MSG_RESULT(${PLATFORM}) fi AC_SUBST(PLATFORM) AC_SUBST(CYGPATH) ]) #------------------------------------------------------------------------ # SC_PATH_MODULE # Add a --with-foodir flag for locating sources for an external module # Search order: # --with-foodir configure switch value # cached configure value # $2 argument # ${srcdir}/modules/$1 # ${srcdir}/../$1 # ${srcdir}/../$1[0-9]* # # Arguments # $1 Name of module to locate # $2 Default directory where module can be found. If not specified, # the macro looks in some well-known locations. This argument # is mainly used for internal modules. # # Results # sets MODULE_DIR_$1 to point to the top level directory of # the module. #------------------------------------------------------------------------ AC_DEFUN(SC_PATH_MODULE, [ if test x"${CYGPATH}" = x ; then SC_SET_PLATFORM fi modsrcdir=$1 AC_ARG_WITH($1dir, [ --with-$1dir directory containing sources for $1], with_module=${withval}, with_module="") AC_MSG_CHECKING([for $1dir]) if test x"${with_module}" = x ; then AC_CACHE_VAL(ac_cv_module_$1dir,[ if test x"${with_module}" != x ; then # Sanity check. Look for this module dir if test -d "${with_module}" ; then ac_cv_module_$1dir=`(cd ${with_module} ; pwd)` fi fi # If not found, look in a few standard places for this module. # Look in the default location (as specified by the argument(s) # to this macro) first if test x"$2" != x ; then for i in \ `ls -dr $2 2>/dev/null` \ `ls -dr ${srcdir}/$2 2>/dev/null` \ `ls -dr ${srcdir}/../$2 2>/dev/null` \ `ls -dr ${srcdir}/../$2[[0-9]]* 2>/dev/null` ; do if test -d $i ; then ac_cv_module_$1dir=`(cd $i; pwd)` break fi done fi # Make sure not to require a specific version number. if test x"${ac_cv_module_$1dir}" = x ; then for i in \ `ls -dr ${srcdir}/modules/$modsrcdir 2>/dev/null` \ `ls -dr ${srcdir}/../$modsrcdir 2>/dev/null` \ `ls -dr ${srcdir}/../$modsrcdir[[0-9]]* 2>/dev/null` ; do if test -d $i ; then ac_cv_module_$1dir=`(cd $i; pwd)` break fi done fi ]) else if test -d "${with_module}" ; then ac_cv_module_$1dir=`(cd ${with_module} ; pwd)` else AC_MSG_ERROR("Directory ${with_module} does not exist!") fi fi if test x"${ac_cv_module_$1dir}" = x ; then AC_MSG_WARN(MISSING. Use --with-$1dir to specify location of $1 or make sure you have checked out the sources from cvs.) MISSING_MODULE_LIST="${MISSING_MODULE_LIST} $1" MODULE_LIST="${MODULE_LIST} $1" else # Strip off any trailing \ from the path MODULE_DIR_$1=`${CYGPATH} ${ac_cv_module_$1dir} | sed -e 's%\\\\$%%'` AC_MSG_RESULT(${MODULE_DIR_$1}) AC_SUBST(MODULE_DIR_$1) if test x"$1" != x"${PACKAGE}" ; then MODULE_LIST="${MODULE_LIST} $1" fi fi ]) #------------------------------------------------------------------------ # SC_PATH_TOOLS # Add a --with-toolsdir flag for locating sources for an external module # # Arguments # none # # Results # sets MODULE_DIR_tools to point to the top level directory of # the module. #------------------------------------------------------------------------ AC_DEFUN(SC_PATH_TOOLS, [ AC_ARG_WITH(toolsdir, [ --with-toolsdir directory containing sources for tools], with_module=${withval}, with_module="") AC_MSG_CHECKING([for toolsdir]) if test x"${with_module}" = x ; then AC_CACHE_VAL(ac_cv_module_toolsdir,[ if test x"${with_module}" != x ; then # Sanity check. Look for configure.in in this module dir if test -d "${with_module}" ; then ac_cv_module_toolsdir=`(cd ${with_module} ; pwd)` fi fi # If not found, look in a few standard places for this module. # Make sure not to require a specific version number. if test x"${ac_cv_module_toolsdir}" = x ; then for i in \ `ls -dr /tools/1.[[1-5]] 2>/dev/null` \ `ls -dr /tools/TclPro1.[[1-5]] 2>/dev/null` \ `ls -dr //t/tools/1.[[1-5]] 2>/dev/null` \ `ls -dr //t/tools/TclPro1.[[1-5]] 2>/dev/null` \ `ls -dr //pop/tools/1.[[1-5]] 2>/dev/null` \ `ls -dr //pop/tools/TclPro1.[[1-5]] 2>/dev/null` ; do if test -d $i ; then ac_cv_module_toolsdir=`(cd $i; pwd)` break fi done fi ]) else if test -d "${with_module}" ; then ac_cv_module_toolsdir=`(cd ${with_module} ; pwd)` else AC_MSG_WARN(Directory ${with_module} does not exist!) fi fi if test x"${ac_cv_module_toolsdir}" = x ; then AC_MSG_WARN(No tools directory - pressing forward with bogus value.) MODULE_DIR_tools=no_tools_dir AC_SUBST(MODULE_DIR_tools) # AC_MSG_ERROR("Use --with-toolsdir to specify location of tools") # exit 1 else MODULE_DIR_tools=${ac_cv_module_toolsdir} AC_MSG_RESULT(${ac_cv_module_toolsdir}) AC_SUBST(MODULE_DIR_tools) fi ]) #------------------------------------------------------------------------ # SC_PATH_PROTOOLS # Path to a valid Tclpro installation. You must call SC_ SET_PLATFORM # before calling this macro. # # Arguments # none # # Results # Subst's the following values: # PROTOOLSDIR #------------------------------------------------------------------------ AC_DEFUN(SC_PATH_PROTOOLS, [ if test x"${PLATFORM}" = x ; then SC_SET_PLATFORM fi AC_ARG_WITH(protools, [ --with-protools directory containing the Tclpro installation], protools_dir=${withval}) AC_MSG_CHECKING(for protclsh in a TclPro installation) if test x"${protools_dir}" != x ; then # Look for protclsh for i in `ls -r ${protools_dir}/${PLATFORM}/bin/protclsh* 2>/dev/null` ; do if test -f $i ; then PROTCLSH=$i break fi done else for i in `ls -dr /tools/TclPro1.[[3-4]] 2>/dev/null` \ `ls -dr //t/tools/TclPro1.[[3-4]] 2>/dev/null ` ; do # Look for protclsh for j in `ls $i/${PLATFORM}/bin/protclsh* 2>/dev/null` ; do if test -f $j ; then PROTCLSH=$j break fi done if test x"${PROTCLSH}" != x ; then protools_dir=$i break fi done fi if test x"${PROTCLSH}" = x ; then AC_MSG_WARN(Could not locate a TclPro installation containing protclsh. Use --with-protoolsdir to specify a valid TclPro installation.) protools_dir=BOGUS_protools_dir else AC_MSG_RESULT("found ${PROTCLSH}") fi PROTOOLSDIR=${protools_dir} AC_SUBST(PROTOOLSDIR) ]) Tk_Library_Source_Code/configure000075500000000000000000002457201435605071100166710ustar00nobodynobody#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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. ## ## -------------------- ## # 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=: # 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_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 ;; 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. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 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" 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" 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 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 : # 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 export CONFIG_SHELL 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+"$@"} 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_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 exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_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 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 as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits 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 :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && 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; } # 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 sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } 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 rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi 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 -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi 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='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # 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` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="ChangeLog" ac_subst_vars='LTLIBOBJS LIBOBJS VERSION PACKAGE TCLSH_PROG EXEEXT CYGPATH 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_tclsh ' ac_precious_vars='build_alias host_alias target_alias' # 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 exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # 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' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' 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 ac_prev= continue fi 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_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -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_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. 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_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. 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_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -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 ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --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) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --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 ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. 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_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. 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. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) 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. 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. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi 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 fi # 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=\$$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 [\\/$]* | ?:[\\/]* ) 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' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_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 fi ac_tool_prefix= 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 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 srcdir=.. fi else ac_srcdir_defaulted=no fi 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. # 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 this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --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 --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 \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', 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] --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 _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-tclsh=FILE location of a working tclsh executable 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. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. 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 .) # We are building in place. ac_srcdir=. 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 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 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 $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 $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.68 Copyright (C) 2010 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 fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## 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.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 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` /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` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) 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 case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { 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: 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 $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" 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 $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" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do 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 $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do 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 $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do 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 -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. 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 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 "$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" \ || { { $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. 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";; esac fi else { $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 $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 case $ac_old_set,$ac_new_set in set,) { $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) { $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 # 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=`$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. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $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' 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 case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) CYGPATH="cygpath -w" ;; *) CYGPATH=echo ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking executable extension based on host type" >&5 $as_echo_n "checking executable extension based on host type... " >&6; } case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*) EXEEXT=".exe" ;; *) EXEEXT="" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${EXEEXT}" >&5 $as_echo "${EXEEXT}" >&6; } # Check whether --with-tclsh was given. if test "${with_tclsh+set}" = set; then : withval=$with_tclsh; with_tclsh=${withval} fi # allow user to override the tclsh we think we found if test x"${with_tclsh}" != x ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5 $as_echo_n "checking for tclsh... " >&6; } if "${with_tclsh}" < /dev/null > /dev/null 2> /dev/null then TCLSH_PROG=${with_tclsh} { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH_PROG, via --with-tclsh" >&5 $as_echo "$TCLSH_PROG, via --with-tclsh" >&6; } else as_fn_error $? "Bad --with-tclsh ${with_tclsh}, not found or not executable" "$LINENO" 5 fi else { $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 ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'` for dir in $search_path ; do for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \ `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do if test x"$ac_cv_path_tclsh" = x ; then if test -f "$j" ; then ac_cv_path_tclsh=$j break fi fi done done fi if test -f "$ac_cv_path_tclsh" ; then TCLSH_PROG=$ac_cv_path_tclsh { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH_PROG" >&5 $as_echo "$TCLSH_PROG" >&6; } else as_fn_error $? "No tclsh found in PATH: $search_path" "$LINENO" 5 fi fi # ### ######### ########################### PACKAGE=`$TCLSH_PROG ${srcdir}/sak.tcl name` MAJOR_VERSION=`$TCLSH_PROG ${srcdir}/sak.tcl major` MINOR_VERSION=`$TCLSH_PROG ${srcdir}/sak.tcl minor` PATCHLEVEL="" VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL} NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION} # ### ######### ########################### ac_config_files="$ac_config_files Makefile" 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 # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _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, 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 $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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end 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 { $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 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # 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 branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote 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_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 LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $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. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false 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=: # 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_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 ;; 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. 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 $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 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 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 as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits 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 rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi 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 -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi 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='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## 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. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$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 [OPTION]... [TAG]... -h, --help print this help, then exit -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 Configuration files: $config_files Report bugs to the package provider." _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.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' test -n "\$AWK" || AWK=awk _ACEOF 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_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --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 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. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then 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 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) 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 # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # 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 || { 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 "./confXXXXXX") 2>/dev/null` && test -d "$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` 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 ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # 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 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" 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 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 # 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 case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac 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 || $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=. 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 .) # We are building in place. ac_srcdir=. 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 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 case $ac_mode in :F) # # CONFIG_FILE # _ACEOF 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 # 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 || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b 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 ;; esac done # for ac_tag as_fn_exit 0 _ACEOF 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. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 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 || 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 Tk_Library_Source_Code/configure.in000064400000000000000000000022001435605071100172530ustar00nobodynobodyAC_INIT(ChangeLog) case "`uname -s`" in *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*) CYGPATH="cygpath -w" ;; *) CYGPATH=echo ;; esac AC_SUBST(CYGPATH) SC_SIMPLE_EXEEXT AC_ARG_WITH(tclsh, [ --with-tclsh=FILE location of a working tclsh executable], with_tclsh=${withval}) # allow user to override the tclsh we think we found if test x"${with_tclsh}" != x ; then AC_MSG_CHECKING([for tclsh]) if "${with_tclsh}" < /dev/null > /dev/null 2> /dev/null then TCLSH_PROG=${with_tclsh} AC_MSG_RESULT([$TCLSH_PROG, via --with-tclsh]) else AC_MSG_ERROR([Bad --with-tclsh ${with_tclsh}, not found or not executable]) fi AC_SUBST(TCLSH_PROG) else SC_PROG_TCLSH fi # ### ######### ########################### PACKAGE=`$TCLSH_PROG ${srcdir}/sak.tcl name` MAJOR_VERSION=`$TCLSH_PROG ${srcdir}/sak.tcl major` MINOR_VERSION=`$TCLSH_PROG ${srcdir}/sak.tcl minor` PATCHLEVEL="" VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL} NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION} AC_SUBST(PACKAGE) AC_SUBST(VERSION) # ### ######### ########################### AC_OUTPUT([Makefile]) Tk_Library_Source_Code/embedded000075500000000000000000000000001435605071100164225ustar00nobodynobodyTk_Library_Source_Code/embedded/head.md000064400000000000000000000002771435605071100177320ustar00nobodynobody# Downloads for the Trunk Head of Tklib. - [Tarball] (../../../tarball/trunk/Tk+Library+Source+Code-trunk.tar.gz) - [Zip Archive](../../../zip/trunk/Tk+Library+Source+Code-trunk.zip) Tk_Library_Source_Code/embedded/index.md000064400000000000000000000041501435605071100201320ustar00nobodynobody

Tk Library Source Code

Packages - [Table Of Contents](md/toc.md)     [Keyword Index](md/index.md)
A companion to Tcllib, for Tk related packages. ## Releases / Downloads The download links are on the referenced pages. * [Trunk Head](head.md) * [Current Release](../../../event/545a7ee378a0cc271fcf58ebf83684fb4257094e) __0.7 (Feb 9, 2020)__ * [Past Releases](../../../wiki?name=Releases) * [Development Snapshots](../../../wiki?name=Development+Snapshots) * [@ SourceForge](https://sourceforge.net/projects/tcllib/files/) ## Discussion & Contact Tklib has two [mailing lists](https://sourceforge.net/p/tcllib/mailman/), shared with Tcllkib. One for notifications (commits, ticket changes), the other for general discussion. These are managed at SourceForge, at the aforementioned link. A few direct links for various topics: |tcllib-bugs| : |[Subscribe](https://lists.sourceforge.net/lists/listinfo/tcllib-bugs) [Archive](https://sourceforge.net/p/tcllib/mailman/tcllib-bugs) [Search](https://sourceforge.net/p/tcllib/mailman/search/?mail_list=tcllib-bugs)| |tcllib-devel| : |[Subscribe](https://lists.sourceforge.net/lists/listinfo/tcllib-devel) [Archive](https://sourceforge.net/p/tcllib/mailman/tcllib-devel) [Search](https://sourceforge.net/p/tcllib/mailman/search/?mail_list=tcllib-devel)| ## Related Repositories * [Tcllib](../../../../tcllib) * [Tcl Apps](../../../../tclapps) * [Tcl Bench](../../../../tclbench) * [Multicolumn Listbox](../../../../mclistbox) * [Widget](../../../../widget) * [BWidget](../../../../bwidget) ## Feedback Please go to and use our [Local Trackers](../../../reportlist). They are for * Bugs, * Patches, and * Ideas & Feature Requests. ## See also * [Landing page for this package at the Tcl Developer eXchange](http://www.tcl.tk/software/tcllib/) Tk_Library_Source_Code/embedded/md000075500000000000000000000000001435605071100170225ustar00nobodynobodyTk_Library_Source_Code/embedded/md/image000075500000000000000000000000001435605071100201045ustar00nobodynobodyTk_Library_Source_Code/embedded/md/image/figure-00-dependencies.png000064400000000000000000000511571435605071100250240ustar00nobodynobodyPNG  IHDR#kgAMA1_ IDATx{`gz<؞6o $!ƀU*V*wzڪ ZQ GbmQr^(o`JRPIf &ۼ3;ٝ}g}vvv&=!q݈n!xzD\7"׭ӹ{) 2>Xd96Ad G׍Fu#q݈nD\7"׍Fu#qݼ8{ltGh:׍Fu+W)b_w|k:<^"׍Fu#`v;#dD\7"׍*q݈nD\y% Q !sap#%rx-<^°P R<+UsDc R)ˑAr['@z9 2N;}7R䢧hT`9R#j[.:w&OHEEŰi9 r8,G{@r8,WP+(ǶvcT³1'bEaXp"5}MOAr8,w,]9=#AOhX^°# UwKC|‧HqX]țlӑZ=#Bv3\C|FH=8,NCX*Qa3J8lF~f7nsmw;m隶_c6;xM'#>A~["q G˞]JKKEdg<߿kG80qL'_rkF~f7lF~f7l، ߰ ߰ ߰ Y k3߁ͨ߰PtDE o, o,( ߰ByO@A/`#%HBR4vON-qNm?hK| %vl>S6#a36#a36*RWYSw|xV~ ۾CH6#a36#a36+(M”qm bEc߸'$_yO=BR]"J*F7mڟgS'JydʊEPx4켺$aH^waw>0~%kV/{yE>I b%lF~f7lF~f.zPD$ 9)*c+Kk^_2c0/،o،o̒7Β/̒>a|a@~[>~bA a2fA-e\7༴A*:;#S7:П$ C)"eȰɺfa o،o،ӦoP&!-yh蕩_Z#"r'e3S' ߰ ߰8|wSDw:xcEcS%D@ am4TQp*օ¼~'_0!6#a36#a36#a36#mf7gep~kgd)B$ѫ<܂ O^BOhy(V C< ͉^@FHhޏ. z͞Т `**8JSw(Jhi5A8 -?!Z^y;hͻTAw`**8 ʡ{}}G} Q³nYታ৏u#kvwFqטr(V>$"ݳdsܦ%oWV vh"{wV-q{p7?Kڏ^sw4]P_^#ïٴ}WݹMr֞.9y78[nNվu7$"gr9@ fːw-g$'Rg)-=P}M<||:Ж<)_vΟ܃HIDDģJNwmDtL˪Q#ֵ?)+;ڽg;DJ#wE"RZV?u˗DKD~2mԧO&gK`ܜ$?tliDD>sKə?SBSD/mCiĒ&۝xo777 KN9g쏋$"Hʬ|]e-oAT {qL#bʕj:f^3//cK{9 8y$N&|SA =Ǣ`**8 W@Y_cJlw;`**8 ŏ Dqo=RCQ,D`) FT]Jܰ۽t\6<oz 3}$8Cp#p>fTp$?-pEY]: `**8 9H?%̺;j8c-hJ͡(.zp [9_54`**8 @8DzrlY9mwgzwi})爈Rj-C"r=K67mZve`牋-ӟuEdY[7KΣJ]D=@O"Hx℣%۞]})-=P}M<|)䁶M$JK#[.K#}[E#3 Л$!\2x9.}i~Ed +zp }N^ZGc?8 `**8 ~ x-*8`63 <]nզ|7nh%Zchu/ f26oZEL',f( X^]lN H0h ;PQQa %ࠂ0C`>`**8 4UH>T8qs(匓k|Cg/kc֡s)"~kCg'E BziCN/o=0d fY S<ÝTTp0LESQTT"38h&p|icϮ}"RZZ*":"H$>Cww5U]uvM~^rF[$jG<ᮦ]m{ );I=n/ #eU3G|@$mG.o$)_vNľkD,+9"R_S֮8'w@~rk7C|ߖΩvL{&־Anڴi3f(<*ZS4?TUo-p&=oتb| `**8cQT`*zp0=8 `**8 `**8 `**8 `**8 R! ~eͦ3(z.}gB29Y{?'R.uЍ nԉM>7Dם;wSr!94""hC@Hв@qeǭY (3꺯EkZ @T`**8 `**8 `2ةܛ3DD<:U+?6WQ)J-\ESQTTp0LESq0=8`a0L^0=8` g ;RࢂfPJ9cE*8`|;(pڝ򐈰 =x*Z""@b17R *at4ED0 'CygU`"'\STyo2T`**8ߢD!ȟ\QTTp0LESQTTp0LESQTTp0EQ''Tp  A "|(*8m @SQèܳQa@LESQTTp0LESQTTp0LESQTTp0=={vsAEFGDa@MWȼyDd!uCӧ6 w6KZR꜆A_]/Gn%gTUV޷dӼyڪi<â3sM_7ss󣕕?.0j☈(kC"hmC7֥Rntw>s<Ԛ)MsX@({Wڲ烧{,"6:;܇DdUJXlyU-kj݉osƕ_\Fxo8}#ak}]^jD,}ƍ?>v^|îxG ALDbNd%i=N+ot_;zpN`**8 m*8@pm@LB֛6<{Tp~J?%g^į,)'F ɠ/uRSN85/ "dʲv{Q,K/=l =nkϏ Nz偠6㯵^y#h{< WQŚM sO_Fe;Z7-8tf ǃ`**8 `**8 `**8Jܳpꆜ<;Oȓ0уX zfEUrFQCHpv"bN*8l'Z˃qvaACNpN\Όq`**8 `**8 `**8* <>IׯXK|`ї"a `*xMϲ:RzW~eͦ3(V{j xGrp=]RJuJwȢEjsm;c҇qmn|1eե;}sgZzw} W~_wt 62rY:'йHYX7[޸kL{mwN9GE 9.gMKޮ<щ^Jθ LM+݉'ōY֔G_YUCNsg6}q~mc>akыEZº2/+G?.`qAzU%89NN;{mo}nܼB ރeʪ[zQS{#=x1 pޝ7~d ۹?2/׃wǣ%;kњ/}RW՗~}R9ijUY!OnoaSD,?}N^ާ3GKJي_`**8 `**8 2&玠EDRV$E9C"J:bc dL9 `(`**8 `**8 {zD#*x@рTp +06et t_Yi̯6ʡ:ޥZ("C&;'\9kOᇔRR"h"gnJ۶5wͷܰ}l'妕sYH tG7TĦGun"N;v)9[|z7}?zow/_>q^i>UMzϽi3zKkw'Mc;K|(e&n."mw<0?nvD߂erhy;A>wqeGߝ}(G'>H"݇\ 9{j2vXƃpt¦2c OSQTTp0LESQTTp0LESQjĸSTp00W -*8`0<%oP ^X@2*8ARPa7  4@:*8 `**8 `**8 "N7^NS[dFNciq4Gkcǂh^ =xGIC3hRt9ǣ9e1}q4?{Qra> ¦mY4]'3F =#>\ًKqq Brb\%}I!b;-XzpցYKM Ǭu!VG`**8 `**8 `**8 {؁ ?6 D(zp/ ʳ~W>e-΀Ro;:DG-Z8}Ow} {GTwtOD|p=K67mZve`{wV-t}/6t$!h[>y78tο8Opb3DwmG[Οjv[-[n #tD)O(:],GnO."#kvwF$/*\:5sv:搔OrVr0pVh)y^ 挋7~krˎ?r(boț֧?eo]rpb~r)3ٝr)c_9ij"RO0]'HIٛk[HEE-)3tItb]"%"Y?_-r<\uW:9#3]UȀ*cNI7m7vwy$LKm EZ$/*׵6rY"%]GvqN.EK\_=}uكSEG&"2l*Q;8kvpm_.grՐ3|T g.vwzaعmF_ߟ|gOվύ>CwO'/߸oyle)ꮦ޿us7wgWŚI`?o)"cܺxOuS>~\;֮8;U.ZJ.a@UmYcn׮ڼƚҟLsEktRK @H,{ d\Vo[7/cLjȞiwMS)ظqcOҷLqX,6g{ݱUS~͆d|3Kk--RrǗRߦ5G-YD$H,}ōm"%'RJD"R<g|o\""ǗFD"Rd0Sξ{''ۣ4~nzK?0j/85 I>RU;/vѱeݲ5$ B^Co9t [۷n5y79ztAy7y$>;BDRdʕjw-WWVjY=OUs͜m ݹJOzaɓX_e돊8Oٯ*ݧŜ9?KFv)jY+$WT֬_9Xdܟ-o}k~A':=b)$ȀŊiאʊW^vWY+>%RR~]K!zş;k77mowLRc:zŋ~zinO̿ &^oʑt^Gq/E<~>|Ť~͘R}SݧϹ3#Ӈ[7-D51={ [ڷ5_ܸy=W!'|9fc/8D w'KϹ2ٷs3gYgP@F~m*D=vRÏk{gzjBG t(D,Zp(sr} 0!8ЊЊЊЊЊЊЊЊЊc!RCMD$HF Ek,rp$#7dā(VVVVVVVVVVVVVVVJ) MhR*H, X@.`Zpiv({pNo]Cݵ>cf$U9?LJ%HG $9hO6@h9 8# <ȂZ8$0х-Zpxz@ hhhhD*;'-8HK:]88]zb4(:.PBcNzޝ @~Ղ(" tؽ:^]^:_LւBhWX`32-P^v/]NK3<$նX~/ȴ@{uؽt9;v/'?=ȴ@{uؽt9;v/%q;[|ߑib{rbw(^: W, [pv!@2-P^v/]NK@тZтZтZтZтZтZтZтZтZтZ=QJ܎b 6sͽA#$[={S  !٠ e i?uІd+Zp9TŨemH`EIǨ!!"KiA9H6 lh esL60O&2SdZ2SI6Vv pVVVVVVVVVVJ)ٳSn$s.H3ͱ M-]6\׫BT낿N)2ӂ'sMiPտnMWϛ7ϹG VV =։Hs jZsKRjһkkwH3A3im~ꇾ3&ҭKGSnϤqǎu-"}͠虣mU9\ë8&Z{ڔmDͱ^r鑈UgO{y92twir p9>j˙ॵt)UzKEp_7GW9#Gk_>Z^}3m/v1"sӽ >f#k=!9_.==jKO]'-"o<ﬓMɫMWѣEdχ;gޛw]jK2gEٖ&)M/kLU) esJ]!+:4c<h`?<ăf&w1dϻwFuQD"q菲 ;7xJsOG+zJiNQ,GwǗFD"ҽf}d] {N9й>}]DCA=c|_Y l: IDATKOxC3_?))K$E+slj lIouG{xbYyJhϹI.nG/Gxf&H+F0Sξ{''ۣ4~nzK?0j/85 I ozI{grQںwF+ϝ/> cFk5Ν/橧F&}wq>1#ͱ^,==~?hU3i?JZZ>|ˌ+D5Wly'z$ ؔLU(Z3,4s'v.|l'n= |.EЮ8aGܔ/۵g]`9b |Q@BQ@ʹy J Z Ī=+~0"߾䙃7Ol35؋f} Z pt-8-8-8-8-8-8-8-8-8U-xk,aE{1.1.d ɖ #{h < hE hE hE hE hE hE hE hE C) /@Ό2@@@@/Λ-8L lHB -8-@pF[т#p#Ω0*B@2w ZpoBK)E8i-~@8т#(|g"hĭA gD-u?AvI~GcC,Vf  )^̼gWח.EG K$jr$Eƺ 㙾7!22t@xO6$[ۈ-8Lew0ɖu hha$lA-WκXVVVVVVVVVVI4}WO22KXiycXwb19c41In{h{~bʾͯY9M т/י,;-8W7J䨒 tEhhhhhhhhhhhhhErn̞=ߑk P#o;mJÀun½޼y΍-?bHn?ND]OmPU0|۵+6/&vg9<>Aچ~;j'ݺ}4ƪW/zƅWھOD;4M9}`uo])UJ>j<"";vhll*B4~p?b1"烧#u=߿z2?>vY}gWL?FDX`zir&8y K/nRr(U!?H,vp$&|/x5C+yu\xʀwy%n[|Rjŋ^p@>""Dv|w/nl)9:瞎xW"9Nݳ}K794"u%,!qx))K$?%z\) ?_ 38:ڿ컗}2}۾=G<_c >򊍳?Zs/)ͳzI("㿯;៽KyWFkꯚOdU}:Q$k;;([(yX!Qx4+ժqV~MK]~ve v}oٜsxଵ"aCXAbXp&/y͓/e},Á(VVVVVVVVV\B\)H1@h ZRp -8SF@L) LhZp|@ gD@hoŒ^(Pj8a/7E-8vBw |gg ‘-ЅHs-i(Aa.p()GV(,-x2;,al-6BXcss ZpЅ؄BtlQvC n'p`+~  w߁v|-8x.DwQYт@q3Pd>3ΈD -8 7 VVVVVVVVVVVJ C>ehbR\Yc@H?WG$=IY16-ZNrwA~ 0G<€ VGpX. ¦e)94.Vh L /=Vl%!hhYy R\c ِ'PXbZ{S~3u^4⤄</IO:ƾ5\Zm[@>¬ 8xk@*ZOed6 z m{ٳ>8LPJ;蕶\_(B/P\k O .9̪aܷdScc;ED)y]5ѵ$ v">V֟=E$GNqSkjk)Ntu.gZ=mJܶxWNS•rED)w{CH3ټy(ZyNàhmW?q5n]a@UmYc=l]s>z@7lF>ejޔFu04`-罬Jߚg~Xboc83V9G[ȓ8@lHbK[HײpjKp0Dk(GەffH@$=kwbwcs|ώ݁6d瘐%O.c7] '!42h{LǜRB`Y,gQ9^ZeX-7fZ-x?lnOՅHf%^_ۜID%&6Q1jӣsChq/ pY"1ƔԷE蟫sKs56(l29W5[O6F />b۸rג Isf=+dS ;[#g-?R{ Af(X,@dx!+QnܸiR$VvI?IvڀQn EQL{䵵z%yejehgi/! n6pRz 08_ D` -8ShB "IENDB`Tk_Library_Source_Code/embedded/md/image/figure-02-arc.png000064400000000000000000000014061435605071100231350ustar00nobodynobodyPNG  IHDR==(gAMA1_IDAThcy&6U_Kc-d FbPWW'Qv'quq-u{Q8%[A{ WFIȪ hhJ@S?݇Vmhqv"A;hY wH$gls45W^g``x꧷ճQkׯ/ ```v)?yj"2LZA+l:V0 ""ӱVw,16c?aF=w1b``PWWךVd`DXr?>9%`}i~w N<amX\}GS8oS3T=[AGӏ>tF ku<W bO".`4~s4֌N@&f4y`З!Fh=m׀v`/u7}vv=}xv DP]]="ūZsf>}nZ^{#U_>oū_"2whQWW~&ƹk7X&b";$)mK 100|Y4yyyܧ_(q4`еO la/ ln r7@jFN`t7yc00@zT n $͕w7+=ܠkW Q}Iu7}Pu7 'IENDB`Tk_Library_Source_Code/embedded/md/image/figure-02-arrow.png000064400000000000000000000016341435605071100235250ustar00nobodynobodyPNG  IHDRS:4,SgAMA1_SIDAThcy&^_t ႌwV@ ZZ3}m7V@8)2LSWW?O " 1U~uuuPw`Bx*p ͜!'fu~e}`G>*1ϮұGwx?Pm|헟>oUJK K>k300 𐊎I}+^bQ?s- uu7oBB8+#7n\ɼm6kGNµIENDB`Tk_Library_Source_Code/embedded/md/image/figure-02-basic-shapes.png000064400000000000000000000163251435605071100247400ustar00nobodynobodyPNG  IHDR.q|gAMA1_IDATx{|JiPEppEڃ#hPQ\_ ׇBySɇOm˜x7ڽ攋HN8!V5Q^oO,Z7ٓrsE$VX::Hn uwϫLСB9rB_Ν[^.V5%g:3cދ<^wpsЯ@E=,:sPQތ,[B^keYq+`ޣc&ѐgn7N5G/(N|ؒ9,[灠T`H~:(MMn?Y4}OYNF[d-ZU"^GӷN[9:u4LEh4bO~I3^x}DQEGD<ܛ XGԇZ<;EGDQ4}D D )D qXH{ot&|oMǃ:?qq)@끸@wrs-"";?\]Ka{'p R]Wpa}殷3H-klyn wL{l֒/fSꙙ[y!n|UהR<3qND:^xGߖ8^[!"j?rυ73s"r>?\נi1\4m澥YR?{F4x\*О1Y?1W۹ vo"rk[]lًګ&Pҧ9_YzƩ *)΋=LZq fB޸X7's~f-*ϖ&ߦPrQG+~[W] i2G$-[1\$,ZS^w3Yr$zQl~!#;èэ,DZ 2Yzp]v J3wuzp 1@#h!@oq98WCụԂ2y>D y BH B!}>DA"`h@DAQ$%w Aq:>!3_EDӴYw.r߅ ?Gs"}u~ (4MKm6M&$So/]8Y]&WG3]bXkkO"0,K4&tM5۽f˖_\vAI⟧H h9+$5Zk^Rcs)}Xat!zpxϪ[\Fgnެ=+poZK @MszvZ˥eWE4+MB.`8{MiUI<;aAY7t\] [*oBk6~_prP%zB0>Iw5ƈ,Bg"g̘wύ:O{HsȇKgSDTP6qjwrs-"";?\sW1o'D {oGU͍Nv1p_ ĐM}jɹ$xo}igZY{ gon۷[w76V]^(.ʁPd["bmZ{ADڜ=52nQzƩhh9DgV,<6G>c9$1#SUq /Yٵ06r ȯ︢W] /Ww.@ Y0y+#ݼ,{8 ވH +ovjM`-3f7Zɦ3Gn=F5,t߉]+=VʭL5^P&lR~ҜrMN`-®/.kVP{\D߻˅zb}fkRC]miQU)/.-sX1 1 =CɅٖӯ߸zk7!Zg^9LDw޽{D{Ndg=Z15JD6?pZ~ֽԧ藖8S|5]Xᛯ&ީTS^i%5jS13٥sx+|?zۢB8s -MuW鯗W4-*޷U]D3ITc,C& pŃv2]SQQ!"הo߫[ꇳDZih8!"[谽b#k̗AD/SsDD^Yׅ3'%o|Qߗ:$SpR`~]oHX-sDrڲ%JflbrA9_D+ޚv5{-Vy=sWVŞ=\`|buJ,:S>֡wl&VKE &"z\{k%{Mf>b;y3+K%1K ۦCI/MR9S.$ڳ1& \El{A8:[NIPd+8dgkw2Qg0PR!@G!(v_p>Fs3,B {Wa S+C{a S+#O AN~½ȂS={B?^LqezDA"BF\y[;B$nDgu&h"#@IϕL$}04MU>D B!}>DA";@8q'r} p"©@eZfq.cBlzޒ\YK'>:p`g@VՐy7*^<02 ĹsxzH+X8>N@8 PQALqk n >J!oRf?4 T a"" ۷.{t^Y[x'j6MӊuK&NᔫsvU][G,[;6~9xx/ss5,`M$,0M0&W W֧U&\[-e$΀nsDsۭzJ Vك]O@p^vɑMj>8(q~ 6. AU }*6 \uwOY1[eg n۞էYwݕ7ycu7oБ$MMj;۫Ib?y}^ctQxH#w\Y|ED0R$ U=8*8ߏ# eAISg+|,!Gp:H"W~D>)qKe_h$QfY>~~%~`龨Zl57" bm(ߧCޏṹA$Ϥ#- ei~22>W5?J'ɍ5"p#4M5u ;Vϊ4sw>C{>0.j%U݀C_~-47L_Xsmkkwo>g{V_|*yžWwyuP>q]fAߊl~ds#_?Rk :?ķZںڏ@__ېxfr nn;ңӳ*Gv^}?kq~Ep?~ =q>}+s}o烟7gޝDK FMvg|:痣Ͽrhw{c9#Jď^aI*Ё6Cq>4G`(‘Ngr!Nu o : T+M=(MΥ5)SEplq^q'!IU_\*U~ W|?O"p+kԫ캥|هn8[v?=~;M"2;wfw.a{O& p7.T_I% \ gkcw_8]U֎<^Q1wܿnI?XȦC'amm7tSzMc%vkԫ{yEdPQe4r 7.a=jeo*3s[~Ը1Pؾu٣ʺKG=Qy[}{k؟'n,tږtمi]G>8k}kgtvOjޯwJ=MXa%i2ZΓS5ު~b֭5MΨ/wP;i>n9ӓmm>R9ln@x cxRY6c U_P2{4qvmziO ǵvIM.4 Mx<]vtvOУ}V.Þ5Nqn?fxӥ\Rlr3ss}= ?>P̸pW?Tyݢ ;^u qH5n{zgvo{ay;%} k+|SsνhW x/=ʼnOGN,9wߞZwOX)uIg̰ {>F]e_? 5]XZ#rF*gDy)-gWl;x_Bk&i"#@8F4:)s޻-jPPW9- M(EgK$4y?=B\cT>f,So]70"#d8LΪ)aJټ!Fyz/ )|K={b+T{O~  Y1>oR,'Gp1 AII$~{D>/\3Tve9'x*)9sR~z%-}; I-A| f>PUnU͟קx 4+p>N@8D>Ҋ 7 ={Vsydy8ҽ%G>\@S<<@8D>N8 >IENDB`Tk_Library_Source_Code/embedded/md/image/figure-02-box.png000064400000000000000000000014661435605071100231660ustar00nobodynobodyPNG  IHDRQR~YgAMA1_IDATxKLA5UzzZer|RQCa4&AC |@2e3YjZs=s/ո;gczTP}_㯄xd#%&[$2i1LLF6G"T׾JP>1ng<׵ G?i9 Ďhl띆;O=1~zׇ=VvwB>ړoPf>|@2e5}$|@HɬIENDB`Tk_Library_Source_Code/embedded/md/image/figure-02-circle.png000064400000000000000000000023301435605071100236260ustar00nobodynobodyPNG  IHDRQR~YgAMA1_IDATx[MlMA> a!ry}mG*R]"X Q+!E BRiv"U6O%y4*m-^s];sf;V̙Ι93s}d2 LHw(b]HXTGh$ ԫsPѮ5-_jVɤ4:fj6,|bõ{73 ^|iߒhxD_]>h/u1aYPWj4y46GNi2݃SGƱDaNĊ`xv1Wkp;c &gU"߶hح V3YB6c텣hP@Uz7n6Bz)Uk(XvS 9pKz7w%& yS4@Kj`bx}zF`sCv(HeIp|߅ ZϋFj{FZ.EvayL8Ϸu J_y~Wn.7!tft@`}Ss,dg(EYsvc9"V Qn ս]N Unbv!H@Clbl(X,.xx0k2J#5UD)plw$%DY[{̒掮h{v7Pq7FakWP_8/Z|dkI|˜#% 1WOYWfȏ-{HJ{HAOQ2Qχ0FF^%bm {E]Йԅ@>54("#K5QV46")$IKM V1lmaqooffgvswv;4!x܉2N%YGS~Ȗ>3A*`$3E*GH-]WkJ!\LInSw<"H 7#y+>0U/HMԔ2kTkbW{`RQzS &kIdsC?FHbxE#{$12#y( Nz]-ohO;B/}WD*<Ԭf/u^^4)s9"&K MGs2*>x myF<2ԕJ*.CDy4=+nU] \~Y 8s65+m>gTL"Jfo{'oJϦ-P 5Á8*Ol}vvV>:0YXX*ϼX7JnE'L@I &PHc+flSnCRPѬQq'nNUQF>(RLՄS $툹L@U4R Vźz?wiuA3 2Tt;`bS=5nm Ty&[=L8 JmDU46$ND+l;=zIVz&^U:;; qUypE7&cUKpr߶zhJ豳GҖ u w~u~?|GvlspÆw~h^ plE^wiO]߷^}u \޲,\ʞi=zWOHoy(~_Gƕ槢3'AeNԝB Q}&8P61]6c_+ڄф=N_1u ?ڄ7wr'[ѷ{o?:|eu}chkcs46M[Ѳ=BK/I'͉ėEob%C"XPqYFxzi[ _~n3XI/.T&!ʁ.0s;ě/Xrˇ?sp6iEc[;Of(I *WmVmY$m_Y'mAd B8*34pي k9Xcj9]̺ZṾp`c6V-N4IENDB`Tk_Library_Source_Code/embedded/md/image/figure-02-drum.png000064400000000000000000000023131435605071100233350ustar00nobodynobodyPNG  IHDRS gAMA1_IDATx\MHTQ>B.lsk̟0& *۴ 5\TH@" *H Fi$v`Pf5k# Q™i1罹w}-;;{$Iࢌc,{Xvu{8clf7`;ܦ.:\ sWq&1{b," {isR BB?gܡ19 ,WokYYz/wbj G6Ta6Ǻ-hܶP/Ks|b_54Ųn:BN^~IȚ_;G}-EAs;6X.GP>8g-Ubmgv]j!= SG>=CkC |ks,ߥT ''iKXh- uUR AM nwsOF}kDՁwuZBdGǃ=~/%b%_ d2ub#V~g9_x$QRCzns@<:sy@Kş?7Yc'/ܙx?^7kؙ#˩d?ck﹗{:Բc9;8;53 *Ǟ={xO.7E*j#]ں~|}#_hB&<|] @R\3"y yns@<<7y@y+ٙpT.AU|j w,xKZyn7IENDB`Tk_Library_Source_Code/embedded/md/image/figure-02-ellipse.png000064400000000000000000000026641435605071100240340ustar00nobodynobodyPNG  IHDRoRD-gAMA1_kIDATx_lE^@ +"' jL`HU ib|@0 ԊT}Z R?hB ?mJzÒfwn7noff33 pT 9& +1%^:1bƒS9mK An@k6aDcN,][*ƲSd{p3QAuôv/gr87X@Olu8*~yhʨ;=i3Aroim9rO<L=(ӧGE'P4rF^yI/)4ûHgΔ{ө&tg8 ]ZESYCKMތ='up/CDM .ڭܰA0U#K$BE*%N/%ۺ#mLT޺?xupxd򝾋xZkwX[r*ݩ7v 29[v_Fd=ahĈ 7##pes;J3e%tR7o^pϪ [;yKc|yeM.zokIwi3Kj윮Ɋo{Ih/ħw!}ƅ*B6- GxNWzTF6Rkgn0ʪݞe ~:謇ZsH#:#q }sa$RHMJ"5)XjOIENDB`Tk_Library_Source_Code/embedded/md/image/figure-02-line.png000064400000000000000000000010421435605071100233130ustar00nobodynobodyPNG  IHDRS:4,SgAMA1_IDAThcy&^_\Z\Ɓr H={6&YpSdm#[ۙ'WM'2: #uMS ͸~!n@ݣvڍ@3c7#\_e``XԒe`?:ٕ-A v%]8amN?ဍa `4-=S.9 t%v=jݣv=1 @0F}>i &T=5Uہ>G _|rDb_gGoyxܳMC6|?eL,7_Q 7+LY5l3gȴr꣩uXQ4j#b1 y4<0F}>G>y`#W!yIENDB`Tk_Library_Source_Code/embedded/md/image/figure-02-spline.png000064400000000000000000000021431435605071100236610ustar00nobodynobodyPNG  IHDRV8ͨgAMA1_IDAThZ[HQWE(!q]U6.`bڂ,-B/HR"EY$iij$!)h^av.g.3|Ogsf !Ek1 ݣC0TUUA,?^^sX,b<V6.rVO>avX\$.B,gAXY N4i`Mfԫ='#/#7`aStoe/Qj\X&e=# ->B d qfm|BTFל0._ Y_ZG\R N$;cs#8>s )Og~F#}fQ23?W.麬У諠3h{ 0OZ.[޻#iW<](-% NY}aIQ⪴ڶDpOL(P З" L]ʕVqzȻ&,8iS@aa<^Ϧ|V^hw.[#yle&ɥ/y&r#U:*f) `\1383=J9Zu`NT/M@7&ԁ~U 1YYTd] %_]"#8x{`㓿ٙJ|8Vg~{oŖJ6~ve\m|jҬo)ED9aP}U=C+7;+?  ->/g9v& OARKRG^YWB1XSi暔ˢqhܒ.EuyYKjsA;Pb$f˥,,Vh⤨oj&Pwtڙ6JV*!9#/W L@/j p}A6KXb ԅ~e@7&Ei5sIENDB`Tk_Library_Source_Code/embedded/md/image/figure-02-text.png000064400000000000000000000010231435605071100233470ustar00nobodynobodyPNG  IHDR)'jGgAMA1_IDATXcy&*`bV&Å1BB7N21008Ijݴ-8IENDB`Tk_Library_Source_Code/embedded/md/image/figure-15-spline-1.png000064400000000000000000000106771435605071100240360ustar00nobodynobodyPNG  IHDREJ0gAMA1_vIDATxyXG0 2FbYYm@9FAaU b$@ UDE!* 2"rh@?vfi>|=u~U3h mVNc-0.΍ڑVn& c.@ 0sAvUnQ^  55UFF-BnP_ O ͺaqamrwZfF?+M*]Bي+k;R#%#kƮ ѽ#`R16 'ql`#g[hٹvVvViȳ}͵6"ڼ*g( g:-vɕ:Ȯ@`f1dNI+9mtAQLs\mŰ[1 cێ׉ygAش܉S2ޞMU@Hj+G*@MR~2c@]<#|p}[:=h $q2+N,YKT}סdӵ[xSrЕYGo;Xn&]g]}V|XYd:RdJ2Ԩ t鎒fdq=7^ $]ߖ879y{)~B*StI+2`y^LF)y NdM\8{(\$6K1/<D/z\{pG`feߩq ìmڽ$L={*1lm81m M *QrlbxV'h!Ժ쨹[KjBI7q^ԮiRytŝ9|Ҵ+&3ib}bh]*ִ+d"Qۛ2yM68X`0a{pϞ[pZ14:.jZ9XFog. r }bDT qt~>^8pl7R㋥FN"ŨTl=ɸG=,jcێ"z8og۹ovQÖP&q;ɄI,8Hd5rzd)M-B7a 9M{sl-lQt;L\kݽybPJvdY0N7;++L8!55uı풓<2~uXi~9 I@Sj]jrW~ș = /d2@ Qw8KMU8 &yʌidä0p"Do`봯  ܼGW{" 4N.cŋ<;)8۹þ+qM"?duzobA_!--c-b <}1'PH1FmƹA+Bl'Ho2o]lt43㳳IfB3ok#Rj2>VK{'ʹº~gիZH.ByU%4##5AQl 5HF!3a8 {F d} ِÿAr52aC:a h@m3T,կJM>VʠϫTATB<>=K1bah_'b2L\53%8J h= Q~Z OkYjt6D 朂?a.UB|ۀRDDE'Zx2C嫧$2V$? y%ʫ y̢<]0f٨4$46>vsHyܺϞ #dc̓5oSW)!Ek-' MƼW*gh!j$\y a`j1 ֖1#z?glkҥ3Z6XLL͘ )Y+p_@+/=߼PMGa` :V=hjjx\[͒n2bw~*f,bXbu`= -! سB.J N}Dt}=Ld@ m#ѿ@t#!ߞ:0<&N1:͛Taxȷ>Z5ƙc;-:Z.pwgsFDjTYFX[s=|~ή î%.qcO_"Dw^ð{gh3mJeƝ˿rl8\Ϩ=L1aʳg/t 8RC6j 刃Bv\nbed4WT>PoTnQiKqӈ 헊˪JnsI`ۢ-N~֛ݨ:pNGrţk-+˳] 't@]9wY/Z{:z?ZD%dX>:a؁B,!|y<^}}=ZŤ^n~:ZMD񶖤PWMowJ&(9g%j`3cER>N+]$E 뻵}@+tp[%Uj"e׷,"5nwpt }Tf@NaFYo e5pZyLZ[nRsvfmΘm^3XXxhu%99;7u/#| |>7*ì F{9cw֗BBњG#@Ysg cĎ.k.E3EWw[ŒSK [q f&BNg+ʏ/]3Rmz_Qz_R4֌HKѼ2'iOR"U6HEaNJcBGpaAYG=;Ⴗ]plƲID`p6{\C3TU\/mÜl~as\<6G\O lڰt:i;0HzX7OH<6[8b;K"K''Ҷ&QȇV}6ɩD$y 2x)Ԅ2$I%ndr{v*ܚHEϫKں ϳ] >[|Ë<.)ԝIܗw"jrɬhWmIo6;4y""1_2-.z'懤W^|c7MT+_7p~LE%>87k A#1Z/]rk~_D/W:H&0lS?@bpfH.e/3NVGH l3tXJsV6|S@'l:Ae04=`!r?a_- Uix?Pk- Zt42UiE \{b?0pZfc?aWAg._;3V;Cha[ƎH4[@ T~+  3mΝ$mՒD)"tC'ѕL=Әp5YWzr76nbV|ok(|> M{v]!aG,ډKDrzI|": ;PEzAQ2oy%374^7Sȉ8[J= nQq5Ͼ?ro'+hG|J㏾1wt̸9i&CUG;n =1|1O~[jyoճjaWI1twwO4Q~OsEDtqp9v4QQaKySĽ@ H~͑P_m'NƳ1a|+lWL)ԴoJv;Z U8<"fez,wʺQ֨ د.2$숀1h#gu ٽ [@C%q(EBDOl>wHfSMP~6쭮m+[cj;Y\|a{'=5=ts+-x+Ļ~͝?ʏ4wC=oH9"-b9$邩՝hw?b6mzӋ""N9흗KmK€c&QX"s eΦ`zٶX㍺/ښj߽'7^|0b`?S4^~rm kU=2*+4fgpuKaHV,]YO|ֵiʽ|s]_}gMZ/ެ4fsGhS1 a?V?O>9ʾ6 xyXTo$[0E xT1,D - 8fK n)XbfQi;cw}]`W[s2$Y!T5aj/!", VvDn)\a9 `9üSUxC+FAU3.` q0ǘA T5H]F:3>-"`|Zv{Fvְ3 Kk2d:_xtnQ Y9s$GT?"JFIgJD; U \@U@U@U?$lIENDB`Tk_Library_Source_Code/embedded/md/image/figure-19-style-arrowheads.png000064400000000000000000000031641435605071100257000ustar00nobodynobodyPNG  IHDR?+(SgAMA1_+IDATxLSWO#8ciı۾>Z l_@6e~dK3DD j4?бsYcc?d2InFGda" mǛ ?;?=[d,B0JC7L tަ=|\N%ho&k#=톞6a:J,BX"=qZ[w !~,}BHG_dXSui^.JjZƇA3T/pRN:ǿeh mj !f_5_ K G~mnYC*b4 \s.[y)SN@W˞'MGgp;sXr]ZjHGK X"U{ޜѪ~VjfsYFDoeJbE37^:'Y2!x*0K|)L;!68$C5|=w1p!zTbscF .B˲_FJ0M#W^1,͕FDbOdM728#G_a䣳yU ͅú,,Xa#E΢E ,r-f0} +fP]1TW̠b3r->% EL޹VRn@q?p[\(/R͟8+[n9sR(><7*wfV q:zR%ʄ(ݔ7Y3oUG\:k+lS12́usիWcc'`YbK\ۆd&]F=V8޻`Hތ2}N'"\TLTJ M5s3\.pDzF*&P /髦Skw{ =U֓@1RMlX׫=;;V/Xh*Z9YƷ*Ofl{ ӀB]v w4~1w޹J̠b3Au Ι$\g3+`"Hً f/+^l _C/3؋IG<&=<{ yd˿}azJnbi5/-YNܶ;k?d*PUcwJ&}K2{_ezLBȋ.zpRI>Vw6BHnvgs*.N_iK'v!`dd>"hlƇ>1 pA׈;̍J˫IW)XMnS_['ȯ]nbY8wVel2Wi`i#8A+ػζ ?[ljsk.ugݛc[=SQ]rW3;o[֎<2c:F-e:ݩN+K_˯AA D66d?1(ͥǒ:43]6:m6>Ѥ Ơ4i I2Ai JcP!YY"QR hт YizGcPҤYH3YP(Ba P„ ?slK+&\E+F0 Q(Ba P(F0 Q(LG++P¼k ?X0 Q(Ba P5ghHoIENDB`Tk_Library_Source_Code/embedded/md/image/figure-21-style-colors.png000064400000000000000000000024321435605071100250300ustar00nobodynobodyPNG  IHDRRggAMA1_IDATx[ rp3 XTe3UbsT "g9]epgK`YnYtIPJC D!ein룛E1nyK՚qU~JU(u""2}[[(`i}7amdXȒ}ijV*qhV*e:D7CL^ҩ&:h&64!4 K(GhXğ/M3ocufqdaqCd@Bʝ`*'a[ҜiVAW`ЫwZxM'.";ML4 a 2ze tFEO&:k_ (JqAFA@}*P zGx빦62S;@M{ <Τ\5?+IW f6G~ _D_l[pP^ӞĝD](Ux9EEYr 3I BG ,\%GEU>p m]DDT\U5l$Gc K ?x3gΜsfZ޳ 4 |ڥEeݟ<8+zgh9ѕڠ7Yz(Q8FU2:j%GfТgnp#]?(smOjXӳ,%'xTAp79_d3I =Xi4KZ7n>Vаe{֒ hxPM(궦$=6Gs&Pw|c#ge;S$Y]+=$S“Z|KR_{tzLS$I"іثeE n,c۱Ӕh,)`kђf5`ў!cNp9NjFdX1Af' E#nףjMى,9Ct3M4bGP^8<-X)(Lc? QGf8K$kٳ7ktM/ݒ3M#ױ.J˕0*tԹZe}^h;>zAV9^9+$\8Wҟ[vBbKof]v4nh]#~- F$iq-¨ G"~D#n3aDQi{%e=`Rg$OD uPgpp{rU4Mg 06I*rh]23S+v{3ڴc 9oվ}^x=8Fu~;~s4#bg5yf3+V:Vh4$Lܬqrmn &?hk7ϨxFDDG#QsU>S?d9uήHk)L-,tƲ!ҶBf,Z4vsM ۙ:iEG߶f%9߾9#.dVݡ2F$O| Wx{#`D"Dϐ#~> F$k#~> F$H/_0"`D"~D# F$H/_0"`DMKGh,zH/&>%?w? |8 GJߢPOp ξxaR?WW..V:\r1-8tzZ.W*72qZ5]a~6]}䇡yC63¦۵$-s P1.SyeTP7@B3?XsA^.: EQ6VdIw|WE_ӞmGAWM!ˢfKRg )kޕk+txXॡMzl{#`fY`۔7vi2Հ8{աw-'h bh,ne:b 0&9}4vJRT@& j/g[YQ7$-d -3N8ZtS~qcs|}Zf^~i-q|̒n-}i-(f/ ,X)MSQ++)NF@/@pV,"^{mSNo8f /vI 1zhy=XiQl8s-CGOR\q=`979iBO23{ m=#a82g6{{ <43pn<2IEd3,ILg:Gɬ-((rg w"ѺP|4F ϒ') 2Iȧ,IgWѸBqMXWP(wYZ8rjoY&ߍ/~[ޤׯ |m=mk`Rˮ? dW%X)ݕIN:?lr^W9T1>z X `q]6eZI~Q? cbi{Zf)2٘Y'mkMY#-JYv꒗]O(>|q̰Y VM֙#3ݮFms+bvY"7!qri,~%v x,9F"o'"q.SbrO]/|4Ao3  C=XzM!ʈgP3hnl_ Lڿ]T=V 6 u޾uOtLՙ0U?Z?mމwل{'lgһZ4҂.=vk"]x,݁IrZ5ri_/H:s%0QdO˟}VTO? zw$niѨ9.2[y"F\Ղ+IRf;%Zr_}'=,^ )Wc,K\Dc2g .*-//-<rF(_, Hwq+n>Y.J%̺FJ.R/n¸ۚʻF?<*J/I#󚬧Q[h)M7Bg_0QUV[5L7؃&{2}VX|' BA$+,ȡVUi +9dڐ|:0ϠzȜL*%Zҩ.\ELZۿLOZ/2SZe3YOkbvFhu Bb{zW&=,{7bKC7lҲވ'o힕)>^ߏs,+wMF a8{UڄC?~W ;'Ȱ㞇, ø/^:48xS]7NtWniIȲڌJ[Ǹh{glj (G2Ve9U+],[WУ^ WW1JXԗ) U-8:}zlgb]{bO^_GR#îl䏇: ~J(i֙"/ l0[hppyﷺUbi{ݢYfixx‚mM*L ogr\+9օM="yI4Hx¸b[(ĊNV( .ZwXmtiC$pPnٴOtH,:$r9(<[2 +Idh T"n~?|J:.n #UjI s#p^ ~JYs~NU=0>ΊPEv67RQ--d)Y#]) p/Kd$y><؝^z m\t_uRÈ^y[x7uW]DH`;sUEvC?ׇ OZy~u_ Srφ~<_[\xa]k*TFd;QbI|{ <ʕ.Y~qVA|:v*F)kxa#xXTZQw'I(ȪDëPfIFm.7(`3S[ّAOÅ{͔MiHkFO g zDCح@l-k>ao>}ر@ c{bĈ;G\Q92'$6OoҥO|OY'G@x\^8ch-FOO+_?pi/:U-;"kkvsj|' >oHL\2n+.@a^i5m=_+.q.SS'IdB־mk֠޵3ԻvFƻ fYB>Q&mA//=KШniN1y~z^2y2wUﴃ qgjXg_OKP+(%*ls{ 0@{fN U<19X]UI;y_Y]qQٜqWo6,cWrK :(]`=]B% )I64VFUD 8Vu&0:ۻE,NL'˞4fVc&tlJirʆ`YVvmQblSt>s s$:^4{PR"y8#@k# ~jgc792鈟*1ߘ=#JmSv Y&ƄS50{wSj(7M혵/Lf5O5dXv42us H GvJwUPze-4pm um-ԵֶPZB]k[d\uu7W*/T%o8w#*`H˓uZ#uz+o}Qb?_bz̰ UVMLn5 tCZ#ثw!0k/8mO6wc`Dѳi{ ~,ȗ\UɈ#'k.+K=K~le9],gVp`s=Uj :ʐN#q]8zϨꊬ*OVRvZZn"ˢ_:T%F_' O|O,qBHe(s̼_vg"G?殎;S}ChY?y^sZjv]F}6b "C`YVt# tBld_31U_5}bU];KM`Kwb6\}M ,Zhk+W窺af)zM `Ж~t}jo,Zpxk_kXص:`u}#:J]ˣ6\}-,8&s~00Q5f@rdئ'c'<29}Y?9BDz|gz7–Ofl,[)evmјWݗur*33jn?pz\]%NyBx#6~_YR@"vhL}{FԿ_@12z!\. #?]Uε!&mgRB;ԗ&Z}ClBtY0..A'Enr߮+uzʮJBd iy/ȗJOva6LUU\v Y!-Wa$D_b&glkȲ{ᔐ1=*;.FBZ-vhB]k[km um-Ե>P(փ^)AB4n)AB4n)AB4n)ABHq0L=M.ܐ8b2^ JOSGHT1U7"k՛ug揊x` c!}/%\r賾4c@rqɊEYy"<7'CՎ06xycn |ꈻ#ڀO&s̼++9mӪ3PAOPq)xw&T2b۟3_th5,!j֙z})a7pe{a`- %o$qMe=ÌrT9ۢ. =3`4(- x";sKˠ4`YX;@Q3U/>e3Xot+#b0-"dl'+ZZtlJ>ޭN8=pݖF9A7HbƔ{:Qj0ٖȸT[OF4R0-E08ź[ݯu %kW;сmp\dY㍣e-[sȲA Fxh7  3!,}2}> 4h|u+$ML4n 7Ô嶏Y0#Ӹ5o.g ^odg~/Fi"$-vkp3-7ƥƒ{0mPz a=tzm3^xґ6;) k;Fe$VlKoI@Z05a[ ͦNr3 ? ˊ4ϱ4%z*'hqfpPa5h%eOhIX\g)MlmU~;Č֘z-IIf i ;k$; v$,+k 6Ӕ W^3*YO v5.5`Auc`ʾ˳7|q%Qql)q1s {=/Oi;^Lǥқ5mrѸ5TzBL8||;{k[C5w< F܁"S} z&bƔW…|d2,˚kH[s gvU| .hu|p:eD%tAqk E䚔YyE.0ؖ~w3I/de4,2N$[B(x_3~|$q A]Ӱ(ʲ)y d㓭Kϖ|l+ƒiFe+ [)>bO.TwjB%(692w7 |tnҜUk_>{HGxSX-81&Gغg,I"ak"[5q}CT=y暪}b9rE׊ L35egu○kazP]>n=3,}O;&}M{g]G*~|3P1._R\^H:b2^ JOSGBvUr6g܈Wo6ם?*vD1BUkXOE{heޖ'NA1i8DY_V1 dEL¢}_U&BEbL-<Ͽ݅5$V1ְ+6'y_ JYENf+sj^Hl׌A/WA ڍtȥR>3)Ϛ⏆ZNY X>R(փ~LXqKXqKX!X{IENDB`Tk_Library_Source_Code/embedded/md/image/figure-28-corners-open.png000064400000000000000000000131041435605071100250100ustar00nobodynobodyPNG  IHDR=gAMA1_IDATx{tU_CYuwG);!B(m5E( ˰` %!w$V8!0 "mѩTUVs8:]}nnrosjBmǙ!9L9f2&]yo;ƕ씴c5?N\o9WD;^2mpa/.#S/=%KAб3R+/cM1;UWWOXR; U1c"KeI䶒>5V,:F A.1^ˑSMDTW8{l7ćRJݫ@[ AdC AfĢam<Q5\Ȍqw5ȜODӖ! kȎh zDbcWܫ%[ 9 .dVEgfF#E:nFf*BfT%eM{v~ !vDHb.n2{ D>3>Ds#qC-2s ;^0`Dx$=j֗9Hծ-x|{2+t'.C ѭOQgp̴AI϶}0cK-+@٣nqKվ?]5gLh׸uH]a)R3֦n R0,b@l,fF²fU9]~ }9u[ix֚Ni[YuY!' m- 0=hQIENּdFTAj:C;Uw`(`) 3b @ *y y y P۽p]8J7~pDq\ l=lỤʪ⯏,lx ϥU SC t&Εg:"m˛C-;dVOjΎ9{(`rJlwgUDtl[o o]`Mx81%tv3 n]K'C?YCe+zN8nx}թ1Nb/zs0xqpCv;ccƋb}lΨPsssCC~{xFg46kBxԔND^1 1aV'NoHds D.vn>cd37ڒd,//^}S`jMJ W~Huv1Ex%6Iv߄6liHDNLѹDT|Y\W>}!HD)ʦ9UeQE|U+ѦubU|cwn 3[δG^]Shz۹^xm}}r 6eccCqݸNIBъ?Ʃ88F@d?ՅCNJ.?6X^?CTT \EMhτX#'_$ZY)l&_R4BU_&60FۣT7l7B +ξeh^w대B]}"^ Q'v}c0e:#k <Po@        Q8oPmO>|w87enڴ5Ce+şE B`r<>+ώN;¯z|~뒦4dJ`8iy` qrF(0BL # FdQ5u勉({ǫLVu?P"8.ʑ)|KI4&RcRt\ޣxp4}L1]OYPcf2%nH_>۽FE-(1u?~NDon,[=DyGn9{lկ!1eUbaݱr 'jxޅQoU Fw5ӃC>ӤKhG} ?>}l[Rh XiH 64pN#Bk#^:6HК!6rNS*6fTѵ?24Դن#%J`$swaǓv } Z>W h}V=<4 v[9;<9H'vBW"6dKB1睱t ̙; qw_vƬ5B%OZ~A[VU yvm"*?PUJ=z6ygpuJB-WagU#dG~@>t={l4O.y\݂jV5_tD:U_Dg;*⑷םi]U_ *ASPN,g!*(do85"j=}DDs>(Q_ܵ髞IAmJ?z6ep;"Rj ~hM_u;.=>_egdߙi2{6?~TQa;JNWηG&rT>mH*ScZn#JPB(\nQv\FTi[g>Q֕[~"/ECv~~CLc<)Z_1Nߐp\&mh_5h~Őwqϱ7LG2c,s }     ИPgR3@) P u(:BP6PgFojji|7L07w-I/n8("] {ş,zmsߗg.X.] B&M,H8槼41qcSP G+t\P_MMmrXo .2x ڸVCLKgO :=2gcS }4h~*>PKɜ)9}<~Eg!"8vm}f-$"!X4#?+?2S NW?bkΝ\gL3-*mݿj=WCDnEe{+8ctIÍ igµmub_~j"|.'0nDƅkmVN>W?ڹӗxz'N-zͲ|ӡxzpɉ` |۴p \.@"pr?Cqb/$\SM Gr gK : S)<06#fP0fNHݠ Ʀ ?L%S'qcIycSbÜBɚ-bNE ɚA 30Rx$V?پ^0SD E]~Rg8#MYѱr]vڢC:0iX3=)!ظx>/sЌ[lT8y hhh1rl[4OUi۰M2 G;p"bbUУ2ΘH^Tr_nt/N^ZZ?[RZQնBmĩ-DhNȋ=Ԓ Mǫ7:Sr* sL[vTS}ނCfn%"9{Rs"-JQq; ;`] a5Ǩh Е0>zfzKE{K ~.pXuۓB^ ׸neE9x)t5M9DQD-ॷ#-JQq8.{LGι0ɎM##ϲiF''1_[o!eіr^"#o%ugN<->DDKy,ݵOW cA{&[D{w}5 ncB.'jY#]">1svgߛ6x)?7l<6\D.ǭFDϙ;ll}O`X ]B/h}$ܟ+Kz#jiUHם1MaThڎjY>ok_>kh^+ڹq_Ο8~ ^!Yϖ||/F>>^*Nuj l'S_z_:ѹY#ܳOVz&8ԼvuDtڴgBma}*^"O.{~ΣPe=hQ[˸'>ڹhcז5ߓoL~~R/\^Xc@xUvǦP[K<@XE+u.DdV2,8scS {/p@J)D_K(Ҏ:F.)ST54[&}iϛ`'Q a-tgDѪhlz7&_.~_{K_Q0ocQ[`?ەIЛ&O sS^Q\37J>]þf":)(2Y0o stdf܌:+ΒB'crY3SL j%h6k̥RL,`j)3%O/l0DDծ-/;{D$fg{{X\fuMŵ oX*)FXC(!T `~rFUEl G (I_c ƦuΣh^b3i|}\ %^Pg0_CU3g@JPgR3!13,IENDB`Tk_Library_Source_Code/embedded/md/image/figure-29-point-interpolation-1.png000064400000000000000000000020421435605071100265520ustar00nobodynobodyPNG  IHDRSRЋOdgAMA1_IDATx\OHQh+ c)֥Cy`IA d]*(" [[\a0&G$K|6, 8&I?2<_K+Ȇd}6YK! "ٟQK5%/[Gߦm*i+́t::}* W呰spYAݱƅmMޜ V-[6)o02ᦳwB̒P2UsZv ʹ"X]aenvQt]&~%!<9f90 T"ؽjl{֩6.'md>︶FqjSmM6v\ejj;D`D?ɇ8)|]ú6BZpAm(d ;rc'ƈmӷ8_E@ ;=m|(ϩ6._m'AP u^y(+(kY%PA RXIi;"MJ5^:PzkN  $p"ǻΝBsw*j38w3y{F 霔g2zFp۹<#;J;pj͋Ez3Sk'usư܏KlnUYd(ܛujEF{aϚks?>zCbs_SOMUj6ѺOh}2Xundo'I-|s:AFƟ @]f c1!zz%24^ ɦz"htS|ny"ZwLDhRF tnMf$iYJ~gHj7ֈ.;c(_C P:>tzF}чm wf-.]^#$ITLD w^}9+uq7\ˢ\ID&pQ'`$`$`$`$`$H=j)I}خGK1@y( &I 'čMA\nNyL]}0=[T^GzzF)SxKyde\Vw'^+oJn#sxqeO~}?wSVGDDrZLMQ^i7\N0 N0 N0 N0 N0 N0 N0 N0 N0 N0 N0 N0 NqGJ'Al>7\ѣv?O{*$I)ʗqx2Rz%IuNdaO6*l ^/!cLa>̩&HY[M?߲S0}Wyiڵ̃1y+ǯ4ȝ S9K{{>v*BmҴ~zv(u?hNr}>̼auGSqIWow_Ը-_v\&ʔ^p+v4Fܿ$IA:,]~Tr?xA}k8ZJ}pCoڏU7g$I55K2iQ:FGpOmem+N }Y}'*q4EEz}K;$:\.o.'4hi S+^P>xA ^/ȃ E<'Z-:w(ng>Qa5=~jBw۲ǽ{#66666vڢY?`b"x])#ǨGX&"n%$'ogA< W_;jU]7 5[Q?˼z/%{W~rz‡h ҭ!'eg55-{BY;Y l6X_1=3k,˦3ʛ=f=#+hWez5>'3 k֍o7J}q2`3<n}[ܩۭ+O=/5є3ԻeȎ'߃HY_w%d?I}BV^ ypˉ+8ǟ 0K4FDkCh&;n>`0рy5xp݅%ەSogd, )l4{+٣S|w17 T".hɘ#oKs6$=yPQ/gx|n2%5uG+Vniw8OXi2U,ɼoϴُUIQ $i+j;}7/̿5ߑ3fidᣪJA#`e|wK <OmUbmA[AǞpr嫏-Ƹ N&"2zIm6e#ು!֣V8FuGlh_엜Ϟ=}M?Ĕ?ݳpb oo<2`wUV_j"~H%%]|Jpz~E9kY[idzYL"ʶ&l 40@ymY[7UeMKOQ~Ҵ~_h5sa!r)_z\AYuJV/sq㴘^@@1 P{s;='X k֍Oh)6N}KȒOs{G_we.WCV̙jGyO҈Eg40$Ijohc{!| By<PBK,S(IENDB`Tk_Library_Source_Code/embedded/md/image/figure-32-point-intersection.png000064400000000000000000000074071435605071100262370ustar00nobodynobodyPNG  IHDRxgAMA1_IDATxmU>֖TZZHHiIHZZ! IP"`}Qc&&&&<Hx+II/TTB <'lӹܝ{9g4{gg<{Z8c8CQJU)xaQ7znͰM+2P*Vkh/4P|˓';P7zMJ&{ci3T9nޛ,ԍm؛ {w737/jroOzTbLMZJE*miKF'w-"|+V8Rj-VqZ@zPco|gkCԅsnZNi2cH-eL.VjDEAtMȩEt='Zt fy4IZkT5aEb} iL MUg8> k8h-F*5<k+M;DEh4ʬ:]5M.-FJ*4bMSڈ25A @Ҳy{]Dv!mDh1QТikwȹq':-ʹIDe]ģ;sMlk?c4Mf7ϟuw[,kC,Fh5Z4 xBa hR|[w0""7Wx{/]sQ\,=>e;ɝooggHz˺(wMք23qC2 'ޙyޛ_}v[[͟=gwdP{h@̑C~vDN9v݇/"޲3MdIoʼr-BEc/O|? rœ[-FtO)9Aw ]٨!&LDѠ0'ĢeT묦MZG0AaMIN0REH^MR+J-)B̞P7Iw ׽3xS>{bHꊆ(}زP+R4t@a3QBߢ!TZPXP+L@z r0r0=0Q4(Aa hPݢᥲA[4ԛ#UtORQչ"Lxʉd/NMCEzb$0su794t[ht[r{ҡ۪IAU1/!lh]-Ƹ'^PlIE˔޸"̔Mz=%RɉAa$Ch1d֡hf\=ɋIP4ٛ:R̞Œ(U9ES?N=1Ɩ ښH)v`}.ED[hV3*2Sufngg·}kF?ݸeip۰ukF\uJɟ~3Wι(uȔIi|r_ȼ],"MmE\MEtI#ifx`)xHF0$kKj0-p)FtZHU$ kzҐ.%4hX+ 5.iGҠ$ cPEFg\4%a baT0ڭI‚JT? /iHyV4\'AAa& ,Ӎs3B8ΉIW &Q1^sJjK*_5 #UZ4K+`TQ4L` $[ECJ0| !`XP.ahߢ!`|P.Uh(+\4 _Phr 傴ًAW݋rA,xAa hPE˜= u 4#hX{#ysN 68(pڅ4 y5.h2MND`A3 rAS@QM"h #wNuD@TA45#wsq]! ?IdTYx +`o2hp% R hS-F`Ð:hXG:J)nnňur:g"hH)V=~s6@]W#zH{/ hPXԀ32+V?S_sTtgG>Ī\2}J4[ʌ;s'ed_~켫^|GVn}t^|K{z.c֌lkG&'֯d]G>?-底ƢW^ts-E~fc5+~9rf $_Ϻ#,m9-矙v{MJ3|?~q(ݷiBD6􋛶E}[?yǎJE;v쎿v<("_Z{qC_xGygѰ|yVy˄lƒO?k-#Gx{o9Y1A8Q,Q:%Vogn92%g 8CO>{<7˞!Yr!wl-xs~ry|㴈<67;ur?McDK-X}=o]~t=~n5#{և[nYyԺ?-e/}n?{1+s gSAyt.ѓA jड़<Ԇο9TSCxXGpFL40)q>ζP#^aebDȅѸ]`S&`DSu(hh,F4ֱ 4cd+@Wh `eMI1)e]F ׽n麔K}"hfE~F:൦M/L!bFò.P %!_څ4 |}.| gAC> hw í!\ 94 :|!\(h,  f>hfpC_ACȣLА/ 4 Ҝ2@m4#hXG`FIENDB`Tk_Library_Source_Code/embedded/md/image/figure-48-point-vectoradd.png000064400000000000000000000043231435605071100255050ustar00nobodynobodyPNG  IHDR~*-gAMA1_IDATxMlUbD^lV | 7MH.d(ta$.HL 1!n 0!TlILA@4.$136tμ79wιs~;gg܏y(=(Wk܆o..Sx(E S/(6VJ~@) (ʆw| ={PZkS\ ci Sq;EK6cBp$o9˜Xӈ_qXqXq+Fگu?B{8PTMEx 2=H(nݡ$VѦ]Ubr+SE#8=;;)Z6]W1@t XыFݿ@m-bozsJ~@ (/$j1j}_&J`(Z.ÍYy7u]z\]{=>+QH{PQse *j&A@iƯkͮvgUFQ4??72,Xak`|FoqMuZk/q˯NE>M}qrrrrrr?&GQ4zϠ~ T~Z_ܖ=[&h>Фt$K/D_4Ylu`3[9 eD1hCx9><\V_GDԴå}W*Q CES:1mgIW1˜ <O#####Cty)-&, b[ַ5TxvpȨz;ޝ?RV]@٧+xV+V??QnO~*OSJ PR&@RXPRVEJaH ʾDY2AIe -)gϮzwtlH.I*͕k_TEVlMTys7zXڛt+J>qU?Y!9KRM]"_V6aZFA9BSVlhʊw]bزYÙvRɄÖ6P”ЮrkC DzlIS2/di" xY @xFFFFFu    ![/.HNCeVٖ.}wW޺_ ×627{}ͺkWϛ?GFF;iٛ|vao;?iO|ٗ;kbb"/^ΛUUh)|W>ze$Yˌh|HLl1*5'W xñ]˪7m :5_{4Mu v(@xϼ;#c7ɣ.hůB6 G!~s=|UEƙk6^ +/2W!=j#~wE: }yA-Sfã6׺ϣ6Wxe4=j#~5xP7rϔh~~ X ;ka܌ؗ_K>Bi>Qn2yjU j/D~QWBBb7`f#4vc fX13 1.fh!=T'a~BKn2r\]zbUƖ:L|Cj1Й݇.po-%!^?Ū?u[b2ZYmGPO#o"k (^!LOҢW/fh1p7S6ZcsW090dEATBG$_CRW:05>{H7ZWWo @(v쉗|c*n.0i `P^݋|T )pLN|Rc2CE@8 Ύcn.!R9KFǔtRg[J7c9Qpsbiqtd֐(ݹɗ=p;IQ%?սݿ-TfTs-m?^$2X{F|f0#jK 4?~0pgz>{%Sy k+33'@GBQZVώL:I'mb_Lq}__]~cצ~!^q!firfo}M|S 0](}uDliimsоx=SZJfɁz!NV-sԟ{_,sZ'Lk6H@p2婋?|ȱ CN P;jfN8\pp>pnp,;:ᘧY6u1C39fN'ktEfĀ<͜NFk~ L孺bNj V*!9zJ-uC]o}qliLmWf/0,c9ͪ*:0rH< ȐU?[ ܂ȭd$2,Mʆ geK43tţsH3={{[=zvԷ3WuCaD Q1)Z1pkv{}{, pD :  [@ƣ IJ7 AX- C:`\_~5Q\lފ)Hҏ~A mC;lv;`f2@m_jm%•eRF!³:=P'U@gؚi rğŚw*ω%fՖ0U͂in/ U:# 8akGm:m$A2@9-Ah1c2'h  V#`ֹ ff:XR'aXsVF!i">$OćXaK'h?Q.jUKxO B9F"VxO^/*).z dDA͆޼ GU9frˈ .W&wW]c+Ǻ 'nO͘ 8S& XMZ2$iAJy g SsWfӃgM?+c?~T*B(\%Wrm =)JzC5Ug ULpG6FW%gaA܀&nt'CD|7O$ID$$#P_k r,(A2Y6&6J Ys V}1pǗ^}sK ]KmnugwؠOM]UH<(H)(6P%n{}eJNO݉<+ͪ UUل#lG zhIKHRS߻-B5Z>t/$'R UH8z<{Tҕm- @N=~uMSpqoώjb*:ۘ^d.5S)k'k5[dAIrDU3򌡊3cTly5Xt=MSQ&-<Γkz ݸzA6qc?ԍPnx$&޴'wMw<А oώ6ߝxqϟɄMSəȸ[ V( =-Ŭ&IP E,q뭣di+CcJSBz9/:$ID$$_KIENDB`Tk_Library_Source_Code/embedded/md/image/figure-51-point-cons-relative.png000064400000000000000000000063031435605071100262770ustar00nobodynobodyPNG  IHDR_U^/gAMA1_ zIDATx{Th&'M>¢"* HbVcP85i}`(z5I(U4Q11I11U E!')]"avvؙٝv޹s;}B׃@ p5-2NAlPm~(h V cٴW]_7D銉ΧsYL^NCOD/%@y$A%1*%*-cTJt BZͷQ-_•bqJiNo`iuv4{Z#拇vBڗDl9S7tcW@KߎBs]}Ahdj~ }(Xr&PX$S{"$rA.٢7mٖ3yb pIOfkA{ <+T6\բ:Phη]SMd% zne TfQo\9c|'rU-g:} 7ϣ_ x%v/ZaA~Bh"7w]=ljn+xgi%7=7913#@ʰ])UۛJ8[Aغ2"55U\բކHyɾI$JM&}^ElPcgk,Y#"\ԔcEEH rydߪ@_EVRFj6P@:\IE,:r?@eɒ0Chvb2F9i GcǺz3hI*ï]t1MScvċ2~]tJŐZN*e_xR"T#ȵD\ ѿ(V\J+bq,-1e(A/,=Y g7_NRi',uhT(Dz/:X;NU7->DD Џˊ_>Uqㅩ1'~,2ɜQ/E">;wPPb4BleRhF&ՠTUڄMFvP0)Qx0D]LFcg>%%%,{mc]s#-WqVhGN>>nNq'3RuVjFbYȄ0߰0+x,`+;`Y,흩1G|Y^Wr>=xru7nz"kzu)p^|D/R%[Yz w6 t4 %<Zz?7x`@@P5|o;g 6I kwh?cϛqi{ xԶQ'*u6LV]ӭCB5w./U}8 @ݧzNJ>-+&vl qKsۇn5BIڣ.:0fڪO1 F羽uMS䔜 D#~`* ~s~v泗FkE4tDhHHm}5$DU_Q`w,?~g??6g.ᦐ=5mb`E E(z?lfW*45Ey)j^,_wDǽr66^Ij(XK~Ϭk Jbl5dL {z׎Ay!3~+?M>s?Qdϲ´𴌓ߔ,Pg.\WV}QVQQq{*vw-xqvD3%G]'Y3g=[w;sTn*ON25f+!x{Eۢv^:cXIM!F`ˆ6,(`ˆDIIENDB`Tk_Library_Source_Code/embedded/md/index.md000064400000000000000000000521411435605071100205350ustar00nobodynobody [//000000001]: # (Index generated by tcllib/doctools/idx with format 'markdown') # Keyword Index ---- [2](#c2) · [A](#cA) · [B](#cB) · [C](#cC) · [D](#cD) · [E](#cE) · [G](#cG) · [H](#cH) · [I](#cI) · [L](#cL) · [M](#cM) · [N](#cN) · [P](#cP) · [Q](#cQ) · [R](#cR) · [S](#cS) · [T](#cT) · [V](#cV) · [W](#cW) · [X](#cX) · [Z](#cZ) ---- #### Keywords: 2 ||| |---|---| |2D geometry|[diagram](tklib/files/modules/diagrams/diagram\.md)| #### Keywords: A ||| |---|---| |alert|[notifywindow](tklib/files/modules/notifywindow/notifywindow\.md)| |append tag|[canvas::tag](tklib/files/modules/canvas/canvas\_tags\.md)| |arc|[diagram](tklib/files/modules/diagrams/diagram\.md)| |arrow|[diagram](tklib/files/modules/diagrams/diagram\.md)| #### Keywords: B ||| |---|---| |background|[canvas::gradient](tklib/files/modules/canvas/canvas\_gradient\.md)| |balloon|[tooltip](tklib/files/modules/tooltip/tooltip\.md)| |bindtags|[ntext](tklib/files/modules/ntext/ntext\.md) · [ntextBindings](tklib/files/modules/ntext/ntextBindings\.md) · [ntextIndent](tklib/files/modules/ntext/ntextIndent\.md) · [ntextWordBreak](tklib/files/modules/ntext/ntextWordBreak\.md)| |bitmap|[bitmap\-editor](tklib/files/apps/bitmap\-editor\.md)| |box|[diagram](tklib/files/modules/diagrams/diagram\.md)| |bundle|[widget](tklib/files/modules/widget/widget\.md)| #### Keywords: C ||| |---|---| |calendar|[widget](tklib/files/modules/widget/widget\.md) · [widget\_calendar](tklib/files/modules/widget/widget\_calendar\.md)| |canvas|[canvas::drag](tklib/files/modules/canvas/canvas\_drag\.md) · [canvas::edit::circle](tklib/files/modules/canvas/canvas\_ecircle\.md) · [canvas::edit::points](tklib/files/modules/canvas/canvas\_epoints\.md) · [canvas::edit::polyline](tklib/files/modules/canvas/canvas\_epolyline\.md) · [canvas::edit::quadrilateral](tklib/files/modules/canvas/canvas\_equad\.md) · [canvas::edit::rectangle](tklib/files/modules/canvas/canvas\_erectangle\.md) · [canvas::gradient](tklib/files/modules/canvas/canvas\_gradient\.md) · [canvas::highlight](tklib/files/modules/canvas/canvas\_highlight\.md) · [canvas::mvg](tklib/files/modules/canvas/canvas\_mvg\.md) · [canvas::snap](tklib/files/modules/canvas/canvas\_snap\.md) · [canvas::sqmap](tklib/files/modules/canvas/canvas\_sqmap\.md) · [canvas::tag](tklib/files/modules/canvas/canvas\_tags\.md) · [canvas::track::lines](tklib/files/modules/canvas/canvas\_trlines\.md) · [canvasLabel](tklib/files/modules/tkpiechart/canvaslabel\.md) · [crosshair](tklib/files/modules/crosshair/crosshair\.md) · [diagram](tklib/files/modules/diagrams/diagram\.md) · [diagram\-viewer](tklib/files/apps/diagram\-viewer\.md) · [pie](tklib/files/modules/tkpiechart/pie\.md) · [pieBoxLabeler](tklib/files/modules/tkpiechart/pieboxlabeler\.md) · [piePeripheralLabeler](tklib/files/modules/tkpiechart/pieperipherallabeler\.md)| |cell|[canvas::sqmap](tklib/files/modules/canvas/canvas\_sqmap\.md)| |character|[khim](tklib/files/modules/khim/khim\.md)| |chat|[chatwidget](tklib/files/modules/chatwidget/chatwidget\.md)| |chatwidget|[chatwidget](tklib/files/modules/chatwidget/chatwidget\.md)| |circle|[canvas::edit::circle](tklib/files/modules/canvas/canvas\_ecircle\.md) · [diagram](tklib/files/modules/diagrams/diagram\.md)| |clock|[datefield](tklib/files/modules/datefield/datefield\.md)| |color gradient|[canvas::gradient](tklib/files/modules/canvas/canvas\_gradient\.md)| |composite widget|[chatwidget](tklib/files/modules/chatwidget/chatwidget\.md)| |concave|[canvas::edit::quadrilateral](tklib/files/modules/canvas/canvas\_equad\.md)| |controlling|[controlwidget](tklib/files/modules/controlwidget/controlwidget\.md)| |conversion|[diagram\-viewer](tklib/files/apps/diagram\-viewer\.md)| |convex|[canvas::edit::quadrilateral](tklib/files/modules/canvas/canvas\_equad\.md)| |cross\-hairs|[crosshair](tklib/files/modules/crosshair/crosshair\.md)| |crosshair|[canvas::track::lines](tklib/files/modules/canvas/canvas\_trlines\.md)| |cursor|[cursor](tklib/files/modules/cursor/cursor\.md)| #### Keywords: D ||| |---|---| |data entry lists|[widget\_listentry](tklib/files/modules/widgetl/widget\_listentry\.md) · [widget\_listsimple](tklib/files/modules/widgetl/widget\_listsimple\.md)| |data entry ordered list|[widget\_listentry](tklib/files/modules/widgetl/widget\_listentry\.md)| |data entry set of strings|[widget\_listentry](tklib/files/modules/widgetl/widget\_listentry\.md) · [widget\_listsimple](tklib/files/modules/widgetl/widget\_listsimple\.md)| |data entry unordered list|[widget\_listentry](tklib/files/modules/widgetl/widget\_listentry\.md) · [widget\_listsimple](tklib/files/modules/widgetl/widget\_listsimple\.md)| |date|[datefield](tklib/files/modules/datefield/datefield\.md) · [widget\_calendar](tklib/files/modules/widget/widget\_calendar\.md) · [widget\_dateentry](tklib/files/modules/widget/widget\_dateentry\.md)| |dateentry|[datefield](tklib/files/modules/datefield/datefield\.md) · [widget](tklib/files/modules/widget/widget\.md) · [widget\_dateentry](tklib/files/modules/widget/widget\_dateentry\.md)| |diagram|[diagram](tklib/files/modules/diagrams/diagram\.md) · [diagram\-viewer](tklib/files/apps/diagram\-viewer\.md)| |dialog|[getstring](tklib/files/modules/getstring/tk\_getString\.md) · [swaplist](tklib/files/modules/swaplist/swaplist\.md) · [widget](tklib/files/modules/widget/widget\.md)| |diamond|[diagram](tklib/files/modules/diagrams/diagram\.md)| |disjointlistbox|[swaplist](tklib/files/modules/swaplist/swaplist\.md)| |displaying|[controlwidget](tklib/files/modules/controlwidget/controlwidget\.md)| |dll|[ico](tklib/files/modules/ico/ico\.md)| |doctools|[shtmlview](tklib/files/apps/shtmlview\.md) · [shtmlview\_doctools](tklib/files/modules/shtmlview/shtmlview\-doctools\.md)| |dragging|[canvas::drag](tklib/files/modules/canvas/canvas\_drag\.md)| |drawing|[diagram](tklib/files/modules/diagrams/diagram\.md)| |drum|[diagram](tklib/files/modules/diagrams/diagram\.md)| #### Keywords: E ||| |---|---| |editing|[canvas::edit::circle](tklib/files/modules/canvas/canvas\_ecircle\.md) · [canvas::edit::points](tklib/files/modules/canvas/canvas\_epoints\.md) · [canvas::edit::polyline](tklib/files/modules/canvas/canvas\_epolyline\.md) · [canvas::edit::quadrilateral](tklib/files/modules/canvas/canvas\_equad\.md) · [canvas::edit::rectangle](tklib/files/modules/canvas/canvas\_erectangle\.md)| |editor|[bitmap\-editor](tklib/files/apps/bitmap\-editor\.md)| |ellipse|[diagram](tklib/files/modules/diagrams/diagram\.md)| |enter callback|[canvas::highlight](tklib/files/modules/canvas/canvas\_highlight\.md)| |entry|[datefield](tklib/files/modules/datefield/datefield\.md) · [getstring](tklib/files/modules/getstring/tk\_getString\.md) · [history](tklib/files/modules/history/tklib\_history\.md) · [ico](tklib/files/modules/ico/ico\.md) · [ipentry](tklib/files/modules/ipentry/ipentry\.md)| |exe|[ico](tklib/files/modules/ico/ico\.md)| #### Keywords: G ||| |---|---| |gradients|[canvas::gradient](tklib/files/modules/canvas/canvas\_gradient\.md)| |graphics|[canvas::mvg](tklib/files/modules/canvas/canvas\_mvg\.md)| |grid|[canvas::sqmap](tklib/files/modules/canvas/canvas\_sqmap\.md)| #### Keywords: H ||| |---|---| |help|[tooltip](tklib/files/modules/tooltip/tooltip\.md)| |highlighting|[canvas::highlight](tklib/files/modules/canvas/canvas\_highlight\.md)| |history|[history](tklib/files/modules/history/tklib\_history\.md)| |hover|[tooltip](tklib/files/modules/tooltip/tooltip\.md)| |html|[shtmlview](tklib/files/apps/shtmlview\.md) · [shtmlview](tklib/files/modules/shtmlview/shtmlview\.md) · [shtmlview\_doctools](tklib/files/modules/shtmlview/shtmlview\-doctools\.md) · [shtmlview\_mkdoc](tklib/files/modules/shtmlview/shtmlview\-mkdoc\.md)| #### Keywords: I ||| |---|---| |i18n|[khim](tklib/files/modules/khim/khim\.md)| |ico|[ico](tklib/files/modules/ico/ico\.md)| |icon|[ico](tklib/files/modules/ico/ico\.md)| |image|[bitmap\-editor](tklib/files/apps/bitmap\-editor\.md) · [canvas::gradient](tklib/files/modules/canvas/canvas\_gradient\.md) · [canvas::snap](tklib/files/modules/canvas/canvas\_snap\.md) · [canvas::sqmap](tklib/files/modules/canvas/canvas\_sqmap\.md) · [diagram](tklib/files/modules/diagrams/diagram\.md)| |imagemagick|[canvas::mvg](tklib/files/modules/canvas/canvas\_mvg\.md)| |input|[khim](tklib/files/modules/khim/khim\.md)| |insert tag|[canvas::tag](tklib/files/modules/canvas/canvas\_tags\.md)| |international|[khim](tklib/files/modules/khim/khim\.md)| |interpolation|[diagram](tklib/files/modules/diagrams/diagram\.md)| |intersection|[diagram](tklib/files/modules/diagrams/diagram\.md)| |invalid|[widget\_validator](tklib/files/modules/widgetv/widget\_validator\.md)| |ip address|[ipentry](tklib/files/modules/ipentry/ipentry\.md)| |irc|[chatwidget](tklib/files/modules/chatwidget/chatwidget\.md)| #### Keywords: L ||| |---|---| |labeler|[canvasLabel](tklib/files/modules/tkpiechart/canvaslabel\.md) · [pie](tklib/files/modules/tkpiechart/pie\.md) · [pieBoxLabeler](tklib/files/modules/tkpiechart/pieboxlabeler\.md) · [piePeripheralLabeler](tklib/files/modules/tkpiechart/pieperipherallabeler\.md)| |leave callback|[canvas::highlight](tklib/files/modules/canvas/canvas\_highlight\.md)| |line|[diagram](tklib/files/modules/diagrams/diagram\.md)| |list entry panel|[widget\_listentry](tklib/files/modules/widgetl/widget\_listentry\.md) · [widget\_listsimple](tklib/files/modules/widgetl/widget\_listsimple\.md)| |listbox|[swaplist](tklib/files/modules/swaplist/swaplist\.md)| |location|[crosshair](tklib/files/modules/crosshair/crosshair\.md)| #### Keywords: M ||| |---|---| |magick vector graphics|[canvas::mvg](tklib/files/modules/canvas/canvas\_mvg\.md)| |map|[canvas::sqmap](tklib/files/modules/canvas/canvas\_sqmap\.md)| |markdown|[shtmlview](tklib/files/apps/shtmlview\.md)| |mega\-widget|[chatwidget](tklib/files/modules/chatwidget/chatwidget\.md)| |megawidget|[widget](tklib/files/modules/widget/widget\.md) · [widget\_calendar](tklib/files/modules/widget/widget\_calendar\.md) · [widget\_dateentry](tklib/files/modules/widget/widget\_dateentry\.md) · [widget\_toolbar](tklib/files/modules/widget/widget\_toolbar\.md)| |menu|[widget](tklib/files/modules/widget/widget\.md)| |method|[khim](tklib/files/modules/khim/khim\.md)| |mkdoc|[shtmlview](tklib/files/apps/shtmlview\.md) · [shtmlview\_mkdoc](tklib/files/modules/shtmlview/shtmlview\-mkdoc\.md)| |move|[diagram](tklib/files/modules/diagrams/diagram\.md)| |mvg|[canvas::mvg](tklib/files/modules/canvas/canvas\_mvg\.md)| #### Keywords: N ||| |---|---| |network|[ipentry](tklib/files/modules/ipentry/ipentry\.md)| |non\-convex|[canvas::edit::quadrilateral](tklib/files/modules/canvas/canvas\_equad\.md)| |notification|[notifywindow](tklib/files/modules/notifywindow/notifywindow\.md)| |numerical values|[controlwidget](tklib/files/modules/controlwidget/controlwidget\.md)| #### Keywords: P ||| |---|---| |panelframe|[widget](tklib/files/modules/widget/widget\.md)| |photo|[canvas::snap](tklib/files/modules/canvas/canvas\_snap\.md)| |picture|[diagram](tklib/files/modules/diagrams/diagram\.md)| |pie|[canvasLabel](tklib/files/modules/tkpiechart/canvaslabel\.md) · [pie](tklib/files/modules/tkpiechart/pie\.md) · [pieBoxLabeler](tklib/files/modules/tkpiechart/pieboxlabeler\.md) · [piePeripheralLabeler](tklib/files/modules/tkpiechart/pieperipherallabeler\.md)| |pixel|[bitmap\-editor](tklib/files/apps/bitmap\-editor\.md)| |plane geometry|[diagram](tklib/files/modules/diagrams/diagram\.md)| |plotting|[diagram](tklib/files/modules/diagrams/diagram\.md)| |point|[diagram](tklib/files/modules/diagrams/diagram\.md)| |point cloud|[canvas::edit::points](tklib/files/modules/canvas/canvas\_epoints\.md)| |points|[canvas::edit::points](tklib/files/modules/canvas/canvas\_epoints\.md)| |polyline|[canvas::edit::polyline](tklib/files/modules/canvas/canvas\_epolyline\.md)| |print screen|[canvas::mvg](tklib/files/modules/canvas/canvas\_mvg\.md) · [canvas::snap](tklib/files/modules/canvas/canvas\_snap\.md)| #### Keywords: Q ||| |---|---| |quadrilateral|[canvas::edit::quadrilateral](tklib/files/modules/canvas/canvas\_equad\.md)| #### Keywords: R ||| |---|---| |raster image|[diagram](tklib/files/modules/diagrams/diagram\.md)| |re\_syntax|[ntext](tklib/files/modules/ntext/ntext\.md) · [ntextIndent](tklib/files/modules/ntext/ntextIndent\.md) · [ntextWordBreak](tklib/files/modules/ntext/ntextWordBreak\.md)| |rectangle|[canvas::edit::rectangle](tklib/files/modules/canvas/canvas\_erectangle\.md)| |regexp|[ntext](tklib/files/modules/ntext/ntext\.md) · [ntextIndent](tklib/files/modules/ntext/ntextIndent\.md) · [ntextWordBreak](tklib/files/modules/ntext/ntextWordBreak\.md)| |remove tag|[canvas::tag](tklib/files/modules/canvas/canvas\_tags\.md)| |rubberband|[canvas::track::lines](tklib/files/modules/canvas/canvas\_trlines\.md)| |ruler|[widget](tklib/files/modules/widget/widget\.md)| #### Keywords: S ||| |---|---| |scale widget|[controlwidget](tklib/files/modules/controlwidget/controlwidget\.md)| |screenruler|[widget](tklib/files/modules/widget/widget\.md)| |scroll|[autoscroll](tklib/files/modules/autoscroll/autoscroll\.md)| |scrollbar|[autoscroll](tklib/files/modules/autoscroll/autoscroll\.md)| |scrolledwindow|[widget](tklib/files/modules/widget/widget\.md)| |serialization|[canvas::mvg](tklib/files/modules/canvas/canvas\_mvg\.md)| |set entry panel|[widget\_listentry](tklib/files/modules/widgetl/widget\_listentry\.md) · [widget\_listsimple](tklib/files/modules/widgetl/widget\_listsimple\.md)| |slice|[canvasLabel](tklib/files/modules/tkpiechart/canvaslabel\.md) · [pie](tklib/files/modules/tkpiechart/pie\.md) · [pieBoxLabeler](tklib/files/modules/tkpiechart/pieboxlabeler\.md) · [piePeripheralLabeler](tklib/files/modules/tkpiechart/pieperipherallabeler\.md)| |snapshot|[canvas::snap](tklib/files/modules/canvas/canvas\_snap\.md)| |snit|[widget](tklib/files/modules/widget/widget\.md) · [widget\_calendar](tklib/files/modules/widget/widget\_calendar\.md) · [widget\_dateentry](tklib/files/modules/widget/widget\_dateentry\.md) · [widget\_toolbar](tklib/files/modules/widget/widget\_toolbar\.md)| |spline|[diagram](tklib/files/modules/diagrams/diagram\.md)| |square map|[canvas::sqmap](tklib/files/modules/canvas/canvas\_sqmap\.md)| |state management|[widget\_validator](tklib/files/modules/widgetv/widget\_validator\.md)| |statusbar|[widget](tklib/files/modules/widget/widget\.md)| |string|[getstring](tklib/files/modules/getstring/tk\_getString\.md)| |superframe|[widget](tklib/files/modules/widget/widget\.md)| |syntax highlighting|[ctext](tklib/files/modules/ctext/ctext\.md)| #### Keywords: T ||| |---|---| |tags|[canvas::tag](tklib/files/modules/canvas/canvas\_tags\.md)| |text|[ctext](tklib/files/modules/ctext/ctext\.md) · [diagram](tklib/files/modules/diagrams/diagram\.md) · [ntext](tklib/files/modules/ntext/ntext\.md) · [ntextBindings](tklib/files/modules/ntext/ntextBindings\.md) · [ntextIndent](tklib/files/modules/ntext/ntextIndent\.md) · [ntextWordBreak](tklib/files/modules/ntext/ntextWordBreak\.md) · [shtmlview](tklib/files/modules/shtmlview/shtmlview\.md)| |tile|[canvas::sqmap](tklib/files/modules/canvas/canvas\_sqmap\.md)| |tk|[notifywindow](tklib/files/modules/notifywindow/notifywindow\.md)| |toolbar|[widget](tklib/files/modules/widget/widget\.md) · [widget\_toolbar](tklib/files/modules/widget/widget\_toolbar\.md)| |tooltip|[tooltip](tklib/files/modules/tooltip/tooltip\.md)| |tracking|[canvas::track::lines](tklib/files/modules/canvas/canvas\_trlines\.md) · [crosshair](tklib/files/modules/crosshair/crosshair\.md)| |ttk::combobox|[widget\_validator](tklib/files/modules/widgetv/widget\_validator\.md)| |ttk::entry|[widget\_validator](tklib/files/modules/widgetv/widget\_validator\.md)| #### Keywords: V ||| |---|---| |validation|[widget\_validator](tklib/files/modules/widgetv/widget\_validator\.md)| |vector|[diagram](tklib/files/modules/diagrams/diagram\.md) · [diagram\-viewer](tklib/files/apps/diagram\-viewer\.md)| |vector graphics|[canvas::mvg](tklib/files/modules/canvas/canvas\_mvg\.md)| |viewer|[shtmlview](tklib/files/apps/shtmlview\.md)| |viewport|[crosshair](tklib/files/modules/crosshair/crosshair\.md)| #### Keywords: W ||| |---|---| |widget|[chatwidget](tklib/files/modules/chatwidget/chatwidget\.md) · [ctext](tklib/files/modules/ctext/ctext\.md) · [datefield](tklib/files/modules/datefield/datefield\.md) · [shtmlview](tklib/files/modules/shtmlview/shtmlview\.md) · [widget](tklib/files/modules/widget/widget\.md) · [widget\_calendar](tklib/files/modules/widget/widget\_calendar\.md) · [widget\_dateentry](tklib/files/modules/widget/widget\_dateentry\.md) · [widget\_listentry](tklib/files/modules/widgetl/widget\_listentry\.md) · [widget\_listsimple](tklib/files/modules/widgetl/widget\_listsimple\.md) · [widget\_toolbar](tklib/files/modules/widget/widget\_toolbar\.md)| |widget background|[canvas::gradient](tklib/files/modules/canvas/canvas\_gradient\.md)| |widget validation|[widget\_validator](tklib/files/modules/widgetv/widget\_validator\.md)| #### Keywords: X ||| |---|---| |xbm|[bitmap\-editor](tklib/files/apps/bitmap\-editor\.md)| #### Keywords: Z ||| |---|---| |zoom|[canvas::zoom](tklib/files/modules/canvas/canvas\_zoom\.md)| Tk_Library_Source_Code/embedded/md/tklib000075500000000000000000000000001435605071100201275ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files000075500000000000000000000000001435605071100212315ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files/apps000075500000000000000000000000001435605071100221745ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files/apps/bitmap-editor.md000064400000000000000000000055171435605071100253450ustar00nobodynobody [//000000001]: # (bitmap\-editor \- Bitmap handling) [//000000002]: # (Generated from file 'bitmap\-editor\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (Copyright ©) [//000000004]: # (bitmap\-editor\(n\) 1\.0 tklib "Bitmap handling")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME bitmap\-editor \- Editor for XBM images # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [COMMAND LINE](#subsection1) - [BUGS, IDEAS, FEEDBACK](#section2) - [Bugs, Ideas, Feedback](#section3) - [Keywords](#keywords) - [Category](#category) - [Copyright](#copyright) # SYNOPSIS [__bitmap\-editor__ ?*xbmfile*?](#1) # DESCRIPTION The application described by this document, __bitmap\-editor__, is a simple editor for XBM based bitmap images\. Written by Keith Vetter the original code can be found at [http://wiki\.tcl\.tk/6298](http://wiki\.tcl\.tk/6298)\. ## COMMAND LINE - __bitmap\-editor__ ?*xbmfile*? Invoked without argument the editor GUI will be opened and show a standard bitmap to edit\. Invoked with an argument it is expected to be the path to a bitmap file in XBM format, and the contained bitmap is shown\. * path *xbmfile* \(in/out\) This argument specifies the path to a bitmap file in XBM format, whose contents is to shown and edited by the application\. # BUGS, IDEAS, FEEDBACK This document, and the application it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *bitmap* of the [Tcllib SF Trackers](http://sourceforge\.net/tracker/?group\_id=12883)\. Please also report any ideas for enhancements you may have for either application and/or documentation\. # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *bitmap\-editor* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [bitmap](\.\./\.\./\.\./index\.md\#bitmap), [editor](\.\./\.\./\.\./index\.md\#editor), [image](\.\./\.\./\.\./index\.md\#image), [pixel](\.\./\.\./\.\./index\.md\#pixel), [xbm](\.\./\.\./\.\./index\.md\#xbm) # CATEGORY Image processing # COPYRIGHT Copyright © Tk_Library_Source_Code/embedded/md/tklib/files/apps/diagram-viewer.md000064400000000000000000000107611435605071100255050ustar00nobodynobody [//000000001]: # (diagram\-viewer \- Documentation toolbox) [//000000002]: # (Generated from file 'diagram\-viewer\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (Copyright © 2010 Andreas Kupries ) [//000000004]: # (diagram\-viewer\(n\) 1\.0 tklib "Documentation toolbox")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME diagram\-viewer \- Lightweight Diagram Processor # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [USE CASES](#subsection1) - [COMMAND LINE](#subsection2) - [BUGS, IDEAS, FEEDBACK](#section2) - [Bugs, Ideas, Feedback](#section3) - [Keywords](#keywords) - [Category](#category) - [Copyright](#copyright) # SYNOPSIS [__diagram\-viewer__ __show__ *inputfile*\.\.\.](#1) [__diagram\-viewer__ __convert__ __\-o__ *output* *format* *inputfile*\.\.\.](#2) # DESCRIPTION The application described by this document, __diagram\-viewer__, is a lightweight processor for tklib diagram files __diagram\-viewer__ is based upon the package __[diagram](\.\./modules/diagrams/diagram\.md)__\. See it for examples and language reference\. ## USE CASES __diagram\-viewer__ was written with the following two use cases in mind\. 1. Processing and display of one or more diagram files\. 1. Batch conversion of one or more diagram files into raster image files\. ## COMMAND LINE - __diagram\-viewer__ __show__ *inputfile*\.\.\. This is the form for use case \[1\]\. The application opens a gui showing the list of input files to the left, allowing the user to choose which of them to render to the canvas on the right\. - __diagram\-viewer__ __convert__ __\-o__ *output* *format* *inputfile*\.\.\. This is the form for use case \[2\]\. The application converts the input files into raster image of the specified *format*\. * path *output* \(in\) This argument specifies where to write the generated image\. It can be the path to a file or directory\. If the *output* does not exist then \[file dirname $output\] has to exist and must be a writable directory\. In case of multiple input files the generated image will be written to a file in the directory, and the name of that file will be derived from the *inputfile*, and *format*\. In case of a single input file the generated image will be written to the file\. * \(handle\) *format* \(in\) This argument specifies the image format to convert the diagrams into when processing the input\. The application recognizes all formats supported by the __Img__ package, i\.e\. for which it can load a package __img::__format____ * path *inputfile* \(in\) This argument specifies the path to the diagram file to process\. It has to exist, must be readable, and written in *[diagram](\.\./\.\./\.\./index\.md\#diagram)* format\. # BUGS, IDEAS, FEEDBACK This document, and the application it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *diagram* of the [Tcllib SF Trackers](http://sourceforge\.net/tracker/?group\_id=12883)\. Please also report any ideas for enhancements you may have for either application and/or documentation\. # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *diagram* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [canvas](\.\./\.\./\.\./index\.md\#canvas), [conversion](\.\./\.\./\.\./index\.md\#conversion), [diagram](\.\./\.\./\.\./index\.md\#diagram), [vector](\.\./\.\./\.\./index\.md\#vector) # CATEGORY Documentation tools # COPYRIGHT Copyright © 2010 Andreas Kupries Tk_Library_Source_Code/embedded/md/tklib/files/apps/shtmlview.md000064400000000000000000000105421435605071100246210ustar00nobodynobody [//000000001]: # (shtmlview \- Basic HTML and Markdown viewer) [//000000002]: # (Generated from file 'shtmlview\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (Copyright ©) [//000000004]: # (shtmlview\(n\) 1\.1\.0 tklib "Basic HTML and Markdown viewer")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME shtmlview \- Basic HTML and Markdown viewer application # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [COMMAND LINE](#subsection1) - [Beyond HTML](#section2) - [BUGS, IDEAS, FEEDBACK](#section3) - [Bugs, Ideas, Feedback](#section4) - [Keywords](#keywords) - [Category](#category) - [Copyright](#copyright) # SYNOPSIS [__[shtmlview](\.\./modules/shtmlview/shtmlview\.md)__](#1) [__[shtmlview](\.\./modules/shtmlview/shtmlview\.md)__ __\-\-help__](#2) [__[shtmlview](\.\./modules/shtmlview/shtmlview\.md)__ __\-\-version__](#3) [__[shtmlview](\.\./modules/shtmlview/shtmlview\.md)__ __\-\-render__ *text*](#4) [__[shtmlview](\.\./modules/shtmlview/shtmlview\.md)__ __\-\-render__ __\-__](#5) [__[shtmlview](\.\./modules/shtmlview/shtmlview\.md)__ *filename*](#6) # DESCRIPTION The application described by this document, __[shtmlview](\.\./modules/shtmlview/shtmlview\.md)__, is a simple viewer for HTML files\. Further supported are documents written in *[Markdown](\.\./\.\./\.\./index\.md\#markdown)*, *[doctools](\.\./\.\./\.\./index\.md\#doctools)*, or *[mkdoc](\.\./\.\./\.\./index\.md\#mkdoc)* format, if various supporting packages are available\. See section [Beyond HTML](#section2)\. ## COMMAND LINE - __[shtmlview](\.\./modules/shtmlview/shtmlview\.md)__ - __[shtmlview](\.\./modules/shtmlview/shtmlview\.md)__ __\-\-help__ Prints usage information to standard error\. - __[shtmlview](\.\./modules/shtmlview/shtmlview\.md)__ __\-\-version__ Prints the application version to standard output\. - __[shtmlview](\.\./modules/shtmlview/shtmlview\.md)__ __\-\-render__ *text* Displays the provided text in a viewer window\. Treats the text as Markdown except if it starts with a recognized HTML tag\. In that case it assumes and renders as HTML\. - __[shtmlview](\.\./modules/shtmlview/shtmlview\.md)__ __\-\-render__ __\-__ As before, except it reads the text to render from standard input\. - __[shtmlview](\.\./modules/shtmlview/shtmlview\.md)__ *filename* Reads and renders the named file in a viewer widget\. # Beyond HTML Documents in any other format than HTML require the presence of various supporting packages to enable the application to display them\. - Markdown * __[Markdown](\.\./\.\./\.\./index\.md\#markdown)__ - doctools * __shtmlview::doctools__ * __dtplite__ - mkdoc * __shtmlview::mkdoc__ * __mkdoc::mkdoc__ # BUGS, IDEAS, FEEDBACK This document, and the application it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *shtmlview* of the [Tklib Trackers](https://core\.tcl\-lang\.org/tklib/ticket)\. Please also report any ideas for enhancements you may have for either application and/or documentation\. # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *shtmlview* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [doctools](\.\./\.\./\.\./index\.md\#doctools), [html](\.\./\.\./\.\./index\.md\#html), [markdown](\.\./\.\./\.\./index\.md\#markdown), [mkdoc](\.\./\.\./\.\./index\.md\#mkdoc), [viewer](\.\./\.\./\.\./index\.md\#viewer) # CATEGORY Document display # COPYRIGHT Copyright © Tk_Library_Source_Code/embedded/md/tklib/files/modules000075500000000000000000000000001435605071100227015ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files/modules/autoscroll000075500000000000000000000000001435605071100250705ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files/modules/autoscroll/autoscroll.md000064400000000000000000000064231435605071100276650ustar00nobodynobody [//000000001]: # (autoscroll \- Automatic mapping of scrollbars) [//000000002]: # (Generated from file 'autoscroll\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (autoscroll\(n\) 1\.1 tklib "Automatic mapping of scrollbars")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME autoscroll \- Provides for a scrollbar to automatically mapped and unmapped as needed # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [Bugs, Ideas, Feedback](#section2) - [Keywords](#keywords) # SYNOPSIS package require Tcl package require autoscroll ?1\.1? [__::autoscroll::autoscroll__ *scrollbar*](#1) [__::autoscroll::unautoscroll__ *scrollbar*](#2) [__::autoscroll::wrap__](#3) [__::autoscroll::unwrap__](#4) # DESCRIPTION This package allows scrollbars to be mapped and unmapped as needed depending on the size and content of the scrollbars scrolled widget\. The scrollbar must be managed by either pack or grid, other geometry managers are not supported\. When managed by pack, any geometry changes made in the scrollbars parent between the time a scrollbar is unmapped, and when it is mapped will be lost\. It is an error to destroy any of the scrollbars siblings while the scrollbar is unmapped\. When managed by grid, if anything becomes gridded in the same row and column the scrollbar occupied it will be replaced by the scrollbar when remapped\. This package may be used on any scrollbar\-like widget as long as it supports the __set__ subcommand in the same style as scrollbar\. If the __set__ subcommand is not used then this package will have no effect\. - __::autoscroll::autoscroll__ *scrollbar* Arranges for the already existing scrollbar __scrollbar__ to be mapped and unmapped as needed\. - __::autoscroll::unautoscroll__ *scrollbar* Returns the named scrollbar to its original static state\. - __::autoscroll::wrap__ Arranges for all scrollbars created after this command is run to be automatically mapped and unmapped as needed\. - __::autoscroll::unwrap__ Turns off the automatic autoscrolling of all new scrollbars\. Does not effect existing scrollbars text .t -yscrollcommand ".scrolly set" scrollbar .scrolly -orient v -command ".t yview" pack .scrolly -side right -fill y pack .t -side left -fill both -expand 1 ::autoscroll::autoscroll .scrolly # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *autoscroll* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [scroll](\.\./\.\./\.\./\.\./index\.md\#scroll), [scrollbar](\.\./\.\./\.\./\.\./index\.md\#scrollbar) Tk_Library_Source_Code/embedded/md/tklib/files/modules/canvas000075500000000000000000000000001435605071100241545ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files/modules/canvas/canvas_drag.md000064400000000000000000000144011435605071100270250ustar00nobodynobody [//000000001]: # (canvas::drag \- Variations on a canvas) [//000000002]: # (Generated from file 'canvas\_drag\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (canvas::drag\(n\) 0\.1 tklib "Variations on a canvas")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME canvas::drag \- Manage the dragging of canvas items or item groups # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [API](#section2) - [Drag callback](#subsection1) - [Options](#subsection2) - [Bugs, Ideas, Feedback](#section3) - [Keywords](#keywords) # SYNOPSIS package require Tcl 8\.5 package require Tk 8\.5 package require canvas::drag ?0\.1? [__::canvas::drag__ __on__ *canvas* *tagOrId* *cmd* *option*\.\.\.](#1) [__::canvas::drag__ __off__ *canvas* *tagOrId*](#2) [__::canvas::drag__ __item__ *canvas* *tagOrId* *option*\.\.\.](#3) [__::canvas::drag__ __group__ *canvas* *tagOrId* *cmd* *option*\.\.\.](#4) [__\{\*\}cmd__ __start__ *canvas* *item*](#5) [__\{\*\}cmd__ __move__ *canvas* *clientdata* *dx* *dy*](#6) [__\{\*\}cmd__ __done__ *canvas* *clientdata*](#7) # DESCRIPTION This package provides utility commands to setup and rmeove dragging of items or item groups on a canvas, hiding all complexity regarding bindings from the user\. # API - __::canvas::drag__ __on__ *canvas* *tagOrId* *cmd* *option*\.\.\. This command initializes item dragging on the *canvas* widget, with the items used as drag handles identified by *tagOrId*\. The command prefix *cmd*, invoked for drag start and movement, is responsible for the initialization and actual execution of the drag operation\. The signature of the command prefix is described later, in section [Drag callback](#subsection1)\. Similarly, the accepted options and their values are described in section [Options](#subsection2) The result of the command is the empty string\. - __::canvas::drag__ __off__ *canvas* *tagOrId* This command removes any drag operation set on the items of canvas *canvas* identified by *tagOrId*\. The result of the command is the empty string\. - __::canvas::drag__ __item__ *canvas* *tagOrId* *option*\.\.\. This is a convenience command wrapped around method __on__ \(see above\) to drag single items of the *canvas* widget, identified by *tagOrId*\. It uses an internal standard callback for this\. The result of the command is the empty string\. - __::canvas::drag__ __group__ *canvas* *tagOrId* *cmd* *option*\.\.\. This is a convenience command wrapped around method __on__ \(see above\) to drag single items of the *canvas* widget, identified by *tagOrId*\. It uses an internal standard callback for this\. The callback *cmd* specified has the same signature as the [Drag callback](#subsection1), except that 1. The __move__ method is not invoked\. 1. The result of the __start__ method *has to be* a canvas tag refering to the whole group of items to move\. In other words, it must convert from drag handle \(item id\) to dragged groupt \(tag\)\. The result of the command is the empty string\. ## Drag callback The drag callback is a command prefix invoked in the following two ways: - __\{\*\}cmd__ __start__ *canvas* *item* This form is invoked when has initiated dragging using drag handle identified by the canvas *item* id\. The callback now has to perform anything necessary for its type of drag operation\. The result of the command can be anything\. It is stored by the system as client information and passed unchanged to the movement callback for its use\. In this manner the drag callback is able to maintain custom state from start to movement\. - __\{\*\}cmd__ __move__ *canvas* *clientdata* *dx* *dy* This form is invoked when the mouse moved during a drag operation\. It is invoked with the client data from the start callback \(or the previous move callback\) and the distances the mouse has traveled in horizontal and vertical directions\. The result of the command can be anything\. It is stored by the system as client information and passed unchanged to the next movement callback for its use\. In this manner the drag callback is able to maintain custom state from movement to movement\. - __\{\*\}cmd__ __done__ *canvas* *clientdata* This form is invoked when the drag operation ends\. It is invoked with the client data from the last movement callback \(or start callback if there had been no motion\)\. The result of the command is ignored\. ## Options The commands to create drag operations \(__on__, __item__, and __group__\) all accept the following options to configure the new drag\. - __\-event__ *spec* The value of this option specifies the mouse button used to initiate the drag operation, and the keyboard modifier, if any\. Examples of specifications: To initiate a drag operation by pressing mouse button 3 on a drag handle, use: -event 3 This is the default as well, if the option is not specified\. To initiate a drag operation by pressing mouse button 2 on a drag handle while holding down the Control key, use: -event Control-2 # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *canvas* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [canvas](\.\./\.\./\.\./\.\./index\.md\#canvas), [dragging](\.\./\.\./\.\./\.\./index\.md\#dragging) Tk_Library_Source_Code/embedded/md/tklib/files/modules/canvas/canvas_ecircle.md000064400000000000000000000266001435605071100275220ustar00nobodynobody [//000000001]: # (canvas::edit::circle \- Variations on a canvas) [//000000002]: # (Generated from file 'canvas\_ecircle\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (canvas::edit::circle\(n\) 0\.1 tklib "Variations on a canvas")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME canvas::edit::circle \- Editing a circle on a canvas # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [Interaction](#section2) - [Class API](#section3) - [Instance API](#section4) - [Options](#section5) - [Bugs, Ideas, Feedback](#section6) - [Keywords](#keywords) # SYNOPSIS package require Tcl 8\.5 package require Tk 8\.5 package require canvas::edit::points ?0\.1? package require canvas::edit::circle ?0\.1? [__::canvas::edit__ __circle__ *objectName* *canvas* *options*\.\.\.](#1) [__objectName__ __destroy__](#2) [__objectName__ __enable__](#3) [__objectName__ __disable__](#4) [__objectName__ __active__](#5) [__objectName__ __set__ *minx* *miny* *maxx* *maxy*](#6) [__objectName__ __clear__](#7) [__activeCmd__ *editorObj* *id*](#8) [__createCmd__ *canvas* *x* *y*](#9) [__dataCmd__ *editorObj* *coordinates*](#10) # DESCRIPTION This package provides a class whose instances handle editing a circle on a canvas\. Instances can be configured with regard to the visual appearance of the markers denoting the circle's principal points\. Note that instances do not store the edited circle themselves, but delegate this to a configurable object\. # Interaction The circle editor internally uses an instance of package __[canvas::edit::points](canvas\_epoints\.md)__, and inherits all the options and behaviours for it\. The color options are additionally applied to the circle element of this editor Beyond that it provides an option, __\-circle\-config__, to customize the circle item used to render the circle through its principal points\. Note that it cannot overide the inherited color options\. During interaction instances execute a state machine where the user creates two points, at which point the system completes the circle and reports it\. At that point the system prevents adding more points\. Dragging the points is still possible, enabling resizing and moving the circle\. Deleting any of the principal points deletes the entire circle, at which point the system is again ready for the creation of a new circle from two points\. # Class API - __::canvas::edit__ __circle__ *objectName* *canvas* *options*\.\.\. This, the class command, creates and configures a new instance of a circle editor, named *objectName*\. The instance will be connected to the specified *canvas* widget\. The result of the command is the fully qualified name of the instance command\. The options accepted here, and their values, are explained in the section [Options](#section5)\. # Instance API Instances of the circle editors provide the following API: - __objectName__ __destroy__ This method destroys the circle editor and releases all its internal resources\. Note that this operation does not destroy the items the editor managed on the attached canvas, nor the canvas itself\. The result of the method is an empty string\. - __objectName__ __enable__ This method activates editing of the circle on the canvas\. This is the default after instance creation\. A call is ignored if the editor is already active\. The result of the method is an empty string\. The complementary method is __disable__\. The interogatory method for the current state is __active__\. - __objectName__ __disable__ This method disables editing of the circle on the canvas\. A call is ignored if the editor is already disabled\. The result of the method is an empty string\. The complementary method is __enable__\. The interogatory method for the current state is __active__\. - __objectName__ __active__ This method queries the editor state\. The result of the method is a boolean value, __true__ if the editor is active, and __false__ otherwise, i\.e\. disabled\. The methods to change the state are __enable__ and __disable__\. - __objectName__ __set__ *minx* *miny* *maxx* *maxy* This method programmatically set the circle from the border coordinates\. This writes over a previous \(possibly partial\) circle\. The result of the method is an empty string\. Note that this method goes through the whole set of callbacks invoked when the principal points are created, i\.e\. __\-create\-cmd__, and, more importantly, __\-data\-cmd__\. This is the method through which to load a pre\-existing circle into an editor instance\. - __objectName__ __clear__ This method programmatically removes the circle from the editor, making the way free for creating a new one\. The result of the method is an empty string\. Note that this method goes through the same callbacks invoked when the user interactively removes a principal point, i\.e\. __\-data\-cmd__\. # Options The class command accepts the following options - __\-active\-cmd__ *command\-prefix* The value of this option is a command prefix the editor will invoke when the mouse enters or leaves the circle or one of the principal points managed by the instance\. If not specified it defaults to an empty command which does nothing\. The signature of this command prefix is * __activeCmd__ *editorObj* *id* The *id* identifies the entered object\. An empty *id* indicates that the last entered object was left\. The value __circle__ indicates that the circle's outline was entered\. Any other value is a code for one of the circle's principal points, i\.e\. __center__, and __edge__\. The result of this method is ignored\. - __\-add\-remove\-point__ *eventspec* The value of this option is an event specification \(without bracketing angles\) declaring which event will trigger adding and removing a point\. This option can only be set at construction time\. The default setup uses different events for adding and removing points, __ButtonPress\-1__ and __ButtonPress\-2__ respectively\. When using this option the same event is used for both operations\. This is no problem because adding is bound as canvas\-global event while removal is bound to the relevant canvas items\. - __\-circle\-config__ *list* The value of this option is a list of options and their values to be applied to the internal circle item whenever it is regenerated after changes\. Note that these options *cannot* override the principal coloring of the circle as applied by the main options __\-color__ and __\-hilit\-color__\. If not specified it defaults to the empty list\. - __\-color__ *colorspec* The value of this option is the fill color for the default item created when adding a point, and no __\-create\-cmd__ is specified\. The default value is __SkyBlue2__\. - __\-create\-cmd__ *command\-prefix* The value of this option is a command prefix the editor will invoke when it has to create a new principal point\. While this option can be set after construction, it is recommended to use this feature only as a means of inserting custom processing to be done at creation time which remembers and calls the previous value of the option\. If not specified it defaults to a command which will create a black\-bordered blue circle of radius 3 centered on the location of the new point\. The signature of this command prefix is * __createCmd__ *canvas* *x* *y* The result of the command prefix *must* be a list of the canvas items it created to represent the marker\. Note here that the visual representation of a "principal point" may consist of multiple canvas items in an arbitrary shape\. The returned list of items is allowed to be empty, and such is taken as signal that the callback vetoed the creation of the principal point\. - __\-data\-cmd__ *command\-prefix* The value of this option is a command prefix the editor will invoke when the circle was edited in some way \(created, modified, deleted\)\. This is how the editor delegates the actual storage of the circle information to an outside object\. This option can only be set at construction time\. If not specified it defaults to an empty string and is ignored by the editor, i\.e\. not invoked\. The signature of this command prefix is * __dataCmd__ *editorObj* *coordinates* This callback is invoked when the circle was changed either interactively, or programmatically\. See instance method __set__ for the latter\. The *editorObj* identifies the instance invoking the callback, whereas *coordinates* is a list of 4 elements, containing the min x, and y, and the max x and y coordinates of the circle, in this order\. The result of this method is ignored\. - __\-drag\-point__ *eventspec* The value of this option is an event specification \(without bracketing angles\) declaring which event will trigger a drag action on points\. This option can only be set at construction time\. The default specification is __ButtonPress\-3__\. - __\-hilit\-color__ *colorspec* The value of this option is the highlight color for the default item created when adding a point, and no __\-highlight\-cmd__ is specified\. The default value is __red__\. - __\-kind__ *name* The value of this option is the canvas item type for the default item created when adding a point, and no __\-create\-cmd__ is specified\. Only item types specified through a bounding box are suitable\. The default value is __oval__\. - __\-radius__ *int* The value of this option is the radius for the default item created when adding a point, and no __\-create\-cmd__ is specified\. The default value is __3__\. - __\-tag__ *string* The value of this option is the name of the canvas tag with which to identify all items of all vertices managed by the editor\. This option can only be set at construction time\. If not specified it defaults to __CIRCLE__ # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *canvas* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [canvas](\.\./\.\./\.\./\.\./index\.md\#canvas), [circle](\.\./\.\./\.\./\.\./index\.md\#circle), [editing](\.\./\.\./\.\./\.\./index\.md\#editing) Tk_Library_Source_Code/embedded/md/tklib/files/modules/canvas/canvas_epoints.md000064400000000000000000000346521435605071100276030ustar00nobodynobody [//000000001]: # (canvas::edit::points \- Variations on a canvas) [//000000002]: # (Generated from file 'canvas\_epoints\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (canvas::edit::points\(n\) 0\.3 tklib "Variations on a canvas")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME canvas::edit::points \- Editing a cloud of points on a canvas # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [Interaction](#section2) - [Class API](#section3) - [Instance API](#section4) - [Options](#section5) - [Bugs, Ideas, Feedback](#section6) - [Keywords](#keywords) # SYNOPSIS package require Tcl 8\.5 package require Tk 8\.5 package require canvas::edit::points ?0\.3? [__::canvas::edit__ __points__ *objectName* *canvas* *options*\.\.\.](#1) [__objectName__ __destroy__](#2) [__objectName__ __enable__](#3) [__objectName__ __disable__](#4) [__objectName__ __active__](#5) [__objectName__ __add__ *x* *y*](#6) [__objectName__ __clear__](#7) [__activeCmd__ *editorObj* *id*](#8) [__createCmd__ *canvas* *x* *y*](#9) [__dataCmd__ __add__ *editorObj* *id* *x* *y*](#10) [__dataCmd__ __remove__ *editorObj* *id*](#11) [__dataCmd__ __move start__ *editorObj* *id*](#12) [__dataCmd__ __move delta__ *editorObj* *id* *x* *y* *dx* *dy*](#13) [__dataCmd__ __move done__ *editorObj* *id*](#14) # DESCRIPTION This package provides a class whose instances handle editing a cloud of point markers on a canvas\. Instances can be configured with regard to the visual appearance of markers\. Note that instances do not store the edited points themselves, but delegate this to a configurable object\. # Interaction The default bindings enable the creation, removal and dragging of point \(markers\) using the mouse buttons 1, 2, and 3\. Specifically: 1. Clicking anywhere with button 1 adds a new point\. 1. Clicking on a point with button 2 removes that point\. 1. Clicking on a point with button 3 starts a drag operation ending with the release of the button\. The option __\-drag\-point__ can be used to change the button used to initiate drag operations\. Note that the option value may not only contain the button number, but also modifier prefix separated from the button by a dash "__\-__"\. The recognized modifiers are __Control__, __Shift__, and __Alt__\. The option __\-add\-remove\-point__ can be used to change the button used to add/remove points\. This works because removal is an item binding, while adding is canvas global\. The option recognizes the same syntax for button as __\-drag\-point__\. In the standard configuration the canvas item representing a point is a circle configured using the appearance options __\-color__, __\-hilit\-color__, and __\-radius__\. Their defaults are __Skyblue2__, __red__, and __3__, repsectively\. The option __\-kind__ can be used to slightly customize the canvas item to any kind accepting the item options __\-width__, __\-outline__, __\-fill__, and __\-activefill__\. For more extensive customization its is necessary to configure a creation callback using option __\-create\-cmd__\. The callback takes the canvas and x\. y coordinates as arguments, in this order, and is expected to return a list of the canvas items representing the point\. Note the plural\. With the callback it is possible to visualize a point using a group of items\. Further note that when the callback return an empty list no point is created\. In other words, the callback can also be used to perform checks if a point at the given location is desirable, or not\. This can be combined with the default creation behaviour as the option can be queried, and its default value is the callback for the default behaviour\. Keeping with the callback for a bit, the option __\-active\-cmd__ sets a callback invoked whenever the mouse is over one of the created points, i\.e\. active\. This can be used to drive derived displays\. For example highlighting the point's entry in a table or other widget\. The last option of importance is __\-tag__\. Its value is the name of the canvas tag used to mark all the items owned, i\.e\. created and managed by an\. The default is __POINT__\. When attaching multiple instances of this behaviour to the same canvas each instance has to be configured with a unique tag, to prevent them from interfering with each other\. # Class API - __::canvas::edit__ __points__ *objectName* *canvas* *options*\.\.\. This, the class command, creates and configures a new instance of a point cloud editor, named *objectName*\. The instance will be connected to the specified *canvas* widget\. The result of the command is the fully qualified name of the instance command\. The options accepted here, and their values, are explained in the section [Options](#section5)\. # Instance API Instances of the point cloud editors provide the following API: - __objectName__ __destroy__ This method destroys the point cloud editor and releases all its internal resources\. Note that this operation does not destroy the items of the point markers the editor managed on the attached canvas, nor the canvas itself\. The result of the method is an empty string\. - __objectName__ __enable__ This method activates editing of the point cloud on the canvas\. This is the default after instance creation\. A call is ignored if the editor is already active\. The result of the method is an empty string\. The complementary method is __disable__\. The interogatory method for the current state is __active__\. - __objectName__ __disable__ This method disables editing of the point cloud on the canvas\. A call is ignored if the editor is already disabled\. The result of the method is an empty string\. The complementary method is __enable__\. The interogatory method for the current state is __active__\. - __objectName__ __active__ This method queries the editor state\. The result of the method is a boolean value, __true__ if the editor is active, and __false__ otherwise, i\.e\. disabled\. The methods to change the state are __enable__ and __disable__\. - __objectName__ __add__ *x* *y* This method programmatically creates a point at the specified location\. The result of the method is an empty string\. Note that this method goes through the whole set of callbacks invoked when the user interactively creates a point, i\.e\. __\-create\-cmd__, and, more importantly, __\-data\-cmd__\. This is the method through which to load pre\-existing points into an editor instance\. - __objectName__ __clear__ This method programmatically removes all points from the editor\. The result of the method is an empty string\. Note that this method goes through the same callback invoked when the user interactively removes a point, i\.e\. __\-data\-cmd__\. # Options The class command accepts the following options - __\-active\-cmd__ *command\-prefix* The value of this option is a command prefix the editor will invoke when the mouse enters or leaves a point managed by the instance\. If not specified it defaults to an empty command which does nothing\. The signature of this command prefix is * __activeCmd__ *editorObj* *id* The *id* identifies the point within the editor\. An empty *id* indicates that the last entered point was left\. The result of this method is ignored\. - __\-add\-remove\-point__ *eventspec* The value of this option is an event specification \(without bracketing angles\) declaring which event will trigger adding and removing a point\. This option can only be set at construction time\. The default setup uses different events for adding and removing points, __ButtonPress\-1__ and __ButtonPress\-2__ respectively\. When using this option the same event is used for both operations\. This is no problem because adding is bound as canvas\-global event while removal is bound to the relevant canvas items\. - __\-color__ *colorspec* The value of this option is the fill color for the default item created when adding a point, and no __\-create\-cmd__ is specified\. The default value is __SkyBlue2__\. - __\-create\-cmd__ *command\-prefix* The value of this option is a command prefix the editor will invoke when it has to create a new point\. While this option can be set after construction, it is recommended to use this feature only as a means of inserting custom processing to be done at creation time which remembers and calls the previous value of the option\. If not specified it defaults to a command which will create a black\-bordered blue circle of radius 3 centered on the location of the new point\. The signature of this command prefix is * __createCmd__ *canvas* *x* *y* The result of the command prefix *must* be a list of the canvas items it created to represent the marker\. Note here that the visual representation of a "point" may consist of multiple canvas items in an arbitrary shape\. The returned list of items is allowed to be empty, and such is taken as signal that the callback vetoed the creation of the point\. - __\-data\-cmd__ *command\-prefix* The value of this option is a command prefix the editor will invoke when a point was edited in some way\. This is how the editor delegates the actual storage of point information to an outside object\. This option can only be set at construction time\. If not specified it defaults to an empty string and is ignored by the editor, i\.e\. not invoked\. The signatures of this command prefix are * __dataCmd__ __add__ *editorObj* *id* *x* *y* This callback is invoked when a new point was added to the instance, either interactively, or programmatically\. See instance method __add__ for the latter\. The *id* identifies the point within the editor and will be used by the two other callbacks to specify which point to modify\. The last two arguments *x* and *y* specify the location of the new point in canvas coordinates\. The result of this method is ignored\. * __dataCmd__ __remove__ *editorObj* *id* This callback is invoked when a point removed from the editor instance\. The *id* identifies the removed point within the editor\. The result of this method is ignored\. * __dataCmd__ __move start__ *editorObj* *id* This callback is invoked when the movement of a point in the editor instance has started\. The *id* identifies the point within the editor about to be moved\. The result of this method is ignored\. * __dataCmd__ __move delta__ *editorObj* *id* *x* *y* *dx* *dy* This callback is invoked when the point moved in the editor instance\. The *id* identifies the moved point within the editor, and the remaining arguments *x*, *y*, *dx*, and *dy* provide the new absolute location of the point, and full delta to the original location\. At the time of the calls the system is *not* committed to the move yet\. Only after method __move done__ was invoked and has accepted or rejected the last position will the editor update its internal data structures, either committing to the new location, or rolling the move back to the original one\. Given this the location data provided here should be saved only in temporary storage until then\. The result of this method is ignored\. * __dataCmd__ __move done__ *editorObj* *id* This callback is invoked when the movement of a point in the editor instance is complete\. The *id* identifies the moved point within the editor\. The result of this method must be a boolean value\. If the method returns __false__ the move is vetoed and rollbed back\. - __\-drag\-point__ *eventspec* The value of this option is an event specification \(without bracketing angles\) declaring which event will trigger a drag action on points\. This option can only be set at construction time\. The default specification is __ButtonPress\-3__\. - __\-hilit\-color__ *colorspec* The value of this option is the highlight color for the default item created when adding a point, and no __\-highlight\-cmd__ is specified\. The default value is __red__\. - __\-kind__ *name* The value of this option is the canvas item type for the default item created when adding a point, and no __\-create\-cmd__ is specified\. Only item types specified through a bounding box are suitable\. The default value is __oval__\. - __\-radius__ *int* The value of this option is the radius for the default item created when adding a point, and no __\-create\-cmd__ is specified\. The default value is __3__\. - __\-tag__ *string* The value of this option is the name of the canvas tag with which to identify all items of all points managed by the editor\. This option can only be set at construction time\. If not specified it defaults to __POINT__ # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *canvas* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [canvas](\.\./\.\./\.\./\.\./index\.md\#canvas), [editing](\.\./\.\./\.\./\.\./index\.md\#editing), [point cloud](\.\./\.\./\.\./\.\./index\.md\#point\_cloud), [points](\.\./\.\./\.\./\.\./index\.md\#points) Tk_Library_Source_Code/embedded/md/tklib/files/modules/canvas/canvas_epolyline.md000064400000000000000000000304011435605071100301060ustar00nobodynobody [//000000001]: # (canvas::edit::polyline \- Variations on a canvas) [//000000002]: # (Generated from file 'canvas\_epolyline\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (canvas::edit::polyline\(n\) 0\.2 tklib "Variations on a canvas")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME canvas::edit::polyline \- Editing a polyline on a canvas # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [Interaction](#section2) - [Class API](#section3) - [Instance API](#section4) - [Options](#section5) - [Bugs, Ideas, Feedback](#section6) - [Keywords](#keywords) # SYNOPSIS package require Tcl 8\.5 package require Tk 8\.5 package require canvas::edit::points ?0\.1? package require canvas::edit::polyline ?0\.2? [__::canvas::edit__ __polyline__ *objectName* *canvas* *options*\.\.\.](#1) [__objectName__ __destroy__](#2) [__objectName__ __enable__](#3) [__objectName__ __disable__](#4) [__objectName__ __active__](#5) [__objectName__ __add__ *x* *y*](#6) [__objectName__ __clear__](#7) [__activeCmd__ *editorObj* *id*](#8) [__createCmd__ *canvas* *x* *y*](#9) [__dataCmd__ *editorObj* *coordinates*](#10) # DESCRIPTION This package provides a class whose instances handle editing a single poly\-line \(or \-gon\) on a canvas\. Instances can be configured with regard to the visual appearance of the markers denoting the line's vertices, as well as if the line is to be closed or not, and further if a closed line has to be convex or not\. Note that instances do not store the edited polyline themselves, but delegate this to a configurable object\. # Interaction The polyline editor internally uses an instance of package __[canvas::edit::points](canvas\_epoints\.md)__, and inherits all the options and behaviours for it\. The color options are additionally applied to the line element of this editor Beyond that it provides 2 options to configure the editing mode, and one option to customize the line/polygon item used to render the line through the points\. The main editing mode is controlled by option __\-closed__ for *[line](\.\./\.\./\.\./\.\./index\.md\#line)* \(i\.e\. open\) versus *polygon* \(i\.e\. closed\)\. The default is line/open mode\. In polygon/closed mode the option __\-convex__ controls if the editor enforces convexity of the polygon, or not\. The default is no enforcement of convexity\. The option __\-line\-config__ enables basic customization of the line/polygon item\. Note that it cannot overide the inherited color options\. # Class API - __::canvas::edit__ __polyline__ *objectName* *canvas* *options*\.\.\. This, the class command, creates and configures a new instance of a polyline editor, named *objectName*\. The instance will be connected to the specified *canvas* widget\. The result of the command is the fully qualified name of the instance command\. The options accepted here, and their values, are explained in the section [Options](#section5)\. # Instance API Instances of the polyline editors provide the following API: - __objectName__ __destroy__ This method destroys the polyline editor and releases all its internal resources\. Note that this operation does not destroy the items the editor managed on the attached canvas, nor the canvas itself\. The result of the method is an empty string\. - __objectName__ __enable__ This method activates editing of the polyline on the canvas\. This is the default after instance creation\. A call is ignored if the editor is already active\. The result of the method is an empty string\. The complementary method is __disable__\. The interogatory method for the current state is __active__\. - __objectName__ __disable__ This method disables editing of the polyline on the canvas\. A call is ignored if the editor is already disabled\. The result of the method is an empty string\. The complementary method is __enable__\. The interogatory method for the current state is __active__\. - __objectName__ __active__ This method queries the editor state\. The result of the method is a boolean value, __true__ if the editor is active, and __false__ otherwise, i\.e\. disabled\. The methods to change the state are __enable__ and __disable__\. - __objectName__ __add__ *x* *y* This method programmatically adds a vertex at the specified location to the line\. The result of the method is an empty string\. Note that this method goes through the whole set of callbacks invoked when the user interactively creates a vertex, i\.e\. __\-create\-cmd__, and, more importantly, __\-data\-cmd__\. One important difference however\. The new vertex is always added at the end of the line, whereas interactive creation uses heuristics to splice it into the line at a suitable location\. This is the method through which to load the vertices of a pre\-existing line into an editor instance\. - __objectName__ __clear__ This method programmatically removes all vertices from the editor, essentially removing the whole line\. The result of the method is an empty string\. Note that this method goes through the same callbacks invoked when the user interactively removes a vertex, i\.e\. __\-data\-cmd__\. # Options The class command accepts the following options - __\-active\-cmd__ *command\-prefix* The value of this option is a command prefix the editor will invoke when the mouse enters or leaves the line or a point managed by the instance\. If not specified it defaults to an empty command which does nothing\. The signature of this command prefix is * __activeCmd__ *editorObj* *id* The *id* identifies the entered object\. An empty *id* indicates that the last entered object was left\. The value __line__ indicates that the line was entered\. A numeric value __N__ indicates that the __N__'th vertex of the line was entered, counting from __0__\. The result of this method is ignored\. - __\-add\-remove\-point__ *eventspec* The value of this option is an event specification \(without bracketing angles\) declaring which event will trigger adding and removing a point\. This option can only be set at construction time\. The default setup uses different events for adding and removing points, __ButtonPress\-1__ and __ButtonPress\-2__ respectively\. When using this option the same event is used for both operations\. This is no problem because adding is bound as canvas\-global event while removal is bound to the relevant canvas items\. - __\-closed__ *boolean* The value of this option is a boolean flag indicating if the edited polyline is closed, i\.e\. a loop, or not\. *NOTE* that a proper loop requires at least 3 points\. For less than that an open line is shown, or even just a point\. This option can only be set at construction time\. If not specified it defaults to __false__ - __\-color__ *colorspec* The value of this option is the fill color for the default item created when adding a point, and no __\-create\-cmd__ is specified\. The default value is __SkyBlue2__\. - __\-convex__ *boolean* The value of this option is a boolean flag indicating if the edited polyline is strictly convex, or not\. This option has meaning if and only if option __\-closed__ is configured to be __true__\. This option can only be set at construction time\. If not specified it defaults to __false__ - __\-create\-cmd__ *command\-prefix* The value of this option is a command prefix the editor will invoke when it has to create a new vertex\. While this option can be set after construction, it is recommended to use this feature only as a means of inserting custom processing to be done at creation time which remembers and calls the previous value of the option\. If not specified it defaults to a command which will create a black\-bordered blue circle of radius 3 centered on the location of the new point\. The signature of this command prefix is * __createCmd__ *canvas* *x* *y* The result of the command prefix *must* be a list of the canvas items it created to represent the marker\. Note here that the visual representation of a "vertex" may consist of multiple canvas items in an arbitrary shape\. The returned list of items is allowed to be empty, and such is taken as signal that the callback vetoed the creation of the vertex\. - __\-data\-cmd__ *command\-prefix* The value of this option is a command prefix the editor will invoke when the line was edited in some way \(vertex added, removed, moved\)\. This is how the editor delegates the actual storage of the line information to an outside object\. This option can only be set at construction time\. If not specified it defaults to an empty string and is ignored by the editor, i\.e\. not invoked\. The signature of this command prefix is * __dataCmd__ *editorObj* *coordinates* This callback is invoked when the line was changed either interactively, or programmatically\. See instance method __add__ for the latter\. The *editorObj* identifies the instance invoking the callback, whereas *coordinates* is a list of vertex locations, with each location a pair of x\- and y\-coordinates\. The result of this method is ignored\. - __\-drag\-point__ *eventspec* The value of this option is an event specification \(without bracketing angles\) declaring which event will trigger a drag action on points\. This option can only be set at construction time\. The default specification is __ButtonPress\-3__\. - __\-hilit\-color__ *colorspec* The value of this option is the highlight color for the default item created when adding a point, and no __\-highlight\-cmd__ is specified\. The default value is __red__\. - __\-kind__ *name* The value of this option is the canvas item type for the default item created when adding a point, and no __\-create\-cmd__ is specified\. Only item types specified through a bounding box are suitable\. The default value is __oval__\. - __\-line\-config__ *list* The value of this option is a list of options and their values to be applied to the internal line/polygon item whenever it is regenerated after changes\. Note that these options *cannot* override the principal coloring of the line/polygon as applied by the main options __\-color__ and __\-hilit\-color__\. If not specified it defaults to the empty list\. - __\-radius__ *int* The value of this option is the radius for the default item created when adding a point, and no __\-create\-cmd__ is specified\. The default value is __3__\. - __\-tag__ *string* The value of this option is the name of the canvas tag with which to identify all items of all vertices managed by the editor\. This option can only be set at construction time\. If not specified it defaults to __POLYLINE__ # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *canvas* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [canvas](\.\./\.\./\.\./\.\./index\.md\#canvas), [editing](\.\./\.\./\.\./\.\./index\.md\#editing), [polyline](\.\./\.\./\.\./\.\./index\.md\#polyline) Tk_Library_Source_Code/embedded/md/tklib/files/modules/canvas/canvas_equad.md000064400000000000000000000222631435605071100272140ustar00nobodynobody [//000000001]: # (canvas::edit::quadrilateral \- Variations on a canvas) [//000000002]: # (Generated from file 'canvas\_equad\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (canvas::edit::quadrilateral\(n\) 0\.1 tklib "Variations on a canvas")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME canvas::edit::quadrilateral \- Editing a quadrilateral on a canvas # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [Class API](#section2) - [Instance API](#section3) - [Options](#section4) - [Bugs, Ideas, Feedback](#section5) - [Keywords](#keywords) # SYNOPSIS package require Tcl 8\.5 package require Tk 8\.5 package require canvas::edit::points ?0\.1? package require canvas::edit::quadrilateral ?0\.1? [__::canvas::edit__ __quadrilateral__ *objectName* *canvas* *options*\.\.\.](#1) [__objectName__ __destroy__](#2) [__objectName__ __enable__](#3) [__objectName__ __disable__](#4) [__objectName__ __active__](#5) [__objectName__ __add__ *x* *y*](#6) [__objectName__ __clear__](#7) [__createCmd__ *canvas* *x* *y*](#8) [__highlightCmd__ __on__ *canvas* *item*](#9) [__highlightCmd__ __off__ *canvas* *state*](#10) [__dataCmd__ *editorObj* *coordinates*](#11) # DESCRIPTION This package provides a class whose instances handle the editing of a quadrilateral on a canvas\. Instances can be configured with regard to the visual appearance \(regular, and highlighted\) of vertex markers\. Note that instances do not store the edited quadrilateral themselves, but delegate this to a configurable object\. # Class API - __::canvas::edit__ __quadrilateral__ *objectName* *canvas* *options*\.\.\. This, the class command, creates and configures a new instance of a quadrilateral editor, named *objectName*\. The instance will be connected to the specified *canvas* widget\. The result of the command is the fully qualified name of the instance command\. The options accepted here, and their values, are explained in the section [Options](#section4)\. # Instance API Instances of the quadrilateral editors provide the following API: - __objectName__ __destroy__ This method destroys the quadrilateral editor and releases all its internal resources\. Note that this operation does not destroy the items the editor managed on the attached canvas, nor the canvas itself\. The result of the method is an empty string\. - __objectName__ __enable__ This method activates editing of the quadrilateral on the canvas\. This is the default after instance creation\. A call is ignored if the editor is already active\. The result of the method is an empty string\. The complementary method is __disable__\. The interogatory method for the current state is __active__\. - __objectName__ __disable__ This method disables editing of the quadrilateral on the canvas\. A call is ignored if the editor is already disabled\. The result of the method is an empty string\. The complementary method is __enable__\. The interogatory method for the current state is __active__\. - __objectName__ __active__ This method queries the editor state\. The result of the method is a boolean value, __true__ if the editor is active, and __false__ otherwise, i\.e\. disabled\. The methods to change the state are __enable__ and __disable__\. - __objectName__ __add__ *x* *y* This method programmatically adds a vertex at the specified location to the quadrilateral\. The result of the method is an empty string\. Note that this method goes through the whole set of callbacks invoked when the user interactively creates a vertex, i\.e\. __\-create\-cmd__, and, more importantly, __\-data\-cmd__\. This is the method through which to load the vertices of a pre\-existing quadrilateral into an editor instance\. Note that at most 4 vertices can be specified, and at least 4 must be specified for the quadrilateral to be complete\. - __objectName__ __clear__ This method programmatically unset the quadrilateral in the editor\. The result of the method is an empty string\. Note that this method goes through the same callback invoked when the user interactively removes a vertex, i\.e\. __\-data\-cmd__\. # Options The class command accepts the following options - __\-convex__ *boolean* The value of this option is a boolean flag\. When the flag is set the editor will accept only convex quadrilaterals and reject all operations which would result in a violation of convexity\. This option can only be set at construction time\. If not specified it defaults to __false__, i\.e\. acceptance of any quadrilateral\. - __\-tag__ *string* The value of this option is the name of the canvas tag with which to identify all items of all quadrilateral managed by the editor\. This option can only be set at construction time\. If not specified it defaults to __QUADRILATERAL__ - __\-create\-cmd__ *command\-prefix* The value of this option is a command prefix the editor will invoke when it has to create a new vertex\. This option can only be set at construction time\. If not specified it defaults to a command which will create a black\-bordered blue circle of radius 3 centered on the location of the new point\. The signature of this command prefix is * __createCmd__ *canvas* *x* *y* The result of the command prefix *must* be a list of the canvas items it created to represent the marker\. Note here that the visual representation of a "vertex" may consist of multiple canvas items in an arbitrary shape\. - __\-highlight\-cmd__ *command\-prefix* The value of this option is a command prefix the editor will invoke when it has to \(un\)highlight a vertex\. This option can only be set at construction time\. If not specified it defaults to a command which will re\-color the item to highlight in red \(and restores the color for unhighlighting\)\. The two signatures of this command prefix are * __highlightCmd__ __on__ *canvas* *item* This method of the command prefix has to perform whatever is needed to highlight the vertex the *item* is a part of \(remember the note above about quadrilateral allowed to be constructed from multiple canvas items\)\. The result of the command can be anything and will be passed as is as argument *state* to the __off__ method\. * __highlightCmd__ __off__ *canvas* *state* This method is invoked to unhighlight a vertex described by the *state*, which is the unchanged result of the __on__ method of the command prefix\. The result of this method is ignored\. Note any interaction between dragging and highlighting of quadrilateral is handled within the editor, and that the callback bears no responsibility for doing such\. - __\-data\-cmd__ *command\-prefix* The value of this option is a command prefix the editor will invoke when the quadrilateral was edited in some way\. This is how the editor delegates the actual storage of quadrilateral information to an outside object\. This option can only be set at construction time\. If not specified it defaults to an empty string and is ignored by the editor, i\.e\. not invoked\. The signatures of this command prefix are * __dataCmd__ *editorObj* *coordinates* This callback is invoked when the quarilateral was changed either interactively, or programmatically\. See instance method __add__ for the latter\. The *editorObj* identifies the instance invoking the callback, whereas *coordinates* is a list of vertex locations, with each location a pair of x\- and y\-coordinates\. The result of this method is ignored\. # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *canvas* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [canvas](\.\./\.\./\.\./\.\./index\.md\#canvas), [concave](\.\./\.\./\.\./\.\./index\.md\#concave), [convex](\.\./\.\./\.\./\.\./index\.md\#convex), [editing](\.\./\.\./\.\./\.\./index\.md\#editing), [non\-convex](\.\./\.\./\.\./\.\./index\.md\#non\_convex), [quadrilateral](\.\./\.\./\.\./\.\./index\.md\#quadrilateral) Tk_Library_Source_Code/embedded/md/tklib/files/modules/canvas/canvas_erectangle.md000064400000000000000000000266441435605071100302350ustar00nobodynobody [//000000001]: # (canvas::edit::rectangle \- Variations on a canvas) [//000000002]: # (Generated from file 'canvas\_erectangle\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (canvas::edit::rectangle\(n\) 0\.1 tklib "Variations on a canvas")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME canvas::edit::rectangle \- Editing a rectangle on a canvas # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [Interaction](#section2) - [Class API](#section3) - [Instance API](#section4) - [Options](#section5) - [Bugs, Ideas, Feedback](#section6) - [Keywords](#keywords) # SYNOPSIS package require Tcl 8\.5 package require Tk 8\.5 package require canvas::edit::points ?0\.1? package require canvas::edit::rectangle ?0\.1? [__::canvas::edit__ __rectangle__ *objectName* *canvas* *options*\.\.\.](#1) [__objectName__ __destroy__](#2) [__objectName__ __enable__](#3) [__objectName__ __disable__](#4) [__objectName__ __active__](#5) [__objectName__ __set__ *minx* *miny* *maxx* *maxy*](#6) [__objectName__ __clear__](#7) [__activeCmd__ *editorObj* *id*](#8) [__createCmd__ *canvas* *x* *y*](#9) [__dataCmd__ *editorObj* *coordinates*](#10) # DESCRIPTION This package provides a class whose instances handle editing a rectangle on a canvas\. Instances can be configured with regard to the visual appearance of the markers denoting the rectangle's corners\. Note that instances do not store the edited rectangle themselves, but delegate this to a configurable object\. # Interaction The rectangle editor internally uses an instance of package __[canvas::edit::points](canvas\_epoints\.md)__, and inherits all the options and behaviours for it\. The color options are additionally applied to the rectangle element of this editor Beyond that it provides an option, __\-rect\-config__, to customize the rectangle item used to render the rectangle through its corners\. Note that it cannot overide the inherited color options\. During interaction instances execute a state machine where the user creates two points, at which point the system completes the rectangle with the missing corners and reports it\. At that point the system prevents adding more points\. Dragging the points is still possible, enabling resizing and moving the rectangle\. Deleting any corner deletes the entire rectangle, at which point the system is again ready for the creation of a new rectangle from two points\. # Class API - __::canvas::edit__ __rectangle__ *objectName* *canvas* *options*\.\.\. This, the class command, creates and configures a new instance of a rectangle editor, named *objectName*\. The instance will be connected to the specified *canvas* widget\. The result of the command is the fully qualified name of the instance command\. The options accepted here, and their values, are explained in the section [Options](#section5)\. # Instance API Instances of the rectangle editors provide the following API: - __objectName__ __destroy__ This method destroys the rectangle editor and releases all its internal resources\. Note that this operation does not destroy the items the editor managed on the attached canvas, nor the canvas itself\. The result of the method is an empty string\. - __objectName__ __enable__ This method activates editing of the rectangle on the canvas\. This is the default after instance creation\. A call is ignored if the editor is already active\. The result of the method is an empty string\. The complementary method is __disable__\. The interogatory method for the current state is __active__\. - __objectName__ __disable__ This method disables editing of the rectangle on the canvas\. A call is ignored if the editor is already disabled\. The result of the method is an empty string\. The complementary method is __enable__\. The interogatory method for the current state is __active__\. - __objectName__ __active__ This method queries the editor state\. The result of the method is a boolean value, __true__ if the editor is active, and __false__ otherwise, i\.e\. disabled\. The methods to change the state are __enable__ and __disable__\. - __objectName__ __set__ *minx* *miny* *maxx* *maxy* This method programmatically set the rectangle from the border coordinates\. This writes over a previous \(possibly partial\) rectangle\. The result of the method is an empty string\. Note that this method goes through the whole set of callbacks invoked when corners are created, i\.e\. __\-create\-cmd__, and, more importantly, __\-data\-cmd__\. This is the method through which to load a pre\-existing rectangle into an editor instance\. - __objectName__ __clear__ This method programmatically removes the rectangle from the editor, making the way free for creating a new one\. The result of the method is an empty string\. Note that this method goes through the same callbacks invoked when the user interactively removes a corner, i\.e\. __\-data\-cmd__\. # Options The class command accepts the following options - __\-active\-cmd__ *command\-prefix* The value of this option is a command prefix the editor will invoke when the mouse enters or leaves the rectangle or a corner managed by the instance\. If not specified it defaults to an empty command which does nothing\. The signature of this command prefix is * __activeCmd__ *editorObj* *id* The *id* identifies the entered object\. An empty *id* indicates that the last entered object was left\. The value __rect__ indicates that the rectangle's outline was entered\. Any other value is a code for one of the rectangle's corner, i\.e\. __tl__, __tr__, __bl__, and __br__\. The result of this method is ignored\. - __\-add\-remove\-point__ *eventspec* The value of this option is an event specification \(without bracketing angles\) declaring which event will trigger adding and removing a point\. This option can only be set at construction time\. The default setup uses different events for adding and removing points, __ButtonPress\-1__ and __ButtonPress\-2__ respectively\. When using this option the same event is used for both operations\. This is no problem because adding is bound as canvas\-global event while removal is bound to the relevant canvas items\. - __\-color__ *colorspec* The value of this option is the fill color for the default item created when adding a point, and no __\-create\-cmd__ is specified\. The default value is __SkyBlue2__\. - __\-create\-cmd__ *command\-prefix* The value of this option is a command prefix the editor will invoke when it has to create a new corner\. While this option can be set after construction, it is recommended to use this feature only as a means of inserting custom processing to be done at creation time which remembers and calls the previous value of the option\. If not specified it defaults to a command which will create a black\-bordered blue circle of radius 3 centered on the location of the new point\. The signature of this command prefix is * __createCmd__ *canvas* *x* *y* The result of the command prefix *must* be a list of the canvas items it created to represent the marker\. Note here that the visual representation of a "corner" may consist of multiple canvas items in an arbitrary shape\. The returned list of items is allowed to be empty, and such is taken as signal that the callback vetoed the creation of the corner\. - __\-data\-cmd__ *command\-prefix* The value of this option is a command prefix the editor will invoke when the rectangle was edited in some way \(created, modified, deleted\)\. This is how the editor delegates the actual storage of the rectangle information to an outside object\. This option can only be set at construction time\. If not specified it defaults to an empty string and is ignored by the editor, i\.e\. not invoked\. The signature of this command prefix is * __dataCmd__ *editorObj* *coordinates* This callback is invoked when the rectangle was changed either interactively, or programmatically\. See instance method __set__ for the latter\. The *editorObj* identifies the instance invoking the callback, whereas *coordinates* is a list of 4 elements, containing the min x, and y, and the max x and y coordinates of the rectangle, in this order\. The result of this method is ignored\. - __\-drag\-point__ *eventspec* The value of this option is an event specification \(without bracketing angles\) declaring which event will trigger a drag action on points\. This option can only be set at construction time\. The default specification is __ButtonPress\-3__\. - __\-hilit\-color__ *colorspec* The value of this option is the highlight color for the default item created when adding a point, and no __\-highlight\-cmd__ is specified\. The default value is __red__\. - __\-kind__ *name* The value of this option is the canvas item type for the default item created when adding a point, and no __\-create\-cmd__ is specified\. Only item types specified through a bounding box are suitable\. The default value is __oval__\. - __\-radius__ *int* The value of this option is the radius for the default item created when adding a point, and no __\-create\-cmd__ is specified\. The default value is __3__\. - __\-rect\-config__ *list* The value of this option is a list of options and their values to be applied to the internal rectangle item whenever it is regenerated after changes\. Note that these options *cannot* override the principal coloring of the rectangle as applied by the main options __\-color__ and __\-hilit\-color__\. If not specified it defaults to the empty list\. - __\-tag__ *string* The value of this option is the name of the canvas tag with which to identify all items of all vertices managed by the editor\. This option can only be set at construction time\. If not specified it defaults to __RECTANGLE__ # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *canvas* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [canvas](\.\./\.\./\.\./\.\./index\.md\#canvas), [editing](\.\./\.\./\.\./\.\./index\.md\#editing), [rectangle](\.\./\.\./\.\./\.\./index\.md\#rectangle) Tk_Library_Source_Code/embedded/md/tklib/files/modules/canvas/canvas_gradient.md000064400000000000000000000111401435605071100277020ustar00nobodynobody [//000000001]: # (canvas::gradient \- Variations on a canvas) [//000000002]: # (Generated from file 'canvas\_gradient\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (Copyright © 2013 Jarek Lewandowski, MaxJarek) [//000000004]: # (Copyright © Origin http://wiki\.tcl\.tk/6100) [//000000005]: # (Copyright © Origin http://wiki\.tcl\.tk/37242) [//000000006]: # (Copyright © Origin http://wiki\.tcl\.tk/9079) [//000000007]: # (canvas::gradient\(n\) 0\.2 tklib "Variations on a canvas")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME canvas::gradient \- Canvas with a gradient background # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [API](#section2) - [Options](#subsection1) - [Example](#section3) - [Bugs, Ideas, Feedback](#section4) - [Keywords](#keywords) - [Copyright](#copyright) # SYNOPSIS package require Tcl 8\.5 package require Tk 8\.5 package require canvas::gradient ?0\.2? [__::canvas::gradient__ *pathName* ?options?\.\.\.](#1) # DESCRIPTION This package provides a command to set background gradients on canvases\. *NOTE\!* This package reserves the canvas tag __canvas::gradient__ for its use\. # API - __::canvas::gradient__ *pathName* ?options?\.\.\. Creates a background gradient on the canvas *pathName*\. An existing gradient is replaced by the new definition\. The set of available options is decribed below, in section [Options](#subsection1)\. ## Options - __\-direction__ *direction* The value for this option specifies the *direction* of the gradient\. If not specified the system defaults to __x__, a horizontal gradient\. The package supports five directions: * __x__ for a horizontal gradient \(default\)\. Color changes along the x\-axis, with the start color at the left\. * __y__ for a vertical gradient\. Color changes along the y\-axis, with the start color at the top\. * __d1__ for a diagonal gradient from left\+top to bottom\+right\. Color changes along the diagonal\. with the start color at left\+top\. * __d2__ for a diagonal gradient from left\+bottom to top\+right\. Color changes along the diagonal\. with the start color at left\+bottom\. * __r__ for a radial gradient around the center of the viewport Color changes from the center outward, with the start color at the center\. - __\-color1__ *color* The value for this option specifies the starting color of the gradient\. If not specified it defaults to __red__\. - __\-color2__ *color* The value for this option specifies the ending color of the gradient\. If not specified it defaults to __green__\. - __\-type__ *type* The value for this option specifies how the gradient is calculated\. The package currently supports on ly one method, which is the default, naturally: * __linear__ for linear interpolation between the start and end colors \(default\)\. # Example package require canvas::gradient canvas .c canvas::gradient .c -direction x -color1 yellow -color2 blue pack .c -fill both -expand 1 # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *canvas* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [background](\.\./\.\./\.\./\.\./index\.md\#background), [canvas](\.\./\.\./\.\./\.\./index\.md\#canvas), [color gradient](\.\./\.\./\.\./\.\./index\.md\#color\_gradient), [gradients](\.\./\.\./\.\./\.\./index\.md\#gradients), [image](\.\./\.\./\.\./\.\./index\.md\#image), [widget background](\.\./\.\./\.\./\.\./index\.md\#widget\_background) # COPYRIGHT Copyright © 2013 Jarek Lewandowski, MaxJarek Copyright © Origin http://wiki\.tcl\.tk/6100 Copyright © Origin http://wiki\.tcl\.tk/37242 Copyright © Origin http://wiki\.tcl\.tk/9079 Tk_Library_Source_Code/embedded/md/tklib/files/modules/canvas/canvas_highlight.md000064400000000000000000000105761435605071100300700ustar00nobodynobody [//000000001]: # (canvas::highlight \- Variations on a canvas) [//000000002]: # (Generated from file 'canvas\_highlight\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (canvas::highlight\(n\) 0\.1 tklib "Variations on a canvas")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME canvas::highlight \- Manage the highlighting of canvas items or item groups # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [API](#section2) - [Highlight callback](#subsection1) - [Bugs, Ideas, Feedback](#section3) - [Keywords](#keywords) # SYNOPSIS package require Tcl 8\.5 package require Tk 8\.5 package require canvas::highlight ?0\.1? [__::canvas::highlight__ __on__ *canvas* *tagOrId* *cmd*](#1) [__::canvas::highlight__ __off__ *canvas* *tagOrId*](#2) [__\{\*\}cmd__ __on__ *canvas* *item*](#3) [__\{\*\}cmd__ __off__ *canvas* *clientdata*](#4) # DESCRIPTION This package provides utility commands for setting up and tearing down of highlights for canvas items or item groups, the latter identified by a tag\. # API - __::canvas::highlight__ __on__ *canvas* *tagOrId* *cmd* This command sets up a general highlight, with the items of canvas *canvas* to highlight in this manner identified by *tagOrId* and the *cmd* prefix providing the implementation, i\.e\. the how to perform the highlight\. The signature of the command prefix is described later, in section [Highlight callback](#subsection1)\. The result of the command is the empty string\. Limitations: 1. When a highlight is active no other highlight can be activated\. This means that nested highlights are not possible\. 1. The system may break if a highlight is removed from within its highlight callback\. - __::canvas::highlight__ __off__ *canvas* *tagOrId* This command removes any highlight set on the items of canvas *canvas* identified by *tagOrId*\. The result of the command is the empty string\. ## Highlight callback The highlight callback is a command prefix invoked in the following two ways: - __\{\*\}cmd__ __on__ *canvas* *item* This form is invoked when the mouse has entered \(one of\) the item\(s\) the highlight was set up for\. The callback now has to perform any reconfiguration necessary to highlight the item \(group\)\. The result of the command can be anything\. It is stored by the system as client information and passed unchanged to the un\-highlight callback for its use\. In this manner the highlight callback is able to maintain custom state from highlighting to un\-highlighting\. Note that the callback does not have to maintain state, nor does it have to actually reconfigure the item \(group\)\. In the latter case the callback simply serves as easy enter/leave notification\. - __\{\*\}cmd__ __off__ *canvas* *clientdata* This form is invoked when the mouse has left \(one of\) the item\(s\) of the currently active the highlight\. The callback now has to perform any reconfiguration necessary to un\-highlight the item \(group\)\. The result of the command must be a boolean value with the usual value to be __true__\. By returning __false__ instead the callback can veto the removal of the highlight\. # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *canvas* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [canvas](\.\./\.\./\.\./\.\./index\.md\#canvas), [enter callback](\.\./\.\./\.\./\.\./index\.md\#enter\_callback), [highlighting](\.\./\.\./\.\./\.\./index\.md\#highlighting), [leave callback](\.\./\.\./\.\./\.\./index\.md\#leave\_callback) Tk_Library_Source_Code/embedded/md/tklib/files/modules/canvas/canvas_mvg.md000064400000000000000000000050151435605071100267020ustar00nobodynobody [//000000001]: # (canvas::mvg \- Variations on a canvas) [//000000002]: # (Generated from file 'canvas\_mvg\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (Copyright © 2010 Wolf\-Dieter Busch \(http://wiki\.tcl\.tk/15505\)) [//000000004]: # (Copyright © 2010 Documentation, Andreas Kupries) [//000000005]: # (canvas::mvg\(n\) 1\.0\.1 tklib "Variations on a canvas")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME canvas::mvg \- Canvas to ImageMagick MVG vector format # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [API](#section2) - [Bugs, Ideas, Feedback](#section3) - [Keywords](#keywords) - [Copyright](#copyright) # SYNOPSIS package require Tcl 8\.5 package require Tk 8\.5 package require canvas::mvg ?1? [__::canvas::mvg__ *pathName*](#1) # DESCRIPTION This package provides a command to convert a canvas' contents to ImageMagick's MVG vector format\. # API - __::canvas::mvg__ *pathName* Dump the contents of the canvas *pathName*\. The result is a string in ImageMagick's MVG vector format\. # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *canvas* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [canvas](\.\./\.\./\.\./\.\./index\.md\#canvas), [graphics](\.\./\.\./\.\./\.\./index\.md\#graphics), [imagemagick](\.\./\.\./\.\./\.\./index\.md\#imagemagick), [magick vector graphics](\.\./\.\./\.\./\.\./index\.md\#magick\_vector\_graphics), [mvg](\.\./\.\./\.\./\.\./index\.md\#mvg), [print screen](\.\./\.\./\.\./\.\./index\.md\#print\_screen), [serialization](\.\./\.\./\.\./\.\./index\.md\#serialization), [vector graphics](\.\./\.\./\.\./\.\./index\.md\#vector\_graphics) # COPYRIGHT Copyright © 2010 Wolf\-Dieter Busch \(http://wiki\.tcl\.tk/15505\) Copyright © 2010 Documentation, Andreas Kupries Tk_Library_Source_Code/embedded/md/tklib/files/modules/canvas/canvas_snap.md000064400000000000000000000050401435605071100270500ustar00nobodynobody [//000000001]: # (canvas::snap \- Variations on a canvas) [//000000002]: # (Generated from file 'canvas\_snap\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (Copyright © 2004 George Petasis \(http://wiki\.tcl\.tk/1404\)) [//000000004]: # (Copyright © 2010 Documentation, Andreas Kupries) [//000000005]: # (canvas::snap\(n\) 1\.0\.1 tklib "Variations on a canvas")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME canvas::snap \- Canvas snapshot to Tk photo image # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [API](#section2) - [Bugs, Ideas, Feedback](#section3) - [Keywords](#keywords) - [Copyright](#copyright) # SYNOPSIS package require Tcl 8\.5 package require Tk 8\.5 package require canvas::snap ?1\.0\.1? package require img::window [__::canvas::snap__ *pathName*](#1) # DESCRIPTION This package provides a command to take snapshots of arbitrary canvases\. # API - __::canvas::snap__ *pathName* Takes a snapshot of the canvas *pathName*\. The result is the name of a new Tk photo image containing the snapshot\. *Note* that this command has a side\-effect\. To avoid having white rectangles where other windows may overlap the canvas this command forces the toplevel window the canvas is in to the top of the stacking order\. # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *canvas* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [canvas](\.\./\.\./\.\./\.\./index\.md\#canvas), [image](\.\./\.\./\.\./\.\./index\.md\#image), [photo](\.\./\.\./\.\./\.\./index\.md\#photo), [print screen](\.\./\.\./\.\./\.\./index\.md\#print\_screen), [snapshot](\.\./\.\./\.\./\.\./index\.md\#snapshot) # COPYRIGHT Copyright © 2004 George Petasis \(http://wiki\.tcl\.tk/1404\) Copyright © 2010 Documentation, Andreas Kupries Tk_Library_Source_Code/embedded/md/tklib/files/modules/canvas/canvas_sqmap.md000064400000000000000000000143131435605071100272330ustar00nobodynobody [//000000001]: # (canvas::sqmap \- Variations on a canvas) [//000000002]: # (Generated from file 'canvas\_sqmap\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (canvas::sqmap\(n\) 0\.3\.1 tklib "Variations on a canvas")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME canvas::sqmap \- Canvas with map background based on square tiles # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [API](#section2) - [Options](#subsection1) - [Methods](#subsection2) - [Image ownership](#section3) - [Bugs, Ideas, Feedback](#section4) - [Keywords](#keywords) # SYNOPSIS package require Tcl 8\.4 package require Tk 8\.4 package require snit package require uevent::onidle package require cache::async package require canvas::sqmap ?0\.3\.1? [__::canvas::sqmap__ *pathName* ?options?](#1) [*canvasName* __image set__ *cell* *image*](#2) [*canvasName* __image unset__ *cell*](#3) [*canvasName* __flush__](#4) # DESCRIPTION This package provides an extended canvas widget for the display of maps based on a set of square image tiles\. The tiles are the background of the canvas, with all other canvas items added always shown in front of them\. The number of tiles shown, tile size, and where to get the images to show are all configurable\. # API - __::canvas::sqmap__ *pathName* ?options? Creates the canvas *pathName* and configures it\. The new widget supports all of the options and methods of a regular canvas, plus the options and methods described below\. The result of the command is *pathName*\. ## Options - __\-grid\-cell\-width__ The value for this option is a non\-negative integer\. It specifies the width of the cells the background is made up of\. - __\-grid\-cell\-height__ The value for this option is a non\-negative integer\. It specifies the height of the cells the background is made up of\. - __\-grid\-cell\-command__ The value for this option is a command prefix\. It is invoked whenever the canvas needs the image for a specific cell of the background, with two additional arguments, the id of the cell, and a command prefix to invoke when the image is ready, or known to not exist\. The id of the cell is a 2\-element list containing the row and column number of the cell, in this order\. The result command prefix \(named "$result" in the example below\) has to be invoked with either two or three arguments, i\.e\. $result set $cellid $image ; # image is known and ready $result unset $cellid ; # image does not exist This option may be left undefined, i\.e\. the canvas can operate without it\. In that case the only images shown in grid cells are those explicitly set with the method __image set__, see the next section\. All other grid cells will simply be empty\. - __\-viewport\-command__ This option specifies a command prefix to invoke when the viewport of the canvas is changed, to allow users keep track of where in the scroll\-region we are at all times\. This can be used, for example, to drive derivate displays, or to keep items in view by moving them as the viewport moves\. - __\-image\-on\-load__ The value for this option is an image\. If specified the image is shown in a cell while the actual image for that cell is getting loaded through the callback specified by the __\-grid\-cell\-command__\. - __\-image\-on\-unset__ The value for this option is an image\. If specified the image is shown in a cell for which the callback specified by the __\-grid\-cell\-command__ reported that there is no actual image to be shown\. ## Methods - *canvasName* __image set__ *cell* *image* Invoking this method places the *image* into the specified *cell* of the background\. The cell is given as a 2\-element list containing row and column number, in this order\. Note that an image is allowed to be associated with and displayed in multiple cells of the canvas\. - *canvasName* __image unset__ *cell* Invoking this method declares the specified *cell* of the background as empty, an existing image shown by this cell will be forgotten\. The cell is given as a 2\-element list containing row and column number, in this order\. - *canvasName* __flush__ Invoking this method forces the canvas to completely reload the images for all cells\. Do not use this method if the canvas is operated without a __\-grid\-cell\-command__, as in that case the canvas will simply forget all images without being able to reload them\. # Image ownership Note that the canvas *does not* take ownership of the images it shows in the background\. In other words, when we say that the canvas forgets an image this means only that the association between a grid cell and shown image is broken\. The image is *not* deleted\. Managing the lifecycle of the images shown by the canvas is responsibility of the user of the canvas\. # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *canvas* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [canvas](\.\./\.\./\.\./\.\./index\.md\#canvas), [cell](\.\./\.\./\.\./\.\./index\.md\#cell), [grid](\.\./\.\./\.\./\.\./index\.md\#grid), [image](\.\./\.\./\.\./\.\./index\.md\#image), [map](\.\./\.\./\.\./\.\./index\.md\#map), [square map](\.\./\.\./\.\./\.\./index\.md\#square\_map), [tile](\.\./\.\./\.\./\.\./index\.md\#tile) Tk_Library_Source_Code/embedded/md/tklib/files/modules/canvas/canvas_tags.md000064400000000000000000000101511435605071100270440ustar00nobodynobody [//000000001]: # (canvas::tag \- Variations on a canvas) [//000000002]: # (Generated from file 'canvas\_tags\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (canvas::tag\(n\) 0\.1 tklib "Variations on a canvas")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME canvas::tag \- Easier management of the tags on canvas items or item groups # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [API](#section2) - [Bugs, Ideas, Feedback](#section3) - [Keywords](#keywords) # SYNOPSIS package require Tcl 8\.5 package require Tk 8\.5 package require canvas::tag ?0\.1? [__::canvas::tag__ __append__ *canvas* *tagOrId* *tag*\.\.\.](#1) [__::canvas::tag__ __prepend__ *canvas* *tagOrId* *tag*\.\.\.](#2) [__::canvas::tag__ __append__ *canvas* *tagOrId* *index* *tag*\.\.\.](#3) [__::canvas::tag__ __remove__ *canvas* *tagOrId* *tag*\.\.\.](#4) [__::canvas::tag__ __match__ *canvas* *tagOrId* *pattern*](#5) # DESCRIPTION This package provides utility commands for easier management of the tag lists associated with canvas items or item groups\. The problem with the existing canvas API is that a tag list can only be set as a whole, making adding and removing of tags from such lists relatively complex operations reading the current tag list, modifying it, and then writing the changed list back\. The commands provided by this package hide all this complexity from the user\. # API - __::canvas::tag__ __append__ *canvas* *tagOrId* *tag*\.\.\. This command adds the tags *tag*\.\.\. to the tag list for the items identified by the *tagOrId* in the *canvas* widget\. The new tags are added at the end of the list\. The result of the command is the empty string\. - __::canvas::tag__ __prepend__ *canvas* *tagOrId* *tag*\.\.\. This command adds the tags *tag*\.\.\. to the tag list for the items identified by the *tagOrId* in the *canvas* widget\. The new tags are added at the beginning of the list\. The result of the command is the empty string\. - __::canvas::tag__ __append__ *canvas* *tagOrId* *index* *tag*\.\.\. This command adds the tags *tag*\.\.\. to the tag list for the items identified by the *tagOrId* in the *canvas* widget\. The new tags are inserted before the element at *index*\. *index* __0__ refers to the beginning of the list\. *index* __end__ refers to after the end of the list\. The result of the command is the empty string\. - __::canvas::tag__ __remove__ *canvas* *tagOrId* *tag*\.\.\. This command removes the named tags *tag*\.\.\. from the tag list for the items identified by the *tagOrId* in the *canvas* widget\. The result of the command is the empty string\. - __::canvas::tag__ __match__ *canvas* *tagOrId* *pattern* This command finds all tags for the items identified by the *tagOrId* in the *canvas* widget which match the glob *pattern*\. The result of the command is a list of the matching tags\. Which may be empty\. # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *canvas* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [append tag](\.\./\.\./\.\./\.\./index\.md\#append\_tag), [canvas](\.\./\.\./\.\./\.\./index\.md\#canvas), [insert tag](\.\./\.\./\.\./\.\./index\.md\#insert\_tag), [remove tag](\.\./\.\./\.\./\.\./index\.md\#remove\_tag), [tags](\.\./\.\./\.\./\.\./index\.md\#tags) Tk_Library_Source_Code/embedded/md/tklib/files/modules/canvas/canvas_trlines.md000064400000000000000000000072251435605071100275760ustar00nobodynobody [//000000001]: # (canvas::track::lines \- Variations on a canvas) [//000000002]: # (Generated from file 'canvas\_trlines\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (canvas::track::lines\(n\) 0\.1 tklib "Variations on a canvas")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME canvas::track::lines \- Manage a group of rubber band lines # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [Class API](#section2) - [Instance API](#section3) - [Bugs, Ideas, Feedback](#section4) - [Keywords](#keywords) # SYNOPSIS package require Tcl 8\.5 package require Tk 8\.5 package require canvas::tag ?0\.1? [__::canvas::track__ __lines__ *objectName* *canvas*](#1) [__objectName__ __destroy__](#2) [__objectName__ __start__ *current* *p*\.\.\.](#3) [__objectName__ __move__ *current*](#4) [__objectName__ __done__](#5) # DESCRIPTION This package provides a utility class managing the drawing of set of semi\-crosshair \(rubberband\) lines\. # Class API - __::canvas::track__ __lines__ *objectName* *canvas* This, the class command, creates and configures a new instance of the tracker, named *objectName*\. The instance will be connected to the specified *canvas* widget\. The result of the command is the fully qualified name of the instance command\. # Instance API Instances of this class provide the following API: - __objectName__ __destroy__ This method destroys the instance and releases all its internal resources\. This operation does destroy the items representing the tracked lines\. It does not destroy the attached canvas\. The result of the method is an empty string\. - __objectName__ __start__ *current* *p*\.\.\. This method starts the tracking of a set of lines, one line per point *p*, which specifies the destination end\-point of each line\. All lines will have *current* as a common end\-point\. Note that a previously tracked set of lines is removed\. The result of the method is an empty string\. Each point is specified through a 2\-element list containing its x\- and y\-coordinates, in this order\. - __objectName__ __move__ *current* This method updates the shared end\-point of all rubberbands and redraws them\. The result of the method is an empty string\. The point is specified through a 2\-element list containing its x\- and y\-coordinates, in this order\. - __objectName__ __done__ This method ends the tracking of the current set of lines and removes them from the canvas\. # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *canvas* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [canvas](\.\./\.\./\.\./\.\./index\.md\#canvas), [crosshair](\.\./\.\./\.\./\.\./index\.md\#crosshair), [rubberband](\.\./\.\./\.\./\.\./index\.md\#rubberband), [tracking](\.\./\.\./\.\./\.\./index\.md\#tracking) Tk_Library_Source_Code/embedded/md/tklib/files/modules/canvas/canvas_zoom.md000064400000000000000000000057561435605071100271110ustar00nobodynobody [//000000001]: # (canvas::zoom \- Variations on a canvas) [//000000002]: # (Generated from file 'canvas\_zoom\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (canvas::zoom\(n\) 0\.2\.1 tklib "Variations on a canvas")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME canvas::zoom \- Zoom control for canvas::sqmap # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [API](#section2) - [Options](#subsection1) - [Methods](#subsection2) - [Bugs, Ideas, Feedback](#section3) - [Keywords](#keywords) # SYNOPSIS package require Tcl 8\.4 package require Tk 8\.4 package require snit package require uevent::onidle package require canvas::zoom ?0\.2\.1? [__::canvas::zoom__ *pathName* ?options?](#1) # DESCRIPTION This package provides a widget to enable the user of a map display to control the zoom level\. # API - __::canvas::zoom__ *pathName* ?options? Creates the zoom control widget *pathName* and configures it\. The methods and options supported by the new widget are described in the following sections\. The result of the command is *pathName*\. ## Options - __\-orient__ The value for this option is either __vertical__, or __horizontal__, specifying the orientation of the major axis of the widget\. The default is __vertical__\. - __\-levels__ The value for this option is a non\-negative integer\. It specifies the number of zoom levels to support\. - __\-variable__ The value for this option is the name of a global or namespaced variable which is connected with the widget\. changes to the zoom level made the widget are propagated to this variable, and in turn changes to the variable are imported into the widget\. - __\-command__ This option specifies a command prefix\. This callback will be invoked whenever the zoom level is changed\. It is called with two additional arguments, the zoom control widget, and the new zoom level, in this order\. ## Methods The widget supports no methods beyond the standard \(__configure__, __cget__, etc\.\)\. # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *canvas* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [zoom](\.\./\.\./\.\./\.\./index\.md\#zoom) Tk_Library_Source_Code/embedded/md/tklib/files/modules/chatwidget000075500000000000000000000000001435605071100250245ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files/modules/chatwidget/chatwidget.md000064400000000000000000000135571435605071100275630ustar00nobodynobody [//000000001]: # (chatwidget \- Composite widget for chat applications) [//000000002]: # (Generated from file 'chatwidget\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (chatwidget\(n\) 1\.1\.4 tklib "Composite widget for chat applications")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME chatwidget \- Provides a multi\-paned view suitable for display of chat room or irc channel information # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [COMMANDS](#section2) - [WIDGET COMMANDS](#section3) - [EXAMPLE](#section4) - [Bugs, Ideas, Feedback](#section5) - [See Also](#seealso) - [Keywords](#keywords) # SYNOPSIS package require Tk 8\.5 package require chatwidget ?1\.1\.4? [__::chatwidget::chatwidget__ *path* ?*options*?](#1) [__$widget__ topic *command* *args*](#2) [__$widget__ name *nick* *args*](#3) [__$widget__ message *text* *args*](#4) [__$widget__ hook *command* *args*](#5) [__$widget__ names *args*](#6) [__$widget__ entry *args*](#7) [__$widget__ chat *args*](#8) # DESCRIPTION This is a composite widget designed to simplify the construction of chat applications\. The widget contains display areas for chat messages, user names and topic and an entry area\. It automatically handles colourization of messages per nick and manages nick completion\. A system of hooks permit the application author to adjust display features\. The main chat display area may be split for use displaying history or for searching\. The widget is made up of a number of text widget and panedwindow widgets so that the size of each part of the display may be adjusted by the user\. All the text widgets may be accessed via widget passthrough commands if fine adjustment is required\. The topic and names sections can also be hidden if desired\. # COMMANDS - __::chatwidget::chatwidget__ *path* ?*options*? Create a new chatwidget using the Tk window id *path*\. Any options provided are currently passed directly to the main chat text widget\. # WIDGET COMMANDS - __$widget__ topic *command* *args* The chat widget can display a topic string, for instance the topic or name given to a multi\-user chatroom or irc channel\. * __show__ Enable display of the topic\. * __hide__ Disable display of the topic * __set *topic*__ Set the topic text to *topic*\. - __$widget__ name *nick* *args* Control the names and tags associated with names\. * __list ?*\-full*?__ Returns a list of all the user names from the names view\. If ?\-full? is given then the list returned is a list of lists where each sublist is made up of the nick followed by any options that have been set on this nick entry\. This may be used to examine any application specific options that may be applied to a nick when using the __add__ command\. * __add *nick* ?*options*?__ * __delete *nick*__ - __$widget__ message *text* *args* Add messages to the display\. options are \-nick, \-time, \-type, \-mark \-tags - __$widget__ hook *command* *args* Manage hooks\. add \(message, post names\_group, names\_nick, chatstate\), remove, run - __$widget__ names *args* Passthrough to the name display text widget\. See the __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ widget manual for all available commands\. The chatwidget provides two additional commands __show__ and __hide__ which are used to control the display of this element in the widget\. - __$widget__ entry *args* Passthrough to the entry text widget\. See the __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ widget manual for all available commands\. - __$widget__ chat *args* Passthrough to the chat text widget\. See the __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ widget manual for all available commands\. # EXAMPLE chatwidget::chatwidget .chat proc speak {w msg} {$w message $msg -nick user} .chat hook add post [list speak .chat] pack .chat -side top -fill both -expand 1 .chat topic show .chat topic set "Chat widget demo" .chat name add "admin" -group admin .chat name add "user" -group users -color tomato .chat message "Chatwidget ready" -type system .chat message "Hello, user" -nick admin .chat message "Hello, admin" -nick user A more extensive example is available by examining the code for the picoirc program in the tclapps repository which ties the tcllib __picoirc__ package to this __chatwidget__ package to create a simple irc client\. # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *chatwidget* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # SEE ALSO text\(n\) # KEYWORDS [chat](\.\./\.\./\.\./\.\./index\.md\#chat), [chatwidget](\.\./\.\./\.\./\.\./index\.md\#chatwidget), [composite widget](\.\./\.\./\.\./\.\./index\.md\#composite\_widget), [irc](\.\./\.\./\.\./\.\./index\.md\#irc), [mega\-widget](\.\./\.\./\.\./\.\./index\.md\#mega\_widget), [widget](\.\./\.\./\.\./\.\./index\.md\#widget) Tk_Library_Source_Code/embedded/md/tklib/files/modules/controlwidget000075500000000000000000000000001435605071100255655ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files/modules/controlwidget/controlwidget.md000064400000000000000000000433261435605071100310620ustar00nobodynobody [//000000001]: # (controlwidget \- controlwidget) [//000000002]: # (Generated from file 'controlwidget\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (Copyright © 2010 Ron Fox ) [//000000004]: # (Copyright © 2010 Gerhard Reithofer <\.\.\.@\.\.\.>) [//000000005]: # (Copyright © 2010 Marco Maggi <\.\.\.@\.\.\.>) [//000000006]: # (Copyright © 2010 Arjen Markus ) [//000000007]: # (controlwidget\(n\) 0\.1 tklib "controlwidget")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME controlwidget \- Collection of widgets for displaying and controlling numerical values # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [TYPES OF WIDGETS](#section2) - [COMMANDS](#section3) - [ACKNOWLEDGMENTS](#section4) - [Bugs, Ideas, Feedback](#section5) - [Keywords](#keywords) - [Copyright](#copyright) # SYNOPSIS package require Tcl ?8\.5? package require Tk ?8\.5? package require snit ?2\.0? package require controlwidget ?0\.1? [__::controlwidget::meter__ *w* *args*](#1) [__::controlwidget::slider__ *w* *args*](#2) [__::controlwidget::equalizerBar__ *w* *args*](#3) [__::controlwidget::thermometer__ *w* *args*](#4) [__::controlwidget::voltmeter__ *w* *args*](#5) [__::controlwidget::tachometer__ *w* *args*](#6) [__::controlwidget::rdial__ *w* *args*](#7) [__$widget__ get](#8) [__$widget__ set *value*](#9) [__::controlwidget::led__ *w* *args*](#10) [__::controlwidget::radioMatrix__ *w* *args*](#11) [__$led__ on](#12) [__$led__ off](#13) [__$led__ setstate *state*](#14) [__$matrix__ get](#15) [__$matrix__ set *index*](#16) # DESCRIPTION The controlwidget package focuses on the display and interactive control of numerical values\. It mimicks several of the meters and controls found in laboratory settings but also daily life: volt meters, equalizers and tachometers to name a few\. They can be seen as alternatives for the *scale widget*\. *Note:* The package has not sofar been tested extensively, and that may result in an unexpected appearance if you use sizes that are different than the defaults\. Also not all options for the coloring of the various parts and fonts and so on have been tested, so that may be another source of bugs\. A last note: some parts have not been included in any option, most notably the colors of parts that require lighter and darker shades to cooperate\. # TYPES OF WIDGETS The package distinguishes several typed of widgets: - Vertical meters: the value of the variable is translated into a vertical position, like with the coloured bars you find on your stereo installation\. - Angle displays: the value of the variable is related to the angle of a needle, like with tachometers\. - Interactive widgets: most widgets allow you to change the value of the variable by pressing the mouse button on the needle and shifting it up and down or left and right\. - Non\-interactive widgets: some widgets, like the thermometer widget, do not allow such interaction\. - Logical or choice widgets: some widgets display the values as either on/off \(or true/false\) or as one of a set of discrete choices\. All widgets have in common, however, that you can connect them to a variable and that changing the variable changes the display\. Forthermore, all widgets have the set and get methods to interact with the value that the widget displays \(whether that is stored in a global variable or not\)\. They also have in common that their appearance and behaviour is determined by one or more options that you can set at creation time and often later on as well\. The widgets are all based on the *snit* package, so that the methods __configure__ and __cget__ are available to set and get these options\. # COMMANDS Currently the package contains these widgets of the *vertical meter* type: - __::controlwidget::meter__ *w* *args* Create a vertical meter consisting of an axis and a moveable arrow\. * widget *w* \(in\) Name of the widget to be created\. * arguments *args* \(in\) List of key\-value pairs, controlling the appearance and behaviour of the widget: + __variable__ name Name of the variable to be associated with the meter + __background__ color Background color for the widget + __height__ pixels Height of the widget + __width__ pixels Width of the widget + __arrowthickness__ pixels Thickness of the displayed arrow in pixels + __arrowcolor__ color Color of the displayed arrow + __readonly__ boolean Whether the arrow can be moved interactively or not - __::controlwidget::slider__ *w* *args* Create a widget containing one or more vertical sliders and an axis\. You can shift the slider handles interactively via the mouse\. * widget *w* \(in\) Name of the widget to be created\. * arguments *args* \(in\) List of key\-value pairs, controlling the appearance and behaviour of the widget: + __variable__ name Name of the \(list\) variable to be associated with the widget + __number__ integer Number of sliders in the widget + __background__ color Background color for the widget + __height__ pixels Height of the widget + __width__ pixels Width of the widget + __sliderthickness__ pixels Thickness of the slider handles + __sliderwidth__ color Width of the slider handles + __troughwidth__ color Width of the troughs holding the sliders - __::controlwidget::equalizerBar__ *w* *args* Create a widget containing one or more vertical bars resembling those found on hifi graphical equalizers\. Note that it is a read\-only widget\. * widget *w* \(in\) Name of the widget to be created\. * arguments *args* \(in\) List of key\-value pairs, controlling the appearance and behaviour of the widget: + __variable__ name Name of the \(list\) variable to be associated with the widget + __number__ integer Number of bars in the widget + __background__ color Background color for the widget + __height__ pixels Height of the widget + __width__ pixels Width of the widget + __barwidth__ pixels Width of the bars + __segments__ integer Number of segments the bars are divided in + __safecolor__ color Color for values lower than the warning level + __warningcolor__ color Color for values greater than the warning level + __warninglevel__ double Threshold value, determines at what level the color changes - __::controlwidget::thermometer__ *w* *args* Create a thermometer widget \(read\-only\) * widget *w* \(in\) Name of the widget to be created\. * arguments *args* \(in\) List of key\-value pairs, controlling the appearance and behaviour of the widget: + __variable__ name Name of the \(list\) variable to be associated with the widget + __background__ color Background color for the widget + __height__ pixels Height of the widget + __width__ pixels Width of the widget + __linethickness__ pixels Thickness of the line representing the "temperature" + __linecolor__ color Color of the line These widgets all use a vertical axis and have the following options in common for configuring the axis: - __axisformat__ string Format string for formatting the numbers along the axis - __axisfont__ string Name of the font to be used for the numbers - __axiscolor__ color Color of the axis \(including the numbers\) - __from__ color Lower value for the axis - __to__ color Upper value for the axis - __majorticks__ integer Number of major tickmarks to draw \(each is labelled\) - __minorticks__ integer Number of minor tickmarks to draw between two major tickmarks - __log__ boolean Use a logarithmic axis \(true\) or a linear axis \(false\) The package contains the following widget based on angle displays: - __::controlwidget::voltmeter__ *w* *args* Create a voltmeter\-like widget\. * widget *w* \(in\) Name of the widget to be created\. * arguments *args* \(in\) List of key\-value pairs, controlling the appearance and behaviour of the widget: + __variable__ name Name of the variable to be associated with the meter + __value__ value Value for the meter \(if not associated with a variable\) + __min__ value The minimum value for data in the display + __max__ value The maximum value for data in the display + __labels__ list The labels to be shown along the scale\. \(These are simply considered texts, so no relation with the minimum and maximum perse\) + __title__ string String to be shown below the dial + __width__ pixels The width of the widget + __height__ pixels The height of the widget + __borderwidth__ pixels The width of the border surrounding the entire widget + __relief__ string The relief of the border surrounding the entire widget + __highlightthickness__ pixels The width of the border to indicate the widget has keyboard focus + __labelfont__ fontname Font of the labels to the scale + __titlefont__ fontname Font of the title below the dial + __dialcolor__ color Color of the dial holding the needle + __needlecolor__ color Color of the needle + __scalecolor__ color Color of the scale \(arc and tickmarks\) + __labelcolor__ color Color of the labels to the scale + __titlecolor__ color Color of the title below the dial - __::controlwidget::tachometer__ *w* *args* Create a tachometer\-like widget\. * widget *w* \(in\) Name of the widget to be created\. * arguments *args* \(in\) List of key\-value pairs, controlling the appearance and behaviour of the widget\. In addition to the ones given for the voltmeter widget: + __variable__ name Name of the variable to be associated with the meter + __value__ value Value for the meter \(if not associated with a variable\) + __dangerlevel__ value Level above which values are indicated with a different color + __dangercolor__ color Color for the values above the "danger level" + __dangerwidth__ pixels Width for the colored band indicating the "danger level" + __pincolor__ color Color for the needle and the pin - __::controlwidget::rdial__ *w* *args* Create a rotating dial\. You can drag the dial to change the value\. With the shift button depressed the value changes slowly, with the control button depressed it changes fast\. Similarly, you can control the dial via the mouse wheel, with the shift and control button working in the same way as with the mouse pointer\. *Note:* The shift and control buttons currently have no effect on Windows\. * widget *w* \(in\) Name of the widget to be created\. * arguments *args* \(in\) List of key\-value pairs, controlling the appearance and behaviour of the widget: + __variable__ name Name of the variable to be associated with the dial + __value__ value Value for the dial \(if not associated with a variable\) + __orient__ string Whether a horizontal disk/dial is required \("horizontal"\) or a vertical one \("vertical"\) + __step__ value Initial step for incrementing or decrementing the value + __bindwheel__ value Step size for controlling the dial's value via the mouse wheel + __slow__ value Factor on the step size for incrementing or decrementing the value slowly + __fast__ value Factor on the step size for incrementing or decrementing the value fast + __scale__ value Scale value to be applied to the actual value + __callback__ command Command to be called when the value changes + __width__ pixels The width of the widget + __height__ pixels The height of the widget + __background__ color The background color of the widget \(coloring of the disk/dial\) + __foreground__ color The foreground color of the widget \(the marker lines\) All these widgets have the following methods: - __$widget__ get Return the current value or values shown in the widget - __$widget__ set *value* Reset the value or values shown in the widget\. If the widget is associated with a variable, that variable is set as well\. * value *double/list* New value or values for the widget Two further widgets are available, meant to display logical values: - __::controlwidget::led__ *w* *args* Create a LED\-like widget\. * widget *w* \(in\) Name of the widget to be created\. * arguments *args* \(in\) List of key\-value pairs, controlling the appearance and behaviour of the widget\. In addition to the ones given for the voltmeter widget: + __variable__ name Name of the variable to be associated with the LED + __size__ pixels Diameter of the LED widget + __on__ color Color to use for the "on" state + __off__ color Color to use for the "off" state - __::controlwidget::radioMatrix__ *w* *args* Create a matrix of radio buttons that behaves as a single widget\. * widget *w* \(in\) Name of the widget to be created\. * arguments *args* \(in\) List of key\-value pairs, controlling the appearance and behaviour of the widget\. In addition to the ones given for the voltmeter widget: + __variable__ name Name of the variable to be associated with the matrix + __orient__ string The way the radio buttons are to be arranged \(horizontal or vertical first\) + __rows__ integer Number of rows in the matrix + __columns__ integer Number of columns in the matrix + __command__ list Command associated with the radio buttons\. Invoked when the active radio button changes\. The LED widget has the following public methods: - __$led__ on Set the state to "on" - __$led__ off Set the state to "off" - __$led__ setstate *state* Set the state according to the value of "state" * state *boolean* \(in\) New state for the LED widget The radioMatrix widget has two public methods: - __$matrix__ get Return the index of the currently selected radio button - __$matrix__ set *index* Select the radio button with index "index" * index *integer* Index of the radio button to be set # ACKNOWLEDGMENTS The code for most of these widgets first appeared on the Wiki\. In many cases, Arjen Markus merely refactored the code a bit and "snitified" some of them\. The original code was developed by the following people: - Vertical meter, LED display, radio matrix: Ron Fox - Rotating dials: Gerhard Reithofer - Voltmeter and tachometer: Marco Maggi - Code for moving the needle: ? # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *controlwidget* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [controlling](\.\./\.\./\.\./\.\./index\.md\#controlling), [displaying](\.\./\.\./\.\./\.\./index\.md\#displaying), [numerical values](\.\./\.\./\.\./\.\./index\.md\#numerical\_values), [scale widget](\.\./\.\./\.\./\.\./index\.md\#scale\_widget) # COPYRIGHT Copyright © 2010 Ron Fox Copyright © 2010 Gerhard Reithofer <\.\.\.@\.\.\.> Copyright © 2010 Marco Maggi <\.\.\.@\.\.\.> Copyright © 2010 Arjen Markus Tk_Library_Source_Code/embedded/md/tklib/files/modules/crosshair000075500000000000000000000000001435605071100246765ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files/modules/crosshair/crosshair.md000064400000000000000000000145051435605071100273010ustar00nobodynobody [//000000001]: # (crosshair \- Crosshairs) [//000000002]: # (Generated from file 'crosshair\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (Copyright © 2003 Kevin Kenny) [//000000004]: # (Copyright © 2008 \(docs\) Andreas Kupries ) [//000000005]: # (Copyright © 2013 Frank Gover, Andreas Kupries) [//000000006]: # (crosshair\(n\) 1\.2\.1 tklib "Crosshairs")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME crosshair \- Crosshairs for Tk canvas # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [API](#section2) - [BUGS, IDEAS, FEEDBACK](#section3) - [Bugs, Ideas, Feedback](#section4) - [Keywords](#keywords) - [Copyright](#copyright) # SYNOPSIS package require Tcl ?8\.4? package require Tk ?8\.4? package require crosshair ?1\.2\.1? [__crosshair::crosshair__ *w* ?*arg*\.\.\.?](#1) [__crosshair::off__ *w*](#2) [__crosshair::configure__ *w* ?*arg*\.\.\.?](#3) [__crosshair::track__ __on__ *w* *cmdprefix*](#4) [__crosshair::track__ __off__ *w*](#5) [__crosshair::bbox\_add__ *w* *bbox*](#6) [__crosshair::bbox\_remove__ *token*](#7) # DESCRIPTION The __crosshair__ package provides commands to \(de\)activate and track crosshairs on canvas widgets\. # API The following commands are exported to the public: - __crosshair::crosshair__ *w* ?*arg*\.\.\.? This command activates the display of a pair of cross\-hairs for the canvas widget *w*\. The cross\-hairs track the pointing device\. The result of the command is the empty string\. All arguments after the widget *w* are treated as options as for a canvas line item in *w*\. Of particular interest are __\-fill__ and __\-dash__\. - __crosshair::off__ *w* This command removes the cross\-hairs from the canvas widget *w*\. Nothing is done if the widget had no cross\-hairs\. The result of the command is the empty string\. - __crosshair::configure__ *w* ?*arg*\.\.\.? This command changes the appearance of the cross\-hairs in the canvas widget *w*\. It is an error to call it for a canvas which has no cross\-hairs\. All arguments after the widget *w* are treated as options as for a canvas line item in *w*\. Of particular interest are __\-fill__ and __\-dash__\. The result of the command are the current configuration settings\. - __crosshair::track__ __on__ *w* *cmdprefix* This command activates reporting of the location of the cross\-hairs in the canvas widget *w*\. It is an error to use this command for a canvas which has no cross\-hairs\. The result of the command is the empty string\. After the invokation of this command the specified command prefix *cmdprefix* will be called whenever the mouse moves within the canvas, with 7 arguments\. These are, in order: 1. The widget *w* 1. The x\-location of the cross\-hairs, in pixels\. 1. The y\-location of the cross\-hairs, in pixels\. 1. The x\-location of the top\-left corner of the viewport, in pixels\. 1. The y\-location of the top\-left corner of the viewport, in pixels\. 1. The x\-location of the bottom\-right corner of the viewport, in pixels\. 1. The y\-location of the bottom\-right corner of the viewport, in pixels\. A previously existing callback for *w* will be disabled\. I\.e\. per canvas widget with cross\-hairs only one callback reporting their location is possible\. - __crosshair::track__ __off__ *w* This command disables the reporting of the location of the cross\-hairs in the canvas widget *w*\. It is an error to use this command for a canvas which has no cross\-hairs\. The result of the command is the empty string\. - __crosshair::bbox\_add__ *w* *bbox* This command adds a bounding box to the crosshairs for canvas *w*\. The crosshairs will only be active within that area\. The result of the command is a token with which the bounding box can be removed again, see __crosshair::bbox\_remove__ below\. The bounding box *bbox* is specified thorugh a list of 4 values, the lower left and upper right corners of the box\. The order of values in the list is: llx lly urx ury Note that this command can be used multiple times, each call adding one more bounding box\. In such a case the visible area is the *union* of all the specified bounding boxes\. - __crosshair::bbox\_remove__ *token* This command removes the bounding box specified by the *token* \(a result of __crosshair::bbox\_add__\) from the crosshairs for its canvas widget\. # BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *tklib :: crosshair* of the [Tcllib SF Trackers](http://sourceforge\.net/tracker/?group\_id=12883)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *crosshair* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [canvas](\.\./\.\./\.\./\.\./index\.md\#canvas), [cross\-hairs](\.\./\.\./\.\./\.\./index\.md\#cross\_hairs), [location](\.\./\.\./\.\./\.\./index\.md\#location), [tracking](\.\./\.\./\.\./\.\./index\.md\#tracking), [viewport](\.\./\.\./\.\./\.\./index\.md\#viewport) # COPYRIGHT Copyright © 2003 Kevin Kenny Copyright © 2008 \(docs\) Andreas Kupries Copyright © 2013 Frank Gover, Andreas Kupries Tk_Library_Source_Code/embedded/md/tklib/files/modules/ctext000075500000000000000000000000001435605071100240305ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files/modules/ctext/ctext.md000064400000000000000000000264271435605071100255730ustar00nobodynobody [//000000001]: # (ctext \- Ctext a text widget with highlighting support) [//000000002]: # (Generated from file 'ctext\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (Copyright © George Peter Staplin ) [//000000004]: # (ctext\(n\) 3\.3 tklib "Ctext a text widget with highlighting support")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME ctext \- Ctext a text widget with highlighting support # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [COMMANDS](#section2) - [HIGHLIGHTING](#section3) - [WIDGET COMMANDS](#section4) - [WIDGET OPTIONS](#section5) - [EXAMPLE](#section6) - [THANKS](#section7) - [Bugs, Ideas, Feedback](#section8) - [See Also](#seealso) - [Keywords](#keywords) - [Copyright](#copyright) # SYNOPSIS package require Tk package require ctext ?3\.3? [__ctext__ *pathName* ?*options*?](#1) [__::ctext::addHighlightClass__ *pathName* *class* *color* *keywordlist*](#2) [__::ctext::addHighlightClassWithOnlyCharStart__ *pathName* *class* *color* *char*](#3) [__::ctext::addHighlightClassForSpecialChars__ *pathName* *class* *color* *charstring*](#4) [__::ctext::addHighlightClassForRegexp__ *pathName* *class* *color* *pattern*](#5) [__::ctext::clearHighlightClasses__ *pathName*](#6) [__::ctext::getHighlightClasses__ *pathName*](#7) [__::ctext::deleteHighlightClass__ *pathName* *class*](#8) [__::ctext::enableComments__ *enable*](#9) [__::ctext::disableComments__ *enable*](#10) [*pathName* __highlight__ *startIndex* *endIndex*](#11) [*pathName* __fastdelete__ *index1* ?*index2*?](#12) [*pathName* __fastinsert__](#13) [*pathName* __copy__](#14) [*pathName* __cut__](#15) [*pathName* __paste__](#16) [*pathName* __append__](#17) [*pathName* __configure__ *option* *value* ?\.\.\.?](#18) # DESCRIPTION The __ctext__ package provides the ctext widget which is an enhanced text widget with support for configurable syntax highlighting and some extra commands\. Ctext overloads the text widget and provides new commands, named __highlight__, __copy__, __paste__,__cut__, __append__, and __edit__\. It also provides several commands that allow you to define classes\. Each class corresponds to a tag in the widget\. # COMMANDS - __ctext__ *pathName* ?*options*? Creates and configures a ctext widget\. # HIGHLIGHTING Highlighting is controlled with text widget tags, that are called highlight classes\. The *class* is a tag name and can be configured like any text widget tag\. Four types of highlight classes are supported\. All highlight classes are automatically used by the __highlight__ method of the widget\. - __::ctext::addHighlightClass__ *pathName* *class* *color* *keywordlist* Add a highlighting class *class* to the ctext widget *pathName*\. The highlighting will be done with the color *color*\. All words in the *keywordlist* will be highlighted\. # highlight some tcl keywords ::ctext::addHighlightClass .t tclkeywords red [list set info interp uplevel upvar] - __::ctext::addHighlightClassWithOnlyCharStart__ *pathName* *class* *color* *char* Add a highlighting class *class* to the ctext widget *pathName*\. The highlighting will be done with the color *color*\. All words starting with *char* will be highlighted\. ::ctext::addHighlightClassWithOnlyCharStart .t vars blue \$ - __::ctext::addHighlightClassForSpecialChars__ *pathName* *class* *color* *charstring* Add a highlighting class *class* to the ctext widget *pathName*\. The highlighting will be done with the color *color*\. All chars in *charstring* will be highlighted\. - __::ctext::addHighlightClassForRegexp__ *pathName* *class* *color* *pattern* Add a highlighting class *class* to the ctext widget *pathName*\. The highlighting will be done with the color *color*\. All text parts matching the regexp *pattern* will be highlighted\. - __::ctext::clearHighlightClasses__ *pathName* Remove all highlight classes from the widget *pathName*\. - __::ctext::getHighlightClasses__ *pathName* List all highlight classes for the widget *pathName*\. - __::ctext::deleteHighlightClass__ *pathName* *class* Delete the highlight class *class* from the widget *pathName* - __::ctext::enableComments__ *enable* Enable C comment highlighting\. The *class* for c\-style comments is __\_cComment__\. The C comment highlighting is disabled by default\. - __::ctext::disableComments__ *enable* Disable C comment highlighting\. # WIDGET COMMANDS Each ctext widget created with the above command supports the following commands and options in addition to the standard text widget commands and options\. - *pathName* __highlight__ *startIndex* *endIndex* Highlight the text between *startIndex* and *endIndex*\. - *pathName* __fastdelete__ *index1* ?*index2*? Delete text range without updating the highlighting\. Arguments are identical to the *pathName* __delete__ command inherited from the standard text widget\. - *pathName* __fastinsert__ Insert text without updating the highlighting\. Arguments are identical to the *pathName* __insert__ command inherited from the standard text widget\. - *pathName* __copy__ Call __tk\_textCopy__ for the ctext instance\. - *pathName* __cut__ Call __tk\_textCut__ for the ctext instance\. - *pathName* __paste__ Call __tk\_textPaste__ for the ctext instance\. - *pathName* __append__ Append the current selection to the clipboard\. - *pathName* __configure__ *option* *value* ?\.\.\.? Set the options for the ctext widget\. Each option name must be followed the new value\. # WIDGET OPTIONS - Command\-Line Switch: __\-linemap__ Database Name: ____ Database Class: ____ Creates \(\-linemap 1\) or deletes \(\-linemap 0\) a line number list on the left of the widget\. The default is to have a linemap displayed\. - Command\-Line Switch: __\-linemapfg__ Database Name: ____ Database Class: ____ Changes the foreground of the linemap\. The default is the same color as the main text widget\. - Command\-Line Switch: __\-linemapbg__ Database Name: ____ Database Class: ____ Changes the background of the linemap\. The default is the same color as the main text widget\. - Command\-Line Switch: __\-linemap\_select\_fg__ Database Name: ____ Database Class: ____ Changes the selected line foreground\. The default is black\. - Command\-Line Switch: __\-linemap\_select\_bg__ Database Name: ____ Database Class: ____ Changes the selected line background\. The default is yellow\. - Command\-Line Switch: __\-linemap\_mark\_command__ Database Name: ____ Database Class: ____ Calls a procedure or command with the *pathName* of the ctext window, the *type* which is either __marked__ or __unmarked__, and finally the line number selected\. The proc prototype is: proc linemark_cmd {win type line}. See also ctext\_test\_interactive\.tcl - Command\-Line Switch: __\-highlight__ Database Name: ____ Database Class: ____ Takes a boolean value which defines whether or not to highlight text which is inserted or deleted\. The default is 1\. - Command\-Line Switch: __\-linemap\_markable__ Database Name: ____ Database Class: ____ Takes a boolean value which specifies whether or not lines in the linemap are markable with the mouse\. The default is 1\. # EXAMPLE package require Tk package require ctext proc main {} { pack [frame .f] -fill both -expand 1 pack [scrollbar .f.s -command {.f.t yview}] -side right -fill y pack [ctext .f.t -bg black -fg white -insertbackground yellow -yscrollcommand {.f.s set}] -fill both -expand 1 ctext::addHighlightClass .f.t widgets purple [list ctext button label text frame toplevel scrollbar checkbutton canvas listbox menu menubar menubutton radiobutton scale entry message tk_chooseDir tk_getSaveFile tk_getOpenFile tk_chooseColor tk_optionMenu] ctext::addHighlightClass .f.t flags orange [list -text -command -yscrollcommand -xscrollcommand -background -foreground -fg -bg -highlightbackground -y -x -highlightcolor -relief -width -height -wrap -font -fill -side -outline -style -insertwidth -textvariable -activebackground -activeforeground -insertbackground -anchor -orient -troughcolor -nonewline -expand -type -message -title -offset -in -after -yscroll -xscroll -forward -regexp -count -exact -padx -ipadx -filetypes -all -from -to -label -value -variable -regexp -backwards -forwards -bd -pady -ipady -state -row -column -cursor -highlightcolors -linemap -menu -tearoff -displayof -cursor -underline -tags -tag] ctext::addHighlightClass .f.t stackControl red {proc uplevel namespace while for foreach if else} ctext::addHighlightClassWithOnlyCharStart .f.t vars mediumspringgreen "\$" ctext::addHighlightClass .f.t variable_funcs gold {set global variable unset} ctext::addHighlightClassForSpecialChars .f.t brackets green {[]{}} ctext::addHighlightClassForRegexp .f.t paths lightblue {\.[a-zA-Z0-9\_\-]+} ctext::addHighlightClassForRegexp .f.t comments khaki {#[^\n\r]*} .f.t fastinsert end [info body main] pack [frame .f1] -fill x .f.t highlight 1.0 end pack [button .f1.exit -text Exit -command exit] -side left pack [entry .e] -side bottom -fill x .e insert end "ctext::deleteHighlightClass .f.t " bind .e {eval [.e get]} } main Further examples are in the source package for ctext\. # THANKS Kevin Kenny, Neil Madden, Jeffrey Hobbs, Richard Suchenwirth, Johan Bengtsson, Mac Cody, Günther, Andreas Sievers, and Michael Schlenker\. # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *ctext* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # SEE ALSO [re\_syntax](\.\./\.\./\.\./\.\./index\.md\#re\_syntax), [text](\.\./\.\./\.\./\.\./index\.md\#text) # KEYWORDS [syntax highlighting](\.\./\.\./\.\./\.\./index\.md\#syntax\_highlighting), [text](\.\./\.\./\.\./\.\./index\.md\#text), [widget](\.\./\.\./\.\./\.\./index\.md\#widget) # COPYRIGHT Copyright © George Peter Staplin Tk_Library_Source_Code/embedded/md/tklib/files/modules/cursor000075500000000000000000000000001435605071100242165ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files/modules/cursor/cursor.md000064400000000000000000000052211435605071100261340ustar00nobodynobody [//000000001]: # (cursor \- Tk cursor routines) [//000000002]: # (Generated from file 'cursor\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (Copyright © Jeffrey Hobbs ) [//000000004]: # (cursor\(n\) 0\.3\.1 tklib "Tk cursor routines")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME cursor \- Procedures to handle CURSOR data # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [COMMANDS](#section2) - [Bugs, Ideas, Feedback](#section3) - [See Also](#seealso) - [Keywords](#keywords) - [Copyright](#copyright) # SYNOPSIS package require Tk package require cursor ?0\.3\.1? [__::cursor::propagate__ *widget* *cursor*](#1) [__::cursor::restore__ *widget* ?*cursor*?](#2) [__::cursor::display__ ?*parent*?](#3) # DESCRIPTION The __cursor__ package provides commands to handle Tk cursors\. # COMMANDS The following commands are available: - __::cursor::propagate__ *widget* *cursor* Sets the cursor for the specified *widget* and all its descendants to *cursor*\. - __::cursor::restore__ *widget* ?*cursor*? Restore the original or previously set cursor for the specified *widget* and all its descendants\. If *cursor* is specified, that will be used if on any widget that did not have a preset cursor \(set by a previous call to __::cursor::propagate__\)\. - __::cursor::display__ ?*parent*? Pops up a dialog with a listbox containing all the cursor names\. Selecting a cursor name will display it in that dialog\. This is simply for viewing any available cursors on the platform\. # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *cursor* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # SEE ALSO Tk\_GetCursor\(3\), cursors\(n\), options\(n\) # KEYWORDS [cursor](\.\./\.\./\.\./\.\./index\.md\#cursor) # COPYRIGHT Copyright © Jeffrey Hobbs Tk_Library_Source_Code/embedded/md/tklib/files/modules/datefield000075500000000000000000000000001435605071100246225ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files/modules/datefield/datefield.md000064400000000000000000000073321435605071100271510ustar00nobodynobody [//000000001]: # (datefield \- Tk datefield widget) [//000000002]: # (Generated from file 'datefield\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (Copyright © Keith Vetter ) [//000000004]: # (Copyright © Thomas Wunderlich ) [//000000005]: # (datefield\(n\) 0\.3 tklib "Tk datefield widget")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME datefield \- Tk datefield widget # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [COMMANDS](#section2) - [OPTIONS](#section3) - [EXAMPLE](#section4) - [Bugs, Ideas, Feedback](#section5) - [See Also](#seealso) - [Keywords](#keywords) - [Category](#category) - [Copyright](#copyright) # SYNOPSIS package require Tk package require datefield ?0\.3? [__::datefield::datefield__ *widgetpath* ?*options*?](#1) [*\-format*](#2) # DESCRIPTION The __datefield__ package provides the datefield widget which is an enhanced text entry widget for the purpose of date entry\. There are three valid formats for the dates which can be entered: 1. English form MM/DD/YYYY using *\-format "%m/%d/%Y"* \(default\) 1. German form DD\.MM\.YYYY using *\-format "%d\.%m\.%Y"* 1. ISO form YYYY\-MM\-DD using *\-format "%Y\-%m\-%d"* The datefield widget is, in fact, just an entry widget with specialized bindings\. This means all the command and options for an entry widget apply equally here\. # COMMANDS - __::datefield::datefield__ *widgetpath* ?*options*? Creates and configures a date field widget\. # OPTIONS - *\-format* One of "%m/%d/%Y" \(English, default if option left\), "%d\.%m\.%Y" \(German\), or "%Y\-%m\-%d" \(ISO\)\. See the __[entry](\.\./\.\./\.\./\.\./index\.md\#entry)__ manual entry for details on all remaining/available options\. # EXAMPLE package require datefield wm title . "Datefield example" proc DayOfWeek {args} { set now [clock scan $::myDate] set ::myDate2 [clock format $now -format %A] } trace variable myDate w DayOfWeek ::datefield::datefield .df -textvariable myDate -format "%m/%d/%Y" label .l1 -text "Enter a date:" -anchor e label .l2 -text "That date is a:" -anchor e label .l3 -textvariable myDate2 -relief sunken -width 12 grid .l1 .df -sticky ew grid .l2 .l3 -sticky ew focus .df # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *datefield* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # SEE ALSO clock\(n\), entry\(n\) # KEYWORDS [clock](\.\./\.\./\.\./\.\./index\.md\#clock), [date](\.\./\.\./\.\./\.\./index\.md\#date), [dateentry](\.\./\.\./\.\./\.\./index\.md\#dateentry), [entry](\.\./\.\./\.\./\.\./index\.md\#entry), [widget](\.\./\.\./\.\./\.\./index\.md\#widget) # CATEGORY Widget # COPYRIGHT Copyright © Keith Vetter Copyright © Thomas Wunderlich Tk_Library_Source_Code/embedded/md/tklib/files/modules/diagrams000075500000000000000000000000001435605071100244705ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files/modules/diagrams/diagram.md000064400000000000000000003374071435605071100265130ustar00nobodynobody [//000000001]: # (diagram \- Documentation toolbox) [//000000002]: # (Generated from file 'diagram\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (diagram\(n\) 0\.3 tklib "Documentation toolbox")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME diagram \- Diagram drawing # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [API](#section2) - [Class API](#subsection1) - [Object API](#subsection2) - [Language Reference](#section3) - [Elements](#subsection3) - [Attributes](#subsection4) - [Corners](#subsection5) - [Named directions](#subsection6) - [Miscellaneous Commands](#subsection7) - [Variables](#subsection8) - [Diagram Classes](#section4) - [References](#section5) - [Bugs, Ideas, Feedback](#section6) - [Keywords](#keywords) - [Category](#category) # SYNOPSIS package require Tcl 8\.5 package require Tk 8\.5 package require diagram 1 [__::diagram__ *objectName* *canvas* ?*script*?](#1) [*diagramObject* __new direction__ *name* ?*key* *value*\.\.\.?](#2) [*diagramObject* __new element__ *name* *attributes* *cmdprefix*](#3) [*diagramObject* __new alias__ *name* *cmdprefix*](#4) [*diagramObject* __new command__ *name* *arguments* *body*](#5) [*diagramObject* __new attribute__ *name* ?*key* *value*\.\.\.?](#6) [*diagramObject* __unknown attribute__ *cmdprefix*](#7) [*diagramObject* __draw__ *script*](#8) [__[arc](\.\./\.\./\.\./\.\./index\.md\#arc)__ *attr*\.\.\.](#9) [__[arrow](\.\./\.\./\.\./\.\./index\.md\#arrow)__ *attr*\.\.\.](#10) [__\-\->__ *attr*\.\.\.](#11) [__<\-\->__ *attr*\.\.\.](#12) [__<\-\->__ *attr*\.\.\.](#13) [__block__ *script* *attr*\.\.\.](#14) [__[box](\.\./\.\./\.\./\.\./index\.md\#box)__ *attr*\.\.\.](#15) [__[circle](\.\./\.\./\.\./\.\./index\.md\#circle)__ *attr*\.\.\.](#16) [__O__ *attr*\.\.\.](#17) [__[diamond](\.\./\.\./\.\./\.\./index\.md\#diamond)__ *attr*\.\.\.](#18) [__<>__ *attr*\.\.\.](#19) [__[drum](\.\./\.\./\.\./\.\./index\.md\#drum)__ *attr*\.\.\.](#20) [__[ellipse](\.\./\.\./\.\./\.\./index\.md\#ellipse)__ *attr*\.\.\.](#21) [__[line](\.\./\.\./\.\./\.\./index\.md\#line)__ *attr*\.\.\.](#22) [__\-\-__ *attr*\.\.\.](#23) [__[move](\.\./\.\./\.\./\.\./index\.md\#move)__ *attr*](#24) [__[spline](\.\./\.\./\.\./\.\./index\.md\#spline)__ *attr*\.\.\.](#25) [__[text](\.\./\.\./\.\./\.\./index\.md\#text)__ *attr*\.\.\.](#26) [__west__](#27) [__w__](#28) [__left__](#29) [__l__](#30) [__south__](#31) [__s__](#32) [__down__](#33) [__bottom__](#34) [__bot__](#35) [__b__](#36) [__east__](#37) [__e__](#38) [__right__](#39) [__r__](#40) [__north__](#41) [__n__](#42) [__up__](#43) [__top__](#44) [__t__](#45) [__northwest__](#46) [__nw__](#47) [__up\-left__](#48) [__upleft__](#49) [__leftup__](#50) [__northeast__](#51) [__ne__](#52) [__up\-right__](#53) [__upright__](#54) [__rightup__](#55) [__southwest__](#56) [__sw__](#57) [__down\-left__](#58) [__downleft__](#59) [__leftdown__](#60) [__southeast__](#61) [__se__](#62) [__down\-right__](#63) [__downright__](#64) [__rightdown__](#65) [*number* __cm__](#66) [*number* __mm__](#67) [*number* __inch__](#68) [*number* __pt__](#69) [*number* *number*](#70) [__by__ *distance* *direction*](#71) [*point1* __\+__ *point2*](#72) [*point1* __\-__ *point2*](#73) [*point* __by__ *distance* *direction*](#74) [*point1* __|__ *point2*](#75) [*n* __between__ *poin1* *point2*](#76) [__intersect__ *elem1* *elem2*](#77) [*element* __names__ ?*pattern*?](#78) [*element* *corner*](#79) [*element* *corner1* *corner2*\.\.\.](#80) [*element* ?*corner1*\.\.\. ?__names__ ?*pattern*??\]?](#81) [____n__th__ ?*corner*?](#82) [____n__th__ __last__ ?*corner*?](#83) [____n__th__ *shape* ?*corner*?](#84) [____n__th__ __last__ *shape* ?*corner*?](#85) [__last__ ?*corner*?](#86) [__last__ *shape* ?*corner*?](#87) [__1st__](#88) [__2nd__](#89) [__3rd__](#90) # DESCRIPTION Welcome to __diagram__, a package for the easy construction of diagrams \(sic\), i\.e\. 2D vector graphics, sometimes also called *pictures*\. Note that this package is not a replacement for __[Tk](\.\./\.\./\.\./\.\./index\.md\#tk)__'s canvas, but rather a layer sitting on top of it, to make it easier to use\. In other words, using the canvas as the core graphics engine __diagram__ abstracts away from the minutiae of handling coordinates to position and size the drawn elements, allowing the user to concentrate on the content of the diagram instead\. This is similar to Brian Kernighan's PIC language for troff, which is the spiritual ancestor of this package\. This document contains the reference to the API and drawing \(language\) commands\. Its intended audience are users of the package wishing to refresh their memory\. Newcomers should read the *Diagram Language Tutorial* first\. Developers wishing to work on the internals of the package and its supporting packages should look at section [Diagram Classes](#section4) first, and then the comments in the sources of the packages itself\. In the remainder of the document we first describe the APIs of the diagram class and its instances, followed by the language reference for the drawing language itself\. # API ## Class API The package exports the API described here\. - __::diagram__ *objectName* *canvas* ?*script*? The command creates a new instance of a diagram controller and returns the fully qualified name of the object command as its result\. The new instance is connected to the specified *canvas* object, which is used as the diagrams graphics engine\. This is usually an instance of Tk's canvas, however any object which is API compatible to Tk's canvas can be used here\. The API of this object command is described in the following section, [Object API](#subsection2)\. It may be used to invoke various operations on the object\. If the *script* argument is specified then method __draw__ will be invoked on it\. ## Object API Instances of the diagram class support the following methods: - *diagramObject* __new direction__ *name* ?*key* *value*\.\.\.? This method defines a new named direction and its attributes\. The latter is given through the *key*/*value* pairs coming after the *name*\. Users are mostly free to specify arbitrary attributes with whatever meaning they desire\. The exception are the names *angle* and *opposite*\. They are special to the diagram package and have a fixed meaning\. * angle This attribute specifies the angle of the direction in degrees, where 0 points east \(to the right\) and 90 points north \(up\)\. * opposite This attribute specifies the name of the direction which should be considered as complementary to the named one\. - *diagramObject* __new element__ *name* *attributes* *cmdprefix* This method defines a new graphics element for the drawing language\. I\.e\. *name* will become a new command in the language, and the specified command prefix \(*cmdprefix*\) will be called to perform the actual drawing\. *attributes* specifies the set of attributes for which data has to be available\. I\.e\. the system will run the \.\.\.\-callbacks for these attributes\. See the method __new attribute__ for more information on attribute definitions\. The command prefix is expected to conform to the following signature: * __cmdprefix__ *canvas* *attributes* Where *canvas* is the handle of the canvas widget to draw to, and *attributes* is a dictionary holding the attributes for the element, be they user\-specified, or defaults\. The results of the command has to be a list containing at least two and at most four items\. These are, in order: 1. The list of canvas items the drawn element consists of\. 1. The dictionary of named locations in the element, its *corners*\. 1. An optional mode, either "relative" or "absolute"\. When not returned "relative" is assumed\. In the case of a relative element position the attributes "with" and "at" are used to determine the final position of the new element\. 1. An optional name of a direction\. If not the empty string this is handed to the automatic layouter as the new direction to follow\. - *diagramObject* __new alias__ *name* *cmdprefix* This method defines a new command for the drawing language\. I\.e\. *name* will become a new command in the language, and the specified command prefix \(*cmdprefix*\) will be called on use of this new command\. Any arguments given to the command are simply passed to the prefix\. There is no fixed siganture\. Note that the prefix is run in the context of the drawing language, allowing the direct use of any existing commands\. - *diagramObject* __new command__ *name* *arguments* *body* This is like __new alias__ except that the new command is defined as a procedure in the language's context, with regular argument list and body\. - *diagramObject* __new attribute__ *name* ?*key* *value*\.\.\.? This method defines a new named attribute which can be used by graphical elements\. The handling of the attribute by the processor is declared through the *key*/*value* pairs coming after the *name*\. The accepted keys and their meanings are: * __key__ The value of this key is the name of the key under which the attribute's value shall be stored in the attribute dictionary given to the drawing command after attribute processing is complete\. This key is optional\. If it is not specified it defaults to the name of the attribute\. * __get__ The value of this key is a command prefix which will be invoked to retrieve the attribute's argument\(s\) from the command line\. This key is optional\. If it is not specified a default is used which takes the single word after the attribute name as the attribute's value\. The signature of the command prefix is + __cmdprefix__ *wordqueue* Where *wordqueue* is the handle of a queue object conforming to the API of the queues provided by package __struct::queue__\. This queue contains the not\-yet\-processed part of the attribute definitions, with one entry per word, with the first entry the word *after* name of the attribute\. In other words, the attribute's name has already been removed from the queue\. The result of the command is the value of the attribute, which may have been taken from the queue, or not\. * __transform__ The value of this key is a command prefix which will be invoked to transform the retrieved value \(See __get__\) into their final form\. This key is optional\. If it is not specified no transformation is done\. The signature of the command prefix is + __cmdprefix__ *value* Where *value* is the value to transform\. The result of the command is the final value of the attribute\. * __type__ The value of this key is a command prefix which will be invoked to validate the attribute's argument\(s\)\. This key is optional\. If it is not specified no validation is done\. The signature of the command prefix is that of snit validation types\. See the documentation of the __[snit](\.\./\.\./\.\./\.\./index\.md\#snit)__ package\. * __merge__ The value of this key is a command prefix which will be invoked to insert the transformed and validated attribute value into the dictionary of collected attributes\. This key is optional\. If it is not specified a default merge is chosen, based on the data for key __aggregate__, see below\. The signature of the command prefix is + __cmdprefix__ *value* *dict* Where *value* is the value to insert, and *dict* the dictionary of attributes and values collected so far\. The result of the command is the new dictionary of attributes\. * __aggregate__ The value of this key is a boolean flag\. It has an effect if and only if the key __merge__ was not specified\. This key is optional\. If it is not specified it defaults to __False__\. If the key is effective, the value of __False__ means that the attribute's value is *set* into the dictionary using the value of key *key* \(see above\) as index, *overwriting* any previously specified value\. If the key is effective, the value of __True__ means that the attribute's value is *added* to the dictionary using the value of key *key* \(see above\) as index, *extending* any previously specified value\. This means that the final value of the attribute as seen after processing will be a list of the collected values\. * __default__ The value of this key is a command prefix which will be invoked after collection of attributes has been completed and this attribute is in the list of required attributes for the drawing element \(See argument *attributes* of method __new element__\)\. Note that the connection is made through the value of key *key*, not through the attribute name per se\. Further note that this command prefix is invoked even if a user specified attribute value is present\. This allows the command to go beyond simply setting defaults, it can calculate and store derived values as well\. This key is optional\. If an element requires this attribute, but *default* is not specified then nothing will be done\. The signature of the command prefix is + __cmdprefix__ __init__ This method is run when the attribute is defined, its responsibility is to initialize anything in the language namespace for the attribute and default processing\. The result of this method is ignored\. + __cmdprefix__ __fill__ *varname* This method is run to put defaults, or derived values into the attribute dictionary named by *varname*\. This variable will be found in the calling context\. The result of this method is ignored\. + __cmdprefix__ __set__ *name* *value* This method is run to push current a attribute value into the language namespace, to make it the new default\. The result of this method is ignored\. * __linked__ This key is effective if and only if key __default__ is not specified\. In that case is supplies a default handling for __default__, linking the attribute to a variable in the language context\. The value for this key is a 2\-element list containing the name of the variable to link to, and its initial value, in this order\. - *diagramObject* __unknown attribute__ *cmdprefix* This method registers the command prefix with the subsystem processing the attributes for element commands, telling it to call it when it encounters an attribute it is unable to handle on its on\. It is allowed to register more than callback, these will be called in order of registration \(i\.e\. first to last\), until one of the callbacks accepts the current input\. The command prefix is expected to conform to the following signature: * __cmdprefix__ *wordqueue* Where *wordqueue* is the handle of a queue object conforming to the API of the queues provided by package __struct::queue__\. This queue contains the not\-yet\-processed part of the attribute definitions, with one entry per word, with the first entry the name of the attribute which could not be processed\. The results of the command has to be a boolean value where __True__ signals that this callback has accepted the attribute, processed it, and the new state of the *wordqueue* is where the general processing shall continue\. Given the signature the command has basically two ways of handling \(rewriting\) the attributes it recognizes: 1. Replace the attribute \(and arguments\) with a different attribute and arguments\. 1. Push additional words in front to get the general processing unstuck\. - *diagramObject* __draw__ *script* This method runs the given *script* in the context of the drawing language definitions\. See section [Language Reference](#section3) for details on the available commands\. *Note* that *script* is *trusted*\. It is executed in the current interpreter with access to its full abilities\. For the execution of untrusted diagram scripts this interpreter should be a safe one\. # Language Reference ## Elements This section lists the commands for the predefined drawing elements, aka shapes\. These commands are all defined in the language's context\. All commands of this section return the handle of the newly created element as their result\. This handle also exists as a command which can be used to query the element for its corners \(names, values\)\. See section [Miscellaneous Commands](#subsection7)\. ![](\.\./\.\./\.\./\.\./image/figure\-02\-basic\-shapes\.png) - __[arc](\.\./\.\./\.\./\.\./index\.md\#arc)__ *attr*\.\.\. ![](\.\./\.\./\.\./\.\./image/figure\-02\-arc\.png) An open element with the corresponding corners, i\.e\. "start", "end", and "center"\. Note however that it also has the compass rose of closed elements as its corners, with the center of the arc's circle as the center of the compass and the other points on the circle the arc is part of\. It handles the attributes * __anchor__ *name* * __ljust__ * __rjust__ * __above__ * __below__ ![](\.\./\.\./\.\./\.\./image/figure\-22\-text\-anchoring\-3\.png) Specifies the anchor of the text which is to be placed at the element's center, by name\. I\.e\. this attribute defines the text's position relative to the element's center\. The value is ignored if no text was specified for the element\. If not specified the system falls back to the value taken from the language variable __anchor__, which itself defaults to __center__\. The legal values are all those accepted by [Tk\_GetAnchor](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetAnchor\.htm)\. The commands without arguments are all shorthands with the anchor implied\. Note that they do not combine, only the last is used\. For comined directions the main attribute command, __anchor__ has to be used\. + __ljust__ "anchor west" + __rjust__ "anchor east" + __above__ "anchor south" + __below__ "anchor north" * __clockwise__ * __cw__ Specifies the direction of the __[arc](\.\./\.\./\.\./\.\./index\.md\#arc)__ element, here going clockwise\. The complementary attribute is __counterclockwise__\. If not specified the system falls back to the value taken from the language variable __clockwise__, which itself defaults to __false__, for counter\-clockwise direction\. * __color__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-21\-style\-colors\.png) Specifies the color used to draw the lines of the element\. If not specified the system falls back to the value taken from the language variable __linecolor__, which itself defaults to __black__\. * __counterclockwise__ * __ccw__ Specifies the direction of the __[arc](\.\./\.\./\.\./\.\./index\.md\#arc)__ element, here counter\-clockwise\. The complementary attribute is __clockwise__\. If not specified the system falls back to the value taken from the language variable __clockwise__, which itself defaults to __false__, for counter\-clockwise direction\. * __fillcolor__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-21\-style\-colors\.png) Specifies the color used to draw the inside of the element\. If not specified the system falls back to the value taken from the language variable __fillcolor__, which itself defaults to the empty string, signaling "no filling"\. * __from__ *location* Specifies the location where the __[arc](\.\./\.\./\.\./\.\./index\.md\#arc)__ element begins\. Defaults to the current location as maintained by the layouting system\. * __justify__ __left__|__center__|__right__ Specifies how multi\-line text associated with the element is positioned within its box\. The value is ignored if no text was specified for the element\. If not specified the system falls back to the value taken from the language variable __justify__, which itself defaults to __left__\. The legal values are __left__, __right__, and __center__\. * __radius__ *length* Specifies the radius of the __[arc](\.\./\.\./\.\./\.\./index\.md\#arc)__ element, or rather, the radius of the circle the shown arc is a part of\. If not specified the system falls back to the value taken from the language variable __arcradius__, which itself defaults to the pixel equivalent of __1 cm__\. * __stroke__ *width* ![](\.\./\.\./\.\./\.\./image/figure\-20\-style\-stroke\.png) Specifies the width of the lines drawn for the the element, in pixels\. If not specified the system falls back to the value taken from the language variable __linewidth__, which itself defaults to __1__\. * __style__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-18\-style\-dash\.png) Specifies the style used to draw the lines of the element\. If not specified the system falls back to the value taken from the language variable __linestyle__, which itself defaults to __solid__ lines\. The legal values are all those accepted by [Tk\_GetDash](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetDash\.htm), and additionally all which are listed below: + __solid__, empty string Draw solid line\. + __dash__, __dashed__, __\-__ Draw a dashed line\. + __dot__, __dotted__, __\.__ Draw a dotted line\. + __dash\-dot__, __\-\.__ Draw a dash\-dotted line + __dash\-dot\-dot__, __\-\.\.__ Draw a dash\-dot\-dotted line\. Note that the values "solid", "dot\(ted\)", "dash\(ed\)", "dash\-dot", and "dash\-dot\-dot" are all accepted as shorthands for the __style__ command using them as argument\. * __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ *string* Specifies the text to associate with the element\. Defaults to nothing\. When specified multiple times the actually shown text is the concatenation of the individual strings, vertically stacked, with the first string specified being the topmost element\. * __textcolor__ *spec* Specifies the color used to draw the text of an element with\. Ignored if there is no text\. If not specified the system falls back to the value taken from the language variable __textcolor__, which itself defaults to __black__\. * __textfont__ *spec* Specifies the font used to draw the text of an element with\. Ignored if there is no text\. If not specified the system falls back to the value taken from the language variable __textfont__, which itself defaults to __Helvetica 12pt__\. * __to__ *location* Specifies the location where the __[arc](\.\./\.\./\.\./\.\./index\.md\#arc)__ element ends\. Defaults to a location such that a 90\-degree arc is drawn in the chosen direction, starting at __from__\. - __[arrow](\.\./\.\./\.\./\.\./index\.md\#arrow)__ *attr*\.\.\. - __\-\->__ *attr*\.\.\. - __<\-\->__ *attr*\.\.\. - __<\-\->__ *attr*\.\.\. ![](\.\./\.\./\.\./\.\./image/figure\-02\-arrow\.png) An alias for the __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ element \(see below\), with the attribute __arrowhead__ preset to __\->__, __<\->__, or __<\-__\. The __[arrow](\.\./\.\./\.\./\.\./index\.md\#arrow)__ is equivalent to __\-\->__\. - __block__ *script* *attr*\.\.\. A closed element with the corresponding corners, i\.e\. the eight directions of the compass rose, and "center"\. The main effect is the aggregration of all elements created by the *script* into one element\. This also means that while the elements created by the script are visible in the element history while the script is executing, afterward the history contains only the block itself, and not the elements it is composed of\. The script has access to the current state of all variables in the language context\. Any changes to the variables will be reverted after execution of the block\. However, also, any variables set in the script will be exported as corners of the element, allowing users to define their own named locations in the block\. Regarding the layout mechanism any changes made by the script are reverted after the element is done\. In other words, a block is an implicit __group__\. Blocks handle all attributes, propgating their settings into the script as the default values active during script execution\. - __[box](\.\./\.\./\.\./\.\./index\.md\#box)__ *attr*\.\.\. ![](\.\./\.\./\.\./\.\./image/figure\-02\-box\.png) A closed element with the corresponding corners, i\.e\. the eight directions of the compass rose, and "center"\. It handles the attributes * __anchor__ *name* * __ljust__ * __rjust__ * __above__ * __below__ ![](\.\./\.\./\.\./\.\./image/figure\-22\-text\-anchoring\-3\.png) Specifies the anchor of the text which is to be placed at the element's center, by name\. I\.e\. this attribute defines the text's position relative to the element's center\. The value is ignored if no text was specified for the element\. If not specified the system falls back to the value taken from the language variable __anchor__, which itself defaults to __center__\. The legal values are all those accepted by [Tk\_GetAnchor](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetAnchor\.htm)\. The commands without arguments are all shorthands with the anchor implied\. Note that they do not combine, only the last is used\. For comined directions the main attribute command, __anchor__ has to be used\. + __ljust__ "anchor west" + __rjust__ "anchor east" + __above__ "anchor south" + __below__ "anchor north" * __at__ *location* Specifies the location of the element's corner named by the attribute __with__\. Defaults to the current location as maintained by the layouting system\. * __color__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-21\-style\-colors\.png) Specifies the color used to draw the lines of the element\. If not specified the system falls back to the value taken from the language variable __linecolor__, which itself defaults to __black__\. * __fillcolor__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-21\-style\-colors\.png) Specifies the color used to draw the inside of the element\. If not specified the system falls back to the value taken from the language variable __fillcolor__, which itself defaults to the empty string, signaling "no filling"\. * __height__ *length* * __ht__ *length* Specifies the height of the element\. If not specified the system falls back to the value taken from the language variable __boxheight__, which itself defaults to the pixel equivalent of __2 cm__\. * __justify__ __left__|__center__|__right__ Specifies how multi\-line text associated with the element is positioned within its box\. The value is ignored if no text was specified for the element\. If not specified the system falls back to the value taken from the language variable __justify__, which itself defaults to __left__\. The legal values are __left__, __right__, and __center__\. * __slant__ *angle* Specifies the angle by which the __[box](\.\./\.\./\.\./\.\./index\.md\#box)__ element is slanted, in degrees\. If not specified the system falls back to the value taken from the language variable __slant__, which itself defaults to __90__, i\.e\. vertical, no slant\. 0 degrees is slanting straight east, pointing to the right\. 90 degrees is slanting to the north, pointing straight up\. * __stroke__ *width* ![](\.\./\.\./\.\./\.\./image/figure\-20\-style\-stroke\.png) Specifies the width of the lines drawn for the the element, in pixels\. If not specified the system falls back to the value taken from the language variable __linewidth__, which itself defaults to __1__\. * __style__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-18\-style\-dash\.png) Specifies the style used to draw the lines of the element\. If not specified the system falls back to the value taken from the language variable __linestyle__, which itself defaults to __solid__ lines\. The legal values are all those accepted by [Tk\_GetDash](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetDash\.htm), and additionally all which are listed below: + __solid__, empty string Draw solid line\. + __dash__, __dashed__, __\-__ Draw a dashed line\. + __dot__, __dotted__, __\.__ Draw a dotted line\. + __dash\-dot__, __\-\.__ Draw a dash\-dotted line + __dash\-dot\-dot__, __\-\.\.__ Draw a dash\-dot\-dotted line\. Note that the values "solid", "dot\(ted\)", "dash\(ed\)", "dash\-dot", and "dash\-dot\-dot" are all accepted as shorthands for the __style__ command using them as argument\. * __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ *string* Specifies the text to associate with the element\. Defaults to nothing\. When specified multiple times the actually shown text is the concatenation of the individual strings, vertically stacked, with the first string specified being the topmost element\. * __textcolor__ *spec* Specifies the color used to draw the text of an element with\. Ignored if there is no text\. If not specified the system falls back to the value taken from the language variable __textcolor__, which itself defaults to __black__\. * __textfont__ *spec* Specifies the font used to draw the text of an element with\. Ignored if there is no text\. If not specified the system falls back to the value taken from the language variable __textfont__, which itself defaults to __Helvetica 12pt__\. * __width__ *length* * __wid__ *length* Specifies the width of the element\. If not specified the system falls back to the value taken from the language variable __boxwidth__, which itself defaults to the pixel equivalent of __2 cm__\. * __with__ *corner* Specifies the corner of the element to place at the location given by the attribute __at__\. Defaults to the current corner as maintained by the layouting system, except if the value for __at__ was specified by the user\. In that case it defaults to __center__\. - __[circle](\.\./\.\./\.\./\.\./index\.md\#circle)__ *attr*\.\.\. - __O__ *attr*\.\.\. ![](\.\./\.\./\.\./\.\./image/figure\-02\-circle\.png) A closed element with the corresponding corners, i\.e\. the eight directions of the compass rose, and "center"\. It handles the attributes * __anchor__ *name* * __ljust__ * __rjust__ * __above__ * __below__ ![](\.\./\.\./\.\./\.\./image/figure\-22\-text\-anchoring\-3\.png) Specifies the anchor of the text which is to be placed at the element's center, by name\. I\.e\. this attribute defines the text's position relative to the element's center\. The value is ignored if no text was specified for the element\. If not specified the system falls back to the value taken from the language variable __anchor__, which itself defaults to __center__\. The legal values are all those accepted by [Tk\_GetAnchor](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetAnchor\.htm)\. The commands without arguments are all shorthands with the anchor implied\. Note that they do not combine, only the last is used\. For comined directions the main attribute command, __anchor__ has to be used\. + __ljust__ "anchor west" + __rjust__ "anchor east" + __above__ "anchor south" + __below__ "anchor north" * __at__ *location* Specifies the location of the element's corner named by the attribute __with__\. Defaults to the current location as maintained by the layouting system\. * __color__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-21\-style\-colors\.png) Specifies the color used to draw the lines of the element\. If not specified the system falls back to the value taken from the language variable __linecolor__, which itself defaults to __black__\. * __diameter__ *length* * __diam__ *length* Specifies the diameter of the __[circle](\.\./\.\./\.\./\.\./index\.md\#circle)__ element, as an alternative way to specify its __radius__\. Effective if and only if the radius was not specified\. I\.e\. if both diameter and radius are specified then the radius infomration has precendence\. This attribute has no default, because the defaults are taken from the radius\. * __fillcolor__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-21\-style\-colors\.png) Specifies the color used to draw the inside of the element\. If not specified the system falls back to the value taken from the language variable __fillcolor__, which itself defaults to the empty string, signaling "no filling"\. * __justify__ __left__|__center__|__right__ Specifies how multi\-line text associated with the element is positioned within its box\. The value is ignored if no text was specified for the element\. If not specified the system falls back to the value taken from the language variable __justify__, which itself defaults to __left__\. The legal values are __left__, __right__, and __center__\. * __radius__ *length* * __rad__ *length* Specifies the radius of the __[circle](\.\./\.\./\.\./\.\./index\.md\#circle)__ element\. If not specified the system falls back to the value taken from the language variable __circleradius__, which itself defaults to the pixel equivalent of __1 cm__\. * __stroke__ *width* ![](\.\./\.\./\.\./\.\./image/figure\-20\-style\-stroke\.png) Specifies the width of the lines drawn for the the element, in pixels\. If not specified the system falls back to the value taken from the language variable __linewidth__, which itself defaults to __1__\. * __style__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-18\-style\-dash\.png) Specifies the style used to draw the lines of the element\. If not specified the system falls back to the value taken from the language variable __linestyle__, which itself defaults to __solid__ lines\. The legal values are all those accepted by [Tk\_GetDash](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetDash\.htm), and additionally all which are listed below: + __solid__, empty string Draw solid line\. + __dash__, __dashed__, __\-__ Draw a dashed line\. + __dot__, __dotted__, __\.__ Draw a dotted line\. + __dash\-dot__, __\-\.__ Draw a dash\-dotted line + __dash\-dot\-dot__, __\-\.\.__ Draw a dash\-dot\-dotted line\. Note that the values "solid", "dot\(ted\)", "dash\(ed\)", "dash\-dot", and "dash\-dot\-dot" are all accepted as shorthands for the __style__ command using them as argument\. * __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ *string* Specifies the text to associate with the element\. Defaults to nothing\. When specified multiple times the actually shown text is the concatenation of the individual strings, vertically stacked, with the first string specified being the topmost element\. * __textcolor__ *spec* Specifies the color used to draw the text of an element with\. Ignored if there is no text\. If not specified the system falls back to the value taken from the language variable __textcolor__, which itself defaults to __black__\. * __textfont__ *spec* Specifies the font used to draw the text of an element with\. Ignored if there is no text\. If not specified the system falls back to the value taken from the language variable __textfont__, which itself defaults to __Helvetica 12pt__\. * __with__ *corner* Specifies the corner of the element to place at the location given by the attribute __at__\. Defaults to the current corner as maintained by the layouting system, except if the value for __at__ was specified by the user\. In that case it defaults to __center__\. - __[diamond](\.\./\.\./\.\./\.\./index\.md\#diamond)__ *attr*\.\.\. - __<>__ *attr*\.\.\. ![](\.\./\.\./\.\./\.\./image/figure\-02\-diamond\.png) A closed element with the corresponding corners, i\.e\. the eight directions of the compass rose, and "center"\. It handles the attributes * __anchor__ *name* * __ljust__ * __rjust__ * __above__ * __below__ ![](\.\./\.\./\.\./\.\./image/figure\-22\-text\-anchoring\-3\.png) Specifies the anchor of the text which is to be placed at the element's center, by name\. I\.e\. this attribute defines the text's position relative to the element's center\. The value is ignored if no text was specified for the element\. If not specified the system falls back to the value taken from the language variable __anchor__, which itself defaults to __center__\. The legal values are all those accepted by [Tk\_GetAnchor](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetAnchor\.htm)\. The commands without arguments are all shorthands with the anchor implied\. Note that they do not combine, only the last is used\. For comined directions the main attribute command, __anchor__ has to be used\. + __ljust__ "anchor west" + __rjust__ "anchor east" + __above__ "anchor south" + __below__ "anchor north" * __aspect__ *number* Specifies the aspect ratio, i\.e ratio of width to height, of the __[diamond](\.\./\.\./\.\./\.\./index\.md\#diamond)__ element\. The manner in which a default is calculated when not specified also depends on the specifications of the attributes __width__ and __height__, if any\. If both __width__, and __height__ are specified then any specification of __aspect__ is ignored, as it is implicitly defined in the width and height as well, and this takes precedence\. A missing specification is ignored in that case well, i\.e\. no defaults are required\. If the __aspect__ is specified, and one of the attributes __width__ or __height__, then the missing attribute is calculated from the two which are specified\. No defaults are required for these cases either\. If only one of the attributes __width__ or __height__ is specified then the system uses a fallback for the __aspect__, the value taken from the language variable __diamondaspect__, which itselfs defaults to __2__\. If none of of the attributes __width__ or __height__ is specified then the system uses a fallback for the __width__, the value taken from the language variable __boxwidth__, which itselfs defaults to the pixel equivalent of __2 cm__\. For the aspect it uses either the user\-specified value or the default taken as described in the previous paragraph\. * __at__ *location* Specifies the location of the element's corner named by the attribute __with__\. Defaults to the current location as maintained by the layouting system\. * __color__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-21\-style\-colors\.png) Specifies the color used to draw the lines of the element\. If not specified the system falls back to the value taken from the language variable __linecolor__, which itself defaults to __black__\. * __fillcolor__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-21\-style\-colors\.png) Specifies the color used to draw the inside of the element\. If not specified the system falls back to the value taken from the language variable __fillcolor__, which itself defaults to the empty string, signaling "no filling"\. * __height__ *length* Specifies the height of the __[diamond](\.\./\.\./\.\./\.\./index\.md\#diamond)__ element\. The manner in which a default is calculated when not specified also depends on the specifications of the attributes __aspect__ and __width__, if any\. If both __width__, and __height__ are specified then any specification of __aspect__ is ignored, as it is implicitly defined in the width and height as well, and this takes precedence\. A missing specification is ignored in that case well, i\.e\. no defaults are required\. If the __aspect__ is specified, and one of the attributes __width__ or __height__, then the missing attribute is calculated from the two which are specified\. No defaults are required for these cases either\. If only one of the attributes __width__ or __height__ is specified then the system uses a fallback for the __aspect__, the value taken from the language variable __diamondaspect__, which itselfs defaults to __2__\. If none of of the attributes __width__ or __height__ is specified then the system uses a fallback for the __width__, the value taken from the language variable __boxwidth__, which itselfs defaults to the pixel equivalent of __2 cm__\. For the aspect it uses either the user\-specified value or the default taken as described in the previous paragraph\. * __justify__ __left__|__center__|__right__ Specifies how multi\-line text associated with the element is positioned within its box\. The value is ignored if no text was specified for the element\. If not specified the system falls back to the value taken from the language variable __justify__, which itself defaults to __left__\. The legal values are __left__, __right__, and __center__\. * __stroke__ *width* ![](\.\./\.\./\.\./\.\./image/figure\-20\-style\-stroke\.png) Specifies the width of the lines drawn for the the element, in pixels\. If not specified the system falls back to the value taken from the language variable __linewidth__, which itself defaults to __1__\. * __style__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-18\-style\-dash\.png) Specifies the style used to draw the lines of the element\. If not specified the system falls back to the value taken from the language variable __linestyle__, which itself defaults to __solid__ lines\. The legal values are all those accepted by [Tk\_GetDash](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetDash\.htm), and additionally all which are listed below: + __solid__, empty string Draw solid line\. + __dash__, __dashed__, __\-__ Draw a dashed line\. + __dot__, __dotted__, __\.__ Draw a dotted line\. + __dash\-dot__, __\-\.__ Draw a dash\-dotted line + __dash\-dot\-dot__, __\-\.\.__ Draw a dash\-dot\-dotted line\. Note that the values "solid", "dot\(ted\)", "dash\(ed\)", "dash\-dot", and "dash\-dot\-dot" are all accepted as shorthands for the __style__ command using them as argument\. * __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ *string* Specifies the text to associate with the element\. Defaults to nothing\. When specified multiple times the actually shown text is the concatenation of the individual strings, vertically stacked, with the first string specified being the topmost element\. * __textcolor__ *spec* Specifies the color used to draw the text of an element with\. Ignored if there is no text\. If not specified the system falls back to the value taken from the language variable __textcolor__, which itself defaults to __black__\. * __textfont__ *spec* Specifies the font used to draw the text of an element with\. Ignored if there is no text\. If not specified the system falls back to the value taken from the language variable __textfont__, which itself defaults to __Helvetica 12pt__\. * __width__ *length* Specifies the width of the __[diamond](\.\./\.\./\.\./\.\./index\.md\#diamond)__ element\. The manner in which a default is calculated when not specified also depends on the specifications of the attributes __aspect__ and __height__, if any\. If both __width__, and __height__ are specified then any specification of __aspect__ is ignored, as it is implicitly defined in the width and height as well, and this takes precedence\. A missing specification is ignored in that case well, i\.e\. no defaults are required\. If the __aspect__ is specified, and one of the attributes __width__ or __height__, then the missing attribute is calculated from the two which are specified\. No defaults are required for these cases either\. If only one of the attributes __width__ or __height__ is specified then the system uses a fallback for the __aspect__, the value taken from the language variable __diamondaspect__, which itselfs defaults to __2__\. If none of of the attributes __width__ or __height__ is specified then the system uses a fallback for the __width__, the value taken from the language variable __boxwidth__, which itselfs defaults to the pixel equivalent of __2 cm__\. For the aspect it uses either the user\-specified value or the default taken as described in the previous paragraph\. * __with__ *corner* Specifies the corner of the element to place at the location given by the attribute __at__\. Defaults to the current corner as maintained by the layouting system, except if the value for __at__ was specified by the user\. In that case it defaults to __center__\. - __[drum](\.\./\.\./\.\./\.\./index\.md\#drum)__ *attr*\.\.\. ![](\.\./\.\./\.\./\.\./image/figure\-02\-drum\.png) A closed element with the corresponding corners, i\.e\. the eight directions of the compass rose, and "center"\. It handles the attributes * __anchor__ *name* * __ljust__ * __rjust__ * __above__ * __below__ ![](\.\./\.\./\.\./\.\./image/figure\-22\-text\-anchoring\-3\.png) Specifies the anchor of the text which is to be placed at the element's center, by name\. I\.e\. this attribute defines the text's position relative to the element's center\. The value is ignored if no text was specified for the element\. If not specified the system falls back to the value taken from the language variable __anchor__, which itself defaults to __center__\. The legal values are all those accepted by [Tk\_GetAnchor](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetAnchor\.htm)\. The commands without arguments are all shorthands with the anchor implied\. Note that they do not combine, only the last is used\. For comined directions the main attribute command, __anchor__ has to be used\. + __ljust__ "anchor west" + __rjust__ "anchor east" + __above__ "anchor south" + __below__ "anchor north" * __aspect__ *number* Specifies the aspect ratio, i\.e ratio of width to height, of the ellipses which are used to draw the top and bottom of the __[drum](\.\./\.\./\.\./\.\./index\.md\#drum)__ element\. If not specified the system falls back to the value taken from the language variable __drumaspect__, which itself defaults to __0\.35__\. * __at__ *location* Specifies the location of the element's corner named by the attribute __with__\. Defaults to the current location as maintained by the layouting system\. * __color__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-21\-style\-colors\.png) Specifies the color used to draw the lines of the element\. If not specified the system falls back to the value taken from the language variable __linecolor__, which itself defaults to __black__\. * __fillcolor__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-21\-style\-colors\.png) Specifies the color used to draw the inside of the element\. If not specified the system falls back to the value taken from the language variable __fillcolor__, which itself defaults to the empty string, signaling "no filling"\. * __height__ *length* * __ht__ *length* Specifies the height of the element\. If not specified the system falls back to the value taken from the language variable __boxheight__, which itself defaults to the pixel equivalent of __2 cm__\. * __justify__ __left__|__center__|__right__ Specifies how multi\-line text associated with the element is positioned within its box\. The value is ignored if no text was specified for the element\. If not specified the system falls back to the value taken from the language variable __justify__, which itself defaults to __left__\. The legal values are __left__, __right__, and __center__\. * __stroke__ *width* ![](\.\./\.\./\.\./\.\./image/figure\-20\-style\-stroke\.png) Specifies the width of the lines drawn for the the element, in pixels\. If not specified the system falls back to the value taken from the language variable __linewidth__, which itself defaults to __1__\. * __style__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-18\-style\-dash\.png) Specifies the style used to draw the lines of the element\. If not specified the system falls back to the value taken from the language variable __linestyle__, which itself defaults to __solid__ lines\. The legal values are all those accepted by [Tk\_GetDash](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetDash\.htm), and additionally all which are listed below: + __solid__, empty string Draw solid line\. + __dash__, __dashed__, __\-__ Draw a dashed line\. + __dot__, __dotted__, __\.__ Draw a dotted line\. + __dash\-dot__, __\-\.__ Draw a dash\-dotted line + __dash\-dot\-dot__, __\-\.\.__ Draw a dash\-dot\-dotted line\. Note that the values "solid", "dot\(ted\)", "dash\(ed\)", "dash\-dot", and "dash\-dot\-dot" are all accepted as shorthands for the __style__ command using them as argument\. * __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ *string* Specifies the text to associate with the element\. Defaults to nothing\. When specified multiple times the actually shown text is the concatenation of the individual strings, vertically stacked, with the first string specified being the topmost element\. * __textcolor__ *spec* Specifies the color used to draw the text of an element with\. Ignored if there is no text\. If not specified the system falls back to the value taken from the language variable __textcolor__, which itself defaults to __black__\. * __textfont__ *spec* Specifies the font used to draw the text of an element with\. Ignored if there is no text\. If not specified the system falls back to the value taken from the language variable __textfont__, which itself defaults to __Helvetica 12pt__\. * __width__ *length* * __wid__ *length* Specifies the width of the element\. If not specified the system falls back to the value taken from the language variable __boxwidth__, which itself defaults to the pixel equivalent of __2 cm__\. * __with__ *corner* Specifies the corner of the element to place at the location given by the attribute __at__\. Defaults to the current corner as maintained by the layouting system, except if the value for __at__ was specified by the user\. In that case it defaults to __center__\. - __[ellipse](\.\./\.\./\.\./\.\./index\.md\#ellipse)__ *attr*\.\.\. ![](\.\./\.\./\.\./\.\./image/figure\-02\-ellipse\.png) A closed element with the corresponding corners, i\.e\. the eight directions of the compass rose, and "center"\. It handles the attributes * __anchor__ *name* * __ljust__ * __rjust__ * __above__ * __below__ ![](\.\./\.\./\.\./\.\./image/figure\-22\-text\-anchoring\-3\.png) Specifies the anchor of the text which is to be placed at the element's center, by name\. I\.e\. this attribute defines the text's position relative to the element's center\. The value is ignored if no text was specified for the element\. If not specified the system falls back to the value taken from the language variable __anchor__, which itself defaults to __center__\. The legal values are all those accepted by [Tk\_GetAnchor](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetAnchor\.htm)\. The commands without arguments are all shorthands with the anchor implied\. Note that they do not combine, only the last is used\. For comined directions the main attribute command, __anchor__ has to be used\. + __ljust__ "anchor west" + __rjust__ "anchor east" + __above__ "anchor south" + __below__ "anchor north" * __at__ *location* Specifies the location of the element's corner named by the attribute __with__\. Defaults to the current location as maintained by the layouting system\. * __color__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-21\-style\-colors\.png) Specifies the color used to draw the lines of the element\. If not specified the system falls back to the value taken from the language variable __linecolor__, which itself defaults to __black__\. * __fillcolor__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-21\-style\-colors\.png) Specifies the color used to draw the inside of the element\. If not specified the system falls back to the value taken from the language variable __fillcolor__, which itself defaults to the empty string, signaling "no filling"\. * __height__ *length* * __ht__ *length* Specifies the height of the element\. If not specified the system falls back to the value taken from the language variable __boxheight__, which itself defaults to the pixel equivalent of __2 cm__\. * __justify__ __left__|__center__|__right__ Specifies how multi\-line text associated with the element is positioned within its box\. The value is ignored if no text was specified for the element\. If not specified the system falls back to the value taken from the language variable __justify__, which itself defaults to __left__\. The legal values are __left__, __right__, and __center__\. * __stroke__ *width* ![](\.\./\.\./\.\./\.\./image/figure\-20\-style\-stroke\.png) Specifies the width of the lines drawn for the the element, in pixels\. If not specified the system falls back to the value taken from the language variable __linewidth__, which itself defaults to __1__\. * __style__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-18\-style\-dash\.png) Specifies the style used to draw the lines of the element\. If not specified the system falls back to the value taken from the language variable __linestyle__, which itself defaults to __solid__ lines\. The legal values are all those accepted by [Tk\_GetDash](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetDash\.htm), and additionally all which are listed below: + __solid__, empty string Draw solid line\. + __dash__, __dashed__, __\-__ Draw a dashed line\. + __dot__, __dotted__, __\.__ Draw a dotted line\. + __dash\-dot__, __\-\.__ Draw a dash\-dotted line + __dash\-dot\-dot__, __\-\.\.__ Draw a dash\-dot\-dotted line\. Note that the values "solid", "dot\(ted\)", "dash\(ed\)", "dash\-dot", and "dash\-dot\-dot" are all accepted as shorthands for the __style__ command using them as argument\. * __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ *string* Specifies the text to associate with the element\. Defaults to nothing\. When specified multiple times the actually shown text is the concatenation of the individual strings, vertically stacked, with the first string specified being the topmost element\. * __textcolor__ *spec* Specifies the color used to draw the text of an element with\. Ignored if there is no text\. If not specified the system falls back to the value taken from the language variable __textcolor__, which itself defaults to __black__\. * __textfont__ *spec* Specifies the font used to draw the text of an element with\. Ignored if there is no text\. If not specified the system falls back to the value taken from the language variable __textfont__, which itself defaults to __Helvetica 12pt__\. * __width__ *length* * __wid__ *length* Specifies the width of the element\. If not specified the system falls back to the value taken from the language variable __boxwidth__, which itself defaults to the pixel equivalent of __2 cm__\. * __with__ *corner* Specifies the corner of the element to place at the location given by the attribute __at__\. Defaults to the current corner as maintained by the layouting system, except if the value for __at__ was specified by the user\. In that case it defaults to __center__\. - __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ *attr*\.\.\. - __\-\-__ *attr*\.\.\. ![](\.\./\.\./\.\./\.\./image/figure\-02\-line\.png) An open element with the corresponding corners, i\.e\. "start", "end", and "center"\. It handles the attributes * __anchor__ *name* * __ljust__ * __rjust__ * __above__ * __below__ ![](\.\./\.\./\.\./\.\./image/figure\-22\-text\-anchoring\-3\.png) Specifies the anchor of the text which is to be placed at the element's center, by name\. I\.e\. this attribute defines the text's position relative to the element's center\. The value is ignored if no text was specified for the element\. If not specified the system falls back to the value taken from the language variable __anchor__, which itself defaults to __center__\. The legal values are all those accepted by [Tk\_GetAnchor](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetAnchor\.htm)\. The commands without arguments are all shorthands with the anchor implied\. Note that they do not combine, only the last is used\. For comined directions the main attribute command, __anchor__ has to be used\. + __ljust__ "anchor west" + __rjust__ "anchor east" + __above__ "anchor south" + __below__ "anchor north" * __arrowhead__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-19\-style\-arrowheads\.png) Specifies where to draw arrowheads on the __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ element, at the beginning or end, at both ends, or none\. If not specified the system falls back to the value taken from the language variable __arrowhead__, which itself defaults to __none__\. The legal values are + __none__, __\-__ Draw no arrowheads, at neither end of the line\. + __start__, __first__, __<\-__ Draw an arrowhead at the beginning of the line, but not at its end\. + __end__, __last__, __\->__ Draw an arrowhead at the end of the line, but not at its beginning\. + __both__, __<\->__ Draw arrowheads at both ends of the line\. Note that the values "start", "end", "\-", "\->", "<\-", and "<\->" are all accepted as shorthands for the __arrowhead__ command using them as argument\. * __at__ *location* __[Line](\.\./\.\./\.\./\.\./index\.md\#line)__ elements are normally positioned absolutely, using the locations specified through the attributes __from__, __then__, and __to__\. If __at__ is specified however then these positions are translated a last time, moving the line's corner named by the attribute __with__ to the location given by this attribute\. * __chop__ ?*length*? Specifies the length of the __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ element to remove from the beginning and/or end\. Defaults to nothing\. If specified once the chopping applies to both beginning and end of the line\. If specified twice or more the last two specifications are used, and applied to beginning and end of the line, in this order\. Whenever the attribute is specified without an explicit length, the system falls back to the value taken from the language variable __circleradius__, which itself defaults to the pixel equivalent of __1 cm__ * __color__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-21\-style\-colors\.png) Specifies the color used to draw the lines of the element\. If not specified the system falls back to the value taken from the language variable __linecolor__, which itself defaults to __black__\. * __fillcolor__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-21\-style\-colors\.png) Specifies the color used to draw the inside of the element\. If not specified the system falls back to the value taken from the language variable __fillcolor__, which itself defaults to the empty string, signaling "no filling"\. * __from__ *location* Specifies the location where the __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ element begins\. Defaults to the current location as maintained by the layouting system\. * __justify__ __left__|__center__|__right__ Specifies how multi\-line text associated with the element is positioned within its box\. The value is ignored if no text was specified for the element\. If not specified the system falls back to the value taken from the language variable __justify__, which itself defaults to __left__\. The legal values are __left__, __right__, and __center__\. * __noturn__ Specifies that the direction of __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ element at its end is not propagated to the layout management\. If not specified the direction of the line becomes the new direction the layout\. * __smooth__ Specifies the use of bezier splines for the __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ element\. If not specified lines are drawn exactly through the specified waypoints, without any smooth curves\. * __stroke__ *width* ![](\.\./\.\./\.\./\.\./image/figure\-20\-style\-stroke\.png) Specifies the width of the lines drawn for the the element, in pixels\. If not specified the system falls back to the value taken from the language variable __linewidth__, which itself defaults to __1__\. * __style__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-18\-style\-dash\.png) Specifies the style used to draw the lines of the element\. If not specified the system falls back to the value taken from the language variable __linestyle__, which itself defaults to __solid__ lines\. The legal values are all those accepted by [Tk\_GetDash](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetDash\.htm), and additionally all which are listed below: + __solid__, empty string Draw solid line\. + __dash__, __dashed__, __\-__ Draw a dashed line\. + __dot__, __dotted__, __\.__ Draw a dotted line\. + __dash\-dot__, __\-\.__ Draw a dash\-dotted line + __dash\-dot\-dot__, __\-\.\.__ Draw a dash\-dot\-dotted line\. Note that the values "solid", "dot\(ted\)", "dash\(ed\)", "dash\-dot", and "dash\-dot\-dot" are all accepted as shorthands for the __style__ command using them as argument\. * __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ *string* Specifies the text to associate with the element\. Defaults to nothing\. When specified multiple times the actually shown text is the concatenation of the individual strings, vertically stacked, with the first string specified being the topmost element\. * __textcolor__ *spec* Specifies the color used to draw the text of an element with\. Ignored if there is no text\. If not specified the system falls back to the value taken from the language variable __textcolor__, which itself defaults to __black__\. * __textfont__ *spec* Specifies the font used to draw the text of an element with\. Ignored if there is no text\. If not specified the system falls back to the value taken from the language variable __textfont__, which itself defaults to __Helvetica 12pt__\. * __then__ *location* * __then__ \( ?*length*?\)\.\.\. * \( ?*length*?\)\.\.\. This attribute specifies an intermediate location the __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ element has to go through\. It can be specified multiple times, with each use adding one additional location to the series which the line will go through\. These location will be traversed in the order they were specified\. The location can be given explicitly, or as a series of directions with distances\. In the latter case the names of all known directions are accepted for the direction part\. If no distance is specified for a direction the system falls back to the value taken from the language variable __movelength__, which itself defaults to the pixel equivalent of __2 cm__\. The whole set of direction,distance pairs is treated as a series of translations which are added up to provide the final translation specifying the intermediate point \(relative to the preceding point\)\. The last named direction is propagated to the layout system as the direction to follow\. The use of __noturn__ is not able to overide this behaviour\. At last, the names of the registered directions also serve as attribute commands, with an implicit attribute __then__ in front of them\. If no intermediate or last location is specified for the line the system falls back to a point __movelength__ pixels away from the starting location, in the current direction as maintained by the layouting system * __to__ *location* Specifies the location where the __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ element ends\. This attribute has no default\. The default is handled by the attribute __then__, which makes it appear as if __to__ has a default when not specified\. * __with__ *corner* __[Line](\.\./\.\./\.\./\.\./index\.md\#line)__ elements are normally positioned absolutely, using the locations specified through the attributes __from__, __then__, and __to__\. If __at__ is specified however then these positions are translated a last time, moving the line's corner named by the attribute __with__ to the location given by this attribute\. This means that *with* is effective if and only if the attribute __at__ was specified as well for the line\. - __[move](\.\./\.\./\.\./\.\./index\.md\#move)__ *attr* An open element with the corresponding corners, i\.e\. "start", "end", and "center"\. A __[move](\.\./\.\./\.\./\.\./index\.md\#move)__ element is in essence an invisible __[line](\.\./\.\./\.\./\.\./index\.md\#line)__\. While the main effect we are interested in is the change it makes to the layout system, it is an actual element, i\.e\. it has the same corners as an ordinary line, and shows up in the history as well, allowing future references to all the places it touched\. It handles the same attibutes as __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ elements\. - __[spline](\.\./\.\./\.\./\.\./index\.md\#spline)__ *attr*\.\.\. ![](\.\./\.\./\.\./\.\./image/figure\-02\-spline\.png) An alias for the __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ element \(see above\), with the attribute __smooth__ preset\. - __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ *attr*\.\.\. ![](\.\./\.\./\.\./\.\./image/figure\-02\-text\.png) A closed element with the corresponding corners, i\.e\. the eight directions of the compass rose, and "center"\. It handles the attributes * __anchor__ *name* * __ljust__ * __rjust__ * __above__ * __below__ ![](\.\./\.\./\.\./\.\./image/figure\-22\-text\-anchoring\-3\.png) Specifies the anchor of the text which is to be placed at the element's center, by name\. I\.e\. this attribute defines the text's position relative to the element's center\. The value is ignored if no text was specified for the element\. If not specified the system falls back to the value taken from the language variable __anchor__, which itself defaults to __center__\. The legal values are all those accepted by [Tk\_GetAnchor](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetAnchor\.htm)\. The commands without arguments are all shorthands with the anchor implied\. Note that they do not combine, only the last is used\. For comined directions the main attribute command, __anchor__ has to be used\. + __ljust__ "anchor west" + __rjust__ "anchor east" + __above__ "anchor south" + __below__ "anchor north" * __at__ *location* Specifies the location of the element's corner named by the attribute __with__\. Defaults to the current location as maintained by the layouting system\. * __height__ *length* Specifies the height of the __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ element\. Defaults to the natural height of its text\. * __justify__ __left__|__center__|__right__ Specifies how multi\-line text associated with the element is positioned within its box\. The value is ignored if no text was specified for the element\. If not specified the system falls back to the value taken from the language variable __justify__, which itself defaults to __left__\. The legal values are __left__, __right__, and __center__\. * __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ *string* Specifies the text to associate with the element\. Defaults to nothing\. When specified multiple times the actually shown text is the concatenation of the individual strings, vertically stacked, with the first string specified being the topmost element\. * __textcolor__ *spec* Specifies the color used to draw the text of an element with\. Ignored if there is no text\. If not specified the system falls back to the value taken from the language variable __textcolor__, which itself defaults to __black__\. * __textfont__ *spec* Specifies the font used to draw the text of an element with\. Ignored if there is no text\. If not specified the system falls back to the value taken from the language variable __textfont__, which itself defaults to __Helvetica 12pt__\. * __width__ *length* Specifies the width of the __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ element\. Defaults to the natural width of its text\. * __with__ *corner* Specifies the corner of the element to place at the location given by the attribute __at__\. Defaults to the current corner as maintained by the layouting system, except if the value for __at__ was specified by the user\. In that case it defaults to __center__\. ## Attributes The set of all attributes supported by all the element commands is shown below\. While we speak of them as commands, and provide a syntax, they are not truly available as actual commands, but only as part of the arguments for an element command\. Note that some of the attribute names are overloaded, i\.e\. have multiple, different, definitions\. During processing of attributes for an element the actual definition used is chosen based on the type of the element the processing is for\. Further, as a catch\-all clause, any attribute which could not be processed according to the definitions below will be treated as the argument of an implicit __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ attribute\. - __anchor__ *name* - __ljust__ - __rjust__ - __above__ - __below__ ![](\.\./\.\./\.\./\.\./image/figure\-22\-text\-anchoring\-3\.png) Specifies the anchor of the text which is to be placed at the element's center, by name\. I\.e\. this attribute defines the text's position relative to the element's center\. The value is ignored if no text was specified for the element\. If not specified the system falls back to the value taken from the language variable __anchor__, which itself defaults to __center__\. The legal values are all those accepted by [Tk\_GetAnchor](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetAnchor\.htm)\. The commands without arguments are all shorthands with the anchor implied\. Note that they do not combine, only the last is used\. For comined directions the main attribute command, __anchor__ has to be used\. * __ljust__ "anchor west" * __rjust__ "anchor east" * __above__ "anchor south" * __below__ "anchor north" - __arrowhead__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-19\-style\-arrowheads\.png) Specifies where to draw arrowheads on the __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ element, at the beginning or end, at both ends, or none\. If not specified the system falls back to the value taken from the language variable __arrowhead__, which itself defaults to __none__\. The legal values are * __none__, __\-__ Draw no arrowheads, at neither end of the line\. * __start__, __first__, __<\-__ Draw an arrowhead at the beginning of the line, but not at its end\. * __end__, __last__, __\->__ Draw an arrowhead at the end of the line, but not at its beginning\. * __both__, __<\->__ Draw arrowheads at both ends of the line\. Note that the values "start", "end", "\-", "\->", "<\-", and "<\->" are all accepted as shorthands for the __arrowhead__ command using them as argument\. - __aspect__ *number* Specifies the aspect ratio, i\.e ratio of width to height, of the __[diamond](\.\./\.\./\.\./\.\./index\.md\#diamond)__ element\. The manner in which a default is calculated when not specified also depends on the specifications of the attributes __width__ and __height__, if any\. If both __width__, and __height__ are specified then any specification of __aspect__ is ignored, as it is implicitly defined in the width and height as well, and this takes precedence\. A missing specification is ignored in that case well, i\.e\. no defaults are required\. If the __aspect__ is specified, and one of the attributes __width__ or __height__, then the missing attribute is calculated from the two which are specified\. No defaults are required for these cases either\. If only one of the attributes __width__ or __height__ is specified then the system uses a fallback for the __aspect__, the value taken from the language variable __diamondaspect__, which itselfs defaults to __2__\. If none of of the attributes __width__ or __height__ is specified then the system uses a fallback for the __width__, the value taken from the language variable __boxwidth__, which itselfs defaults to the pixel equivalent of __2 cm__\. For the aspect it uses either the user\-specified value or the default taken as described in the previous paragraph\. - __aspect__ *number* Specifies the aspect ratio, i\.e ratio of width to height, of the ellipses which are used to draw the top and bottom of the __[drum](\.\./\.\./\.\./\.\./index\.md\#drum)__ element\. If not specified the system falls back to the value taken from the language variable __drumaspect__, which itself defaults to __0\.35__\. - __at__ *location* Specifies the location of the element's corner named by the attribute __with__\. Defaults to the current location as maintained by the layouting system\. - __at__ *location* __[Line](\.\./\.\./\.\./\.\./index\.md\#line)__ elements are normally positioned absolutely, using the locations specified through the attributes __from__, __then__, and __to__\. If __at__ is specified however then these positions are translated a last time, moving the line's corner named by the attribute __with__ to the location given by this attribute\. - __chop__ ?*length*? Specifies the length of the __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ element to remove from the beginning and/or end\. Defaults to nothing\. If specified once the chopping applies to both beginning and end of the line\. If specified twice or more the last two specifications are used, and applied to beginning and end of the line, in this order\. Whenever the attribute is specified without an explicit length, the system falls back to the value taken from the language variable __circleradius__, which itself defaults to the pixel equivalent of __1 cm__ - __clockwise__ - __cw__ Specifies the direction of the __[arc](\.\./\.\./\.\./\.\./index\.md\#arc)__ element, here going clockwise\. The complementary attribute is __counterclockwise__\. If not specified the system falls back to the value taken from the language variable __clockwise__, which itself defaults to __false__, for counter\-clockwise direction\. - __color__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-21\-style\-colors\.png) Specifies the color used to draw the lines of the element\. If not specified the system falls back to the value taken from the language variable __linecolor__, which itself defaults to __black__\. - __counterclockwise__ - __ccw__ Specifies the direction of the __[arc](\.\./\.\./\.\./\.\./index\.md\#arc)__ element, here counter\-clockwise\. The complementary attribute is __clockwise__\. If not specified the system falls back to the value taken from the language variable __clockwise__, which itself defaults to __false__, for counter\-clockwise direction\. - __diameter__ *length* - __diam__ *length* Specifies the diameter of the __[circle](\.\./\.\./\.\./\.\./index\.md\#circle)__ element, as an alternative way to specify its __radius__\. Effective if and only if the radius was not specified\. I\.e\. if both diameter and radius are specified then the radius infomration has precendence\. This attribute has no default, because the defaults are taken from the radius\. - __fillcolor__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-21\-style\-colors\.png) Specifies the color used to draw the inside of the element\. If not specified the system falls back to the value taken from the language variable __fillcolor__, which itself defaults to the empty string, signaling "no filling"\. - __from__ *location* Specifies the location where the __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ element begins\. Defaults to the current location as maintained by the layouting system\. - __from__ *location* Specifies the location where the __[arc](\.\./\.\./\.\./\.\./index\.md\#arc)__ element begins\. Defaults to the current location as maintained by the layouting system\. - __height__ *length* - __ht__ *length* Specifies the height of the element\. If not specified the system falls back to the value taken from the language variable __boxheight__, which itself defaults to the pixel equivalent of __2 cm__\. - __height__ *length* Specifies the height of the __[diamond](\.\./\.\./\.\./\.\./index\.md\#diamond)__ element\. The manner in which a default is calculated when not specified also depends on the specifications of the attributes __aspect__ and __width__, if any\. If both __width__, and __height__ are specified then any specification of __aspect__ is ignored, as it is implicitly defined in the width and height as well, and this takes precedence\. A missing specification is ignored in that case well, i\.e\. no defaults are required\. If the __aspect__ is specified, and one of the attributes __width__ or __height__, then the missing attribute is calculated from the two which are specified\. No defaults are required for these cases either\. If only one of the attributes __width__ or __height__ is specified then the system uses a fallback for the __aspect__, the value taken from the language variable __diamondaspect__, which itselfs defaults to __2__\. If none of of the attributes __width__ or __height__ is specified then the system uses a fallback for the __width__, the value taken from the language variable __boxwidth__, which itselfs defaults to the pixel equivalent of __2 cm__\. For the aspect it uses either the user\-specified value or the default taken as described in the previous paragraph\. - __height__ *length* Specifies the height of the __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ element\. Defaults to the natural height of its text\. - __justify__ __left__|__center__|__right__ Specifies how multi\-line text associated with the element is positioned within its box\. The value is ignored if no text was specified for the element\. If not specified the system falls back to the value taken from the language variable __justify__, which itself defaults to __left__\. The legal values are __left__, __right__, and __center__\. - __noturn__ Specifies that the direction of __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ element at its end is not propagated to the layout management\. If not specified the direction of the line becomes the new direction the layout\. - __radius__ *length* - __rad__ *length* Specifies the radius of the __[circle](\.\./\.\./\.\./\.\./index\.md\#circle)__ element\. If not specified the system falls back to the value taken from the language variable __circleradius__, which itself defaults to the pixel equivalent of __1 cm__\. - __radius__ *length* Specifies the radius of the __[arc](\.\./\.\./\.\./\.\./index\.md\#arc)__ element, or rather, the radius of the circle the shown arc is a part of\. If not specified the system falls back to the value taken from the language variable __arcradius__, which itself defaults to the pixel equivalent of __1 cm__\. - __slant__ *angle* Specifies the angle by which the __[box](\.\./\.\./\.\./\.\./index\.md\#box)__ element is slanted, in degrees\. If not specified the system falls back to the value taken from the language variable __slant__, which itself defaults to __90__, i\.e\. vertical, no slant\. 0 degrees is slanting straight east, pointing to the right\. 90 degrees is slanting to the north, pointing straight up\. - __smooth__ Specifies the use of bezier splines for the __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ element\. If not specified lines are drawn exactly through the specified waypoints, without any smooth curves\. - __stroke__ *width* ![](\.\./\.\./\.\./\.\./image/figure\-20\-style\-stroke\.png) Specifies the width of the lines drawn for the the element, in pixels\. If not specified the system falls back to the value taken from the language variable __linewidth__, which itself defaults to __1__\. - __style__ *spec* ![](\.\./\.\./\.\./\.\./image/figure\-18\-style\-dash\.png) Specifies the style used to draw the lines of the element\. If not specified the system falls back to the value taken from the language variable __linestyle__, which itself defaults to __solid__ lines\. The legal values are all those accepted by [Tk\_GetDash](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetDash\.htm), and additionally all which are listed below: * __solid__, empty string Draw solid line\. * __dash__, __dashed__, __\-__ Draw a dashed line\. * __dot__, __dotted__, __\.__ Draw a dotted line\. * __dash\-dot__, __\-\.__ Draw a dash\-dotted line * __dash\-dot\-dot__, __\-\.\.__ Draw a dash\-dot\-dotted line\. Note that the values "solid", "dot\(ted\)", "dash\(ed\)", "dash\-dot", and "dash\-dot\-dot" are all accepted as shorthands for the __style__ command using them as argument\. - __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ *string* Specifies the text to associate with the element\. Defaults to nothing\. When specified multiple times the actually shown text is the concatenation of the individual strings, vertically stacked, with the first string specified being the topmost element\. - __textcolor__ *spec* Specifies the color used to draw the text of an element with\. Ignored if there is no text\. If not specified the system falls back to the value taken from the language variable __textcolor__, which itself defaults to __black__\. - __textfont__ *spec* Specifies the font used to draw the text of an element with\. Ignored if there is no text\. If not specified the system falls back to the value taken from the language variable __textfont__, which itself defaults to __Helvetica 12pt__\. - __then__ *location* - __then__ \( ?*length*?\)\.\.\. - \( ?*length*?\)\.\.\. This attribute specifies an intermediate location the __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ element has to go through\. It can be specified multiple times, with each use adding one additional location to the series which the line will go through\. These location will be traversed in the order they were specified\. The location can be given explicitly, or as a series of directions with distances\. In the latter case the names of all known directions are accepted for the direction part\. If no distance is specified for a direction the system falls back to the value taken from the language variable __movelength__, which itself defaults to the pixel equivalent of __2 cm__\. The whole set of direction,distance pairs is treated as a series of translations which are added up to provide the final translation specifying the intermediate point \(relative to the preceding point\)\. The last named direction is propagated to the layout system as the direction to follow\. The use of __noturn__ is not able to overide this behaviour\. At last, the names of the registered directions also serve as attribute commands, with an implicit attribute __then__ in front of them\. If no intermediate or last location is specified for the line the system falls back to a point __movelength__ pixels away from the starting location, in the current direction as maintained by the layouting system - __to__ *location* Specifies the location where the __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ element ends\. This attribute has no default\. The default is handled by the attribute __then__, which makes it appear as if __to__ has a default when not specified\. - __to__ *location* Specifies the location where the __[arc](\.\./\.\./\.\./\.\./index\.md\#arc)__ element ends\. Defaults to a location such that a 90\-degree arc is drawn in the chosen direction, starting at __from__\. - __width__ *length* - __wid__ *length* Specifies the width of the element\. If not specified the system falls back to the value taken from the language variable __boxwidth__, which itself defaults to the pixel equivalent of __2 cm__\. - __width__ *length* Specifies the width of the __[diamond](\.\./\.\./\.\./\.\./index\.md\#diamond)__ element\. The manner in which a default is calculated when not specified also depends on the specifications of the attributes __aspect__ and __height__, if any\. If both __width__, and __height__ are specified then any specification of __aspect__ is ignored, as it is implicitly defined in the width and height as well, and this takes precedence\. A missing specification is ignored in that case well, i\.e\. no defaults are required\. If the __aspect__ is specified, and one of the attributes __width__ or __height__, then the missing attribute is calculated from the two which are specified\. No defaults are required for these cases either\. If only one of the attributes __width__ or __height__ is specified then the system uses a fallback for the __aspect__, the value taken from the language variable __diamondaspect__, which itselfs defaults to __2__\. If none of of the attributes __width__ or __height__ is specified then the system uses a fallback for the __width__, the value taken from the language variable __boxwidth__, which itselfs defaults to the pixel equivalent of __2 cm__\. For the aspect it uses either the user\-specified value or the default taken as described in the previous paragraph\. - __width__ *length* Specifies the width of the __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ element\. Defaults to the natural width of its text\. - __with__ *corner* Specifies the corner of the element to place at the location given by the attribute __at__\. Defaults to the current corner as maintained by the layouting system, except if the value for __at__ was specified by the user\. In that case it defaults to __center__\. - __with__ *corner* __[Line](\.\./\.\./\.\./\.\./index\.md\#line)__ elements are normally positioned absolutely, using the locations specified through the attributes __from__, __then__, and __to__\. If __at__ is specified however then these positions are translated a last time, moving the line's corner named by the attribute __with__ to the location given by this attribute\. This means that *with* is effective if and only if the attribute __at__ was specified as well for the line\. ## Corners Corners are named values for in elements, usually locations\. - The *closed* elements define corners for the compass rose, including the "center", and their "width" and "height"\. ![](\.\./\.\./\.\./\.\./image/figure\-27\-corners\-closed\.png) - __block__ elements additionally export all variables which were set during their definition as corners\. - The *open* elements on the other hand define "start", "end", and "center"\. The first two map to the locations originally provided through the attributes __from__ and __to__ of the element\. ![](\.\./\.\./\.\./\.\./image/figure\-28\-corners\-open\.png) - The center of __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ and __[move](\.\./\.\./\.\./\.\./index\.md\#move)__ elements is the location halfway between "start" and "end" corners, this is regardless of any intermediate locations the element may have\. - The __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ and __[move](\.\./\.\./\.\./\.\./index\.md\#move)__ elements additionally name all their locations as corners using numbers as names, starting from __1__ \(equivalent to "start"\), in order of traversal\. ![](\.\./\.\./\.\./\.\./image/figure\-15\-spline\-1\.png) - The center of __[arc](\.\./\.\./\.\./\.\./index\.md\#arc)__ elements is the center of the circle the arc is part off\. - The __[arc](\.\./\.\./\.\./\.\./index\.md\#arc)__ elements additionally define the compass rose of closed elements as well\. ## Named directions The named directions are commands which tell the layout system in which direction to go when placing the next element without an explicit position specification\. They can also be used as arguments to the attribute __then__, and the command __by__ for relative points, see there for the relevant syntax\. The diagram core defines the directions of the compass rose, plus a number of aliases\. See below for the full list\. ![](\.\./\.\./\.\./\.\./image/figure\-27\-corners\-closed\.png) This overlaps with the pre\-defined corners for closed elements\. This is used by the layout system, when are going in direction X the name of the opposite direction is the name of the corner at which the new element will be attached to the current position, and if this corner does not exist the nearest actual corner by angle is used\. - __west__ - __w__ - __left__ - __l__ - __south__ - __s__ - __down__ - __bottom__ - __bot__ - __b__ - __east__ - __e__ - __right__ - __r__ - __north__ - __n__ - __up__ - __top__ - __t__ - __northwest__ - __nw__ - __up\-left__ - __upleft__ - __leftup__ - __northeast__ - __ne__ - __up\-right__ - __upright__ - __rightup__ - __southwest__ - __sw__ - __down\-left__ - __downleft__ - __leftdown__ - __southeast__ - __se__ - __down\-right__ - __downright__ - __rightdown__ ## Miscellaneous Commands - *number* __cm__ - *number* __mm__ - *number* __inch__ - *number* __pt__ These commands allow the specification of distances and coordinates in metric and imperial units, returning the equivalent distance or coordinate in pixels, which is the unit used internally for all calculations\. The conversion factors are based on the result of __tk scaling__ and are computed once, at the time the package is sourced, future changes of the __tk scaling__ factor have no effect\. - *number* *number* ![](\.\./\.\./\.\./\.\./image/figure\-50\-point\-cons\-absolute\.png) This command takes the x and y coordinates of a location and returns the *absolute* point for it\. - __by__ *distance* *direction* ![](\.\./\.\./\.\./\.\./image/figure\-51\-point\-cons\-relative\.png) This command takes a *distance* and *direction* \(angle in degress, or registered direction name\) and returns the *relative* point for it, i\.e\. the *delta* or *translation* it represents\. Note also the \(dis\)similarities to the directional specifications for the attribute __then__ of __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ and __[move](\.\./\.\./\.\./\.\./index\.md\#move)__ elements\. Where we say here by 50 east for the attribute we say ... then east 50 ... or just ... then east ... - *point1* __\+__ *point2* ![](\.\./\.\./\.\./\.\./image/figure\-48\-point\-vectoradd\.png) This command interprets two points as vectors and adds them together\. If at least one of the points is *absolute* the result is absolute as well\. The result is a *relative* point if and only if both points are *relative*\. - *point1* __\-__ *point2* ![](\.\./\.\./\.\./\.\./image/figure\-49\-point\-vectorsub\.png) This command interprets two points as vectors and subtracts the second from the first\. If at least one of the points is *absolute* the result is absolute as well\. The result is a *relative* point if and only if both points are *relative*\. - *point* __by__ *distance* *direction* This command is a more convenient, or at least shorter, form of [$point + [by $distance $direction]] - *point1* __|__ *point2* ![](\.\./\.\./\.\./\.\./image/figure\-31\-point\-projection\.png) This command calculates the *projection* of two points, i\.e\. the result is the point having the x\-coordinate of *point1* and the y\-coordinate of *point2*\. - *n* __between__ *poin1* *point2* ![](\.\./\.\./\.\./\.\./image/figure\-29\-point\-interpolation\-1\.png) This command computes the point which is *n*\*100 percent of the way between *point1* and *point2*, and returns it as its result\. This means that for * *n* == 0 The result is *point1*\. * *n* == 1 The result is *point2*\. * *n* == 0\.5 The result is half way between the two points\. etc\. *Note* that it is allowed to use values < 0 and > 1 for *n* - __intersect__ *elem1* *elem2* ![](\.\./\.\./\.\./\.\./image/figure\-32\-point\-intersection\.png) This command takes two *open* elements, computes the lines going through their "start"\- and "end"\-corners, and returns the point where these two lines intersect\. The command throws an error if the lines do not intersect, or are coincident\. - *element* __names__ ?*pattern*? This command returns a list containing the names of all corners for the *element*\. If a pattern is specified then only the names matching it \(via __string match__ are returned\. Otherwise all names are returned \(equivalent to a default pattern of __\*__\)\. - *element* *corner* This command returns the value for the *corner* of the *element*\. This can be anything, including points and elements\. - *element* *corner1* *corner2*\.\.\. This is a convenience shorthand for [[[$elem $corner1] $corner2] ...] assuming that the value for [$elem $corner1] , etc\. is again an element\. - *element* ?*corner1*\.\.\. ?__names__ ?*pattern*??\]? This is a convenience shorthand for [[[$elem $corner1] ...] names ?pattern?] assuming that the value for [$elem $corner1] , etc\. is again an element\. - ____n__th__ ?*corner*? This command asks the diagram history for the __n__th element created, searching from the beginning of the history \(counting from 1\) and returns it as its result\. If the *corner* is specified then the value for this corner is returned instead\. - ____n__th__ __last__ ?*corner*? This command asks the diagram history for the __n__th element created, searching from the end of the history and returns it as its result\. If the *corner* is specified then the value for this corner is returned instead\. - ____n__th__ *shape* ?*corner*? This command asks the diagram history for the __n__th element created, of the given *shape*, searching from the beginning of the history \(counting from 1\) and returns it as its result\. If the *corner* is specified then the value for this corner is returned instead\. - ____n__th__ __last__ *shape* ?*corner*? This command asks the diagram history for the __n__th element created, of the given *shape*, searching from the end of the history and returns it as its result\. If the *corner* is specified then the value for this corner is returned instead\. - __last__ ?*corner*? - __last__ *shape* ?*corner*? Convenience commands mapping to "__1st last__" and "__1st last__ *shape*"\. - __1st__ - __2nd__ - __3rd__ Aliases for __1th__, __2th__, and __3th__, for readability, usable whereever ____n__th__ can ocur\. ## Variables The language context contains a number of predefined variables which hold the default values for various attributes\. These variables, their uses, and values are: - __anchor__ The default value for the attribute __anchor__\. Initialized to __center__\. The legal values are all those accepted by [Tk\_GetAnchor](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetAnchor\.htm)\. - __arcradius__ The default value for the attribute __radius__ of __[arc](\.\./\.\./\.\./\.\./index\.md\#arc)__ elements\. Initialized to the pixel equivalent of __1 cm__\. - __arrowhead__ The default value for the attribute __arrowhead__\. Initialized to __none__\. The legal values are * __none__, __\-__ Draw no arrowheads, at neither end of the line\. * __start__, __first__, __<\-__ Draw an arrowhead at the beginning of the line, but not at its end\. * __end__, __last__, __\->__ Draw an arrowhead at the end of the line, but not at its beginning\. * __both__, __<\->__ Draw arrowheads at both ends of the line\. - __boxheight__ The default value for the attribute __height__ of __[box](\.\./\.\./\.\./\.\./index\.md\#box)__, __[diamond](\.\./\.\./\.\./\.\./index\.md\#diamond)__ and __[ellipse](\.\./\.\./\.\./\.\./index\.md\#ellipse)__ elements\. Initialized to the pixel equivalent of __2 cm__\. - __boxwidth__ The default value for the attribute __width__ of __[box](\.\./\.\./\.\./\.\./index\.md\#box)__, __[diamond](\.\./\.\./\.\./\.\./index\.md\#diamond)__ and __[ellipse](\.\./\.\./\.\./\.\./index\.md\#ellipse)__ elements\. Initialized to the pixel equivalent of __2 cm__\. - __clockwise__ The default value for the attributes __clockwise__ and __counterclockwise__ of __[arc](\.\./\.\./\.\./\.\./index\.md\#arc)__ elements\. Initialized to __False__, for counter\-clockwise direction\. - __circleradius__ The default value for the attribute __radius__ of __[circle](\.\./\.\./\.\./\.\./index\.md\#circle)__ elements, and also the default for the attribute __chop__, when specified without an explicit length\. Initialized to the pixel equivalent of __1 cm__\. - __drumaspect__ The default value for the attribute __aspect__ of __[drum](\.\./\.\./\.\./\.\./index\.md\#drum)__ elements\. Initialized to __0\.35__\. - __fillcolor__ The default value for the attribute __fillcolor__ of all elements which can be filled\. Initialized to the empty string, signaling that the element is not filled\. - __justify__ The default value for the attribute __justify__\. Initialized to __left__\. The legal values are __left__, __right__, and __center__\. - __linecolor__ The default value for the attribute __color__ of all elements having to draw lines \(all but __[text](\.\./\.\./\.\./\.\./index\.md\#text)__\)\. Initialized to __black__\. - __linestyle__ The default value for the attribute __style__ of all elements having to draw some line\. Initialized to __solid__\. The legal values are all those accepted by [Tk\_GetDash](http://www\.tcl\.tk/man/tcl8\.5/TkLib/GetDash\.htm), and additionally all which are listed below: * __solid__, empty string Draw solid line\. * __dash__, __dashed__, __\-__ Draw a dashed line\. * __dot__, __dotted__, __\.__ Draw a dotted line\. * __dash\-dot__, __\-\.__ Draw a dash\-dotted line * __dash\-dot\-dot__, __\-\.\.__ Draw a dash\-dot\-dotted line\. - __linewidth__ The default value for the attribute __stroke__ of all elements having to draw some line\. Initialized to __1__ \(pixels\)\. - __movelength__ The default value for the directional specification of intermediate locations by the attribute __then__ of __[line](\.\./\.\./\.\./\.\./index\.md\#line)__ and __[move](\.\./\.\./\.\./\.\./index\.md\#move)__ elements\. Initialized to the pixel equivalent of __2 cm__\. - __slant__ The default value for the attribute __slant__ of __[box](\.\./\.\./\.\./\.\./index\.md\#box)__ elements\. Initialized to 90 degrees, i\.e\. slant straight up\. - __textcolor__ The default value for the attribute __textcolor__ of all elements having to draw some text\. Initialized to __black__\. - __textfont__ The default value for the attribute __textfont__ of all elements having to draw some text\. Initialized to __Helvetica 12pt__\. # Diagram Classes The intended audience of this section are developers wishing to work on the internals of the diagram package\. Regular users of __diagram__ can skip this section without missing anything\. The main information seen here is the figure below, showing the hierarchy of the classes implementing diagram\. ![](\.\./\.\./\.\./\.\./image/figure\-00\-dependencies\.png) At the bottom, all at the same level are the supporting packages like __[snit](\.\./\.\./\.\./\.\./index\.md\#snit)__, etc\. These can all be found in Tcllib\. Above them is the set of diagram classes implementing the various aspects of the system, i\.e\.: - __diagram__ The main class, that which is seen by the user\. - __diagram::core__ The core engine, itself distributed over four helper classes\. - __diagram::basic__ The implementation of the standard shapes, like box, circle, etc\., based on the extension features of the core\. - __diagram::element__ Core support class, the database of created elements\. It also keeps the history, i\.e\. the order in which elements were created\. - __diagram::attribute__ Core support class, the generic handling of definition and processing of attributes\. - __diagram::direction__ Core support class, the database of named directions\. - __diagram::navigation__ Core support class, the state of layout engine, i\.e\. current position and directin, and operations on it\. - __diagram::point__ General support class handling various vector operations\. # References # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *diagram* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [2D geometry](\.\./\.\./\.\./\.\./index\.md\#2d\_geometry), [arc](\.\./\.\./\.\./\.\./index\.md\#arc), [arrow](\.\./\.\./\.\./\.\./index\.md\#arrow), [box](\.\./\.\./\.\./\.\./index\.md\#box), [canvas](\.\./\.\./\.\./\.\./index\.md\#canvas), [circle](\.\./\.\./\.\./\.\./index\.md\#circle), [diagram](\.\./\.\./\.\./\.\./index\.md\#diagram), [diamond](\.\./\.\./\.\./\.\./index\.md\#diamond), [drawing](\.\./\.\./\.\./\.\./index\.md\#drawing), [drum](\.\./\.\./\.\./\.\./index\.md\#drum), [ellipse](\.\./\.\./\.\./\.\./index\.md\#ellipse), [image](\.\./\.\./\.\./\.\./index\.md\#image), [interpolation](\.\./\.\./\.\./\.\./index\.md\#interpolation), [intersection](\.\./\.\./\.\./\.\./index\.md\#intersection), [line](\.\./\.\./\.\./\.\./index\.md\#line), [move](\.\./\.\./\.\./\.\./index\.md\#move), [picture](\.\./\.\./\.\./\.\./index\.md\#picture), [plane geometry](\.\./\.\./\.\./\.\./index\.md\#plane\_geometry), [plotting](\.\./\.\./\.\./\.\./index\.md\#plotting), [point](\.\./\.\./\.\./\.\./index\.md\#point), [raster image](\.\./\.\./\.\./\.\./index\.md\#raster\_image), [spline](\.\./\.\./\.\./\.\./index\.md\#spline), [text](\.\./\.\./\.\./\.\./index\.md\#text), [vector](\.\./\.\./\.\./\.\./index\.md\#vector) # CATEGORY Documentation tools Tk_Library_Source_Code/embedded/md/tklib/files/modules/getstring000075500000000000000000000000001435605071100247075ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files/modules/getstring/tk_getString.md000064400000000000000000000052611435605071100277600ustar00nobodynobody [//000000001]: # (getstring \- A dialog which prompts for a string input) [//000000002]: # (Generated from file 'tk\_getString\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (getstring\(n\) 0\.1 tklib "A dialog which prompts for a string input")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME getstring \- A string dialog # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [EXAMPLE](#section2) - [Bugs, Ideas, Feedback](#section3) - [Keywords](#keywords) # SYNOPSIS package require Tcl 8\.4 package require getstring ?0\.1? [__::getstring::tk\_getString__ *pathName* *variable* *text* ?options?](#1) # DESCRIPTION This package provides a dialog which consists of an Entry, OK, and Cancel buttons\. - __::getstring::tk\_getString__ *pathName* *variable* *text* ?options? Creates a dialog which prompts the user with *text* to input a text string\. The contents of the entry are put in the *variable* upon closure of the dialog\. The command returns a boolean indicating if the user pressed OK or not\. If \-geometry is not specified, the dialog is centered in its parent toplevel unless its parent is \. in which case the dialog is centered in the screen\. Options: \-title \-allowempty a boolean argument indicating if the dialog should accept an empty entry \-entryoptions simply passes its arguments through to the entry widget\. This is valuble for performing extra validation using the Entry widget validation hooks\. \-geometry specifies the geometry of the window # EXAMPLE package require getstring namespace import getstring::* if {[tk_getString .gs text "Feed me a string please:"]} { puts "user entered: $text" } # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *getstring* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [dialog](\.\./\.\./\.\./\.\./index\.md\#dialog), [entry](\.\./\.\./\.\./\.\./index\.md\#entry), [string](\.\./\.\./\.\./\.\./index\.md\#string) Tk_Library_Source_Code/embedded/md/tklib/files/modules/history000075500000000000000000000000001435605071100244025ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files/modules/history/tklib_history.md000064400000000000000000000073541435605071100277020ustar00nobodynobody [//000000001]: # (history \- Provides a history for Entry widgets) [//000000002]: # (Generated from file 'tklib\_history\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (history\(n\) 0\.1 tklib "Provides a history for Entry widgets")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME history \- Provides a history for Entry widgets # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [Bugs, Ideas, Feedback](#section2) - [Keywords](#keywords) # SYNOPSIS package require Tcl 8\.4 package require Tk 8\.4 package require history ?0\.1? [__::history::init__ *pathName* ?length?](#1) [__::history::remove__ *pathName*](#2) [__::history::add__ *pathName* *text*](#3) [__::history::get__ *pathName*](#4) [__::history::clear__ *pathName*](#5) [__::history::configure__ *pathName* *option* ?value?](#6) [bell](#7) # DESCRIPTION This package provides a convenient history mechanism for Entry widgets\. The history may be accessed with the up and down arrow keys\. - __::history::init__ *pathName* ?length? Arranges to remember the history of the named Entry widget\. An optional length determines the number of history entries to keep\. This may be changed later with __::history::configure__\. History entries must be added with the __::history::add__ command before they can be seen\. - __::history::remove__ *pathName* Forgets all history entries for the Entry *pathName* and removes the history bindings\. - __::history::add__ *pathName* *text* This command is used to add history entries to an Entry that has previously had __::history::init__ called on it\. This command should be called from your Entry handler with the contents of the entry \(or whatever you wish to add to the history\)\. - __::history::get__ *pathName* This command returns a list containing the history entries for the Entry *pathName* - __::history::clear__ *pathName* This command clears the history list for the named Entry\. - __::history::configure__ *pathName* *option* ?value? This command queries or sets configuration options\. Currently the options recognized are *length* and *alert*\. Setting the length determines the number of history entries to keep for the named Entry\. Alert specifies the command to run when the user reaches the end of the history, it defaults to - bell \. Although configure requires a *pathName* argument, the setting for alert is global and the path is ignored\. entry .e bind .e [list ProcessEntry %W] ::history::init .e pack .e proc ProcessEntry {w} { set text [$w get] if {$text == ""} { return } ::history::add $w $text puts $text $w delete 0 end } # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *entry::history* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [entry](\.\./\.\./\.\./\.\./index\.md\#entry), [history](\.\./\.\./\.\./\.\./index\.md\#history) Tk_Library_Source_Code/embedded/md/tklib/files/modules/ico000075500000000000000000000000001435605071100234535ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files/modules/ico/ico.md000064400000000000000000000221241435605071100246270ustar00nobodynobody [//000000001]: # (ico \- Windows ICO handling) [//000000002]: # (Generated from file 'ico\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (ico\(n\) 1\.0\.5 tklib "Windows ICO handling")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME ico \- Reading and writing windows icons # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [API](#section2) - [EXAMPLE](#section3) - [LIMITATIONS](#section4) - [Bugs, Ideas, Feedback](#section5) - [Keywords](#keywords) # SYNOPSIS package require Tcl 8\.4 package require ico ?1\.0\.5? [__::ico::icons__ *file* ?*option* *value*\.\.\.?](#1) [__::ico::iconMembers__ *file* *name* ?*option* *value*\.\.\.?](#2) [__::ico::getIcon__ *file* *name* ?*option* *value*\.\.\.?](#3) [__::ico::getIconByName__ *file* *name* ?*option* *value*\.\.\.?](#4) [__::ico::getFileIcon__ *file* ?*option* *value*\.\.\.?](#5) [__::ico::writeIcon__ *file* *name* *depth* *data* ?*option* *value*\.\.\.?](#6) [__::ico::copyIcon__ *file* *index* *file2* *index2* ?*option* *value*\.\.\.?](#7) [__::ico::EXEtoICO__ *file* ?dir?](#8) [__::ico::clearCache__ ?file?](#9) [__::ico::transparentColor__ *image* *color*](#10) [__::ico::Show__ *file* ?*option* *value*\.\.\.?](#11) # DESCRIPTION This package provides functions for reading and writing Windows icons from ICO, EXE, DLL, ICL, and BMP files\. As used in this module an icon is a visual representation of an object\. An icon consists of one or more images usually with varying resolution and color depth\. Each icon and image has a resource identifier which may be a text string or a positive integer value\. Most commands use this identifier to specify which icon or image to operate on\. # API - __::ico::icons__ *file* ?*option* *value*\.\.\.? Returns a list of icons found in *file* where each element is the name or numeric ID\. Recognizes the following options: * __\-type__ fileFormat - __::ico::iconMembers__ *file* *name* ?*option* *value*\.\.\.? Returns a list of images that make up the icon with ID *name*\. Each element is itself a sublist in the format \{name width height bpp\}\. Recognizes the following options: * __\-type__ fileFormat - __::ico::getIcon__ *file* *name* ?*option* *value*\.\.\.? Extracts the icon with ID *name* from *file*\. The default __\-format__ is __image__ which will return the name of a Tk image containing the icon\. The resolution and color depth are selected with the ?\-res?, ?\-bpp?, and ?\-exact? options\. If \-exact is specified and there is no exact match, an error is thrown\. Optionally __\-image__ may be used to specify the name of the Tk image that is created\. If __\-format__ is __colors__ then a list of color names in the \#RRGGBB format is returned\. Each list element is a horizontal row\. Each horizontal row contains a list of colors for all the pixels in that row from left to right\. If __\-format__ is __name__ then the resource name of the image chosen is returned\. This is useful for calling writeIcon or getIconByName\. Recognizes the following *option*s\. * __\-type__ fileFormat * __\-format__ value * __\-image__ value * __\-res__ value * __\-bpp__ value * __\-exact__ value - __::ico::getIconByName__ *file* *name* ?*option* *value*\.\.\.? Extracts the image with ID *name* from *file*\. This name should be the name of a specific image as returned by __::ico::iconMembers__, not an icon name returned from __::ico::icons__\. If there is no matching resource ID in *file* an error is thrown\. Recognizes the following options: * __\-type__ fileFormat * __\-format__ value - __::ico::getFileIcon__ *file* ?*option* *value*\.\.\.? This command is only functional when running under Windows\. It reads the Windows registry to determine the display icon for *file* as it would appear in Explorer or similar\. *file* does not need to exist and may also be specified as a file extension with a leading dot\. If *file* is a directory or you specify the special name __Folder__ then the icon representing a folder is returned\. This command takes the same arguments and usage as __getIcon__: * __\-format__ value * __\-image__ value * __\-res__ value * __\-bpp__ value * __\-exact__ value - __::ico::writeIcon__ *file* *name* *depth* *data* ?*option* *value*\.\.\.? Writes an image to *file*\. *name* is the resource identifier of the image in *file* to write\. When writing to an EXE, DLL, or ICL file you may only overwrite existing icons with an icon of the same dimensions and color depth\. No icons may be added to these file types\. When writing to BMP the name is ignored as this type can contain only one image\. This means if the file already existed it is completely overwritten\. When writing to an ICO or ICODATA file if the name specified does not exist then an image is appended and will be named the next in sequence \(the specified name is ignored\)\. Images in ICO and ICODATA files may be overwritten with differing dimensions or color depths\. Note that you will get strange results when displaying icons if you fail to change every image which makes up a given icon\. * integer *depth* \(in\) This argument must have a value of __1__, __4__, __8__, __24__, or __32__\. If *data* has more colors than the color depth allows an error will be generated\. * options *data* \(in\) This argument is either a list of colors in the format returned by __::ico::getIcon \-format colors__ or the name of a Tk image\. Recognizes the following *option*s\. * __\-type__ fileFormat - __::ico::copyIcon__ *file* *index* *file2* *index2* ?*option* *value*\.\.\.? Copies the icon at *index* in *file* to *index2* in *file2*\. * __\-fromtype__ fileFormat * __\-totype__ fileFormat - __::ico::EXEtoICO__ *file* ?dir? Extracts all icons from the executable *file* to ICO files placed in *dir*\. ?dir? defaults to the directory *file* is located in\. Icon files will be named in the form *file*\-ID\.ico where ID is the icon resource identifier\. * __\-type__ fileFormat - __::ico::clearCache__ ?file? The __::ico::getIconList__ command caches icon offsets inside EXE, DLL, ICL, and ICO files in order to speed up extraction\. This command clears that cache for the specific ?file? or all files\. - __::ico::transparentColor__ *image* *color* If *image* is a single word it is assumed to be the name of a Tk image\. All pixels matching *color* in the *image* will be set transparent\. Alternatively, *image* may be a color list in which case a modified list is returned\. - __::ico::Show__ *file* ?*option* *value*\.\.\.? Application level command which displays a window showing all the icons in *file* and their name\. * __\-type__ fileFormat * __\-parent__ pathName # EXAMPLE button .explore -image [::ico::getIcon explorer.exe 0 -name explore -res 16 -bpp 8] set i [lsearch -inline [::ico::iconMembers tclkit.exe 0] {* 32 32 8}] set colorlist [::ico::getIconByName tclkit.exe [lindex $i 0] -format colors] # LIMITATIONS Icons may not be added or removed from file types other than ICO\. Icons in these files may only be replaced with icons of the same dimensions and color depth\. Icons of 8bpp or lower must include black in the pallete, this means if your icon does not have black in it, you will need to leave a color free so that it may be included by writeIcon\. There is currently no way to read alpha channel information from 32bpp icons\. Tk images do not have an alpha channel so the only way to write a true 32bpp icon is from a color list\. writing a 32bpp icon from a Tkimage is identical to writing a 24bpp icon\. # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *ico* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [dll](\.\./\.\./\.\./\.\./index\.md\#dll), [entry](\.\./\.\./\.\./\.\./index\.md\#entry), [exe](\.\./\.\./\.\./\.\./index\.md\#exe), [ico](\.\./\.\./\.\./\.\./index\.md\#ico), [icon](\.\./\.\./\.\./\.\./index\.md\#icon) Tk_Library_Source_Code/embedded/md/tklib/files/modules/ipentry000075500000000000000000000000001435605071100243735ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files/modules/ipentry/ipentry.md000064400000000000000000000151061435605071100264710ustar00nobodynobody [//000000001]: # (ipentry \- An IP address entry widget) [//000000002]: # (Generated from file 'ipentry\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (ipentry\(n\) 0\.3 tklib "An IP address entry widget")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME ipentry \- An IP address entry widget # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [Widget options](#section2) - [Bugs, Ideas, Feedback](#section3) - [Keywords](#keywords) - [Category](#category) # SYNOPSIS package require Tcl 8\.4 package require Tk 8\.4 package require ipentry ?0\.3? [__::ipentry::ipentry__ *pathName* ?*option* *value*\.\.\.?](#1) [__::ipentry::ipentry6__ *pathName* ?*option* *value*\.\.\.?](#2) [*pathName* __complete__](#3) [*pathName* __get__](#4) [*pathName* __insert__ *iplist*](#5) [*pathName* __icursor__ *index*](#6) [*pathName* __configure__ *option* *value*\.\.\.](#7) [*pathName* __cget__ *option*](#8) # DESCRIPTION This package provides a widget for the entering of a IP address\. - __::ipentry::ipentry__ *pathName* ?*option* *value*\.\.\.? Creates a new IPv4 ipentry widget and configures it with the given options and their values\. - __::ipentry::ipentry6__ *pathName* ?*option* *value*\.\.\.? Creates a new ipentry widget for the entry of an IPv6 address\. All options are the same as the IPv4 widget\. Each widget created with the command above supports the following methods: - *pathName* __complete__ Returns a boolean value\. True indicates that the entry contains a complete IP address, meaning all fields have a value\. In some cases IPv6 address are valid when fields are missing\. You will need to do your own validation to detect this\. - *pathName* __get__ Returns the contents of the entry as a list consisting of 4 or 8 elements\. - *pathName* __insert__ *iplist* IPv4 Takes a list of 4 elements and inserts one into each quad of the entry, in order\. All values in the list must be empty or integers\. Values outside the range 0 to 255 are modified to be within the range\. IPv6 Takes a list of 8 elements and inserts one into each quad of the entry, in order\. All values in the list must be empty or 1 to 4 hex digits\. - *pathName* __icursor__ *index* Sets the position of the widgets insertion cursor\. Only integer values between 0 and 15 are valid for ipentry and 0 to 31 for ipentry6\. Setting the icursor will only have an effect if the widget already has the input focus\. - *pathName* __configure__ *option* *value*\.\.\. Modifies the configuration of the widget\. For options and their meaning see the widget options section\. - *pathName* __cget__ *option* Returns information about the current configuration of the widget, for the specified option\. For options and their meaning see the widget options section\. # Widget options - Command\-Line Switch: __\-textvariable__ Database Name: __textvariable__ Database Class: __Variable__ The name of a variable which holds the value of the IP address\. The value must be a string of the form NNN\.NNN\.NNN\.NNN for IPv4 or HHHH:HHHH:HHHH:HHHH:HHHH:HHHH:HHHH:HHHH for IPv6 where H is a hex digit\. The variable will be modified to represent a valid IP address if it is not already\. - Command\-Line Switch: __\-state__ Database Name: __state__ Database Class: __State__ Specifies one of three states for the entry: __normal__, __disabled__, or __readonly__\. - Command\-Line Switch: __\-font__ Database Name: __font__ Database Class: __Font__ - Command\-Line Switch: __\-bd__ Database Name: __borderWidth__ Database Class: __BorderWidth__ - Command\-Line Switch: __\-fg__ Database Name: __foreground__ Database Class: __Foreground__ - Command\-Line Switch: __\-bg__ Database Name: __background__ Database Class: __Background__ - Command\-Line Switch: __\-relief__ Database Name: __relief__ Database Class: __Relief__ - Command\-Line Switch: __\-highlightthickness__ Database Name: __highlightThickness__ Database Class: __HighlightThickness__ - Command\-Line Switch: __\-highlightcolor__ Database Name: __highlightColor__ Database Class: __HighlightColor__ - Command\-Line Switch: __\-highlightbackground__ Database Name: __highlightBackground__ Database Class: __HighlightBackground__ - Command\-Line Switch: __\-selectbackground__ Database Name: __selectBackground__ Database Class: __Background__ - Command\-Line Switch: __\-selectforeground__ Database Name: __selectForeground__ Database Class: __Foreground__ - Command\-Line Switch: __\-selectborderwidth__ Database Name: __selectBorderWidth__ Database Class: __BorderWidth__ - Command\-Line Switch: __\-disabledbackground__ Database Name: __disabledBackground__ Database Class: __DisabledBackground__ - Command\-Line Switch: __\-disabledforeground__ Database Name: __disabledForeground__ Database Class: __DisabledForeground__ - Command\-Line Switch: __\-readonlybackground__ Database Name: __readonlyBackground__ Database Class: __ReadonlyBackground__ - Command\-Line Switch: __\-insertbackground__ Database Name: __insertBackground__ Database Class: __Background__ Standard widget options\. See __options__ for a description of their meanings and values\. # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *ipentry* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [entry](\.\./\.\./\.\./\.\./index\.md\#entry), [ip address](\.\./\.\./\.\./\.\./index\.md\#ip\_address), [network](\.\./\.\./\.\./\.\./index\.md\#network) # CATEGORY Widget Tk_Library_Source_Code/embedded/md/tklib/files/modules/khim000075500000000000000000000000001435605071100236315ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files/modules/khim/khim.md000064400000000000000000000164631435605071100251740ustar00nobodynobody [//000000001]: # (khim \- Kevin's Hacky Input Method) [//000000002]: # (Generated from file 'khim\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (khim\(n\) 1\.0 tklib "Kevin's Hacky Input Method")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME khim \- Provides key bindings for entering international characters on a keyboard that does not support them # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [PROCEDURES](#section2) - [LOCALISATION](#section3) - [ACKNOWLEDGMENTS](#section4) - [Bugs, Ideas, Feedback](#section5) - [Keywords](#keywords) # SYNOPSIS package require Tcl package require khim ?1\.0? [__::khim::getOptions__ *path*](#1) [__::khim::getConfig__](#2) [__::khim::setConfig__ *version* *enabled* *compose* *map*](#3) [__::khim::showHelp__ *path*](#4) # DESCRIPTION This package provides a set of key bindings to allow a user to enter arbitrary characters on a keyboard that does not support them\. It works by designating some seldom\-used key of the keyboard as a "Compose" key \(this key is distinct from any key so labeled, and is often "Pause," "F12" or "L2"\), and having the "Compose" key, followed by a two\-key sequence, have the effect of inserting some character in a widget\. In addition, the "Compose" key, when struck twice in succession, brings up a dialog containing a Unicode character map, allowing arbitrary characters to be inserted\. The vast bulk of the package's functionality is implemented in a single bindtag, __KHIM__\. An application can request that any text or entry widget use the package to allow for entry of arbitrary characters by placing this binding tag ahead of the __Text__ or __Entry__ binding tag for the widget: text .t -width 80 -height 24 bindtags .t {.t KHIM Text . all} Note that the __KHIM__ tag must precede the __Text__ or __Entry__ class binding, or the package will not function correctly\. # PROCEDURES In addition to commands supporting the KHIM binding tag, the following commands are exported from the package: - __::khim::getOptions__ *path* Posts a top\-level modal dialog with the path name *path* that prompts the user for KHIM options\. The user is allowed to reconfigure the key sequences for the "Compose" key, change the choice of key to use for the "Compose" function, and enable/disable the KHIM key bindings entirely\. - __::khim::getConfig__ Returns a Tcl script that restores the current configuration of KHIM: the enabled/disabled state, the choice of "Compose" key, and the key sequences that may be composed\. This script is designed to be saved to a configuration file for use in a subsequent invocation of the same application: # Save KHIM configuration set f [open ~/.khimrc w] puts $f [::khim::getConfig] close $f # Restore KHIM configuration source ~/.khimrc - __::khim::setConfig__ *version* *enabled* *compose* *map* Restores an earlier saved configuration\. Few, if any, applications will call this command in any other way than to evaluate it as returned from __::khim::getConfig__\. - __::khim::showHelp__ *path* Displays a top\-level dialog giving user\-level help for KHIM; the dialog will have the path name *path*\. # LOCALISATION Programmers who wish to make KHIM available in a non\-English\-speaking locale may do so by providing a __\.msg__ file with the appropriate localised text\. The catalog requires the following messages: - __Apply__ Text that will appear on the "Apply" button in the dialog that sets KHIM options\. - __Cancel__ Text that will appear on the "Cancel" button in several dialogs\. - __Change__ Text that will appear on the "Change" button, which alters the binding of a pair of composed characters \(creating or replacing as appropriate\)\. - __Character__ Text that will appear on the label of the entry widget that accepts a character resulting from a composed sequence\. - __\{Compose Key\}__ Window title for a dialog that prompts the user to strike the key that will be used for the "Compose" key\. - __\{Compose key:\}__ Label that identifies a component showing the "Compose" key choice in the KHIM options dialog\. - __\{Composed sequence must be two characters long\}__ Error message that is displayed if the user attempts to define a "Compose" sequence that is shorter or longer than two characters\. - __Delete__ Text for a button that deletes a "Compose" sequence\. - __Help\.\.\.__ Text for a button that displays the KHIM user help dialog\. - __HELPTEXT__ Complete text for the user\-level help for KHIM\. Refer to "en\.msg" for the English\-language version of the help\. - __\{Input key sequence\}__ Text for a label of the entry widget that prompts the user for a two\-character sequence to use with the "Compose" key\. - __\{Insert Character\}__ Window title of the dialog box that displays a Unicode character map and prompts the user to select a character to insert\. - __\{Key sequences\}__ Text for a label at the head of a listbox showing the composed sequences that are currently bound\. - __\{KHIM Controls\}__ Window title for the dialog box that prompts for KHIM settings\. - __\{KHIM Help\}__ Window title for the window that display help text for KHIM\. - __OK__ Label for the OK button on several dialogs\. - __Select code page:__ Label for a spinbox that prompts the user for a Unicode code page number\. - __SELECT COMPOSE KEY__ A message, which should be composed in short lines, prompting the user to press the key that will become the "Compose" key in KHIM\. - __Unicode\.\.\.__ Text for a button that brings up the character map to select the character to which a composed sequence binds\. - __\{Use KHIM\}__ Text for a checkbutton that asks whether the user wishes to use KHIM to manage composed key sequences\. # ACKNOWLEDGMENTS KHIM was originally inspired by the key bindings that Brent Welch developed for the 'sedit' editor used in the 'exmh' mail user agent\. The code for KHIM is entirely separate from that for 'sedit'\. # Bugs, Ideas, Feedback This document, and the package it describes, will undoubtedly contain bugs and other problems\. Please report such in the category *khim* of the [Tklib Trackers](http://core\.tcl\.tk/tklib/reportlist)\. Please also report any ideas for enhancements you may have for either package and/or documentation\. # KEYWORDS [character](\.\./\.\./\.\./\.\./index\.md\#character), [i18n](\.\./\.\./\.\./\.\./index\.md\#i18n), [input](\.\./\.\./\.\./\.\./index\.md\#input), [international](\.\./\.\./\.\./\.\./index\.md\#international), [method](\.\./\.\./\.\./\.\./index\.md\#method) Tk_Library_Source_Code/embedded/md/tklib/files/modules/menubar000075500000000000000000000000001435605071100243325ustar00nobodynobodyTk_Library_Source_Code/embedded/md/tklib/files/modules/menubar/menubar.md000064400000000000000000000660531435605071100263760ustar00nobodynobody [//000000001]: # (menubar \- Create and manipulate menubars) [//000000002]: # (Generated from file 'menubar\.man' by tcllib/doctools with format 'markdown') [//000000003]: # (Copyright © 2009 Tom Krehbiel All rights reserved\.) [//000000004]: # (menubar\(n\) 0\.5 tklib "Create and manipulate menubars")
[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]
# NAME menubar \- Creates an instance of the *menubar* Class\. # Table Of Contents - [Table Of Contents](#toc) - [Synopsis](#synopsis) - [Description](#section1) - [Options](#section2) - [Introduction](#section3) - [Terminology](#section4) - [Methods](#section5) - [Methods \- menu\.xxx](#section6) - [Methods \- tag\.xxx](#section7) - [Methods \- group\.xxx](#section8) - [Methods \- notebook\.xxx](#section9) - [Scope Control](#section10) - [Example](#section11) - [Caveats](#section12) - [References](#section13) - [Bugs, Ideas, Feedback](#section14) - [Copyright](#copyright) # SYNOPSIS package require Tcl 8\.6 package require Tk 8\.6 package require menubar ?0\.5? [__menubar new__ ?options?](#1) [*mBarInst* __define__ *body*](#2) [*mBarInst* __install__ *pathName body*](#3) [*mBarInst* __menu\.configure__ *option tag\-settings ?option tag\-settings \.\.\.?*](#4) [*mBarInst* __menu\.namespace__ *tag namespace*](#5) [*mBarInst* __menu\.hide__ *tag*](#6) [*mBarInst* __menu\.show__ *tag*](#7) [*mBarInst* __tag\.add__ *tag value*](#8) [*mBarInst* __tag\.configure__ *pathName tag ?option value \.\.\.option value?*](#9) [*mBarInst* __tag\.cget__ *pathName tag ?option?*](#10) [*mBarInst* __group\.add__ *tag label ?cmd? ?accel? ?sequence? ?state?*](#11) [*mBarInst* __group\.delete__ *tag label*](#12) [*mBarInst* __group\.move__ *direction tag label*](#13) [*mBarInst* __group\.configure__ *tag label ?option value \.\.\.option value?*](#14) [*mBarInst* __group\.serialize__ *tag*](#15) [*mBarInst* __group\.deserialize__ *tag stream*](#16) [*mBarInst* __notebook\.addTabStore__ *pathname*](#17) [*mBarInst* __notebook\.deleteTabStore__ *pathname*](#18) [*mBarInst* __notebook\.setTabValue__ *pathname tag*](#19) [*mBarInst* __notebook\.restoreTabValues__ *pathname*](#20) # DESCRIPTION - __menubar new__ ?options? Create and return a new instance of the menubar class\. The menubar class encapsulates the definition, installation and dynamic behavior of a menubar\. The class doesn't depend on a widget framework and therefore can be used with or without a framework \(e\.g\. Bwidget, IWidget, Snit, etc\.\)\. Unlike other Tk widget commands, the menubar command doesn't have a *pathName* argument because menubars are handled by the window manager \(i\.e\. wm\) and not the application\. # Options The following options can be passed to the *menubar new* command\. These options are inherited from the Tk menu command, their effect is platform specific\. - __[\-activebackground](http://docs\.activestate\.com/activetcl/8\.5/tcl/TkCmd/options\.htm\#M\-activebackground)__ - __[\-activeborderwidth](http://docs\.activestate\.com/activetcl/8\.5/tcl/TkCmd/options\.htm\#M\-activeborderwidth)__ - __[\-activeforeground](http://docs\.activestate\.com/activetcl/8\.5/tcl/TkCmd/options\.htm\#M\-activeforeground)__ - __[\-background](http://docs\.activestate\.com/activetcl/8\.5/tcl/TkCmd/options\.htm\#M\-background)__ - __[\-borderwidth](http://docs\.activestate\.com/activetcl/8\.5/tcl/TkCmd/options\.htm\#M\-borderwidth)__ - __[\-cursor](http://docs\.activestate\.com/activetcl/8\.5/tcl/TkCmd/options\.htm\#M\-cursor)__ - __[\-disabledforeground](http://docs\.activestate\.com/activetcl/8\.5/tcl/TkCmd/options\.htm\#M\-disabledforeground)__ - __[\-font](http://docs\.activestate\.com/activetcl/8\.5/tcl/TkCmd/options\.htm\#M\-font)__ - __[\-foreground](http://docs\.activestate\.com/activetcl/8\.5/tcl/TkCmd/options\.htm\#M\-foreground)__ - __[\-relief](http://docs\.activestate\.com/activetcl/8\.5/tcl/TkCmd/options\.htm\#M\-relief)__ # Introduction An instance of the menubar class provides methods for compiling a description of the menubar, configuring menu items and installing the menubar in toplevel windows\. A menubar can be thought of as a tree of cascading menus\. Users define a menubar using a language that results in a human readable description of a menubar\. The description of the menubar is then compiled by an instance of the menubar class after which it can be installed in one or more toplevel windows\. The menubar class provides many unique capabilities that are not found in other tcl/tk menubar implementation\. Some of these are: - A tagging system that simplifies access to menu entries in the menu tree\. - Support for user defined tags that depend on the toplevel window context\. - A simplified and uniform interface for all callback commands\. - Namespace support for all callback commands so callback commands can be easily grouped into namespaces\. - Support for hiding and exposing menus on the menubar\. - A simplified method for creating radiobutton groups\. - Automatic management of state variables for checkbuttons and radiobuttons\. - Scope control for the state variables of checkbuttons and radiobuttons\. - Tear\-off menu management that ensures only one tearoff menu is created\. - Support for dynamic menu extension to simplify the creation of recent document menus\. - Support for saving and restoring dynamic menu extensions\. # Terminology - MENUBAR The visible rendering of a menubar in a toplevel window is a horizontally group of cascading Tk menus\. - MENU A menu is an ordered list of items that is rendered vertically\. Menus are not visible until a user preforms some action \(normally a event\)\. A menu may contain any number of child menus that are rendered as cascading menus\. Cascading menus are rendered next to the parent menu when they are activated\. - MENU ENTRY A menu contains an ordered list of items called entries\. Menu entries have a type and the menubar class supports the following 6 entry types: *Command*, *Checkbutton*, *Radiobutton*, *Separator*, *Group* and *Menu*\. - ENTRY LABEL Each menu entry has a visible string that is called the entry label\. - TAG A tag is name that is normally used to referr to an item in a menu tree\. A tag name is an alphanumeric character string that may include the underscore character\. Menu tree tags are defined for all nodes and leafs in a menu tree\. This provides a flat abstraction of the tree and simplifies item referencing in menubar methods\. Without this abstraction it would be necessary to reference menu elements using a tree path which could change at run\-time\. The menubar class also has a method that can create a user defined tag\. User defined tags store values that change based on the currently active toplevel window\. User defined tags can be used to store widget pathnames use by callback code so that output can be routed to the appropriate toplevel window\. # Methods - *mBarInst* __define__ *body* Compiles *body* into a tree of menu entries which define the visual layout of the menubar\. The *body* argument describes the layout using the following syntax, where the elements of the syntax are described below\. *body == definitions* definitions ::= { | | } ignore ::= { | | # } definition ::= { | | | | | } command ::=