Tk_Library_Source_Code000075500000000000000000000000001341472355700147025ustar00nobodynobodyTk_Library_Source_Code/ChangeLog000064400000000000000000000261631341472355700165430ustar00nobodynobody2013-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.txt000064400000000000000000000025621341472355700173120ustar00nobodynobodyIdentifier: 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.6 URL: http://core.tcl.tk/tklib/ Architecture: tcl Contributor: Aaron Faupell Contributor: Andreas Kupries 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.txt000064400000000000000000000053071341472355700166350ustar00nobodynobodyHow 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.in000064400000000000000000000066711341472355700170400ustar00nobodynobody# 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/README000064400000000000000000000074531341472355700156520ustar00nobodynobodyRCS: @(#) $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.developer000064400000000000000000000326651341472355700176410ustar00nobodynobodyRCS: @(#) $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.releasemgr000064400000000000000000000015331341472355700177700ustar00nobodynobodyRCS: @(#) $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.m4000064400000000000000000001753411341472355700166340ustar00nobodynobody# 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/apps000075500000000000000000000000001341472355700156455ustar00nobodynobodyTk_Library_Source_Code/apps/bitmap-editor000075500000000000000000000525621341472355700204240ustar00nobodynobody#!/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.man000064400000000000000000000027231341472355700211650ustar00nobodynobody[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-viewer000075500000000000000000000022511341472355700205550ustar00nobodynobody#!/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.man000064400000000000000000000055701341472355700213330ustar00nobodynobody[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/config000075500000000000000000000000001341472355700161475ustar00nobodynobodyTk_Library_Source_Code/config/ChangeLog000064400000000000000000000022161341472355700200010ustar00nobodynobody2001-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.guess000064400000000000000000001224711341472355700205520ustar00nobodynobody#! /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.sub000064400000000000000000000734421341472355700202200ustar00nobodynobody#! /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-sh000075500000000000000000000042121341472355700202310ustar00nobodynobody#!/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.tcl000075500000000000000000000054731341472355700212140ustar00nobodynobody#!/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/mkinstalldirs000075500000000000000000000013271341472355700210370ustar00nobodynobody#! /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.m4000064400000000000000000002225631341472355700172640ustar00nobodynobody# 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/configure000075500000000000000000002457201341472355700167020ustar00nobodynobody#! /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.in000064400000000000000000000022001341472355700172640ustar00nobodynobodyAC_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/embedded000075500000000000000000000000001341472355700164335ustar00nobodynobodyTk_Library_Source_Code/embedded/man000075500000000000000000000000001341472355700172065ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files000075500000000000000000000000001341472355700203105ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files/apps000075500000000000000000000000001341472355700212535ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files/apps/bitmap-editor.n000064400000000000000000000166561341472355700242670ustar00nobodynobody'\" '\" Generated from file 'bitmap-editor\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) '\" .TH "bitmap-editor" n 1\&.0 tklib "Bitmap handling" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME bitmap-editor \- Editor for XBM images .SH SYNOPSIS \fBbitmap-editor\fR ?\fIxbmfile\fR? .sp .BE .SH DESCRIPTION .PP The application described by this document, \fBbitmap-editor\fR, is a simple editor for XBM based bitmap images\&. Written by Keith Vetter the original code can be found at \fIhttp://wiki\&.tcl\&.tk/6298\fR\&. .SS "COMMAND LINE" .TP \fBbitmap-editor\fR ?\fIxbmfile\fR? 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\&. .RS .TP path \fIxbmfile\fR (in/out) This argument specifies the path to a bitmap file in XBM format, whose contents is to shown and edited by the application\&. .RE .sp .PP .SH "BUGS, IDEAS, FEEDBACK" This document, and the application it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIbitmap\fR of the \fITcllib SF Trackers\fR [http://sourceforge\&.net/tracker/?group_id=12883]\&. Please also report any ideas for enhancements you may have for either application and/or documentation\&. .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIbitmap-editor\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS bitmap, editor, image, pixel, xbm .SH CATEGORY Image processing .SH COPYRIGHT .nf Copyright (c) .fiTk_Library_Source_Code/embedded/man/files/apps/diagram-viewer.n000064400000000000000000000217171341472355700244240ustar00nobodynobody'\" '\" Generated from file 'diagram-viewer\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2010 Andreas Kupries '\" .TH "diagram-viewer" n 1\&.0 tklib "Documentation toolbox" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME diagram-viewer \- Lightweight Diagram Processor .SH SYNOPSIS \fBdiagram-viewer\fR \fBshow\fR \fIinputfile\fR\&.\&.\&. .sp \fBdiagram-viewer\fR \fBconvert\fR \fB-o\fR \fIoutput\fR \fIformat\fR \fIinputfile\fR\&.\&.\&. .sp .BE .SH DESCRIPTION .PP The application described by this document, \fBdiagram-viewer\fR, is a lightweight processor for tklib diagram files .PP \fBdiagram-viewer\fR is based upon the package \fBdiagram\fR\&. See it for examples and language reference\&. .SS "USE CASES" \fBdiagram-viewer\fR was written with the following two use cases in mind\&. .PP .IP [1] Processing and display of one or more diagram files\&. .IP [2] Batch conversion of one or more diagram files into raster image files\&. .PP .PP .SS "COMMAND LINE" .TP \fBdiagram-viewer\fR \fBshow\fR \fIinputfile\fR\&.\&.\&. 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\&. .TP \fBdiagram-viewer\fR \fBconvert\fR \fB-o\fR \fIoutput\fR \fIformat\fR \fIinputfile\fR\&.\&.\&. This is the form for use case [2]\&. The application converts the input files into raster image of the specified \fIformat\fR\&. .RS .TP path \fIoutput\fR (in) This argument specifies where to write the generated image\&. It can be the path to a file or directory\&. .sp If the \fIoutput\fR does not exist then [file dirname $output] has to exist and must be a writable directory\&. .sp 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 \fIinputfile\fR, and \fIformat\fR\&. .sp In case of a single input file the generated image will be written to the file\&. .TP (handle) \fIformat\fR (in) This argument specifies the image format to convert the diagrams into when processing the input\&. The application recognizes all formats supported by the \fBImg\fR package, i\&.e\&. for which it can load a package \fBimg::\fBformat\fR\fR .TP path \fIinputfile\fR (in) This argument specifies the path to the diagram file to process\&. It has to exist, must be readable, and written in \fIdiagram\fR format\&. .RE .sp .PP .SH "BUGS, IDEAS, FEEDBACK" This document, and the application it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIdiagram\fR of the \fITcllib SF Trackers\fR [http://sourceforge\&.net/tracker/?group_id=12883]\&. Please also report any ideas for enhancements you may have for either application and/or documentation\&. .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIdiagram\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS canvas, conversion, diagram, vector .SH CATEGORY Documentation tools .SH COPYRIGHT .nf Copyright (c) 2010 Andreas Kupries .fiTk_Library_Source_Code/embedded/man/files/modules000075500000000000000000000000001341472355700217605ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files/modules/autoscroll000075500000000000000000000000001341472355700241475ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files/modules/autoscroll/autoscroll.n000064400000000000000000000202331341472355700265740ustar00nobodynobody'\" '\" Generated from file 'autoscroll\&.man' by tcllib/doctools with format 'nroff' '\" .TH "autoscroll" n 1\&.1 tklib "Automatic mapping of scrollbars" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME autoscroll \- Provides for a scrollbar to automatically mapped and unmapped as needed .SH SYNOPSIS package require \fBTcl \fR .sp package require \fBautoscroll ?1\&.1?\fR .sp \fB::autoscroll::autoscroll\fR \fIscrollbar\fR .sp \fB::autoscroll::unautoscroll\fR \fIscrollbar\fR .sp \fB::autoscroll::wrap\fR .sp \fB::autoscroll::unwrap\fR .sp .BE .SH 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\&. .PP 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\&. .PP This package may be used on any scrollbar-like widget as long as it supports the \fBset\fR subcommand in the same style as scrollbar\&. If the \fBset\fR subcommand is not used then this package will have no effect\&. .PP .TP \fB::autoscroll::autoscroll\fR \fIscrollbar\fR Arranges for the already existing scrollbar \fBscrollbar\fR to be mapped and unmapped as needed\&. .TP \fB::autoscroll::unautoscroll\fR \fIscrollbar\fR Returns the named scrollbar to its original static state\&. .TP \fB::autoscroll::wrap\fR Arranges for all scrollbars created after this command is run to be automatically mapped and unmapped as needed\&. .TP \fB::autoscroll::unwrap\fR Turns off the automatic autoscrolling of all new scrollbars\&. Does not effect existing scrollbars .PP .CS 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 .CE .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIautoscroll\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS scroll, scrollbarTk_Library_Source_Code/embedded/man/files/modules/canvas000075500000000000000000000000001341472355700232335ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files/modules/canvas/canvas_drag.n000064400000000000000000000260061341472355700257450ustar00nobodynobody'\" '\" Generated from file 'canvas_drag\&.man' by tcllib/doctools with format 'nroff' '\" .TH "canvas::drag" n 0\&.1 tklib "Variations on a canvas" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME canvas::drag \- Manage the dragging of canvas items or item groups .SH SYNOPSIS package require \fBTcl 8\&.5\fR .sp package require \fBTk 8\&.5\fR .sp package require \fBcanvas::drag ?0\&.1?\fR .sp \fB::canvas::drag\fR \fBon\fR \fIcanvas\fR \fItagOrId\fR \fIcmd\fR \fIoption\fR\&.\&.\&. .sp \fB::canvas::drag\fR \fBoff\fR \fIcanvas\fR \fItagOrId\fR .sp \fB::canvas::drag\fR \fBitem\fR \fIcanvas\fR \fItagOrId\fR \fIoption\fR\&.\&.\&. .sp \fB::canvas::drag\fR \fBgroup\fR \fIcanvas\fR \fItagOrId\fR \fIcmd\fR \fIoption\fR\&.\&.\&. .sp \fB{*}cmd\fR \fBstart\fR \fIcanvas\fR \fIitem\fR .sp \fB{*}cmd\fR \fBmove\fR \fIcanvas\fR \fIclientdata\fR \fIdx\fR \fIdy\fR .sp \fB{*}cmd\fR \fBdone\fR \fIcanvas\fR \fIclientdata\fR .sp .BE .SH 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\&. .SH API .TP \fB::canvas::drag\fR \fBon\fR \fIcanvas\fR \fItagOrId\fR \fIcmd\fR \fIoption\fR\&.\&.\&. This command initializes item dragging on the \fIcanvas\fR widget, with the items used as drag handles identified by \fItagOrId\fR\&. The command prefix \fIcmd\fR, invoked for drag start and movement, is responsible for the initialization and actual execution of the drag operation\&. .sp The signature of the command prefix is described later, in section \fBDrag callback\fR\&. .sp Similarly, the accepted options and their values are described in section \fBOptions\fR .sp The result of the command is the empty string\&. .TP \fB::canvas::drag\fR \fBoff\fR \fIcanvas\fR \fItagOrId\fR This command removes any drag operation set on the items of canvas \fIcanvas\fR identified by \fItagOrId\fR\&. .sp The result of the command is the empty string\&. .TP \fB::canvas::drag\fR \fBitem\fR \fIcanvas\fR \fItagOrId\fR \fIoption\fR\&.\&.\&. This is a convenience command wrapped around method \fBon\fR (see above) to drag single items of the \fIcanvas\fR widget, identified by \fItagOrId\fR\&. .sp It uses an internal standard callback for this\&. .sp The result of the command is the empty string\&. .TP \fB::canvas::drag\fR \fBgroup\fR \fIcanvas\fR \fItagOrId\fR \fIcmd\fR \fIoption\fR\&.\&.\&. This is a convenience command wrapped around method \fBon\fR (see above) to drag single items of the \fIcanvas\fR widget, identified by \fItagOrId\fR\&. .sp It uses an internal standard callback for this\&. The callback \fIcmd\fR specified has the same signature as the \fBDrag callback\fR, except that .RS .IP [1] The \fBmove\fR method is not invoked\&. .IP [2] The result of the \fBstart\fR method \fIhas to be\fR 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)\&. .RE .sp The result of the command is the empty string\&. .PP .SS "DRAG CALLBACK" The drag callback is a command prefix invoked in the following two ways: .TP \fB{*}cmd\fR \fBstart\fR \fIcanvas\fR \fIitem\fR This form is invoked when has initiated dragging using drag handle identified by the canvas \fIitem\fR id\&. The callback now has to perform anything necessary for its type of drag operation\&. .sp 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\&. .TP \fB{*}cmd\fR \fBmove\fR \fIcanvas\fR \fIclientdata\fR \fIdx\fR \fIdy\fR 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\&. .sp 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\&. .TP \fB{*}cmd\fR \fBdone\fR \fIcanvas\fR \fIclientdata\fR 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)\&. .sp The result of the command is ignored\&. .PP .SS OPTIONS The commands to create drag operations (\fBon\fR, \fBitem\fR, and \fBgroup\fR) all accept the following options to configure the new drag\&. .TP \fB-event\fR \fIspec\fR The value of this option specifies the mouse button used to initiate the drag operation, and the keyboard modifier, if any\&. Examples of specifications: .sp To initiate a drag operation by pressing mouse button 3 on a drag handle, use: .CS -event 3 .CE .IP This is the default as well, if the option is not specified\&. .sp To initiate a drag operation by pressing mouse button 2 on a drag handle while holding down the Control key, use: .CS -event Control-2 .CE .PP .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIcanvas\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS canvas, draggingTk_Library_Source_Code/embedded/man/files/modules/canvas/canvas_epoints.n000064400000000000000000000360231341472355700265110ustar00nobodynobody'\" '\" Generated from file 'canvas_epoints\&.man' by tcllib/doctools with format 'nroff' '\" .TH "canvas::edit::points" n 0\&.1 tklib "Variations on a canvas" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME canvas::edit::points \- Editing a cloud of points on a canvas .SH SYNOPSIS package require \fBTcl 8\&.5\fR .sp package require \fBTk 8\&.5\fR .sp package require \fBcanvas::edit::points ?0\&.1?\fR .sp \fB::canvas::edit\fR \fBpoints\fR \fIobjectName\fR \fIcanvas\fR \fIoptions\fR\&.\&.\&. .sp \fBobjectName\fR \fBdestroy\fR .sp \fBobjectName\fR \fBenable\fR .sp \fBobjectName\fR \fBdisable\fR .sp \fBobjectName\fR \fBactive\fR .sp \fBobjectName\fR \fBadd\fR \fIx\fR \fIy\fR .sp \fBobjectName\fR \fBclear\fR .sp \fBcreateCmd\fR \fIcanvas\fR \fIx\fR \fIy\fR .sp \fBhighlightCmd\fR \fBon\fR \fIcanvas\fR \fIitem\fR .sp \fBhighlightCmd\fR \fBoff\fR \fIcanvas\fR \fIstate\fR .sp \fBdataCmd\fR \fBadd\fR \fIeditorObj\fR \fIid\fR \fIx\fR \fIy\fR .sp \fBdataCmd\fR \fBremove\fR \fIeditorObj\fR \fIid\fR .sp \fBdataCmd\fR \fBmove start\fR \fIeditorObj\fR \fIid\fR .sp \fBdataCmd\fR \fBmove delta\fR \fIeditorObj\fR \fIid\fR \fIx\fR \fIy\fR \fIdx\fR \fIdy\fR .sp \fBdataCmd\fR \fBmove done\fR \fIeditorObj\fR \fIid\fR .sp .BE .SH 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 (regular, and highlighted)\&. Note that instances do not store the edited points themselves, but delegate this to a configurable object\&. .SH "CLASS API" .TP \fB::canvas::edit\fR \fBpoints\fR \fIobjectName\fR \fIcanvas\fR \fIoptions\fR\&.\&.\&. This, the class command, creates and configures a new instance of a point cloud editor, named \fIobjectName\fR\&. The instance will be connected to the specified \fIcanvas\fR widget\&. .sp The result of the command is the fully qualified name of the instance command\&. .sp The options accepted here, and their values, are explained in the section \fBOptions\fR\&. .PP .SH "INSTANCE API" Instances of the point cloud editors provide the following API: .TP \fBobjectName\fR \fBdestroy\fR This method destroys the point cloud editor and releases all its internal resources\&. .sp Note that this operation does not destroy the items of the point markers the editor managed on the attached canvas, nor the canvas itself\&. .sp The result of the method is an empty string\&. .TP \fBobjectName\fR \fBenable\fR 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\&. .sp The result of the method is an empty string\&. .sp The complementary method is \fBdisable\fR\&. The interogatory method for the current state is \fBactive\fR\&. .TP \fBobjectName\fR \fBdisable\fR This method disables editing of the point cloud on the canvas\&. A call is ignored if the editor is already disabled\&. .sp The result of the method is an empty string\&. .sp The complementary method is \fBenable\fR\&. The interogatory method for the current state is \fBactive\fR\&. .TP \fBobjectName\fR \fBactive\fR This method queries the editor state\&. .sp The result of the method is a boolean value, \fBtrue\fR if the editor is active, and \fBfalse\fR otherwise, i\&.e\&. disabled\&. .sp The methods to change the state are \fBenable\fR and \fBdisable\fR\&. .TP \fBobjectName\fR \fBadd\fR \fIx\fR \fIy\fR This method programmatically creates a point at the specified location\&. .sp The result of the method is an empty string\&. .sp Note that this method goes through the whole set of callbacks invoked when the user interactively creates a point, i\&.e\&. \fB-create-cmd\fR, and, more importantly, \fB-data-cmd\fR\&. .sp This is the method through which to load pre-existing points into an editor instance\&. .TP \fBobjectName\fR \fBclear\fR This method programmatically removes all points from the editor\&. .sp The result of the method is an empty string\&. .sp Note that this method goes through the same callback invoked when the user interactively removes a point, i\&.e\&. \fB-data-cmd\fR\&. .PP .SH OPTIONS The class command accepts the following options .TP \fB-tag\fR \fIstring\fR 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\&. .sp This option can only be set at construction time\&. .sp If not specified it defaults to \fBPOINT\fR .TP \fB-create-cmd\fR \fIcommand-prefix\fR The value of this option is a command prefix the editor will invoke when it has to create a new point\&. .sp This option can only be set at construction time\&. .sp 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\&. .sp The signature of this command prefix is .RS .TP \fBcreateCmd\fR \fIcanvas\fR \fIx\fR \fIy\fR The result of the command prefix \fImust\fR 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\&. .sp 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\&. .RE .TP \fB-highlight-cmd\fR \fIcommand-prefix\fR The value of this option is a command prefix the editor will invoke when it has to (un)highlight a point\&. .sp This option can only be set at construction time\&. .sp If not specified it defaults to a command which will re-color the item to highlight in red (and restores the color for unhighlighting)\&. .sp The two signatures of this command prefix are .RS .TP \fBhighlightCmd\fR \fBon\fR \fIcanvas\fR \fIitem\fR .sp This method of the command prefix has to perform whatever is needed to highlight the point the \fIitem\fR is a part of (remember the note above about points allowed to be constructed from multiple canvas items)\&. .sp The result of the command can be anything and will be passed as is as argument \fIstate\fR to the \fBoff\fR method\&. .TP \fBhighlightCmd\fR \fBoff\fR \fIcanvas\fR \fIstate\fR .sp This method is invoked to unhighlight a point described by the \fIstate\fR, which is the unchanged result of the \fBon\fR method of the command prefix\&. The result of this method is ignored\&. .sp Note any interaction between dragging and highlighting of points is handled within the editor, and that the callback bears no responsibility for doing such\&. .RE .TP \fB-data-cmd\fR \fIcommand-prefix\fR 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\&. .sp This option can only be set at construction time\&. .sp If not specified it defaults to an empty string and is ignored by the editor, i\&.e\&. not invoked\&. .sp The signatures of this command prefix are .RS .TP \fBdataCmd\fR \fBadd\fR \fIeditorObj\fR \fIid\fR \fIx\fR \fIy\fR This callback is invoked when a new point was added to the instance, either interactively, or programmatically\&. See instance method \fBadd\fR for the latter\&. .sp The \fIid\fR identifies the point within the editor and will be used by the two other callbacks to specify which point to modify\&. .sp The last two arguments \fIx\fR and \fIy\fR specify the location of the new point in canvas coordinates\&. .sp The result of this method is ignored\&. .TP \fBdataCmd\fR \fBremove\fR \fIeditorObj\fR \fIid\fR This callback is invoked when a point removed from the editor instance\&. .sp The \fIid\fR identifies the removed point within the editor\&. .sp The result of this method is ignored\&. .TP \fBdataCmd\fR \fBmove start\fR \fIeditorObj\fR \fIid\fR This callback is invoked when the movement of a point in the editor instance has started\&. .sp The \fIid\fR identifies the point within the editor about to be moved\&. .sp The result of this method is ignored\&. .TP \fBdataCmd\fR \fBmove delta\fR \fIeditorObj\fR \fIid\fR \fIx\fR \fIy\fR \fIdx\fR \fIdy\fR This callback is invoked when the point moved in the editor instance\&. .sp The \fIid\fR identifies the moved point within the editor, and the remaining arguments \fIx\fR, \fIy\fR, \fIdx\fR, and \fIdy\fR provide the new absolute location of the point, and full delta to the original location\&. .sp At the time of the calls the system is \fInot\fR committed to the move yet\&. Only after method \fBmove done\fR 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\&. .sp Given this the location data provided here should be saved only in temporary storage until then\&. .sp The result of this method is ignored\&. .TP \fBdataCmd\fR \fBmove done\fR \fIeditorObj\fR \fIid\fR This callback is invoked when the movement of a point in the editor instance is complete\&. .sp The \fIid\fR identifies the moved point within the editor\&. .sp The result of this method must be a boolean value\&. If the method returns \fBfalse\fR the move is vetoed and rollbed back\&. .RE .PP .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIcanvas\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS canvas, editing, point cloud, pointsTk_Library_Source_Code/embedded/man/files/modules/canvas/canvas_epolyline.n000064400000000000000000000325001341472355700270240ustar00nobodynobody'\" '\" Generated from file 'canvas_epolyline\&.man' by tcllib/doctools with format 'nroff' '\" .TH "canvas::edit::polyline" n 0\&.1 tklib "Variations on a canvas" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME canvas::edit::polyline \- Editing a polyline on a canvas .SH SYNOPSIS package require \fBTcl 8\&.5\fR .sp package require \fBTk 8\&.5\fR .sp package require \fBcanvas::edit::points ?0\&.1?\fR .sp package require \fBcanvas::edit::polyline ?0\&.1?\fR .sp \fB::canvas::edit\fR \fBpolyline\fR \fIobjectName\fR \fIcanvas\fR \fIoptions\fR\&.\&.\&. .sp \fBobjectName\fR \fBdestroy\fR .sp \fBobjectName\fR \fBenable\fR .sp \fBobjectName\fR \fBdisable\fR .sp \fBobjectName\fR \fBactive\fR .sp \fBobjectName\fR \fBadd\fR \fIx\fR \fIy\fR .sp \fBobjectName\fR \fBclear\fR .sp \fBcreateCmd\fR \fIcanvas\fR \fIx\fR \fIy\fR .sp \fBhighlightCmd\fR \fBon\fR \fIcanvas\fR \fIitem\fR .sp \fBhighlightCmd\fR \fBoff\fR \fIcanvas\fR \fIstate\fR .sp \fBdataCmd\fR \fIeditorObj\fR \fIcoordinates\fR .sp .BE .SH DESCRIPTION This package provides a class whose instances handle editing a single poly-line on a canvas\&. Instances can be configured with regard to the visual appearance (regular, and highlighted) of the markers denoting the line's vertices\&. Note that instances do not store the edited polyline themselves, but delegate this to a configurable object\&. .SH "CLASS API" .TP \fB::canvas::edit\fR \fBpolyline\fR \fIobjectName\fR \fIcanvas\fR \fIoptions\fR\&.\&.\&. This, the class command, creates and configures a new instance of a polyline editor, named \fIobjectName\fR\&. The instance will be connected to the specified \fIcanvas\fR widget\&. .sp The result of the command is the fully qualified name of the instance command\&. .sp The options accepted here, and their values, are explained in the section \fBOptions\fR\&. .PP .SH "INSTANCE API" Instances of the polyline editors provide the following API: .TP \fBobjectName\fR \fBdestroy\fR This method destroys the polyline editor and releases all its internal resources\&. .sp Note that this operation does not destroy the items the editor managed on the attached canvas, nor the canvas itself\&. .sp The result of the method is an empty string\&. .TP \fBobjectName\fR \fBenable\fR 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\&. .sp The result of the method is an empty string\&. .sp The complementary method is \fBdisable\fR\&. The interogatory method for the current state is \fBactive\fR\&. .TP \fBobjectName\fR \fBdisable\fR This method disables editing of the polyline on the canvas\&. A call is ignored if the editor is already disabled\&. .sp The result of the method is an empty string\&. .sp The complementary method is \fBenable\fR\&. The interogatory method for the current state is \fBactive\fR\&. .TP \fBobjectName\fR \fBactive\fR This method queries the editor state\&. .sp The result of the method is a boolean value, \fBtrue\fR if the editor is active, and \fBfalse\fR otherwise, i\&.e\&. disabled\&. .sp The methods to change the state are \fBenable\fR and \fBdisable\fR\&. .TP \fBobjectName\fR \fBadd\fR \fIx\fR \fIy\fR This method programmatically adds a vertex at the specified location to the line\&. .sp The result of the method is an empty string\&. .sp Note that this method goes through the whole set of callbacks invoked when the user interactively creates a vertex, i\&.e\&. \fB-create-cmd\fR, and, more importantly, \fB-data-cmd\fR\&. .sp 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\&. .sp This is the method through which to load the vertices of a pre-existing line into an editor instance\&. .TP \fBobjectName\fR \fBclear\fR This method programmatically removes all vertices from the editor, essentially removing the whole line\&. .sp The result of the method is an empty string\&. .sp Note that this method goes through the same callbacks invoked when the user interactively removes a vertex, i\&.e\&. \fB-data-cmd\fR\&. .PP .SH OPTIONS The class command accepts the following options .TP \fB-tag\fR \fIstring\fR 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\&. .sp This option can only be set at construction time\&. .sp If not specified it defaults to \fBPOLYLINE\fR .TP \fB-create-cmd\fR \fIcommand-prefix\fR The value of this option is a command prefix the editor will invoke when it has to create a new vertex\&. .sp This option can only be set at construction time\&. .sp 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\&. .sp The signature of this command prefix is .RS .TP \fBcreateCmd\fR \fIcanvas\fR \fIx\fR \fIy\fR The result of the command prefix \fImust\fR 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\&. .sp 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\&. .RE .TP \fB-highlight-cmd\fR \fIcommand-prefix\fR The value of this option is a command prefix the editor will invoke when it has to (un)highlight a vertex\&. .sp This option can only be set at construction time\&. .sp If not specified it defaults to a command which will re-color the item to highlight in red (and restores the color for unhighlighting)\&. .sp The two signatures of this command prefix are .RS .TP \fBhighlightCmd\fR \fBon\fR \fIcanvas\fR \fIitem\fR .sp This method of the command prefix has to perform whatever is needed to highlight the vertex the \fIitem\fR is a part of (remember the note above about points allowed to be constructed from multiple canvas items)\&. .sp The result of the command can be anything and will be passed as is as argument \fIstate\fR to the \fBoff\fR method\&. .TP \fBhighlightCmd\fR \fBoff\fR \fIcanvas\fR \fIstate\fR .sp This method is invoked to unhighlight a vertex described by the \fIstate\fR, which is the unchanged result of the \fBon\fR method of the command prefix\&. The result of this method is ignored\&. .sp Note any interaction between dragging and highlighting of vertices is handled within the editor, and that the callback bears no responsibility for doing such\&. .RE .TP \fB-data-cmd\fR \fIcommand-prefix\fR 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\&. .sp This option can only be set at construction time\&. .sp If not specified it defaults to an empty string and is ignored by the editor, i\&.e\&. not invoked\&. .sp The signature of this command prefix is .RS .TP \fBdataCmd\fR \fIeditorObj\fR \fIcoordinates\fR This callback is invoked when the line was changed either interactively, or programmatically\&. See instance method \fBadd\fR for the latter\&. .sp The \fIeditorObj\fR identifies the instance invoking the callback, whereas \fIcoordinates\fR is a list of vertex locations, with each location a pair of x- and y-coordinates\&. .sp The result of this method is ignored\&. .RE .PP .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIcanvas\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS canvas, editing, polylineTk_Library_Source_Code/embedded/man/files/modules/canvas/canvas_equad.n000064400000000000000000000330471341472355700261320ustar00nobodynobody'\" '\" Generated from file 'canvas_equad\&.man' by tcllib/doctools with format 'nroff' '\" .TH "canvas::edit::quadrilateral" n 0\&.1 tklib "Variations on a canvas" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME canvas::edit::quadrilateral \- Editing a quadrilateral on a canvas .SH SYNOPSIS package require \fBTcl 8\&.5\fR .sp package require \fBTk 8\&.5\fR .sp package require \fBcanvas::edit::points ?0\&.1?\fR .sp package require \fBcanvas::edit::quadrilateral ?0\&.1?\fR .sp \fB::canvas::edit\fR \fBquadrilateral\fR \fIobjectName\fR \fIcanvas\fR \fIoptions\fR\&.\&.\&. .sp \fBobjectName\fR \fBdestroy\fR .sp \fBobjectName\fR \fBenable\fR .sp \fBobjectName\fR \fBdisable\fR .sp \fBobjectName\fR \fBactive\fR .sp \fBobjectName\fR \fBadd\fR \fIx\fR \fIy\fR .sp \fBobjectName\fR \fBclear\fR .sp \fBcreateCmd\fR \fIcanvas\fR \fIx\fR \fIy\fR .sp \fBhighlightCmd\fR \fBon\fR \fIcanvas\fR \fIitem\fR .sp \fBhighlightCmd\fR \fBoff\fR \fIcanvas\fR \fIstate\fR .sp \fBdataCmd\fR \fIeditorObj\fR \fIcoordinates\fR .sp .BE .SH 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\&. .SH "CLASS API" .TP \fB::canvas::edit\fR \fBquadrilateral\fR \fIobjectName\fR \fIcanvas\fR \fIoptions\fR\&.\&.\&. This, the class command, creates and configures a new instance of a quadrilateral editor, named \fIobjectName\fR\&. The instance will be connected to the specified \fIcanvas\fR widget\&. .sp The result of the command is the fully qualified name of the instance command\&. .sp The options accepted here, and their values, are explained in the section \fBOptions\fR\&. .PP .SH "INSTANCE API" Instances of the quadrilateral editors provide the following API: .TP \fBobjectName\fR \fBdestroy\fR This method destroys the quadrilateral editor and releases all its internal resources\&. .sp Note that this operation does not destroy the items the editor managed on the attached canvas, nor the canvas itself\&. .sp The result of the method is an empty string\&. .TP \fBobjectName\fR \fBenable\fR 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\&. .sp The result of the method is an empty string\&. .sp The complementary method is \fBdisable\fR\&. The interogatory method for the current state is \fBactive\fR\&. .TP \fBobjectName\fR \fBdisable\fR This method disables editing of the quadrilateral on the canvas\&. A call is ignored if the editor is already disabled\&. .sp The result of the method is an empty string\&. .sp The complementary method is \fBenable\fR\&. The interogatory method for the current state is \fBactive\fR\&. .TP \fBobjectName\fR \fBactive\fR This method queries the editor state\&. .sp The result of the method is a boolean value, \fBtrue\fR if the editor is active, and \fBfalse\fR otherwise, i\&.e\&. disabled\&. .sp The methods to change the state are \fBenable\fR and \fBdisable\fR\&. .TP \fBobjectName\fR \fBadd\fR \fIx\fR \fIy\fR This method programmatically adds a vertex at the specified location to the quadrilateral\&. .sp The result of the method is an empty string\&. .sp Note that this method goes through the whole set of callbacks invoked when the user interactively creates a vertex, i\&.e\&. \fB-create-cmd\fR, and, more importantly, \fB-data-cmd\fR\&. .sp This is the method through which to load the vertices of a pre-existing quadrilateral into an editor instance\&. .sp Note that at most 4 vertices can be specified, and at least 4 must be specified for the quadrilateral to be complete\&. .TP \fBobjectName\fR \fBclear\fR This method programmatically unset the quadrilateral in the editor\&. .sp The result of the method is an empty string\&. .sp Note that this method goes through the same callback invoked when the user interactively removes a vertex, i\&.e\&. \fB-data-cmd\fR\&. .PP .SH OPTIONS The class command accepts the following options .TP \fB-convex\fR \fIboolean\fR 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\&. .sp This option can only be set at construction time\&. .sp If not specified it defaults to \fBfalse\fR, i\&.e\&. acceptance of any quadrilateral\&. .TP \fB-tag\fR \fIstring\fR 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\&. .sp This option can only be set at construction time\&. .sp If not specified it defaults to \fBQUADRILATERAL\fR .TP \fB-create-cmd\fR \fIcommand-prefix\fR The value of this option is a command prefix the editor will invoke when it has to create a new vertex\&. .sp This option can only be set at construction time\&. .sp 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\&. .sp The signature of this command prefix is .RS .TP \fBcreateCmd\fR \fIcanvas\fR \fIx\fR \fIy\fR The result of the command prefix \fImust\fR 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\&. .RE .TP \fB-highlight-cmd\fR \fIcommand-prefix\fR The value of this option is a command prefix the editor will invoke when it has to (un)highlight a vertex\&. .sp This option can only be set at construction time\&. .sp If not specified it defaults to a command which will re-color the item to highlight in red (and restores the color for unhighlighting)\&. .sp The two signatures of this command prefix are .RS .TP \fBhighlightCmd\fR \fBon\fR \fIcanvas\fR \fIitem\fR .sp This method of the command prefix has to perform whatever is needed to highlight the vertex the \fIitem\fR is a part of (remember the note above about quadrilateral allowed to be constructed from multiple canvas items)\&. .sp The result of the command can be anything and will be passed as is as argument \fIstate\fR to the \fBoff\fR method\&. .TP \fBhighlightCmd\fR \fBoff\fR \fIcanvas\fR \fIstate\fR .sp This method is invoked to unhighlight a vertex described by the \fIstate\fR, which is the unchanged result of the \fBon\fR method of the command prefix\&. The result of this method is ignored\&. .sp Note any interaction between dragging and highlighting of quadrilateral is handled within the editor, and that the callback bears no responsibility for doing such\&. .RE .TP \fB-data-cmd\fR \fIcommand-prefix\fR 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\&. .sp This option can only be set at construction time\&. .sp If not specified it defaults to an empty string and is ignored by the editor, i\&.e\&. not invoked\&. .sp The signatures of this command prefix are .RS .TP \fBdataCmd\fR \fIeditorObj\fR \fIcoordinates\fR This callback is invoked when the quarilateral was changed either interactively, or programmatically\&. See instance method \fBadd\fR for the latter\&. .sp The \fIeditorObj\fR identifies the instance invoking the callback, whereas \fIcoordinates\fR is a list of vertex locations, with each location a pair of x- and y-coordinates\&. .sp The result of this method is ignored\&. .RE .PP .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIcanvas\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS canvas, concave, convex, editing, non-convex, quadrilateralTk_Library_Source_Code/embedded/man/files/modules/canvas/canvas_gradient.n000064400000000000000000000217611341472355700266300ustar00nobodynobody'\" '\" Generated from file 'canvas_gradient\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2013 Jarek Lewandowski, MaxJarek '\" Copyright (c) Origin http://wiki\&.tcl\&.tk/6100 '\" Copyright (c) Origin http://wiki\&.tcl\&.tk/37242 '\" Copyright (c) Origin http://wiki\&.tcl\&.tk/9079 '\" .TH "canvas::gradient" n 0\&.2 tklib "Variations on a canvas" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME canvas::gradient \- Canvas with a gradient background .SH SYNOPSIS package require \fBTcl 8\&.5\fR .sp package require \fBTk 8\&.5\fR .sp package require \fBcanvas::gradient ?0\&.2?\fR .sp \fB::canvas::gradient\fR \fIpathName\fR ?options?\&.\&.\&. .sp .BE .SH DESCRIPTION This package provides a command to set background gradients on canvases\&. .PP \fINOTE!\fR This package reserves the canvas tag \fBcanvas::gradient\fR for its use\&. .SH API .TP \fB::canvas::gradient\fR \fIpathName\fR ?options?\&.\&.\&. Creates a background gradient on the canvas \fIpathName\fR\&. An existing gradient is replaced by the new definition\&. .sp The set of available options is decribed below, in section \fBOptions\fR\&. .PP .SS OPTIONS .TP \fB-direction\fR \fIdirection\fR The value for this option specifies the \fIdirection\fR of the gradient\&. If not specified the system defaults to \fBx\fR, a horizontal gradient\&. The package supports five directions: .RS .TP \fBx\fR for a horizontal gradient (default)\&. Color changes along the x-axis, with the start color at the left\&. .TP \fBy\fR for a vertical gradient\&. Color changes along the y-axis, with the start color at the top\&. .TP \fBd1\fR for a diagonal gradient from left+top to bottom+right\&. Color changes along the diagonal\&. with the start color at left+top\&. .TP \fBd2\fR for a diagonal gradient from left+bottom to top+right\&. Color changes along the diagonal\&. with the start color at left+bottom\&. .TP \fBr\fR for a radial gradient around the center of the viewport Color changes from the center outward, with the start color at the center\&. .RE .TP \fB-color1\fR \fIcolor\fR The value for this option specifies the starting color of the gradient\&. If not specified it defaults to \fBred\fR\&. .TP \fB-color2\fR \fIcolor\fR The value for this option specifies the ending color of the gradient\&. If not specified it defaults to \fBgreen\fR\&. .TP \fB-type\fR \fItype\fR The value for this option specifies how the gradient is calculated\&. The package currently supports on ly one method, which is the default, naturally: .RS .TP \fBlinear\fR for linear interpolation between the start and end colors (default)\&. .RE .PP .SH EXAMPLE .CS package require canvas::gradient canvas \&.c canvas::gradient \&.c -direction x -color1 yellow -color2 blue pack \&.c -fill both -expand 1 .CE .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIcanvas\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS background, canvas, color gradient, gradients, image, widget background .SH COPYRIGHT .nf Copyright (c) 2013 Jarek Lewandowski, MaxJarek Copyright (c) Origin http://wiki\&.tcl\&.tk/6100 Copyright (c) Origin http://wiki\&.tcl\&.tk/37242 Copyright (c) Origin http://wiki\&.tcl\&.tk/9079 .fiTk_Library_Source_Code/embedded/man/files/modules/canvas/canvas_highlight.n000064400000000000000000000220461341472355700267770ustar00nobodynobody'\" '\" Generated from file 'canvas_highlight\&.man' by tcllib/doctools with format 'nroff' '\" .TH "canvas::highlight" n 0\&.1 tklib "Variations on a canvas" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME canvas::highlight \- Manage the highlighting of canvas items or item groups .SH SYNOPSIS package require \fBTcl 8\&.5\fR .sp package require \fBTk 8\&.5\fR .sp package require \fBcanvas::highlight ?0\&.1?\fR .sp \fB::canvas::highlight\fR \fBon\fR \fIcanvas\fR \fItagOrId\fR \fIcmd\fR .sp \fB::canvas::highlight\fR \fBoff\fR \fIcanvas\fR \fItagOrId\fR .sp \fB{*}cmd\fR \fBon\fR \fIcanvas\fR \fIitem\fR .sp \fB{*}cmd\fR \fBoff\fR \fIcanvas\fR \fIclientdata\fR .sp .BE .SH 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\&. .SH API .TP \fB::canvas::highlight\fR \fBon\fR \fIcanvas\fR \fItagOrId\fR \fIcmd\fR This command sets up a general highlight, with the items of canvas \fIcanvas\fR to highlight in this manner identified by \fItagOrId\fR and the \fIcmd\fR prefix providing the implementation, i\&.e\&. the how to perform the highlight\&. .sp The signature of the command prefix is described later, in section \fBHighlight callback\fR\&. .sp The result of the command is the empty string\&. .sp Limitations: .RS .IP [1] When a highlight is active no other highlight can be activated\&. This means that nested highlights are not possible\&. .IP [2] The system may break if a highlight is removed from within its highlight callback\&. .RE .TP \fB::canvas::highlight\fR \fBoff\fR \fIcanvas\fR \fItagOrId\fR This command removes any highlight set on the items of canvas \fIcanvas\fR identified by \fItagOrId\fR\&. .sp The result of the command is the empty string\&. .PP .SS "HIGHLIGHT CALLBACK" The highlight callback is a command prefix invoked in the following two ways: .TP \fB{*}cmd\fR \fBon\fR \fIcanvas\fR \fIitem\fR 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)\&. .sp 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\&. .sp 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\&. .TP \fB{*}cmd\fR \fBoff\fR \fIcanvas\fR \fIclientdata\fR 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)\&. .sp The result of the command must be a boolean value with the usual value to be \fBtrue\fR\&. By returning \fBfalse\fR instead the callback can veto the removal of the highlight\&. .PP .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIcanvas\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS canvas, enter callback, highlighting, leave callbackTk_Library_Source_Code/embedded/man/files/modules/canvas/canvas_mvg.n000064400000000000000000000160531341472355700256220ustar00nobodynobody'\" '\" Generated from file 'canvas_mvg\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2010 Wolf-Dieter Busch (http://wiki\&.tcl\&.tk/15505) '\" Copyright (c) 2010 Documentation, Andreas Kupries '\" .TH "canvas::mvg" n 1\&.0\&.1 tklib "Variations on a canvas" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME canvas::mvg \- Canvas to ImageMagick MVG vector format .SH SYNOPSIS package require \fBTcl 8\&.5\fR .sp package require \fBTk 8\&.5\fR .sp package require \fBcanvas::mvg ?1?\fR .sp \fB::canvas::mvg\fR \fIpathName\fR .sp .BE .SH DESCRIPTION This package provides a command to convert a canvas' contents to ImageMagick's MVG vector format\&. .SH API .TP \fB::canvas::mvg\fR \fIpathName\fR Dump the contents of the canvas \fIpathName\fR\&. The result is a string in ImageMagick's MVG vector format\&. .PP .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIcanvas\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS canvas, graphics, imagemagick, magick vector graphics, mvg, print screen, serialization, vector graphics .SH COPYRIGHT .nf Copyright (c) 2010 Wolf-Dieter Busch (http://wiki\&.tcl\&.tk/15505) Copyright (c) 2010 Documentation, Andreas Kupries .fiTk_Library_Source_Code/embedded/man/files/modules/canvas/canvas_snap.n000064400000000000000000000163501341472355700257720ustar00nobodynobody'\" '\" Generated from file 'canvas_snap\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2004 George Petasis (http://wiki\&.tcl\&.tk/1404) '\" Copyright (c) 2010 Documentation, Andreas Kupries '\" .TH "canvas::snap" n 1\&.0\&.1 tklib "Variations on a canvas" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME canvas::snap \- Canvas snapshot to Tk photo image .SH SYNOPSIS package require \fBTcl 8\&.5\fR .sp package require \fBTk 8\&.5\fR .sp package require \fBcanvas::snap ?1\&.0\&.1?\fR .sp package require \fBimg::window \fR .sp \fB::canvas::snap\fR \fIpathName\fR .sp .BE .SH DESCRIPTION This package provides a command to take snapshots of arbitrary canvases\&. .SH API .TP \fB::canvas::snap\fR \fIpathName\fR Takes a snapshot of the canvas \fIpathName\fR\&. The result is the name of a new Tk photo image containing the snapshot\&. .sp \fINote\fR 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\&. .PP .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIcanvas\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS canvas, image, photo, print screen, snapshot .SH COPYRIGHT .nf Copyright (c) 2004 George Petasis (http://wiki\&.tcl\&.tk/1404) Copyright (c) 2010 Documentation, Andreas Kupries .fiTk_Library_Source_Code/embedded/man/files/modules/canvas/canvas_sqmap.n000064400000000000000000000252361341472355700261550ustar00nobodynobody'\" '\" Generated from file 'canvas_sqmap\&.man' by tcllib/doctools with format 'nroff' '\" .TH "canvas::sqmap" n 0\&.3\&.1 tklib "Variations on a canvas" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME canvas::sqmap \- Canvas with map background based on square tiles .SH SYNOPSIS package require \fBTcl 8\&.4\fR .sp package require \fBTk 8\&.4\fR .sp package require \fBsnit \fR .sp package require \fBuevent::onidle \fR .sp package require \fBcache::async \fR .sp package require \fBcanvas::sqmap ?0\&.3\&.1?\fR .sp \fB::canvas::sqmap\fR \fIpathName\fR ?options? .sp \fIcanvasName\fR \fBimage set\fR \fIcell\fR \fIimage\fR .sp \fIcanvasName\fR \fBimage unset\fR \fIcell\fR .sp \fIcanvasName\fR \fBflush\fR .sp .BE .SH 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\&. .SH API .TP \fB::canvas::sqmap\fR \fIpathName\fR ?options? Creates the canvas \fIpathName\fR and configures it\&. The new widget supports all of the options and methods of a regular canvas, plus the options and methods described below\&. .sp The result of the command is \fIpathName\fR\&. .PP .SS OPTIONS .TP \fB-grid-cell-width\fR The value for this option is a non-negative integer\&. It specifies the width of the cells the background is made up of\&. .TP \fB-grid-cell-height\fR The value for this option is a non-negative integer\&. It specifies the height of the cells the background is made up of\&. .TP \fB-grid-cell-command\fR 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\&. .sp 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\&. .CS $result set $cellid $image ; # image is known and ready $result unset $cellid ; # image does not exist .CE .IP 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 \fBimage set\fR, see the next section\&. All other grid cells will simply be empty\&. .TP \fB-viewport-command\fR 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\&. .TP \fB-image-on-load\fR 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 \fB-grid-cell-command\fR\&. .TP \fB-image-on-unset\fR The value for this option is an image\&. If specified the image is shown in a cell for which the callback specified by the \fB-grid-cell-command\fR reported that there is no actual image to be shown\&. .PP .SS METHODS .TP \fIcanvasName\fR \fBimage set\fR \fIcell\fR \fIimage\fR Invoking this method places the \fIimage\fR into the specified \fIcell\fR of the background\&. The cell is given as a 2-element list containing row and column number, in this order\&. .sp Note that an image is allowed to be associated with and displayed in multiple cells of the canvas\&. .TP \fIcanvasName\fR \fBimage unset\fR \fIcell\fR Invoking this method declares the specified \fIcell\fR 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\&. .TP \fIcanvasName\fR \fBflush\fR 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 \fB-grid-cell-command\fR, as in that case the canvas will simply forget all images without being able to reload them\&. .PP .SH "IMAGE OWNERSHIP" Note that the canvas \fIdoes not\fR 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 \fInot\fR deleted\&. Managing the lifecycle of the images shown by the canvas is responsibility of the user of the canvas\&. .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIcanvas\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS canvas, cell, grid, image, map, square map, tileTk_Library_Source_Code/embedded/man/files/modules/canvas/canvas_tags.n000064400000000000000000000220141341472355700257610ustar00nobodynobody'\" '\" Generated from file 'canvas_tags\&.man' by tcllib/doctools with format 'nroff' '\" .TH "canvas::tag" n 0\&.1 tklib "Variations on a canvas" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME canvas::tag \- Easier management of the tags on canvas items or item groups .SH SYNOPSIS package require \fBTcl 8\&.5\fR .sp package require \fBTk 8\&.5\fR .sp package require \fBcanvas::tag ?0\&.1?\fR .sp \fB::canvas::tag\fR \fBappend\fR \fIcanvas\fR \fItagOrId\fR \fItag\fR\&.\&.\&. .sp \fB::canvas::tag\fR \fBprepend\fR \fIcanvas\fR \fItagOrId\fR \fItag\fR\&.\&.\&. .sp \fB::canvas::tag\fR \fBappend\fR \fIcanvas\fR \fItagOrId\fR \fIindex\fR \fItag\fR\&.\&.\&. .sp \fB::canvas::tag\fR \fBremove\fR \fIcanvas\fR \fItagOrId\fR \fItag\fR\&.\&.\&. .sp \fB::canvas::tag\fR \fBmatch\fR \fIcanvas\fR \fItagOrId\fR \fIpattern\fR .sp .BE .SH DESCRIPTION This package provides utility commands for easier management of the tag lists associated with canvas items or item groups\&. .PP 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\&. .PP The commands provided by this package hide all this complexity from the user\&. .SH API .TP \fB::canvas::tag\fR \fBappend\fR \fIcanvas\fR \fItagOrId\fR \fItag\fR\&.\&.\&. This command adds the tags \fItag\fR\&.\&.\&. to the tag list for the items identified by the \fItagOrId\fR in the \fIcanvas\fR widget\&. The new tags are added at the end of the list\&. .sp The result of the command is the empty string\&. .TP \fB::canvas::tag\fR \fBprepend\fR \fIcanvas\fR \fItagOrId\fR \fItag\fR\&.\&.\&. This command adds the tags \fItag\fR\&.\&.\&. to the tag list for the items identified by the \fItagOrId\fR in the \fIcanvas\fR widget\&. The new tags are added at the beginning of the list\&. .sp The result of the command is the empty string\&. .TP \fB::canvas::tag\fR \fBappend\fR \fIcanvas\fR \fItagOrId\fR \fIindex\fR \fItag\fR\&.\&.\&. This command adds the tags \fItag\fR\&.\&.\&. to the tag list for the items identified by the \fItagOrId\fR in the \fIcanvas\fR widget\&. The new tags are inserted before the element at \fIindex\fR\&. .sp \fIindex\fR \fB0\fR refers to the beginning of the list\&. .sp \fIindex\fR \fBend\fR refers to after the end of the list\&. .sp The result of the command is the empty string\&. .TP \fB::canvas::tag\fR \fBremove\fR \fIcanvas\fR \fItagOrId\fR \fItag\fR\&.\&.\&. This command removes the named tags \fItag\fR\&.\&.\&. from the tag list for the items identified by the \fItagOrId\fR in the \fIcanvas\fR widget\&. .sp The result of the command is the empty string\&. .TP \fB::canvas::tag\fR \fBmatch\fR \fIcanvas\fR \fItagOrId\fR \fIpattern\fR This command finds all tags for the items identified by the \fItagOrId\fR in the \fIcanvas\fR widget which match the glob \fIpattern\fR\&. .sp The result of the command is a list of the matching tags\&. Which may be empty\&. .PP .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIcanvas\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS append tag, canvas, insert tag, remove tag, tagsTk_Library_Source_Code/embedded/man/files/modules/canvas/canvas_trlines.n000064400000000000000000000205351341472355700265110ustar00nobodynobody'\" '\" Generated from file 'canvas_trlines\&.man' by tcllib/doctools with format 'nroff' '\" .TH "canvas::track::lines" n 0\&.1 tklib "Variations on a canvas" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME canvas::track::lines \- Manage a group of rubber band lines .SH SYNOPSIS package require \fBTcl 8\&.5\fR .sp package require \fBTk 8\&.5\fR .sp package require \fBcanvas::tag ?0\&.1?\fR .sp \fB::canvas::track\fR \fBlines\fR \fIobjectName\fR \fIcanvas\fR .sp \fBobjectName\fR \fBdestroy\fR .sp \fBobjectName\fR \fBstart\fR \fIcurrent\fR \fIp\fR\&.\&.\&. .sp \fBobjectName\fR \fBmove\fR \fIcurrent\fR .sp \fBobjectName\fR \fBdone\fR .sp .BE .SH DESCRIPTION This package provides a utility class managing the drawing of set of semi-crosshair (rubberband) lines\&. .SH "CLASS API" .TP \fB::canvas::track\fR \fBlines\fR \fIobjectName\fR \fIcanvas\fR This, the class command, creates and configures a new instance of the tracker, named \fIobjectName\fR\&. The instance will be connected to the specified \fIcanvas\fR widget\&. .sp The result of the command is the fully qualified name of the instance command\&. .PP .SH "INSTANCE API" Instances of this class provide the following API: .TP \fBobjectName\fR \fBdestroy\fR This method destroys the instance and releases all its internal resources\&. .sp This operation does destroy the items representing the tracked lines\&. It does not destroy the attached canvas\&. .sp The result of the method is an empty string\&. .TP \fBobjectName\fR \fBstart\fR \fIcurrent\fR \fIp\fR\&.\&.\&. This method starts the tracking of a set of lines, one line per point \fIp\fR, which specifies the destination end-point of each line\&. All lines will have \fIcurrent\fR as a common end-point\&. .sp Note that a previously tracked set of lines is removed\&. .sp The result of the method is an empty string\&. .sp Each point is specified through a 2-element list containing its x- and y-coordinates, in this order\&. .TP \fBobjectName\fR \fBmove\fR \fIcurrent\fR This method updates the shared end-point of all rubberbands and redraws them\&. .sp The result of the method is an empty string\&. .sp The point is specified through a 2-element list containing its x- and y-coordinates, in this order\&. .TP \fBobjectName\fR \fBdone\fR This method ends the tracking of the current set of lines and removes them from the canvas\&. .PP .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIcanvas\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS canvas, crosshair, rubberband, trackingTk_Library_Source_Code/embedded/man/files/modules/canvas/canvas_zoom.n000064400000000000000000000174631341472355700260230ustar00nobodynobody'\" '\" Generated from file 'canvas_zoom\&.man' by tcllib/doctools with format 'nroff' '\" .TH "canvas::zoom" n 0\&.2\&.1 tklib "Variations on a canvas" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME canvas::zoom \- Zoom control for canvas::sqmap .SH SYNOPSIS package require \fBTcl 8\&.4\fR .sp package require \fBTk 8\&.4\fR .sp package require \fBsnit \fR .sp package require \fBuevent::onidle \fR .sp package require \fBcanvas::zoom ?0\&.2\&.1?\fR .sp \fB::canvas::zoom\fR \fIpathName\fR ?options? .sp .BE .SH DESCRIPTION This package provides a widget to enable the user of a map display to control the zoom level\&. .SH API .TP \fB::canvas::zoom\fR \fIpathName\fR ?options? Creates the zoom control widget \fIpathName\fR and configures it\&. The methods and options supported by the new widget are described in the following sections\&. .sp The result of the command is \fIpathName\fR\&. .PP .SS OPTIONS .TP \fB-orient\fR The value for this option is either \fBvertical\fR, or \fBhorizontal\fR, specifying the orientation of the major axis of the widget\&. The default is \fBvertical\fR\&. .TP \fB-levels\fR The value for this option is a non-negative integer\&. It specifies the number of zoom levels to support\&. .TP \fB-variable\fR 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\&. .TP \fB-command\fR 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\&. .PP .SS METHODS The widget supports no methods beyond the standard (\fBconfigure\fR, \fBcget\fR, etc\&.)\&. .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIcanvas\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS zoomTk_Library_Source_Code/embedded/man/files/modules/chatwidget000075500000000000000000000000001341472355700241035ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files/modules/chatwidget/chatwidget.n000064400000000000000000000242711341472355700264720ustar00nobodynobody'\" '\" Generated from file 'chatwidget\&.man' by tcllib/doctools with format 'nroff' '\" .TH "chatwidget" n 1\&.0\&.0 tklib "Composite widget for chat applications" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME chatwidget \- Provides a multi-paned view suitable for display of chat room or irc channel information .SH SYNOPSIS package require \fBTk 8\&.5\fR .sp package require \fBchatwidget ?1\&.0\&.0?\fR .sp \fB::chatwidget::chatwidget\fR \fIpath\fR ?\fIoptions\fR? .sp \fB$widget\fR topic \fIcommand\fR \fIargs\fR .sp \fB$widget\fR name \fInick\fR \fIargs\fR .sp \fB$widget\fR message \fItext\fR \fIargs\fR .sp \fB$widget\fR hook \fIcommand\fR \fIargs\fR .sp \fB$widget\fR names \fIargs\fR .sp \fB$widget\fR entry \fIargs\fR .sp \fB$widget\fR chat \fIargs\fR .sp .BE .SH 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\&. .PP 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\&. .SH COMMANDS .TP \fB::chatwidget::chatwidget\fR \fIpath\fR ?\fIoptions\fR? Create a new chatwidget using the Tk window id \fIpath\fR\&. Any options provided are currently passed directly to the main chat text widget\&. .PP .SH "WIDGET COMMANDS" .TP \fB$widget\fR topic \fIcommand\fR \fIargs\fR The chat widget can display a topic string, for instance the topic or name given to a multi-user chatroom or irc channel\&. .RS .TP \fBshow\fR Enable display of the topic\&. .TP \fBhide\fR Disable display of the topic .TP \fBset \fItopic\fR\fR Set the topic text to \fItopic\fR\&. .RE .TP \fB$widget\fR name \fInick\fR \fIargs\fR Control the names and tags associated with names\&. .RS .TP \fBlist ?\fI-full\fR?\fR 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 \fBadd\fR command\&. .TP \fBadd \fInick\fR ?\fIoptions\fR?\fR .TP \fBdelete \fInick\fR\fR .RE .TP \fB$widget\fR message \fItext\fR \fIargs\fR Add messages to the display\&. options are -nick, -time, -type, -mark -tags .TP \fB$widget\fR hook \fIcommand\fR \fIargs\fR Manage hooks\&. add (message, post names_group, names_nick, chatstate), remove, run .TP \fB$widget\fR names \fIargs\fR Passthrough to the name display text widget\&. See the \fBtext\fR widget manual for all available commands\&. The chatwidget provides two additional commands \fBshow\fR and \fBhide\fR which are used to control the display of this element in the widget\&. .TP \fB$widget\fR entry \fIargs\fR Passthrough to the entry text widget\&. See the \fBtext\fR widget manual for all available commands\&. .TP \fB$widget\fR chat \fIargs\fR Passthrough to the chat text widget\&. See the \fBtext\fR widget manual for all available commands\&. .PP .SH EXAMPLE .CS 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 .CE .PP A more extensive example is available by examining the code for the picoirc program in the tclapps repository which ties the tcllib \fBpicoirc\fR package to this \fBchatwidget\fR package to create a simple irc client\&. .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIchatwidget\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH "SEE ALSO" text(n) .SH KEYWORDS chat, chatwidget, composite widget, irc, mega-widget, widgetTk_Library_Source_Code/embedded/man/files/modules/controlwidget000075500000000000000000000000001341472355700246445ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files/modules/controlwidget/controlwidget.n000064400000000000000000000506401341472355700277730ustar00nobodynobody'\" '\" Generated from file 'controlwidget\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2010 Ron Fox '\" Copyright (c) 2010 Gerhard Reithofer <\&.\&.\&.@\&.\&.\&.> '\" Copyright (c) 2010 Marco Maggi <\&.\&.\&.@\&.\&.\&.> '\" Copyright (c) 2010 Arjen Markus '\" .TH "controlwidget" n 0\&.1 tklib "controlwidget" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME controlwidget \- Collection of widgets for displaying and controlling numerical values .SH SYNOPSIS package require \fBTcl ?8\&.5?\fR .sp package require \fBTk ?8\&.5?\fR .sp package require \fBsnit ?2\&.0?\fR .sp package require \fBcontrolwidget ?0\&.1?\fR .sp \fB::controlwidget::meter\fR \fIw\fR \fIargs\fR .sp \fB::controlwidget::slider\fR \fIw\fR \fIargs\fR .sp \fB::controlwidget::equalizerBar\fR \fIw\fR \fIargs\fR .sp \fB::controlwidget::thermometer\fR \fIw\fR \fIargs\fR .sp \fB::controlwidget::voltmeter\fR \fIw\fR \fIargs\fR .sp \fB::controlwidget::tachometer\fR \fIw\fR \fIargs\fR .sp \fB::controlwidget::rdial\fR \fIw\fR \fIargs\fR .sp \fB$widget\fR get .sp \fB$widget\fR set \fIvalue\fR .sp \fB::controlwidget::led\fR \fIw\fR \fIargs\fR .sp \fB::controlwidget::radioMatrix\fR \fIw\fR \fIargs\fR .sp \fB$led\fR on .sp \fB$led\fR off .sp \fB$led\fR setstate \fIstate\fR .sp \fB$matrix\fR get .sp \fB$matrix\fR set \fIindex\fR .sp .BE .SH DESCRIPTION .PP 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 \fIscale widget\fR\&. .PP \fINote:\fR 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\&. .PP 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\&. .SH "TYPES OF WIDGETS" The package distinguishes several typed of widgets: .IP \(bu Vertical meters: the value of the variable is translated into a vertical position, like with the coloured bars you find on your stereo installation\&. .IP \(bu Angle displays: the value of the variable is related to the angle of a needle, like with tachometers\&. .IP \(bu 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\&. .IP \(bu Non-interactive widgets: some widgets, like the thermometer widget, do not allow such interaction\&. .IP \(bu 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\&. .PP 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)\&. .PP 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 \fIsnit\fR package, so that the methods \fBconfigure\fR and \fBcget\fR are available to set and get these options\&. .SH COMMANDS Currently the package contains these widgets of the \fIvertical meter\fR type: .TP \fB::controlwidget::meter\fR \fIw\fR \fIargs\fR Create a vertical meter consisting of an axis and a moveable arrow\&. .RS .TP widget \fIw\fR (in) Name of the widget to be created\&. .TP arguments \fIargs\fR (in) List of key-value pairs, controlling the appearance and behaviour of the widget: .RS .TP \fBvariable\fR name Name of the variable to be associated with the meter .TP \fBbackground\fR color Background color for the widget .TP \fBheight\fR pixels Height of the widget .TP \fBwidth\fR pixels Width of the widget .TP \fBarrowthickness\fR pixels Thickness of the displayed arrow in pixels .TP \fBarrowcolor\fR color Color of the displayed arrow .TP \fBreadonly\fR boolean Whether the arrow can be moved interactively or not .RE .RE .TP \fB::controlwidget::slider\fR \fIw\fR \fIargs\fR Create a widget containing one or more vertical sliders and an axis\&. You can shift the slider handles interactively via the mouse\&. .RS .TP widget \fIw\fR (in) Name of the widget to be created\&. .TP arguments \fIargs\fR (in) List of key-value pairs, controlling the appearance and behaviour of the widget: .RS .TP \fBvariable\fR name Name of the (list) variable to be associated with the widget .TP \fBnumber\fR integer Number of sliders in the widget .TP \fBbackground\fR color Background color for the widget .TP \fBheight\fR pixels Height of the widget .TP \fBwidth\fR pixels Width of the widget .TP \fBsliderthickness\fR pixels Thickness of the slider handles .TP \fBsliderwidth\fR color Width of the slider handles .TP \fBtroughwidth\fR color Width of the troughs holding the sliders .RE .RE .TP \fB::controlwidget::equalizerBar\fR \fIw\fR \fIargs\fR Create a widget containing one or more vertical bars resembling those found on hifi graphical equalizers\&. Note that it is a read-only widget\&. .RS .TP widget \fIw\fR (in) Name of the widget to be created\&. .TP arguments \fIargs\fR (in) List of key-value pairs, controlling the appearance and behaviour of the widget: .RS .TP \fBvariable\fR name Name of the (list) variable to be associated with the widget .TP \fBnumber\fR integer Number of bars in the widget .TP \fBbackground\fR color Background color for the widget .TP \fBheight\fR pixels Height of the widget .TP \fBwidth\fR pixels Width of the widget .TP \fBbarwidth\fR pixels Width of the bars .TP \fBsegments\fR integer Number of segments the bars are divided in .TP \fBsafecolor\fR color Color for values lower than the warning level .TP \fBwarningcolor\fR color Color for values greater than the warning level .TP \fBwarninglevel\fR double Threshold value, determines at what level the color changes .RE .RE .TP \fB::controlwidget::thermometer\fR \fIw\fR \fIargs\fR Create a thermometer widget (read-only) .RS .TP widget \fIw\fR (in) Name of the widget to be created\&. .TP arguments \fIargs\fR (in) List of key-value pairs, controlling the appearance and behaviour of the widget: .RS .TP \fBvariable\fR name Name of the (list) variable to be associated with the widget .TP \fBbackground\fR color Background color for the widget .TP \fBheight\fR pixels Height of the widget .TP \fBwidth\fR pixels Width of the widget .TP \fBlinethickness\fR pixels Thickness of the line representing the "temperature" .TP \fBlinecolor\fR color Color of the line .RE .RE .PP These widgets all use a vertical axis and have the following options in common for configuring the axis: .TP \fBaxisformat\fR string Format string for formatting the numbers along the axis .TP \fBaxisfont\fR string Name of the font to be used for the numbers .TP \fBaxiscolor\fR color Color of the axis (including the numbers) .TP \fBfrom\fR color Lower value for the axis .TP \fBto\fR color Upper value for the axis .TP \fBmajorticks\fR integer Number of major tickmarks to draw (each is labelled) .TP \fBminorticks\fR integer Number of minor tickmarks to draw between two major tickmarks .TP \fBlog\fR boolean Use a logarithmic axis (true) or a linear axis (false) .PP The package contains the following widget based on angle displays: .TP \fB::controlwidget::voltmeter\fR \fIw\fR \fIargs\fR Create a voltmeter-like widget\&. .RS .TP widget \fIw\fR (in) Name of the widget to be created\&. .TP arguments \fIargs\fR (in) List of key-value pairs, controlling the appearance and behaviour of the widget: .RS .TP \fBvariable\fR name Name of the variable to be associated with the meter .TP \fBvalue\fR value Value for the meter (if not associated with a variable) .TP \fBmin\fR value The minimum value for data in the display .TP \fBmax\fR value The maximum value for data in the display .TP \fBlabels\fR list The labels to be shown along the scale\&. (These are simply considered texts, so no relation with the minimum and maximum perse) .TP \fBtitle\fR string String to be shown below the dial .TP \fBwidth\fR pixels The width of the widget .TP \fBheight\fR pixels The height of the widget .TP \fBborderwidth\fR pixels The width of the border surrounding the entire widget .TP \fBrelief\fR string The relief of the border surrounding the entire widget .TP \fBhighlightthickness\fR pixels The width of the border to indicate the widget has keyboard focus .TP \fBlabelfont\fR fontname Font of the labels to the scale .TP \fBtitlefont\fR fontname Font of the title below the dial .TP \fBdialcolor\fR color Color of the dial holding the needle .TP \fBneedlecolor\fR color Color of the needle .TP \fBscalecolor\fR color Color of the scale (arc and tickmarks) .TP \fBlabelcolor\fR color Color of the labels to the scale .TP \fBtitlecolor\fR color Color of the title below the dial .RE .RE .TP \fB::controlwidget::tachometer\fR \fIw\fR \fIargs\fR Create a tachometer-like widget\&. .RS .TP widget \fIw\fR (in) Name of the widget to be created\&. .TP arguments \fIargs\fR (in) List of key-value pairs, controlling the appearance and behaviour of the widget\&. In addition to the ones given for the voltmeter widget: .RS .TP \fBvariable\fR name Name of the variable to be associated with the meter .TP \fBvalue\fR value Value for the meter (if not associated with a variable) .TP \fBdangerlevel\fR value Level above which values are indicated with a different color .TP \fBdangercolor\fR color Color for the values above the "danger level" .TP \fBdangerwidth\fR pixels Width for the colored band indicating the "danger level" .TP \fBpincolor\fR color Color for the needle and the pin .RE .RE .TP \fB::controlwidget::rdial\fR \fIw\fR \fIargs\fR 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\&. \fINote:\fR The shift and control buttons currently have no effect on Windows\&. .RS .TP widget \fIw\fR (in) Name of the widget to be created\&. .TP arguments \fIargs\fR (in) List of key-value pairs, controlling the appearance and behaviour of the widget: .RS .TP \fBvariable\fR name Name of the variable to be associated with the dial .TP \fBvalue\fR value Value for the dial (if not associated with a variable) .TP \fBorient\fR string Whether a horizontal disk/dial is required ("horizontal") or a vertical one ("vertical") .TP \fBstep\fR value Initial step for incrementing or decrementing the value .TP \fBbindwheel\fR value Step size for controlling the dial's value via the mouse wheel .TP \fBslow\fR value Factor on the step size for incrementing or decrementing the value slowly .TP \fBfast\fR value Factor on the step size for incrementing or decrementing the value fast .TP \fBscale\fR value Scale value to be applied to the actual value .TP \fBcallback\fR command Command to be called when the value changes .TP \fBwidth\fR pixels The width of the widget .TP \fBheight\fR pixels The height of the widget .TP \fBbackground\fR color The background color of the widget (coloring of the disk/dial) .TP \fBforeground\fR color The foreground color of the widget (the marker lines) .RE .RE .PP All these widgets have the following methods: .TP \fB$widget\fR get Return the current value or values shown in the widget .TP \fB$widget\fR set \fIvalue\fR Reset the value or values shown in the widget\&. If the widget is associated with a variable, that variable is set as well\&. .RS .TP value \fIdouble/list\fR New value or values for the widget .RE .PP Two further widgets are available, meant to display logical values: .TP \fB::controlwidget::led\fR \fIw\fR \fIargs\fR Create a LED-like widget\&. .RS .TP widget \fIw\fR (in) Name of the widget to be created\&. .TP arguments \fIargs\fR (in) List of key-value pairs, controlling the appearance and behaviour of the widget\&. In addition to the ones given for the voltmeter widget: .RS .TP \fBvariable\fR name Name of the variable to be associated with the LED .TP \fBsize\fR pixels Diameter of the LED widget .TP \fBon\fR color Color to use for the "on" state .TP \fBoff\fR color Color to use for the "off" state .RE .RE .TP \fB::controlwidget::radioMatrix\fR \fIw\fR \fIargs\fR Create a matrix of radio buttons that behaves as a single widget\&. .RS .TP widget \fIw\fR (in) Name of the widget to be created\&. .TP arguments \fIargs\fR (in) List of key-value pairs, controlling the appearance and behaviour of the widget\&. In addition to the ones given for the voltmeter widget: .RS .TP \fBvariable\fR name Name of the variable to be associated with the matrix .TP \fBorient\fR string The way the radio buttons are to be arranged (horizontal or vertical first) .TP \fBrows\fR integer Number of rows in the matrix .TP \fBcolumns\fR integer Number of columns in the matrix .TP \fBcommand\fR list Command associated with the radio buttons\&. Invoked when the active radio button changes\&. .RE .RE .PP The LED widget has the following public methods: .TP \fB$led\fR on Set the state to "on" .TP \fB$led\fR off Set the state to "off" .TP \fB$led\fR setstate \fIstate\fR Set the state according to the value of "state" .RS .TP state \fIboolean\fR (in) New state for the LED widget .RE .PP The radioMatrix widget has two public methods: .TP \fB$matrix\fR get Return the index of the currently selected radio button .TP \fB$matrix\fR set \fIindex\fR Select the radio button with index "index" .RS .TP index \fIinteger\fR Index of the radio button to be set .RE .PP .SH 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: .IP \(bu Vertical meter, LED display, radio matrix: Ron Fox .IP \(bu Rotating dials: Gerhard Reithofer .IP \(bu Voltmeter and tachometer: Marco Maggi .IP \(bu Code for moving the needle: ? .PP .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIcontrolwidget\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS controlling, displaying, numerical values, scale widget .SH COPYRIGHT .nf Copyright (c) 2010 Ron Fox Copyright (c) 2010 Gerhard Reithofer <\&.\&.\&.@\&.\&.\&.> Copyright (c) 2010 Marco Maggi <\&.\&.\&.@\&.\&.\&.> Copyright (c) 2010 Arjen Markus .fiTk_Library_Source_Code/embedded/man/files/modules/crosshair000075500000000000000000000000001341472355700237555ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files/modules/crosshair/crosshair.n000064400000000000000000000256011341472355700262140ustar00nobodynobody'\" '\" Generated from file 'crosshair\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2003 Kevin Kenny '\" Copyright (c) 2008 (docs) Andreas Kupries '\" Copyright (c) 2013 Frank Gover, Andreas Kupries '\" .TH "crosshair" n 1\&.1 tklib "Crosshairs" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME crosshair \- Crosshairs for Tk canvas .SH SYNOPSIS package require \fBTcl ?8\&.4?\fR .sp package require \fBTk ?8\&.4?\fR .sp package require \fBcrosshair ?1\&.1?\fR .sp \fBcrosshair::crosshair\fR \fIw\fR ?\fIarg\fR\&.\&.\&.? .sp \fBcrosshair::off\fR \fIw\fR .sp \fBcrosshair::configure\fR \fIw\fR ?\fIarg\fR\&.\&.\&.? .sp \fBcrosshair::track\fR \fBon\fR \fIw\fR \fIcmdprefix\fR .sp \fBcrosshair::track\fR \fBoff\fR \fIw\fR .sp \fBcrosshair::bbox_add\fR \fIw\fR \fIbbox\fR .sp \fBcrosshair::bbox_remove\fR \fItoken\fR .sp .BE .SH DESCRIPTION The \fBcrosshair\fR package provides commands to (de)activate and track crosshairs on canvas widgets\&. .SH API The following commands are exported to the public: .TP \fBcrosshair::crosshair\fR \fIw\fR ?\fIarg\fR\&.\&.\&.? This command activates the display of a pair of cross-hairs for the canvas widget \fIw\fR\&. The cross-hairs track the pointing device\&. The result of the command is the empty string\&. .sp All arguments after the widget \fIw\fR are treated as options as for a canvas line item in \fIw\fR\&. Of particular interest are \fB-fill\fR and \fB-dash\fR\&. .TP \fBcrosshair::off\fR \fIw\fR This command removes the cross-hairs from the canvas widget \fIw\fR\&. Nothing is done if the widget had no cross-hairs\&. The result of the command is the empty string\&. .TP \fBcrosshair::configure\fR \fIw\fR ?\fIarg\fR\&.\&.\&.? This command changes the appearance of the cross-hairs in the canvas widget \fIw\fR\&. It is an error to call it for a canvas which has no cross-hairs\&. .sp All arguments after the widget \fIw\fR are treated as options as for a canvas line item in \fIw\fR\&. Of particular interest are \fB-fill\fR and \fB-dash\fR\&. .sp The result of the command are the current configuration settings\&. .TP \fBcrosshair::track\fR \fBon\fR \fIw\fR \fIcmdprefix\fR This command activates reporting of the location of the cross-hairs in the canvas widget \fIw\fR\&. 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\&. .sp After the invokation of this command the specified command prefix \fIcmdprefix\fR will be called whenever the mouse moves within the canvas, with 7 arguments\&. These are, in order: .RS .IP [1] The widget \fIw\fR .IP [2] The x-location of the cross-hairs, in pixels\&. .IP [3] The y-location of the cross-hairs, in pixels\&. .IP [4] The x-location of the top-left corner of the viewport, in pixels\&. .IP [5] The y-location of the top-left corner of the viewport, in pixels\&. .IP [6] The x-location of the bottom-right corner of the viewport, in pixels\&. .IP [7] The y-location of the bottom-right corner of the viewport, in pixels\&. .RE .IP A previously existing callback for \fIw\fR will be disabled\&. I\&.e\&. per canvas widget with cross-hairs only one callback reporting their location is possible\&. .TP \fBcrosshair::track\fR \fBoff\fR \fIw\fR This command disables the reporting of the location of the cross-hairs in the canvas widget \fIw\fR\&. 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\&. .TP \fBcrosshair::bbox_add\fR \fIw\fR \fIbbox\fR This command adds a bounding box to the crosshairs for canvas \fIw\fR\&. The crosshairs will only be active within that area\&. .sp The result of the command is a token with which the bounding box can be removed again, see \fBcrosshair::bbox_remove\fR below\&. .sp The bounding box \fIbbox\fR 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: .CS llx lly urx ury .CE .sp 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 \fIunion\fR of all the specified bounding boxes\&. .TP \fBcrosshair::bbox_remove\fR \fItoken\fR This command removes the bounding box specified by the \fItoken\fR (a result of \fBcrosshair::bbox_add\fR) from the crosshairs for its canvas widget\&. .PP .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fItklib :: crosshair\fR of the \fITcllib SF Trackers\fR [http://sourceforge\&.net/tracker/?group_id=12883]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIcrosshair\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS canvas, cross-hairs, location, tracking, viewport .SH COPYRIGHT .nf Copyright (c) 2003 Kevin Kenny Copyright (c) 2008 (docs) Andreas Kupries Copyright (c) 2013 Frank Gover, Andreas Kupries .fiTk_Library_Source_Code/embedded/man/files/modules/ctext000075500000000000000000000000001341472355700231075ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files/modules/ctext/ctext.n000064400000000000000000000374041341472355700245040ustar00nobodynobody'\" '\" Generated from file 'ctext\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) George Peter Staplin '\" .TH "ctext" n 3\&.3 tklib "Ctext a text widget with highlighting support" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME ctext \- Ctext a text widget with highlighting support .SH SYNOPSIS package require \fBTk \fR .sp package require \fBctext ?3\&.3?\fR .sp \fBctext\fR \fIpathName\fR ?\fIoptions\fR? .sp \fB::ctext::addHighlightClass\fR \fIpathName\fR \fIclass\fR \fIcolor\fR \fIkeywordlist\fR .sp \fB::ctext::addHighlightClassWithOnlyCharStart\fR \fIpathName\fR \fIclass\fR \fIcolor\fR \fIchar\fR .sp \fB::ctext::addHighlightClassForSpecialChars\fR \fIpathName\fR \fIclass\fR \fIcolor\fR \fIcharstring\fR .sp \fB::ctext::addHighlightClassForRegexp\fR \fIpathName\fR \fIclass\fR \fIcolor\fR \fIpattern\fR .sp \fB::ctext::clearHighlightClasses\fR \fIpathName\fR .sp \fB::ctext::getHighlightClasses\fR \fIpathName\fR .sp \fB::ctext::deleteHighlightClass\fR \fIpathName\fR \fIclass\fR .sp \fB::ctext::enableComments\fR \fIenable\fR .sp \fB::ctext::disableComments\fR \fIenable\fR .sp \fIpathName\fR \fBhighlight\fR \fIstartIndex\fR \fIendIndex\fR .sp \fIpathName\fR \fBfastdelete\fR \fIindex1\fR ?\fIindex2\fR? .sp \fIpathName\fR \fBfastinsert\fR .sp \fIpathName\fR \fBcopy\fR .sp \fIpathName\fR \fBcut\fR .sp \fIpathName\fR \fBpaste\fR .sp \fIpathName\fR \fBappend\fR .sp \fIpathName\fR \fBconfigure\fR \fIoption\fR \fIvalue\fR ?\&.\&.\&.? .sp .BE .SH DESCRIPTION The \fBctext\fR package provides the ctext widget which is an enhanced text widget with support for configurable syntax highlighting and some extra commands\&. .PP Ctext overloads the text widget and provides new commands, named \fBhighlight\fR, \fBcopy\fR, \fBpaste\fR,\fBcut\fR, \fBappend\fR, and \fBedit\fR\&. It also provides several commands that allow you to define classes\&. Each class corresponds to a tag in the widget\&. .SH COMMANDS .TP \fBctext\fR \fIpathName\fR ?\fIoptions\fR? Creates and configures a ctext widget\&. .PP .SH HIGHLIGHTING Highlighting is controlled with text widget tags, that are called highlight classes\&. The \fIclass\fR 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 \fBhighlight\fR method of the widget\&. .TP \fB::ctext::addHighlightClass\fR \fIpathName\fR \fIclass\fR \fIcolor\fR \fIkeywordlist\fR Add a highlighting class \fIclass\fR to the ctext widget \fIpathName\fR\&. The highlighting will be done with the color \fIcolor\fR\&. All words in the \fIkeywordlist\fR will be highlighted\&. .CS # highlight some tcl keywords ::ctext::addHighlightClass \&.t tclkeywords red [list set info interp uplevel upvar] .CE .TP \fB::ctext::addHighlightClassWithOnlyCharStart\fR \fIpathName\fR \fIclass\fR \fIcolor\fR \fIchar\fR Add a highlighting class \fIclass\fR to the ctext widget \fIpathName\fR\&. The highlighting will be done with the color \fIcolor\fR\&. All words starting with \fIchar\fR will be highlighted\&. .CS ::ctext::addHighlightClassWithOnlyCharStart \&.t vars blue \\$ .CE .TP \fB::ctext::addHighlightClassForSpecialChars\fR \fIpathName\fR \fIclass\fR \fIcolor\fR \fIcharstring\fR Add a highlighting class \fIclass\fR to the ctext widget \fIpathName\fR\&. The highlighting will be done with the color \fIcolor\fR\&. All chars in \fIcharstring\fR will be highlighted\&. .TP \fB::ctext::addHighlightClassForRegexp\fR \fIpathName\fR \fIclass\fR \fIcolor\fR \fIpattern\fR Add a highlighting class \fIclass\fR to the ctext widget \fIpathName\fR\&. The highlighting will be done with the color \fIcolor\fR\&. All text parts matching the regexp \fIpattern\fR will be highlighted\&. .TP \fB::ctext::clearHighlightClasses\fR \fIpathName\fR Remove all highlight classes from the widget \fIpathName\fR\&. .TP \fB::ctext::getHighlightClasses\fR \fIpathName\fR List all highlight classes for the widget \fIpathName\fR\&. .TP \fB::ctext::deleteHighlightClass\fR \fIpathName\fR \fIclass\fR Delete the highlight class \fIclass\fR from the widget \fIpathName\fR .TP \fB::ctext::enableComments\fR \fIenable\fR Enable C comment highlighting\&. The \fIclass\fR for c-style comments is \fB_cComment\fR\&. The C comment highlighting is disabled by default\&. .TP \fB::ctext::disableComments\fR \fIenable\fR Disable C comment highlighting\&. .PP .SH "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\&. .TP \fIpathName\fR \fBhighlight\fR \fIstartIndex\fR \fIendIndex\fR Highlight the text between \fIstartIndex\fR and \fIendIndex\fR\&. .TP \fIpathName\fR \fBfastdelete\fR \fIindex1\fR ?\fIindex2\fR? Delete text range without updating the highlighting\&. Arguments are identical to the \fIpathName\fR \fBdelete\fR command inherited from the standard text widget\&. .TP \fIpathName\fR \fBfastinsert\fR Insert text without updating the highlighting\&. Arguments are identical to the \fIpathName\fR \fBinsert\fR command inherited from the standard text widget\&. .TP \fIpathName\fR \fBcopy\fR Call \fBtk_textCopy\fR for the ctext instance\&. .TP \fIpathName\fR \fBcut\fR Call \fBtk_textCut\fR for the ctext instance\&. .TP \fIpathName\fR \fBpaste\fR Call \fBtk_textPaste\fR for the ctext instance\&. .TP \fIpathName\fR \fBappend\fR Append the current selection to the clipboard\&. .TP \fIpathName\fR \fBconfigure\fR \fIoption\fR \fIvalue\fR ?\&.\&.\&.? Set the options for the ctext widget\&. Each option name must be followed the new value\&. .PP .SH "WIDGET OPTIONS" .LP .nf .ta 6c Command-Line Switch: \fB-linemap\fR Database Name: \fB\fR Database Class: \fB\fR .fi .IP 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\&. .LP .nf .ta 6c Command-Line Switch: \fB-linemapfg\fR Database Name: \fB\fR Database Class: \fB\fR .fi .IP Changes the foreground of the linemap\&. The default is the same color as the main text widget\&. .LP .nf .ta 6c Command-Line Switch: \fB-linemapbg\fR Database Name: \fB\fR Database Class: \fB\fR .fi .IP Changes the background of the linemap\&. The default is the same color as the main text widget\&. .LP .nf .ta 6c Command-Line Switch: \fB-linemap_select_fg\fR Database Name: \fB\fR Database Class: \fB\fR .fi .IP Changes the selected line foreground\&. The default is black\&. .LP .nf .ta 6c Command-Line Switch: \fB-linemap_select_bg\fR Database Name: \fB\fR Database Class: \fB\fR .fi .IP Changes the selected line background\&. The default is yellow\&. .LP .nf .ta 6c Command-Line Switch: \fB-linemap_mark_command\fR Database Name: \fB\fR Database Class: \fB\fR .fi .IP Calls a procedure or command with the \fIpathName\fR of the ctext window, the \fItype\fR which is either \fBmarked\fR or \fBunmarked\fR, and finally the line number selected\&. The proc prototype is: .CS proc linemark_cmd {win type line}\&. .CE .IP See also ctext_test_interactive\&.tcl .LP .nf .ta 6c Command-Line Switch: \fB-highlight\fR Database Name: \fB\fR Database Class: \fB\fR .fi .IP Takes a boolean value which defines whether or not to highlight text which is inserted or deleted\&. The default is 1\&. .LP .nf .ta 6c Command-Line Switch: \fB-linemap_markable\fR Database Name: \fB\fR Database Class: \fB\fR .fi .IP Takes a boolean value which specifies whether or not lines in the linemap are markable with the mouse\&. The default is 1\&. .PP .SH EXAMPLE .CS 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 .CE Further examples are in the source package for ctext\&. .SH THANKS Kevin Kenny, Neil Madden, Jeffrey Hobbs, Richard Suchenwirth, Johan Bengtsson, Mac Cody, Günther, Andreas Sievers, and Michael Schlenker\&. .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIctext\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH "SEE ALSO" re_syntax, text .SH KEYWORDS syntax highlighting, text, widget .SH COPYRIGHT .nf Copyright (c) George Peter Staplin .fiTk_Library_Source_Code/embedded/man/files/modules/cursor000075500000000000000000000000001341472355700232755ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files/modules/cursor/cursor.n000064400000000000000000000167211341472355700250570ustar00nobodynobody'\" '\" Generated from file 'cursor\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) Jeffrey Hobbs '\" .TH "cursor" n 0\&.3\&.1 tklib "Tk cursor routines" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME cursor \- Procedures to handle CURSOR data .SH SYNOPSIS package require \fBTk \fR .sp package require \fBcursor ?0\&.3\&.1?\fR .sp \fB::cursor::propagate\fR \fIwidget\fR \fIcursor\fR .sp \fB::cursor::restore\fR \fIwidget\fR ?\fIcursor\fR? .sp \fB::cursor::display\fR ?\fIparent\fR? .sp .BE .SH DESCRIPTION The \fBcursor\fR package provides commands to handle Tk cursors\&. .SH COMMANDS The following commands are available: .TP \fB::cursor::propagate\fR \fIwidget\fR \fIcursor\fR Sets the cursor for the specified \fIwidget\fR and all its descendants to \fIcursor\fR\&. .TP \fB::cursor::restore\fR \fIwidget\fR ?\fIcursor\fR? Restore the original or previously set cursor for the specified \fIwidget\fR and all its descendants\&. If \fIcursor\fR is specified, that will be used if on any widget that did not have a preset cursor (set by a previous call to \fB::cursor::propagate\fR)\&. .TP \fB::cursor::display\fR ?\fIparent\fR? 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\&. .PP .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIcursor\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH "SEE ALSO" Tk_GetCursor(3), cursors(n), options(n) .SH KEYWORDS cursor .SH COPYRIGHT .nf Copyright (c) Jeffrey Hobbs .fiTk_Library_Source_Code/embedded/man/files/modules/datefield000075500000000000000000000000001341472355700237015ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files/modules/datefield/datefield.n000064400000000000000000000172521341472355700260670ustar00nobodynobody'\" '\" Generated from file 'datefield\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) Keith Vetter '\" .TH "datefield" n 0\&.2 tklib "Tk datefield widget" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME datefield \- Tk datefield widget .SH SYNOPSIS package require \fBTk \fR .sp package require \fBdatefield ?0\&.2?\fR .sp \fB::datefield::datefield\fR \fIwidgetpath\fR ?\fIoptions\fR? .sp .BE .SH DESCRIPTION The \fBdatefield\fR package provides the datefield widget which is an enhanced text entry widget for the purpose of date entry\&. Only valid dates of the form MM/DD/YYYY can be entered\&. .PP 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\&. .SH COMMANDS .TP \fB::datefield::datefield\fR \fIwidgetpath\fR ?\fIoptions\fR? Creates and configures a date field widget\&. .PP .SH OPTIONS See the \fBentry\fR manual entry for details on all available options\&. .SH EXAMPLE .CS 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 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 .CE .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIdatefield\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH "SEE ALSO" clock(n), entry(n) .SH KEYWORDS clock, date, dateentry, entry, widget .SH CATEGORY Widget .SH COPYRIGHT .nf Copyright (c) Keith Vetter .fiTk_Library_Source_Code/embedded/man/files/modules/diagrams000075500000000000000000000000001341472355700235475ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files/modules/diagrams/diagram.n000064400000000000000000003123041341472355700254140ustar00nobodynobody'\" '\" Generated from file 'diagram\&.man' by tcllib/doctools with format 'nroff' '\" .TH "diagram" n 0\&.3 tklib "Documentation toolbox" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME diagram \- Diagram drawing .SH SYNOPSIS package require \fBTcl 8\&.5\fR .sp package require \fBTk 8\&.5\fR .sp package require \fBdiagram 1\fR .sp \fB::diagram\fR \fIobjectName\fR \fIcanvas\fR ?\fIscript\fR? .sp \fIdiagramObject\fR \fBnew direction\fR \fIname\fR ?\fIkey\fR \fIvalue\fR\&.\&.\&.? .sp \fIdiagramObject\fR \fBnew element\fR \fIname\fR \fIattributes\fR \fIcmdprefix\fR .sp \fIdiagramObject\fR \fBnew alias\fR \fIname\fR \fIcmdprefix\fR .sp \fIdiagramObject\fR \fBnew command\fR \fIname\fR \fIarguments\fR \fIbody\fR .sp \fIdiagramObject\fR \fBnew attribute\fR \fIname\fR ?\fIkey\fR \fIvalue\fR\&.\&.\&.? .sp \fIdiagramObject\fR \fBunknown attribute\fR \fIcmdprefix\fR .sp \fIdiagramObject\fR \fBdraw\fR \fIscript\fR .sp \fBarc\fR \fIattr\fR\&.\&.\&. .sp \fBarrow\fR \fIattr\fR\&.\&.\&. .sp \fB-->\fR \fIattr\fR\&.\&.\&. .sp \fB<-->\fR \fIattr\fR\&.\&.\&. .sp \fB<-->\fR \fIattr\fR\&.\&.\&. .sp \fBblock\fR \fIscript\fR \fIattr\fR\&.\&.\&. .sp \fBbox\fR \fIattr\fR\&.\&.\&. .sp \fBcircle\fR \fIattr\fR\&.\&.\&. .sp \fBO\fR \fIattr\fR\&.\&.\&. .sp \fBdiamond\fR \fIattr\fR\&.\&.\&. .sp \fB<>\fR \fIattr\fR\&.\&.\&. .sp \fBdrum\fR \fIattr\fR\&.\&.\&. .sp \fBellipse\fR \fIattr\fR\&.\&.\&. .sp \fBline\fR \fIattr\fR\&.\&.\&. .sp \fB--\fR \fIattr\fR\&.\&.\&. .sp \fBmove\fR \fIattr\fR .sp \fBspline\fR \fIattr\fR\&.\&.\&. .sp \fBtext\fR \fIattr\fR\&.\&.\&. .sp \fBwest\fR .sp \fBw\fR .sp \fBleft\fR .sp \fBl\fR .sp \fBsouth\fR .sp \fBs\fR .sp \fBdown\fR .sp \fBbottom\fR .sp \fBbot\fR .sp \fBb\fR .sp \fBeast\fR .sp \fBe\fR .sp \fBright\fR .sp \fBr\fR .sp \fBnorth\fR .sp \fBn\fR .sp \fBup\fR .sp \fBtop\fR .sp \fBt\fR .sp \fBnorthwest\fR .sp \fBnw\fR .sp \fBup-left\fR .sp \fBupleft\fR .sp \fBleftup\fR .sp \fBnortheast\fR .sp \fBne\fR .sp \fBup-right\fR .sp \fBupright\fR .sp \fBrightup\fR .sp \fBsouthwest\fR .sp \fBsw\fR .sp \fBdown-left\fR .sp \fBdownleft\fR .sp \fBleftdown\fR .sp \fBsoutheast\fR .sp \fBse\fR .sp \fBdown-right\fR .sp \fBdownright\fR .sp \fBrightdown\fR .sp \fInumber\fR \fBcm\fR .sp \fInumber\fR \fBmm\fR .sp \fInumber\fR \fBinch\fR .sp \fInumber\fR \fBpt\fR .sp \fInumber\fR \fInumber\fR .sp \fBby\fR \fIdistance\fR \fIdirection\fR .sp \fIpoint1\fR \fB+\fR \fIpoint2\fR .sp \fIpoint1\fR \fB-\fR \fIpoint2\fR .sp \fIpoint\fR \fBby\fR \fIdistance\fR \fIdirection\fR .sp \fIpoint1\fR \fB|\fR \fIpoint2\fR .sp \fIn\fR \fBbetween\fR \fIpoin1\fR \fIpoint2\fR .sp \fBintersect\fR \fIelem1\fR \fIelem2\fR .sp \fIelement\fR \fBnames\fR ?\fIpattern\fR? .sp \fIelement\fR \fIcorner\fR .sp \fIelement\fR \fIcorner1\fR \fIcorner2\fR\&.\&.\&. .sp \fIelement\fR ?\fIcorner1\fR\&.\&.\&. ?\fBnames\fR ?\fIpattern\fR??]? .sp \fB\fBn\fRth\fR ?\fIcorner\fR? .sp \fB\fBn\fRth\fR \fBlast\fR ?\fIcorner\fR? .sp \fB\fBn\fRth\fR \fIshape\fR ?\fIcorner\fR? .sp \fB\fBn\fRth\fR \fBlast\fR \fIshape\fR ?\fIcorner\fR? .sp \fBlast\fR ?\fIcorner\fR? .sp \fBlast\fR \fIshape\fR ?\fIcorner\fR? .sp \fB1st\fR .sp \fB2nd\fR .sp \fB3rd\fR .sp .BE .SH DESCRIPTION Welcome to \fBdiagram\fR, a package for the easy construction of diagrams (sic), i\&.e\&. 2D vector graphics, sometimes also called \fIpictures\fR\&. Note that this package is not a replacement for \fBTk\fR'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 \fBdiagram\fR 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\&. .PP This is similar to Brian Kernighan's PIC language for troff, which is the spiritual ancestor of this package\&. .PP 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 \fIDiagram Language Tutorial\fR first\&. Developers wishing to work on the internals of the package and its supporting packages should look at section \fBDiagram Classes\fR first, and then the comments in the sources of the packages itself\&. .PP 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\&. .SH API .SS "CLASS API" The package exports the API described here\&. .TP \fB::diagram\fR \fIobjectName\fR \fIcanvas\fR ?\fIscript\fR? 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 \fIcanvas\fR 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\&. .sp The API of this object command is described in the following section, \fBObject API\fR\&. It may be used to invoke various operations on the object\&. .sp If the \fIscript\fR argument is specified then method \fBdraw\fR will be invoked on it\&. .PP .SS "OBJECT API" Instances of the diagram class support the following methods: .TP \fIdiagramObject\fR \fBnew direction\fR \fIname\fR ?\fIkey\fR \fIvalue\fR\&.\&.\&.? This method defines a new named direction and its attributes\&. The latter is given through the \fIkey\fR/\fIvalue\fR pairs coming after the \fIname\fR\&. .sp Users are mostly free to specify arbitrary attributes with whatever meaning they desire\&. The exception are the names \fIangle\fR and \fIopposite\fR\&. They are special to the diagram package and have a fixed meaning\&. .RS .TP angle This attribute specifies the angle of the direction in degrees, where 0 points east (to the right) and 90 points north (up)\&. .TP opposite This attribute specifies the name of the direction which should be considered as complementary to the named one\&. .RE .TP \fIdiagramObject\fR \fBnew element\fR \fIname\fR \fIattributes\fR \fIcmdprefix\fR This method defines a new graphics element for the drawing language\&. I\&.e\&. \fIname\fR will become a new command in the language, and the specified command prefix (\fIcmdprefix\fR) will be called to perform the actual drawing\&. .sp \fIattributes\fR 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 \fBnew attribute\fR for more information on attribute definitions\&. .sp The command prefix is expected to conform to the following signature: .RS .TP \fBcmdprefix\fR \fIcanvas\fR \fIattributes\fR Where \fIcanvas\fR is the handle of the canvas widget to draw to, and \fIattributes\fR is a dictionary holding the attributes for the element, be they user-specified, or defaults\&. .sp The results of the command has to be a list containing at least two and at most four items\&. These are, in order: .RS .IP [1] The list of canvas items the drawn element consists of\&. .IP [2] The dictionary of named locations in the element, its \fIcorners\fR\&. .IP [3] 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\&. .IP [4] An optional name of a direction\&. If not the empty string this is handed to the automatic layouter as the new direction to follow\&. .RE .RE .TP \fIdiagramObject\fR \fBnew alias\fR \fIname\fR \fIcmdprefix\fR This method defines a new command for the drawing language\&. I\&.e\&. \fIname\fR will become a new command in the language, and the specified command prefix (\fIcmdprefix\fR) 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\&. .sp Note that the prefix is run in the context of the drawing language, allowing the direct use of any existing commands\&. .TP \fIdiagramObject\fR \fBnew command\fR \fIname\fR \fIarguments\fR \fIbody\fR This is like \fBnew alias\fR except that the new command is defined as a procedure in the language's context, with regular argument list and body\&. .TP \fIdiagramObject\fR \fBnew attribute\fR \fIname\fR ?\fIkey\fR \fIvalue\fR\&.\&.\&.? 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 \fIkey\fR/\fIvalue\fR pairs coming after the \fIname\fR\&. .sp The accepted keys and their meanings are: .RS .TP \fBkey\fR 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\&. .sp This key is optional\&. If it is not specified it defaults to the name of the attribute\&. .TP \fBget\fR The value of this key is a command prefix which will be invoked to retrieve the attribute's argument(s) from the command line\&. .sp 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\&. .sp The signature of the command prefix is .RS .TP \fBcmdprefix\fR \fIwordqueue\fR Where \fIwordqueue\fR is the handle of a queue object conforming to the API of the queues provided by package \fBstruct::queue\fR\&. This queue contains the not-yet-processed part of the attribute definitions, with one entry per word, with the first entry the word \fIafter\fR name of the attribute\&. In other words, the attribute's name has already been removed from the queue\&. .sp The result of the command is the value of the attribute, which may have been taken from the queue, or not\&. .RE .TP \fBtransform\fR The value of this key is a command prefix which will be invoked to transform the retrieved value (See \fBget\fR) into their final form\&. .sp This key is optional\&. If it is not specified no transformation is done\&. The signature of the command prefix is .RS .TP \fBcmdprefix\fR \fIvalue\fR Where \fIvalue\fR is the value to transform\&. .sp The result of the command is the final value of the attribute\&. .RE .TP \fBtype\fR The value of this key is a command prefix which will be invoked to validate the attribute's argument(s)\&. .sp This key is optional\&. If it is not specified no validation is done\&. .sp The signature of the command prefix is that of snit validation types\&. See the documentation of the \fBsnit\fR package\&. .TP \fBmerge\fR 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\&. .sp This key is optional\&. If it is not specified a default merge is chosen, based on the data for key \fBaggregate\fR, see below\&. The signature of the command prefix is .RS .TP \fBcmdprefix\fR \fIvalue\fR \fIdict\fR Where \fIvalue\fR is the value to insert, and \fIdict\fR the dictionary of attributes and values collected so far\&. .sp The result of the command is the new dictionary of attributes\&. .RE .TP \fBaggregate\fR The value of this key is a boolean flag\&. It has an effect if and only if the key \fBmerge\fR was not specified\&. This key is optional\&. If it is not specified it defaults to \fBFalse\fR\&. .sp If the key is effective, the value of \fBFalse\fR means that the attribute's value is \fIset\fR into the dictionary using the value of key \fIkey\fR (see above) as index, \fIoverwriting\fR any previously specified value\&. .sp If the key is effective, the value of \fBTrue\fR means that the attribute's value is \fIadded\fR to the dictionary using the value of key \fIkey\fR (see above) as index, \fIextending\fR 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\&. .TP \fBdefault\fR 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 \fIattributes\fR of method \fBnew element\fR)\&. .sp Note that the connection is made through the value of key \fIkey\fR, not through the attribute name per se\&. .sp 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\&. .sp This key is optional\&. If an element requires this attribute, but \fIdefault\fR is not specified then nothing will be done\&. .sp The signature of the command prefix is .RS .TP \fBcmdprefix\fR \fBinit\fR 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\&. .sp The result of this method is ignored\&. .TP \fBcmdprefix\fR \fBfill\fR \fIvarname\fR This method is run to put defaults, or derived values into the attribute dictionary named by \fIvarname\fR\&. This variable will be found in the calling context\&. .sp The result of this method is ignored\&. .TP \fBcmdprefix\fR \fBset\fR \fIname\fR \fIvalue\fR This method is run to push current a attribute value into the language namespace, to make it the new default\&. .sp The result of this method is ignored\&. .RE .TP \fBlinked\fR This key is effective if and only if key \fBdefault\fR is not specified\&. In that case is supplies a default handling for \fBdefault\fR, linking the attribute to a variable in the language context\&. .sp 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\&. .RE .TP \fIdiagramObject\fR \fBunknown attribute\fR \fIcmdprefix\fR 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\&. .sp 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: .RS .TP \fBcmdprefix\fR \fIwordqueue\fR Where \fIwordqueue\fR is the handle of a queue object conforming to the API of the queues provided by package \fBstruct::queue\fR\&. 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\&. .sp The results of the command has to be a boolean value where \fBTrue\fR signals that this callback has accepted the attribute, processed it, and the new state of the \fIwordqueue\fR is where the general processing shall continue\&. .sp Given the signature the command has basically two ways of handling (rewriting) the attributes it recognizes: .RS .IP [1] Replace the attribute (and arguments) with a different attribute and arguments\&. .IP [2] Push additional words in front to get the general processing unstuck\&. .RE .RE .TP \fIdiagramObject\fR \fBdraw\fR \fIscript\fR This method runs the given \fIscript\fR in the context of the drawing language definitions\&. See section \fBLanguage Reference\fR for details on the available commands\&. .sp \fINote\fR that \fIscript\fR is \fItrusted\fR\&. 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\&. .PP .SH "LANGUAGE REFERENCE" .SS 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 \fBMiscellaneous Commands\fR\&. IMAGE: figure-02-basic-shapes .TP \fBarc\fR \fIattr\fR\&.\&.\&. IMAGE: figure-02-arc 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 .RS .TP \fBanchor\fR \fIname\fR .TP \fBljust\fR .TP \fBrjust\fR .TP \fBabove\fR .TP \fBbelow\fR IMAGE: figure-22-text-anchoring-3 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 \fBanchor\fR, which itself defaults to \fBcenter\fR\&. The legal values are all those accepted by \fITk_GetAnchor\fR [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, \fBanchor\fR has to be used\&. .RS .TP \fBljust\fR "anchor west" .TP \fBrjust\fR "anchor east" .TP \fBabove\fR "anchor south" .TP \fBbelow\fR "anchor north" .RE .TP \fBclockwise\fR .TP \fBcw\fR Specifies the direction of the \fBarc\fR element, here going clockwise\&. The complementary attribute is \fBcounterclockwise\fR\&. If not specified the system falls back to the value taken from the language variable \fBclockwise\fR, which itself defaults to \fBfalse\fR, for counter-clockwise direction\&. .TP \fBcolor\fR \fIspec\fR IMAGE: figure-21-style-colors 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 \fBlinecolor\fR, which itself defaults to \fBblack\fR\&. .TP \fBcounterclockwise\fR .TP \fBccw\fR Specifies the direction of the \fBarc\fR element, here counter-clockwise\&. The complementary attribute is \fBclockwise\fR\&. If not specified the system falls back to the value taken from the language variable \fBclockwise\fR, which itself defaults to \fBfalse\fR, for counter-clockwise direction\&. .TP \fBfillcolor\fR \fIspec\fR IMAGE: figure-21-style-colors 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 \fBfillcolor\fR, which itself defaults to the empty string, signaling "no filling"\&. .TP \fBfrom\fR \fIlocation\fR Specifies the location where the \fBarc\fR element begins\&. Defaults to the current location as maintained by the layouting system\&. .TP \fBjustify\fR \fBleft\fR|\fBcenter\fR|\fBright\fR 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 \fBjustify\fR, which itself defaults to \fBleft\fR\&. The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. .TP \fBradius\fR \fIlength\fR Specifies the radius of the \fBarc\fR 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 \fBarcradius\fR, which itself defaults to the pixel equivalent of \fB1 cm\fR\&. .TP \fBstroke\fR \fIwidth\fR IMAGE: figure-20-style-stroke 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 \fBlinewidth\fR, which itself defaults to \fB1\fR\&. .TP \fBstyle\fR \fIspec\fR IMAGE: figure-18-style-dash 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 \fBlinestyle\fR, which itself defaults to \fBsolid\fR lines\&. The legal values are all those accepted by \fITk_GetDash\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetDash\&.htm], and additionally all which are listed below: .RS .TP \fBsolid\fR, empty string Draw solid line\&. .TP \fBdash\fR, \fBdashed\fR, \fB-\fR Draw a dashed line\&. .TP \fBdot\fR, \fBdotted\fR, \fB\&.\fR Draw a dotted line\&. .TP \fBdash-dot\fR, \fB-\&.\fR Draw a dash-dotted line .TP \fBdash-dot-dot\fR, \fB-\&.\&.\fR Draw a dash-dot-dotted line\&. .RE .IP Note that the values "solid", "dot(ted)", "dash(ed)", "dash-dot", and "dash-dot-dot" are all accepted as shorthands for the \fBstyle\fR command using them as argument\&. .TP \fBtext\fR \fIstring\fR 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\&. .TP \fBtextcolor\fR \fIspec\fR 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 \fBtextcolor\fR, which itself defaults to \fBblack\fR\&. .TP \fBtextfont\fR \fIspec\fR 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 \fBtextfont\fR, which itself defaults to \fBHelvetica 12pt\fR\&. .TP \fBto\fR \fIlocation\fR Specifies the location where the \fBarc\fR element ends\&. Defaults to a location such that a 90-degree arc is drawn in the chosen direction, starting at \fBfrom\fR\&. .RE .TP \fBarrow\fR \fIattr\fR\&.\&.\&. .TP \fB-->\fR \fIattr\fR\&.\&.\&. .TP \fB<-->\fR \fIattr\fR\&.\&.\&. .TP \fB<-->\fR \fIattr\fR\&.\&.\&. IMAGE: figure-02-arrow An alias for the \fBline\fR element (see below), with the attribute \fBarrowhead\fR preset to \fB->\fR, \fB<->\fR, or \fB<-\fR\&. The \fBarrow\fR is equivalent to \fB-->\fR\&. .TP \fBblock\fR \fIscript\fR \fIattr\fR\&.\&.\&. 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 \fIscript\fR 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\&. .sp 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\&. .sp 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 \fBgroup\fR\&. .sp Blocks handle all attributes, propgating their settings into the script as the default values active during script execution\&. .TP \fBbox\fR \fIattr\fR\&.\&.\&. IMAGE: figure-02-box A closed element with the corresponding corners, i\&.e\&. the eight directions of the compass rose, and "center"\&. It handles the attributes .RS .TP \fBanchor\fR \fIname\fR .TP \fBljust\fR .TP \fBrjust\fR .TP \fBabove\fR .TP \fBbelow\fR IMAGE: figure-22-text-anchoring-3 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 \fBanchor\fR, which itself defaults to \fBcenter\fR\&. The legal values are all those accepted by \fITk_GetAnchor\fR [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, \fBanchor\fR has to be used\&. .RS .TP \fBljust\fR "anchor west" .TP \fBrjust\fR "anchor east" .TP \fBabove\fR "anchor south" .TP \fBbelow\fR "anchor north" .RE .TP \fBat\fR \fIlocation\fR Specifies the location of the element's corner named by the attribute \fBwith\fR\&. Defaults to the current location as maintained by the layouting system\&. .TP \fBcolor\fR \fIspec\fR IMAGE: figure-21-style-colors 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 \fBlinecolor\fR, which itself defaults to \fBblack\fR\&. .TP \fBfillcolor\fR \fIspec\fR IMAGE: figure-21-style-colors 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 \fBfillcolor\fR, which itself defaults to the empty string, signaling "no filling"\&. .TP \fBheight\fR \fIlength\fR .TP \fBht\fR \fIlength\fR Specifies the height of the element\&. If not specified the system falls back to the value taken from the language variable \fBboxheight\fR, which itself defaults to the pixel equivalent of \fB2 cm\fR\&. .TP \fBjustify\fR \fBleft\fR|\fBcenter\fR|\fBright\fR 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 \fBjustify\fR, which itself defaults to \fBleft\fR\&. The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. .TP \fBslant\fR \fIangle\fR Specifies the angle by which the \fBbox\fR element is slanted, in degrees\&. If not specified the system falls back to the value taken from the language variable \fBslant\fR, which itself defaults to \fB90\fR, 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\&. .TP \fBstroke\fR \fIwidth\fR IMAGE: figure-20-style-stroke 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 \fBlinewidth\fR, which itself defaults to \fB1\fR\&. .TP \fBstyle\fR \fIspec\fR IMAGE: figure-18-style-dash 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 \fBlinestyle\fR, which itself defaults to \fBsolid\fR lines\&. The legal values are all those accepted by \fITk_GetDash\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetDash\&.htm], and additionally all which are listed below: .RS .TP \fBsolid\fR, empty string Draw solid line\&. .TP \fBdash\fR, \fBdashed\fR, \fB-\fR Draw a dashed line\&. .TP \fBdot\fR, \fBdotted\fR, \fB\&.\fR Draw a dotted line\&. .TP \fBdash-dot\fR, \fB-\&.\fR Draw a dash-dotted line .TP \fBdash-dot-dot\fR, \fB-\&.\&.\fR Draw a dash-dot-dotted line\&. .RE .IP Note that the values "solid", "dot(ted)", "dash(ed)", "dash-dot", and "dash-dot-dot" are all accepted as shorthands for the \fBstyle\fR command using them as argument\&. .TP \fBtext\fR \fIstring\fR 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\&. .TP \fBtextcolor\fR \fIspec\fR 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 \fBtextcolor\fR, which itself defaults to \fBblack\fR\&. .TP \fBtextfont\fR \fIspec\fR 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 \fBtextfont\fR, which itself defaults to \fBHelvetica 12pt\fR\&. .TP \fBwidth\fR \fIlength\fR .TP \fBwid\fR \fIlength\fR Specifies the width of the element\&. If not specified the system falls back to the value taken from the language variable \fBboxwidth\fR, which itself defaults to the pixel equivalent of \fB2 cm\fR\&. .TP \fBwith\fR \fIcorner\fR Specifies the corner of the element to place at the location given by the attribute \fBat\fR\&. Defaults to the current corner as maintained by the layouting system, except if the value for \fBat\fR was specified by the user\&. In that case it defaults to \fBcenter\fR\&. .RE .TP \fBcircle\fR \fIattr\fR\&.\&.\&. .TP \fBO\fR \fIattr\fR\&.\&.\&. IMAGE: figure-02-circle A closed element with the corresponding corners, i\&.e\&. the eight directions of the compass rose, and "center"\&. It handles the attributes .RS .TP \fBanchor\fR \fIname\fR .TP \fBljust\fR .TP \fBrjust\fR .TP \fBabove\fR .TP \fBbelow\fR IMAGE: figure-22-text-anchoring-3 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 \fBanchor\fR, which itself defaults to \fBcenter\fR\&. The legal values are all those accepted by \fITk_GetAnchor\fR [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, \fBanchor\fR has to be used\&. .RS .TP \fBljust\fR "anchor west" .TP \fBrjust\fR "anchor east" .TP \fBabove\fR "anchor south" .TP \fBbelow\fR "anchor north" .RE .TP \fBat\fR \fIlocation\fR Specifies the location of the element's corner named by the attribute \fBwith\fR\&. Defaults to the current location as maintained by the layouting system\&. .TP \fBcolor\fR \fIspec\fR IMAGE: figure-21-style-colors 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 \fBlinecolor\fR, which itself defaults to \fBblack\fR\&. .TP \fBdiameter\fR \fIlength\fR .TP \fBdiam\fR \fIlength\fR Specifies the diameter of the \fBcircle\fR element, as an alternative way to specify its \fBradius\fR\&. 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\&. .TP \fBfillcolor\fR \fIspec\fR IMAGE: figure-21-style-colors 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 \fBfillcolor\fR, which itself defaults to the empty string, signaling "no filling"\&. .TP \fBjustify\fR \fBleft\fR|\fBcenter\fR|\fBright\fR 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 \fBjustify\fR, which itself defaults to \fBleft\fR\&. The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. .TP \fBradius\fR \fIlength\fR .TP \fBrad\fR \fIlength\fR Specifies the radius of the \fBcircle\fR element\&. If not specified the system falls back to the value taken from the language variable \fBcircleradius\fR, which itself defaults to the pixel equivalent of \fB1 cm\fR\&. .TP \fBstroke\fR \fIwidth\fR IMAGE: figure-20-style-stroke 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 \fBlinewidth\fR, which itself defaults to \fB1\fR\&. .TP \fBstyle\fR \fIspec\fR IMAGE: figure-18-style-dash 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 \fBlinestyle\fR, which itself defaults to \fBsolid\fR lines\&. The legal values are all those accepted by \fITk_GetDash\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetDash\&.htm], and additionally all which are listed below: .RS .TP \fBsolid\fR, empty string Draw solid line\&. .TP \fBdash\fR, \fBdashed\fR, \fB-\fR Draw a dashed line\&. .TP \fBdot\fR, \fBdotted\fR, \fB\&.\fR Draw a dotted line\&. .TP \fBdash-dot\fR, \fB-\&.\fR Draw a dash-dotted line .TP \fBdash-dot-dot\fR, \fB-\&.\&.\fR Draw a dash-dot-dotted line\&. .RE .IP Note that the values "solid", "dot(ted)", "dash(ed)", "dash-dot", and "dash-dot-dot" are all accepted as shorthands for the \fBstyle\fR command using them as argument\&. .TP \fBtext\fR \fIstring\fR 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\&. .TP \fBtextcolor\fR \fIspec\fR 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 \fBtextcolor\fR, which itself defaults to \fBblack\fR\&. .TP \fBtextfont\fR \fIspec\fR 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 \fBtextfont\fR, which itself defaults to \fBHelvetica 12pt\fR\&. .TP \fBwith\fR \fIcorner\fR Specifies the corner of the element to place at the location given by the attribute \fBat\fR\&. Defaults to the current corner as maintained by the layouting system, except if the value for \fBat\fR was specified by the user\&. In that case it defaults to \fBcenter\fR\&. .RE .TP \fBdiamond\fR \fIattr\fR\&.\&.\&. .TP \fB<>\fR \fIattr\fR\&.\&.\&. IMAGE: figure-02-diamond A closed element with the corresponding corners, i\&.e\&. the eight directions of the compass rose, and "center"\&. It handles the attributes .RS .TP \fBanchor\fR \fIname\fR .TP \fBljust\fR .TP \fBrjust\fR .TP \fBabove\fR .TP \fBbelow\fR IMAGE: figure-22-text-anchoring-3 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 \fBanchor\fR, which itself defaults to \fBcenter\fR\&. The legal values are all those accepted by \fITk_GetAnchor\fR [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, \fBanchor\fR has to be used\&. .RS .TP \fBljust\fR "anchor west" .TP \fBrjust\fR "anchor east" .TP \fBabove\fR "anchor south" .TP \fBbelow\fR "anchor north" .RE .TP \fBaspect\fR \fInumber\fR Specifies the aspect ratio, i\&.e ratio of width to height, of the \fBdiamond\fR element\&. The manner in which a default is calculated when not specified also depends on the specifications of the attributes \fBwidth\fR and \fBheight\fR, if any\&. .sp If both \fBwidth\fR, and \fBheight\fR are specified then any specification of \fBaspect\fR 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\&. .sp If the \fBaspect\fR is specified, and one of the attributes \fBwidth\fR or \fBheight\fR, then the missing attribute is calculated from the two which are specified\&. No defaults are required for these cases either\&. .sp If only one of the attributes \fBwidth\fR or \fBheight\fR is specified then the system uses a fallback for the \fBaspect\fR, the value taken from the language variable \fBdiamondaspect\fR, which itselfs defaults to \fB2\fR\&. .sp If none of of the attributes \fBwidth\fR or \fBheight\fR is specified then the system uses a fallback for the \fBwidth\fR, the value taken from the language variable \fBboxwidth\fR, which itselfs defaults to the pixel equivalent of \fB2 cm\fR\&. For the aspect it uses either the user-specified value or the default taken as described in the previous paragraph\&. .TP \fBat\fR \fIlocation\fR Specifies the location of the element's corner named by the attribute \fBwith\fR\&. Defaults to the current location as maintained by the layouting system\&. .TP \fBcolor\fR \fIspec\fR IMAGE: figure-21-style-colors 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 \fBlinecolor\fR, which itself defaults to \fBblack\fR\&. .TP \fBfillcolor\fR \fIspec\fR IMAGE: figure-21-style-colors 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 \fBfillcolor\fR, which itself defaults to the empty string, signaling "no filling"\&. .TP \fBheight\fR \fIlength\fR Specifies the height of the \fBdiamond\fR element\&. The manner in which a default is calculated when not specified also depends on the specifications of the attributes \fBaspect\fR and \fBwidth\fR, if any\&. .sp If both \fBwidth\fR, and \fBheight\fR are specified then any specification of \fBaspect\fR 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\&. .sp If the \fBaspect\fR is specified, and one of the attributes \fBwidth\fR or \fBheight\fR, then the missing attribute is calculated from the two which are specified\&. No defaults are required for these cases either\&. .sp If only one of the attributes \fBwidth\fR or \fBheight\fR is specified then the system uses a fallback for the \fBaspect\fR, the value taken from the language variable \fBdiamondaspect\fR, which itselfs defaults to \fB2\fR\&. .sp If none of of the attributes \fBwidth\fR or \fBheight\fR is specified then the system uses a fallback for the \fBwidth\fR, the value taken from the language variable \fBboxwidth\fR, which itselfs defaults to the pixel equivalent of \fB2 cm\fR\&. For the aspect it uses either the user-specified value or the default taken as described in the previous paragraph\&. .TP \fBjustify\fR \fBleft\fR|\fBcenter\fR|\fBright\fR 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 \fBjustify\fR, which itself defaults to \fBleft\fR\&. The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. .TP \fBstroke\fR \fIwidth\fR IMAGE: figure-20-style-stroke 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 \fBlinewidth\fR, which itself defaults to \fB1\fR\&. .TP \fBstyle\fR \fIspec\fR IMAGE: figure-18-style-dash 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 \fBlinestyle\fR, which itself defaults to \fBsolid\fR lines\&. The legal values are all those accepted by \fITk_GetDash\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetDash\&.htm], and additionally all which are listed below: .RS .TP \fBsolid\fR, empty string Draw solid line\&. .TP \fBdash\fR, \fBdashed\fR, \fB-\fR Draw a dashed line\&. .TP \fBdot\fR, \fBdotted\fR, \fB\&.\fR Draw a dotted line\&. .TP \fBdash-dot\fR, \fB-\&.\fR Draw a dash-dotted line .TP \fBdash-dot-dot\fR, \fB-\&.\&.\fR Draw a dash-dot-dotted line\&. .RE .IP Note that the values "solid", "dot(ted)", "dash(ed)", "dash-dot", and "dash-dot-dot" are all accepted as shorthands for the \fBstyle\fR command using them as argument\&. .TP \fBtext\fR \fIstring\fR 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\&. .TP \fBtextcolor\fR \fIspec\fR 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 \fBtextcolor\fR, which itself defaults to \fBblack\fR\&. .TP \fBtextfont\fR \fIspec\fR 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 \fBtextfont\fR, which itself defaults to \fBHelvetica 12pt\fR\&. .TP \fBwidth\fR \fIlength\fR Specifies the width of the \fBdiamond\fR element\&. The manner in which a default is calculated when not specified also depends on the specifications of the attributes \fBaspect\fR and \fBheight\fR, if any\&. .sp If both \fBwidth\fR, and \fBheight\fR are specified then any specification of \fBaspect\fR 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\&. .sp If the \fBaspect\fR is specified, and one of the attributes \fBwidth\fR or \fBheight\fR, then the missing attribute is calculated from the two which are specified\&. No defaults are required for these cases either\&. .sp If only one of the attributes \fBwidth\fR or \fBheight\fR is specified then the system uses a fallback for the \fBaspect\fR, the value taken from the language variable \fBdiamondaspect\fR, which itselfs defaults to \fB2\fR\&. .sp If none of of the attributes \fBwidth\fR or \fBheight\fR is specified then the system uses a fallback for the \fBwidth\fR, the value taken from the language variable \fBboxwidth\fR, which itselfs defaults to the pixel equivalent of \fB2 cm\fR\&. For the aspect it uses either the user-specified value or the default taken as described in the previous paragraph\&. .TP \fBwith\fR \fIcorner\fR Specifies the corner of the element to place at the location given by the attribute \fBat\fR\&. Defaults to the current corner as maintained by the layouting system, except if the value for \fBat\fR was specified by the user\&. In that case it defaults to \fBcenter\fR\&. .RE .TP \fBdrum\fR \fIattr\fR\&.\&.\&. IMAGE: figure-02-drum A closed element with the corresponding corners, i\&.e\&. the eight directions of the compass rose, and "center"\&. It handles the attributes .RS .TP \fBanchor\fR \fIname\fR .TP \fBljust\fR .TP \fBrjust\fR .TP \fBabove\fR .TP \fBbelow\fR IMAGE: figure-22-text-anchoring-3 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 \fBanchor\fR, which itself defaults to \fBcenter\fR\&. The legal values are all those accepted by \fITk_GetAnchor\fR [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, \fBanchor\fR has to be used\&. .RS .TP \fBljust\fR "anchor west" .TP \fBrjust\fR "anchor east" .TP \fBabove\fR "anchor south" .TP \fBbelow\fR "anchor north" .RE .TP \fBaspect\fR \fInumber\fR 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 \fBdrum\fR element\&. If not specified the system falls back to the value taken from the language variable \fBdrumaspect\fR, which itself defaults to \fB0\&.35\fR\&. .TP \fBat\fR \fIlocation\fR Specifies the location of the element's corner named by the attribute \fBwith\fR\&. Defaults to the current location as maintained by the layouting system\&. .TP \fBcolor\fR \fIspec\fR IMAGE: figure-21-style-colors 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 \fBlinecolor\fR, which itself defaults to \fBblack\fR\&. .TP \fBfillcolor\fR \fIspec\fR IMAGE: figure-21-style-colors 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 \fBfillcolor\fR, which itself defaults to the empty string, signaling "no filling"\&. .TP \fBheight\fR \fIlength\fR .TP \fBht\fR \fIlength\fR Specifies the height of the element\&. If not specified the system falls back to the value taken from the language variable \fBboxheight\fR, which itself defaults to the pixel equivalent of \fB2 cm\fR\&. .TP \fBjustify\fR \fBleft\fR|\fBcenter\fR|\fBright\fR 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 \fBjustify\fR, which itself defaults to \fBleft\fR\&. The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. .TP \fBstroke\fR \fIwidth\fR IMAGE: figure-20-style-stroke 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 \fBlinewidth\fR, which itself defaults to \fB1\fR\&. .TP \fBstyle\fR \fIspec\fR IMAGE: figure-18-style-dash 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 \fBlinestyle\fR, which itself defaults to \fBsolid\fR lines\&. The legal values are all those accepted by \fITk_GetDash\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetDash\&.htm], and additionally all which are listed below: .RS .TP \fBsolid\fR, empty string Draw solid line\&. .TP \fBdash\fR, \fBdashed\fR, \fB-\fR Draw a dashed line\&. .TP \fBdot\fR, \fBdotted\fR, \fB\&.\fR Draw a dotted line\&. .TP \fBdash-dot\fR, \fB-\&.\fR Draw a dash-dotted line .TP \fBdash-dot-dot\fR, \fB-\&.\&.\fR Draw a dash-dot-dotted line\&. .RE .IP Note that the values "solid", "dot(ted)", "dash(ed)", "dash-dot", and "dash-dot-dot" are all accepted as shorthands for the \fBstyle\fR command using them as argument\&. .TP \fBtext\fR \fIstring\fR 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\&. .TP \fBtextcolor\fR \fIspec\fR 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 \fBtextcolor\fR, which itself defaults to \fBblack\fR\&. .TP \fBtextfont\fR \fIspec\fR 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 \fBtextfont\fR, which itself defaults to \fBHelvetica 12pt\fR\&. .TP \fBwidth\fR \fIlength\fR .TP \fBwid\fR \fIlength\fR Specifies the width of the element\&. If not specified the system falls back to the value taken from the language variable \fBboxwidth\fR, which itself defaults to the pixel equivalent of \fB2 cm\fR\&. .TP \fBwith\fR \fIcorner\fR Specifies the corner of the element to place at the location given by the attribute \fBat\fR\&. Defaults to the current corner as maintained by the layouting system, except if the value for \fBat\fR was specified by the user\&. In that case it defaults to \fBcenter\fR\&. .RE .TP \fBellipse\fR \fIattr\fR\&.\&.\&. IMAGE: figure-02-ellipse A closed element with the corresponding corners, i\&.e\&. the eight directions of the compass rose, and "center"\&. It handles the attributes .RS .TP \fBanchor\fR \fIname\fR .TP \fBljust\fR .TP \fBrjust\fR .TP \fBabove\fR .TP \fBbelow\fR IMAGE: figure-22-text-anchoring-3 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 \fBanchor\fR, which itself defaults to \fBcenter\fR\&. The legal values are all those accepted by \fITk_GetAnchor\fR [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, \fBanchor\fR has to be used\&. .RS .TP \fBljust\fR "anchor west" .TP \fBrjust\fR "anchor east" .TP \fBabove\fR "anchor south" .TP \fBbelow\fR "anchor north" .RE .TP \fBat\fR \fIlocation\fR Specifies the location of the element's corner named by the attribute \fBwith\fR\&. Defaults to the current location as maintained by the layouting system\&. .TP \fBcolor\fR \fIspec\fR IMAGE: figure-21-style-colors 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 \fBlinecolor\fR, which itself defaults to \fBblack\fR\&. .TP \fBfillcolor\fR \fIspec\fR IMAGE: figure-21-style-colors 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 \fBfillcolor\fR, which itself defaults to the empty string, signaling "no filling"\&. .TP \fBheight\fR \fIlength\fR .TP \fBht\fR \fIlength\fR Specifies the height of the element\&. If not specified the system falls back to the value taken from the language variable \fBboxheight\fR, which itself defaults to the pixel equivalent of \fB2 cm\fR\&. .TP \fBjustify\fR \fBleft\fR|\fBcenter\fR|\fBright\fR 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 \fBjustify\fR, which itself defaults to \fBleft\fR\&. The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. .TP \fBstroke\fR \fIwidth\fR IMAGE: figure-20-style-stroke 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 \fBlinewidth\fR, which itself defaults to \fB1\fR\&. .TP \fBstyle\fR \fIspec\fR IMAGE: figure-18-style-dash 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 \fBlinestyle\fR, which itself defaults to \fBsolid\fR lines\&. The legal values are all those accepted by \fITk_GetDash\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetDash\&.htm], and additionally all which are listed below: .RS .TP \fBsolid\fR, empty string Draw solid line\&. .TP \fBdash\fR, \fBdashed\fR, \fB-\fR Draw a dashed line\&. .TP \fBdot\fR, \fBdotted\fR, \fB\&.\fR Draw a dotted line\&. .TP \fBdash-dot\fR, \fB-\&.\fR Draw a dash-dotted line .TP \fBdash-dot-dot\fR, \fB-\&.\&.\fR Draw a dash-dot-dotted line\&. .RE .IP Note that the values "solid", "dot(ted)", "dash(ed)", "dash-dot", and "dash-dot-dot" are all accepted as shorthands for the \fBstyle\fR command using them as argument\&. .TP \fBtext\fR \fIstring\fR 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\&. .TP \fBtextcolor\fR \fIspec\fR 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 \fBtextcolor\fR, which itself defaults to \fBblack\fR\&. .TP \fBtextfont\fR \fIspec\fR 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 \fBtextfont\fR, which itself defaults to \fBHelvetica 12pt\fR\&. .TP \fBwidth\fR \fIlength\fR .TP \fBwid\fR \fIlength\fR Specifies the width of the element\&. If not specified the system falls back to the value taken from the language variable \fBboxwidth\fR, which itself defaults to the pixel equivalent of \fB2 cm\fR\&. .TP \fBwith\fR \fIcorner\fR Specifies the corner of the element to place at the location given by the attribute \fBat\fR\&. Defaults to the current corner as maintained by the layouting system, except if the value for \fBat\fR was specified by the user\&. In that case it defaults to \fBcenter\fR\&. .RE .TP \fBline\fR \fIattr\fR\&.\&.\&. .TP \fB--\fR \fIattr\fR\&.\&.\&. IMAGE: figure-02-line An open element with the corresponding corners, i\&.e\&. "start", "end", and "center"\&. It handles the attributes .RS .TP \fBanchor\fR \fIname\fR .TP \fBljust\fR .TP \fBrjust\fR .TP \fBabove\fR .TP \fBbelow\fR IMAGE: figure-22-text-anchoring-3 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 \fBanchor\fR, which itself defaults to \fBcenter\fR\&. The legal values are all those accepted by \fITk_GetAnchor\fR [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, \fBanchor\fR has to be used\&. .RS .TP \fBljust\fR "anchor west" .TP \fBrjust\fR "anchor east" .TP \fBabove\fR "anchor south" .TP \fBbelow\fR "anchor north" .RE .TP \fBarrowhead\fR \fIspec\fR IMAGE: figure-19-style-arrowheads Specifies where to draw arrowheads on the \fBline\fR 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 \fBarrowhead\fR, which itself defaults to \fBnone\fR\&. The legal values are .RS .TP \fBnone\fR, \fB-\fR Draw no arrowheads, at neither end of the line\&. .TP \fBstart\fR, \fBfirst\fR, \fB<-\fR Draw an arrowhead at the beginning of the line, but not at its end\&. .TP \fBend\fR, \fBlast\fR, \fB->\fR Draw an arrowhead at the end of the line, but not at its beginning\&. .TP \fBboth\fR, \fB<->\fR Draw arrowheads at both ends of the line\&. .RE .IP Note that the values "start", "end", "-", "->", "<-", and "<->" are all accepted as shorthands for the \fBarrowhead\fR command using them as argument\&. .TP \fBat\fR \fIlocation\fR \fBLine\fR elements are normally positioned absolutely, using the locations specified through the attributes \fBfrom\fR, \fBthen\fR, and \fBto\fR\&. If \fBat\fR is specified however then these positions are translated a last time, moving the line's corner named by the attribute \fBwith\fR to the location given by this attribute\&. .TP \fBchop\fR ?\fIlength\fR? Specifies the length of the \fBline\fR 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 \fBcircleradius\fR, which itself defaults to the pixel equivalent of \fB1 cm\fR .TP \fBcolor\fR \fIspec\fR IMAGE: figure-21-style-colors 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 \fBlinecolor\fR, which itself defaults to \fBblack\fR\&. .TP \fBfillcolor\fR \fIspec\fR IMAGE: figure-21-style-colors 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 \fBfillcolor\fR, which itself defaults to the empty string, signaling "no filling"\&. .TP \fBfrom\fR \fIlocation\fR Specifies the location where the \fBline\fR element begins\&. Defaults to the current location as maintained by the layouting system\&. .TP \fBjustify\fR \fBleft\fR|\fBcenter\fR|\fBright\fR 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 \fBjustify\fR, which itself defaults to \fBleft\fR\&. The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. .TP \fBnoturn\fR Specifies that the direction of \fBline\fR 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\&. .TP \fBsmooth\fR Specifies the use of bezier splines for the \fBline\fR element\&. If not specified lines are drawn exactly through the specified waypoints, without any smooth curves\&. .TP \fBstroke\fR \fIwidth\fR IMAGE: figure-20-style-stroke 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 \fBlinewidth\fR, which itself defaults to \fB1\fR\&. .TP \fBstyle\fR \fIspec\fR IMAGE: figure-18-style-dash 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 \fBlinestyle\fR, which itself defaults to \fBsolid\fR lines\&. The legal values are all those accepted by \fITk_GetDash\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetDash\&.htm], and additionally all which are listed below: .RS .TP \fBsolid\fR, empty string Draw solid line\&. .TP \fBdash\fR, \fBdashed\fR, \fB-\fR Draw a dashed line\&. .TP \fBdot\fR, \fBdotted\fR, \fB\&.\fR Draw a dotted line\&. .TP \fBdash-dot\fR, \fB-\&.\fR Draw a dash-dotted line .TP \fBdash-dot-dot\fR, \fB-\&.\&.\fR Draw a dash-dot-dotted line\&. .RE .IP Note that the values "solid", "dot(ted)", "dash(ed)", "dash-dot", and "dash-dot-dot" are all accepted as shorthands for the \fBstyle\fR command using them as argument\&. .TP \fBtext\fR \fIstring\fR 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\&. .TP \fBtextcolor\fR \fIspec\fR 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 \fBtextcolor\fR, which itself defaults to \fBblack\fR\&. .TP \fBtextfont\fR \fIspec\fR 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 \fBtextfont\fR, which itself defaults to \fBHelvetica 12pt\fR\&. .TP \fBthen\fR \fIlocation\fR .TP \fBthen\fR ( ?\fIlength\fR?)\&.\&.\&. .TP ( ?\fIlength\fR?)\&.\&.\&. This attribute specifies an intermediate location the \fBline\fR 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\&. .sp 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 \fBmovelength\fR, which itself defaults to the pixel equivalent of \fB2 cm\fR\&. 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)\&. .sp The last named direction is propagated to the layout system as the direction to follow\&. The use of \fBnoturn\fR is not able to overide this behaviour\&. .sp At last, the names of the registered directions also serve as attribute commands, with an implicit attribute \fBthen\fR in front of them\&. .sp If no intermediate or last location is specified for the line the system falls back to a point \fBmovelength\fR pixels away from the starting location, in the current direction as maintained by the layouting system .TP \fBto\fR \fIlocation\fR Specifies the location where the \fBline\fR element ends\&. This attribute has no default\&. The default is handled by the attribute \fBthen\fR, which makes it appear as if \fBto\fR has a default when not specified\&. .TP \fBwith\fR \fIcorner\fR \fBLine\fR elements are normally positioned absolutely, using the locations specified through the attributes \fBfrom\fR, \fBthen\fR, and \fBto\fR\&. If \fBat\fR is specified however then these positions are translated a last time, moving the line's corner named by the attribute \fBwith\fR to the location given by this attribute\&. This means that \fIwith\fR is effective if and only if the attribute \fBat\fR was specified as well for the line\&. .RE .TP \fBmove\fR \fIattr\fR An open element with the corresponding corners, i\&.e\&. "start", "end", and "center"\&. A \fBmove\fR element is in essence an invisible \fBline\fR\&. 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 \fBline\fR elements\&. .TP \fBspline\fR \fIattr\fR\&.\&.\&. IMAGE: figure-02-spline An alias for the \fBline\fR element (see above), with the attribute \fBsmooth\fR preset\&. .TP \fBtext\fR \fIattr\fR\&.\&.\&. IMAGE: figure-02-text A closed element with the corresponding corners, i\&.e\&. the eight directions of the compass rose, and "center"\&. It handles the attributes .RS .TP \fBanchor\fR \fIname\fR .TP \fBljust\fR .TP \fBrjust\fR .TP \fBabove\fR .TP \fBbelow\fR IMAGE: figure-22-text-anchoring-3 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 \fBanchor\fR, which itself defaults to \fBcenter\fR\&. The legal values are all those accepted by \fITk_GetAnchor\fR [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, \fBanchor\fR has to be used\&. .RS .TP \fBljust\fR "anchor west" .TP \fBrjust\fR "anchor east" .TP \fBabove\fR "anchor south" .TP \fBbelow\fR "anchor north" .RE .TP \fBat\fR \fIlocation\fR Specifies the location of the element's corner named by the attribute \fBwith\fR\&. Defaults to the current location as maintained by the layouting system\&. .TP \fBheight\fR \fIlength\fR Specifies the height of the \fBtext\fR element\&. Defaults to the natural height of its text\&. .TP \fBjustify\fR \fBleft\fR|\fBcenter\fR|\fBright\fR 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 \fBjustify\fR, which itself defaults to \fBleft\fR\&. The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. .TP \fBtext\fR \fIstring\fR 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\&. .TP \fBtextcolor\fR \fIspec\fR 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 \fBtextcolor\fR, which itself defaults to \fBblack\fR\&. .TP \fBtextfont\fR \fIspec\fR 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 \fBtextfont\fR, which itself defaults to \fBHelvetica 12pt\fR\&. .TP \fBwidth\fR \fIlength\fR Specifies the width of the \fBtext\fR element\&. Defaults to the natural width of its text\&. .TP \fBwith\fR \fIcorner\fR Specifies the corner of the element to place at the location given by the attribute \fBat\fR\&. Defaults to the current corner as maintained by the layouting system, except if the value for \fBat\fR was specified by the user\&. In that case it defaults to \fBcenter\fR\&. .RE .PP .SS 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\&. .PP 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\&. .PP 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 \fBtext\fR attribute\&. .TP \fBanchor\fR \fIname\fR .TP \fBljust\fR .TP \fBrjust\fR .TP \fBabove\fR .TP \fBbelow\fR IMAGE: figure-22-text-anchoring-3 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 \fBanchor\fR, which itself defaults to \fBcenter\fR\&. The legal values are all those accepted by \fITk_GetAnchor\fR [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, \fBanchor\fR has to be used\&. .RS .TP \fBljust\fR "anchor west" .TP \fBrjust\fR "anchor east" .TP \fBabove\fR "anchor south" .TP \fBbelow\fR "anchor north" .RE .TP \fBarrowhead\fR \fIspec\fR IMAGE: figure-19-style-arrowheads Specifies where to draw arrowheads on the \fBline\fR 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 \fBarrowhead\fR, which itself defaults to \fBnone\fR\&. The legal values are .RS .TP \fBnone\fR, \fB-\fR Draw no arrowheads, at neither end of the line\&. .TP \fBstart\fR, \fBfirst\fR, \fB<-\fR Draw an arrowhead at the beginning of the line, but not at its end\&. .TP \fBend\fR, \fBlast\fR, \fB->\fR Draw an arrowhead at the end of the line, but not at its beginning\&. .TP \fBboth\fR, \fB<->\fR Draw arrowheads at both ends of the line\&. .RE .IP Note that the values "start", "end", "-", "->", "<-", and "<->" are all accepted as shorthands for the \fBarrowhead\fR command using them as argument\&. .TP \fBaspect\fR \fInumber\fR Specifies the aspect ratio, i\&.e ratio of width to height, of the \fBdiamond\fR element\&. The manner in which a default is calculated when not specified also depends on the specifications of the attributes \fBwidth\fR and \fBheight\fR, if any\&. .sp If both \fBwidth\fR, and \fBheight\fR are specified then any specification of \fBaspect\fR 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\&. .sp If the \fBaspect\fR is specified, and one of the attributes \fBwidth\fR or \fBheight\fR, then the missing attribute is calculated from the two which are specified\&. No defaults are required for these cases either\&. .sp If only one of the attributes \fBwidth\fR or \fBheight\fR is specified then the system uses a fallback for the \fBaspect\fR, the value taken from the language variable \fBdiamondaspect\fR, which itselfs defaults to \fB2\fR\&. .sp If none of of the attributes \fBwidth\fR or \fBheight\fR is specified then the system uses a fallback for the \fBwidth\fR, the value taken from the language variable \fBboxwidth\fR, which itselfs defaults to the pixel equivalent of \fB2 cm\fR\&. For the aspect it uses either the user-specified value or the default taken as described in the previous paragraph\&. .TP \fBaspect\fR \fInumber\fR 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 \fBdrum\fR element\&. If not specified the system falls back to the value taken from the language variable \fBdrumaspect\fR, which itself defaults to \fB0\&.35\fR\&. .TP \fBat\fR \fIlocation\fR Specifies the location of the element's corner named by the attribute \fBwith\fR\&. Defaults to the current location as maintained by the layouting system\&. .TP \fBat\fR \fIlocation\fR \fBLine\fR elements are normally positioned absolutely, using the locations specified through the attributes \fBfrom\fR, \fBthen\fR, and \fBto\fR\&. If \fBat\fR is specified however then these positions are translated a last time, moving the line's corner named by the attribute \fBwith\fR to the location given by this attribute\&. .TP \fBchop\fR ?\fIlength\fR? Specifies the length of the \fBline\fR 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 \fBcircleradius\fR, which itself defaults to the pixel equivalent of \fB1 cm\fR .TP \fBclockwise\fR .TP \fBcw\fR Specifies the direction of the \fBarc\fR element, here going clockwise\&. The complementary attribute is \fBcounterclockwise\fR\&. If not specified the system falls back to the value taken from the language variable \fBclockwise\fR, which itself defaults to \fBfalse\fR, for counter-clockwise direction\&. .TP \fBcolor\fR \fIspec\fR IMAGE: figure-21-style-colors 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 \fBlinecolor\fR, which itself defaults to \fBblack\fR\&. .TP \fBcounterclockwise\fR .TP \fBccw\fR Specifies the direction of the \fBarc\fR element, here counter-clockwise\&. The complementary attribute is \fBclockwise\fR\&. If not specified the system falls back to the value taken from the language variable \fBclockwise\fR, which itself defaults to \fBfalse\fR, for counter-clockwise direction\&. .TP \fBdiameter\fR \fIlength\fR .TP \fBdiam\fR \fIlength\fR Specifies the diameter of the \fBcircle\fR element, as an alternative way to specify its \fBradius\fR\&. 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\&. .TP \fBfillcolor\fR \fIspec\fR IMAGE: figure-21-style-colors 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 \fBfillcolor\fR, which itself defaults to the empty string, signaling "no filling"\&. .TP \fBfrom\fR \fIlocation\fR Specifies the location where the \fBline\fR element begins\&. Defaults to the current location as maintained by the layouting system\&. .TP \fBfrom\fR \fIlocation\fR Specifies the location where the \fBarc\fR element begins\&. Defaults to the current location as maintained by the layouting system\&. .TP \fBheight\fR \fIlength\fR .TP \fBht\fR \fIlength\fR Specifies the height of the element\&. If not specified the system falls back to the value taken from the language variable \fBboxheight\fR, which itself defaults to the pixel equivalent of \fB2 cm\fR\&. .TP \fBheight\fR \fIlength\fR Specifies the height of the \fBdiamond\fR element\&. The manner in which a default is calculated when not specified also depends on the specifications of the attributes \fBaspect\fR and \fBwidth\fR, if any\&. .sp If both \fBwidth\fR, and \fBheight\fR are specified then any specification of \fBaspect\fR 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\&. .sp If the \fBaspect\fR is specified, and one of the attributes \fBwidth\fR or \fBheight\fR, then the missing attribute is calculated from the two which are specified\&. No defaults are required for these cases either\&. .sp If only one of the attributes \fBwidth\fR or \fBheight\fR is specified then the system uses a fallback for the \fBaspect\fR, the value taken from the language variable \fBdiamondaspect\fR, which itselfs defaults to \fB2\fR\&. .sp If none of of the attributes \fBwidth\fR or \fBheight\fR is specified then the system uses a fallback for the \fBwidth\fR, the value taken from the language variable \fBboxwidth\fR, which itselfs defaults to the pixel equivalent of \fB2 cm\fR\&. For the aspect it uses either the user-specified value or the default taken as described in the previous paragraph\&. .TP \fBheight\fR \fIlength\fR Specifies the height of the \fBtext\fR element\&. Defaults to the natural height of its text\&. .TP \fBjustify\fR \fBleft\fR|\fBcenter\fR|\fBright\fR 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 \fBjustify\fR, which itself defaults to \fBleft\fR\&. The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. .TP \fBnoturn\fR Specifies that the direction of \fBline\fR 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\&. .TP \fBradius\fR \fIlength\fR .TP \fBrad\fR \fIlength\fR Specifies the radius of the \fBcircle\fR element\&. If not specified the system falls back to the value taken from the language variable \fBcircleradius\fR, which itself defaults to the pixel equivalent of \fB1 cm\fR\&. .TP \fBradius\fR \fIlength\fR Specifies the radius of the \fBarc\fR 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 \fBarcradius\fR, which itself defaults to the pixel equivalent of \fB1 cm\fR\&. .TP \fBslant\fR \fIangle\fR Specifies the angle by which the \fBbox\fR element is slanted, in degrees\&. If not specified the system falls back to the value taken from the language variable \fBslant\fR, which itself defaults to \fB90\fR, 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\&. .TP \fBsmooth\fR Specifies the use of bezier splines for the \fBline\fR element\&. If not specified lines are drawn exactly through the specified waypoints, without any smooth curves\&. .TP \fBstroke\fR \fIwidth\fR IMAGE: figure-20-style-stroke 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 \fBlinewidth\fR, which itself defaults to \fB1\fR\&. .TP \fBstyle\fR \fIspec\fR IMAGE: figure-18-style-dash 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 \fBlinestyle\fR, which itself defaults to \fBsolid\fR lines\&. The legal values are all those accepted by \fITk_GetDash\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetDash\&.htm], and additionally all which are listed below: .RS .TP \fBsolid\fR, empty string Draw solid line\&. .TP \fBdash\fR, \fBdashed\fR, \fB-\fR Draw a dashed line\&. .TP \fBdot\fR, \fBdotted\fR, \fB\&.\fR Draw a dotted line\&. .TP \fBdash-dot\fR, \fB-\&.\fR Draw a dash-dotted line .TP \fBdash-dot-dot\fR, \fB-\&.\&.\fR Draw a dash-dot-dotted line\&. .RE .IP Note that the values "solid", "dot(ted)", "dash(ed)", "dash-dot", and "dash-dot-dot" are all accepted as shorthands for the \fBstyle\fR command using them as argument\&. .TP \fBtext\fR \fIstring\fR 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\&. .TP \fBtextcolor\fR \fIspec\fR 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 \fBtextcolor\fR, which itself defaults to \fBblack\fR\&. .TP \fBtextfont\fR \fIspec\fR 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 \fBtextfont\fR, which itself defaults to \fBHelvetica 12pt\fR\&. .TP \fBthen\fR \fIlocation\fR .TP \fBthen\fR ( ?\fIlength\fR?)\&.\&.\&. .TP ( ?\fIlength\fR?)\&.\&.\&. This attribute specifies an intermediate location the \fBline\fR 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\&. .sp 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 \fBmovelength\fR, which itself defaults to the pixel equivalent of \fB2 cm\fR\&. 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)\&. .sp The last named direction is propagated to the layout system as the direction to follow\&. The use of \fBnoturn\fR is not able to overide this behaviour\&. .sp At last, the names of the registered directions also serve as attribute commands, with an implicit attribute \fBthen\fR in front of them\&. .sp If no intermediate or last location is specified for the line the system falls back to a point \fBmovelength\fR pixels away from the starting location, in the current direction as maintained by the layouting system .TP \fBto\fR \fIlocation\fR Specifies the location where the \fBline\fR element ends\&. This attribute has no default\&. The default is handled by the attribute \fBthen\fR, which makes it appear as if \fBto\fR has a default when not specified\&. .TP \fBto\fR \fIlocation\fR Specifies the location where the \fBarc\fR element ends\&. Defaults to a location such that a 90-degree arc is drawn in the chosen direction, starting at \fBfrom\fR\&. .TP \fBwidth\fR \fIlength\fR .TP \fBwid\fR \fIlength\fR Specifies the width of the element\&. If not specified the system falls back to the value taken from the language variable \fBboxwidth\fR, which itself defaults to the pixel equivalent of \fB2 cm\fR\&. .TP \fBwidth\fR \fIlength\fR Specifies the width of the \fBdiamond\fR element\&. The manner in which a default is calculated when not specified also depends on the specifications of the attributes \fBaspect\fR and \fBheight\fR, if any\&. .sp If both \fBwidth\fR, and \fBheight\fR are specified then any specification of \fBaspect\fR 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\&. .sp If the \fBaspect\fR is specified, and one of the attributes \fBwidth\fR or \fBheight\fR, then the missing attribute is calculated from the two which are specified\&. No defaults are required for these cases either\&. .sp If only one of the attributes \fBwidth\fR or \fBheight\fR is specified then the system uses a fallback for the \fBaspect\fR, the value taken from the language variable \fBdiamondaspect\fR, which itselfs defaults to \fB2\fR\&. .sp If none of of the attributes \fBwidth\fR or \fBheight\fR is specified then the system uses a fallback for the \fBwidth\fR, the value taken from the language variable \fBboxwidth\fR, which itselfs defaults to the pixel equivalent of \fB2 cm\fR\&. For the aspect it uses either the user-specified value or the default taken as described in the previous paragraph\&. .TP \fBwidth\fR \fIlength\fR Specifies the width of the \fBtext\fR element\&. Defaults to the natural width of its text\&. .TP \fBwith\fR \fIcorner\fR Specifies the corner of the element to place at the location given by the attribute \fBat\fR\&. Defaults to the current corner as maintained by the layouting system, except if the value for \fBat\fR was specified by the user\&. In that case it defaults to \fBcenter\fR\&. .TP \fBwith\fR \fIcorner\fR \fBLine\fR elements are normally positioned absolutely, using the locations specified through the attributes \fBfrom\fR, \fBthen\fR, and \fBto\fR\&. If \fBat\fR is specified however then these positions are translated a last time, moving the line's corner named by the attribute \fBwith\fR to the location given by this attribute\&. This means that \fIwith\fR is effective if and only if the attribute \fBat\fR was specified as well for the line\&. .PP .SS CORNERS Corners are named values for in elements, usually locations\&. .IP \(bu The \fIclosed\fR elements define corners for the compass rose, including the "center", and their "width" and "height"\&. .sp IMAGE: figure-27-corners-closed .sp .IP \(bu \fBblock\fR elements additionally export all variables which were set during their definition as corners\&. .IP \(bu The \fIopen\fR elements on the other hand define "start", "end", and "center"\&. The first two map to the locations originally provided through the attributes \fBfrom\fR and \fBto\fR of the element\&. .sp IMAGE: figure-28-corners-open .sp .IP \(bu The center of \fBline\fR and \fBmove\fR elements is the location halfway between "start" and "end" corners, this is regardless of any intermediate locations the element may have\&. .IP \(bu The \fBline\fR and \fBmove\fR elements additionally name all their locations as corners using numbers as names, starting from \fB1\fR (equivalent to "start"), in order of traversal\&. .sp IMAGE: figure-15-spline-1 .sp .IP \(bu The center of \fBarc\fR elements is the center of the circle the arc is part off\&. .IP \(bu The \fBarc\fR elements additionally define the compass rose of closed elements as well\&. .PP .SS "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 \fBthen\fR, and the command \fBby\fR for relative points, see there for the relevant syntax\&. .PP The diagram core defines the directions of the compass rose, plus a number of aliases\&. See below for the full list\&. .PP IMAGE: figure-27-corners-closed .PP 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\&. .PP .TP \fBwest\fR .TP \fBw\fR .TP \fBleft\fR .TP \fBl\fR .TP \fBsouth\fR .TP \fBs\fR .TP \fBdown\fR .TP \fBbottom\fR .TP \fBbot\fR .TP \fBb\fR .TP \fBeast\fR .TP \fBe\fR .TP \fBright\fR .TP \fBr\fR .TP \fBnorth\fR .TP \fBn\fR .TP \fBup\fR .TP \fBtop\fR .TP \fBt\fR .TP \fBnorthwest\fR .TP \fBnw\fR .TP \fBup-left\fR .TP \fBupleft\fR .TP \fBleftup\fR .TP \fBnortheast\fR .TP \fBne\fR .TP \fBup-right\fR .TP \fBupright\fR .TP \fBrightup\fR .TP \fBsouthwest\fR .TP \fBsw\fR .TP \fBdown-left\fR .TP \fBdownleft\fR .TP \fBleftdown\fR .TP \fBsoutheast\fR .TP \fBse\fR .TP \fBdown-right\fR .TP \fBdownright\fR .TP \fBrightdown\fR .PP .SS "MISCELLANEOUS COMMANDS" .TP \fInumber\fR \fBcm\fR .TP \fInumber\fR \fBmm\fR .TP \fInumber\fR \fBinch\fR .TP \fInumber\fR \fBpt\fR 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\&. .sp The conversion factors are based on the result of \fBtk scaling\fR and are computed once, at the time the package is sourced, future changes of the \fBtk scaling\fR factor have no effect\&. .TP \fInumber\fR \fInumber\fR .sp IMAGE: figure-50-point-cons-absolute .sp This command takes the x and y coordinates of a location and returns the \fIabsolute\fR point for it\&. .TP \fBby\fR \fIdistance\fR \fIdirection\fR .sp IMAGE: figure-51-point-cons-relative .sp This command takes a \fIdistance\fR and \fIdirection\fR (angle in degress, or registered direction name) and returns the \fIrelative\fR point for it, i\&.e\&. the \fIdelta\fR or \fItranslation\fR it represents\&. .sp Note also the (dis)similarities to the directional specifications for the attribute \fBthen\fR of \fBline\fR and \fBmove\fR elements\&. Where we say here .CS by 50 east .CE .IP for the attribute we say .CS \&.\&.\&. then east 50 \&.\&.\&. .CE .IP or just .CS \&.\&.\&. then east \&.\&.\&. .CE .TP \fIpoint1\fR \fB+\fR \fIpoint2\fR .sp IMAGE: figure-48-point-vectoradd .sp This command interprets two points as vectors and adds them together\&. If at least one of the points is \fIabsolute\fR the result is absolute as well\&. The result is a \fIrelative\fR point if and only if both points are \fIrelative\fR\&. .TP \fIpoint1\fR \fB-\fR \fIpoint2\fR .sp IMAGE: figure-49-point-vectorsub .sp This command interprets two points as vectors and subtracts the second from the first\&. If at least one of the points is \fIabsolute\fR the result is absolute as well\&. The result is a \fIrelative\fR point if and only if both points are \fIrelative\fR\&. .TP \fIpoint\fR \fBby\fR \fIdistance\fR \fIdirection\fR This command is a more convenient, or at least shorter, form of .CS [$point + [by $distance $direction]] .CE .TP \fIpoint1\fR \fB|\fR \fIpoint2\fR .sp IMAGE: figure-31-point-projection .sp This command calculates the \fIprojection\fR of two points, i\&.e\&. the result is the point having the x-coordinate of \fIpoint1\fR and the y-coordinate of \fIpoint2\fR\&. .TP \fIn\fR \fBbetween\fR \fIpoin1\fR \fIpoint2\fR .sp IMAGE: figure-29-point-interpolation-1 .sp This command computes the point which is \fIn\fR*100 percent of the way between \fIpoint1\fR and \fIpoint2\fR, and returns it as its result\&. This means that for .RS .TP \fIn\fR == 0 The result is \fIpoint1\fR\&. .TP \fIn\fR == 1 The result is \fIpoint2\fR\&. .TP \fIn\fR == 0\&.5 The result is half way between the two points\&. .RE .IP etc\&. \fINote\fR that it is allowed to use values < 0 and > 1 for \fIn\fR .TP \fBintersect\fR \fIelem1\fR \fIelem2\fR .sp IMAGE: figure-32-point-intersection .sp This command takes two \fIopen\fR 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\&. .TP \fIelement\fR \fBnames\fR ?\fIpattern\fR? This command returns a list containing the names of all corners for the \fIelement\fR\&. If a pattern is specified then only the names matching it (via \fBstring match\fR are returned\&. Otherwise all names are returned (equivalent to a default pattern of \fB*\fR)\&. .TP \fIelement\fR \fIcorner\fR This command returns the value for the \fIcorner\fR of the \fIelement\fR\&. This can be anything, including points and elements\&. .TP \fIelement\fR \fIcorner1\fR \fIcorner2\fR\&.\&.\&. This is a convenience shorthand for .CS [[[$elem $corner1] $corner2] \&.\&.\&.] .CE .IP assuming that the value for .CS [$elem $corner1] .CE .IP, etc\&. is again an element\&. .TP \fIelement\fR ?\fIcorner1\fR\&.\&.\&. ?\fBnames\fR ?\fIpattern\fR??]? This is a convenience shorthand for .CS [[[$elem $corner1] \&.\&.\&.] names ?pattern?] .CE .IP assuming that the value for .CS [$elem $corner1] .CE .IP, etc\&. is again an element\&. .TP \fB\fBn\fRth\fR ?\fIcorner\fR? This command asks the diagram history for the \fBn\fRth element created, searching from the beginning of the history (counting from 1) and returns it as its result\&. If the \fIcorner\fR is specified then the value for this corner is returned instead\&. .TP \fB\fBn\fRth\fR \fBlast\fR ?\fIcorner\fR? This command asks the diagram history for the \fBn\fRth element created, searching from the end of the history and returns it as its result\&. If the \fIcorner\fR is specified then the value for this corner is returned instead\&. .TP \fB\fBn\fRth\fR \fIshape\fR ?\fIcorner\fR? This command asks the diagram history for the \fBn\fRth element created, of the given \fIshape\fR, searching from the beginning of the history (counting from 1) and returns it as its result\&. If the \fIcorner\fR is specified then the value for this corner is returned instead\&. .TP \fB\fBn\fRth\fR \fBlast\fR \fIshape\fR ?\fIcorner\fR? This command asks the diagram history for the \fBn\fRth element created, of the given \fIshape\fR, searching from the end of the history and returns it as its result\&. If the \fIcorner\fR is specified then the value for this corner is returned instead\&. .TP \fBlast\fR ?\fIcorner\fR? .TP \fBlast\fR \fIshape\fR ?\fIcorner\fR? Convenience commands mapping to "\fB1st last\fR" and "\fB1st last\fR \fIshape\fR"\&. .TP \fB1st\fR .TP \fB2nd\fR .TP \fB3rd\fR Aliases for \fB1th\fR, \fB2th\fR, and \fB3th\fR, for readability, usable whereever \fB\fBn\fRth\fR can ocur\&. .PP .SS 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: .TP \fBanchor\fR The default value for the attribute \fBanchor\fR\&. Initialized to \fBcenter\fR\&. The legal values are all those accepted by \fITk_GetAnchor\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetAnchor\&.htm]\&. .TP \fBarcradius\fR The default value for the attribute \fBradius\fR of \fBarc\fR elements\&. Initialized to the pixel equivalent of \fB1 cm\fR\&. .TP \fBarrowhead\fR The default value for the attribute \fBarrowhead\fR\&. Initialized to \fBnone\fR\&. The legal values are .RS .TP \fBnone\fR, \fB-\fR Draw no arrowheads, at neither end of the line\&. .TP \fBstart\fR, \fBfirst\fR, \fB<-\fR Draw an arrowhead at the beginning of the line, but not at its end\&. .TP \fBend\fR, \fBlast\fR, \fB->\fR Draw an arrowhead at the end of the line, but not at its beginning\&. .TP \fBboth\fR, \fB<->\fR Draw arrowheads at both ends of the line\&. .RE .TP \fBboxheight\fR The default value for the attribute \fBheight\fR of \fBbox\fR, \fBdiamond\fR and \fBellipse\fR elements\&. Initialized to the pixel equivalent of \fB2 cm\fR\&. .TP \fBboxwidth\fR The default value for the attribute \fBwidth\fR of \fBbox\fR, \fBdiamond\fR and \fBellipse\fR elements\&. Initialized to the pixel equivalent of \fB2 cm\fR\&. .TP \fBclockwise\fR The default value for the attributes \fBclockwise\fR and \fBcounterclockwise\fR of \fBarc\fR elements\&. Initialized to \fBFalse\fR, for counter-clockwise direction\&. .TP \fBcircleradius\fR The default value for the attribute \fBradius\fR of \fBcircle\fR elements, and also the default for the attribute \fBchop\fR, when specified without an explicit length\&. Initialized to the pixel equivalent of \fB1 cm\fR\&. .TP \fBdrumaspect\fR The default value for the attribute \fBaspect\fR of \fBdrum\fR elements\&. Initialized to \fB0\&.35\fR\&. .TP \fBfillcolor\fR The default value for the attribute \fBfillcolor\fR of all elements which can be filled\&. Initialized to the empty string, signaling that the element is not filled\&. .TP \fBjustify\fR The default value for the attribute \fBjustify\fR\&. Initialized to \fBleft\fR\&. The legal values are \fBleft\fR, \fBright\fR, and \fBcenter\fR\&. .TP \fBlinecolor\fR The default value for the attribute \fBcolor\fR of all elements having to draw lines (all but \fBtext\fR)\&. Initialized to \fBblack\fR\&. .TP \fBlinestyle\fR The default value for the attribute \fBstyle\fR of all elements having to draw some line\&. Initialized to \fBsolid\fR\&. The legal values are all those accepted by \fITk_GetDash\fR [http://www\&.tcl\&.tk/man/tcl8\&.5/TkLib/GetDash\&.htm], and additionally all which are listed below: .RS .TP \fBsolid\fR, empty string Draw solid line\&. .TP \fBdash\fR, \fBdashed\fR, \fB-\fR Draw a dashed line\&. .TP \fBdot\fR, \fBdotted\fR, \fB\&.\fR Draw a dotted line\&. .TP \fBdash-dot\fR, \fB-\&.\fR Draw a dash-dotted line .TP \fBdash-dot-dot\fR, \fB-\&.\&.\fR Draw a dash-dot-dotted line\&. .RE .TP \fBlinewidth\fR The default value for the attribute \fBstroke\fR of all elements having to draw some line\&. Initialized to \fB1\fR (pixels)\&. .TP \fBmovelength\fR The default value for the directional specification of intermediate locations by the attribute \fBthen\fR of \fBline\fR and \fBmove\fR elements\&. Initialized to the pixel equivalent of \fB2 cm\fR\&. .TP \fBslant\fR The default value for the attribute \fBslant\fR of \fBbox\fR elements\&. Initialized to 90 degrees, i\&.e\&. slant straight up\&. .TP \fBtextcolor\fR The default value for the attribute \fBtextcolor\fR of all elements having to draw some text\&. Initialized to \fBblack\fR\&. .TP \fBtextfont\fR The default value for the attribute \fBtextfont\fR of all elements having to draw some text\&. Initialized to \fBHelvetica 12pt\fR\&. .PP .SH "DIAGRAM CLASSES" The intended audience of this section are developers wishing to work on the internals of the diagram package\&. Regular users of \fBdiagram\fR can skip this section without missing anything\&. .PP The main information seen here is the figure below, showing the hierarchy of the classes implementing diagram\&. .PP IMAGE: figure-00-dependencies .PP At the bottom, all at the same level are the supporting packages like \fBsnit\fR, etc\&. These can all be found in Tcllib\&. .PP Above them is the set of diagram classes implementing the various aspects of the system, i\&.e\&.: .TP \fBdiagram\fR The main class, that which is seen by the user\&. .TP \fBdiagram::core\fR The core engine, itself distributed over four helper classes\&. .TP \fBdiagram::basic\fR The implementation of the standard shapes, like box, circle, etc\&., based on the extension features of the core\&. .TP \fBdiagram::element\fR Core support class, the database of created elements\&. It also keeps the history, i\&.e\&. the order in which elements were created\&. .TP \fBdiagram::attribute\fR Core support class, the generic handling of definition and processing of attributes\&. .TP \fBdiagram::direction\fR Core support class, the database of named directions\&. .TP \fBdiagram::navigation\fR Core support class, the state of layout engine, i\&.e\&. current position and directin, and operations on it\&. .TP \fBdiagram::point\fR General support class handling various vector operations\&. .PP .SH REFERENCES .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIdiagram\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS 2D geometry, arc, arrow, box, canvas, circle, diagram, diamond, drawing, drum, ellipse, image, interpolation, intersection, line, move, picture, plane geometry, plotting, point, raster image, spline, text, vector .SH CATEGORY Documentation toolsTk_Library_Source_Code/embedded/man/files/modules/getstring000075500000000000000000000000001341472355700237665ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files/modules/getstring/tk_getString.n000064400000000000000000000167651341472355700267070ustar00nobodynobody'\" '\" Generated from file 'tk_getString\&.man' by tcllib/doctools with format 'nroff' '\" .TH "getstring" n 0\&.1 tklib "A dialog which prompts for a string input" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME getstring \- A string dialog .SH SYNOPSIS package require \fBTcl 8\&.4\fR .sp package require \fBgetstring ?0\&.1?\fR .sp \fB::getstring::tk_getString\fR \fIpathName\fR \fIvariable\fR \fItext\fR ?options? .sp .BE .SH DESCRIPTION This package provides a dialog which consists of an Entry, OK, and Cancel buttons\&. .PP .TP \fB::getstring::tk_getString\fR \fIpathName\fR \fIvariable\fR \fItext\fR ?options? Creates a dialog which prompts the user with \fItext\fR to input a text string\&. The contents of the entry are put in the \fIvariable\fR 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 .PP .SH EXAMPLE .CS package require getstring namespace import getstring::* if {[tk_getString \&.gs text "Feed me a string please:"]} { puts "user entered: $text" } .CE .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIgetstring\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS dialog, entry, stringTk_Library_Source_Code/embedded/man/files/modules/history000075500000000000000000000000001341472355700234615ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files/modules/history/tklib_history.n000064400000000000000000000210711341472355700266060ustar00nobodynobody'\" '\" Generated from file 'tklib_history\&.man' by tcllib/doctools with format 'nroff' '\" .TH "history" n 0\&.1 tklib "Provides a history for Entry widgets" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME history \- Provides a history for Entry widgets .SH SYNOPSIS package require \fBTcl 8\&.4\fR .sp package require \fBTk 8\&.4\fR .sp package require \fBhistory ?0\&.1?\fR .sp \fB::history::init\fR \fIpathName\fR ?length? .sp \fB::history::remove\fR \fIpathName\fR .sp \fB::history::add\fR \fIpathName\fR \fItext\fR .sp \fB::history::get\fR \fIpathName\fR .sp \fB::history::clear\fR \fIpathName\fR .sp \fB::history::configure\fR \fIpathName\fR \fIoption\fR ?value? .sp bell .sp .BE .SH DESCRIPTION This package provides a convenient history mechanism for Entry widgets\&. The history may be accessed with the up and down arrow keys\&. .PP .TP \fB::history::init\fR \fIpathName\fR ?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 \fB::history::configure\fR\&. History entries must be added with the \fB::history::add\fR command before they can be seen\&. .TP \fB::history::remove\fR \fIpathName\fR Forgets all history entries for the Entry \fIpathName\fR and removes the history bindings\&. .TP \fB::history::add\fR \fIpathName\fR \fItext\fR This command is used to add history entries to an Entry that has previously had \fB::history::init\fR 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)\&. .TP \fB::history::get\fR \fIpathName\fR This command returns a list containing the history entries for the Entry \fIpathName\fR .TP \fB::history::clear\fR \fIpathName\fR This command clears the history list for the named Entry\&. .TP \fB::history::configure\fR \fIpathName\fR \fIoption\fR ?value? This command queries or sets configuration options\&. Currently the options recognized are \fIlength\fR and \fIalert\fR\&. 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 .TP bell \&. Although configure requires a \fIpathName\fR argument, the setting for alert is global and the path is ignored\&. .PP .CS 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 } .CE .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIentry::history\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS entry, historyTk_Library_Source_Code/embedded/man/files/modules/ico000075500000000000000000000000001341472355700225325ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files/modules/ico/ico.n000064400000000000000000000336421341472355700235520ustar00nobodynobody'\" '\" Generated from file 'ico\&.man' by tcllib/doctools with format 'nroff' '\" .TH "ico" n 1\&.0\&.5 tklib "Windows ICO handling" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME ico \- Reading and writing windows icons .SH SYNOPSIS package require \fBTcl 8\&.4\fR .sp package require \fBico ?1\&.0\&.5?\fR .sp \fB::ico::icons\fR \fIfile\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? .sp \fB::ico::iconMembers\fR \fIfile\fR \fIname\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? .sp \fB::ico::getIcon\fR \fIfile\fR \fIname\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? .sp \fB::ico::getIconByName\fR \fIfile\fR \fIname\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? .sp \fB::ico::getFileIcon\fR \fIfile\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? .sp \fB::ico::writeIcon\fR \fIfile\fR \fIname\fR \fIdepth\fR \fIdata\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? .sp \fB::ico::copyIcon\fR \fIfile\fR \fIindex\fR \fIfile2\fR \fIindex2\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? .sp \fB::ico::EXEtoICO\fR \fIfile\fR ?dir? .sp \fB::ico::clearCache\fR ?file? .sp \fB::ico::transparentColor\fR \fIimage\fR \fIcolor\fR .sp \fB::ico::Show\fR \fIfile\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? .sp .BE .SH 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\&. .SH API .TP \fB::ico::icons\fR \fIfile\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? Returns a list of icons found in \fIfile\fR where each element is the name or numeric ID\&. Recognizes the following options: .RS .TP \fB-type\fR fileFormat .RE .sp .TP \fB::ico::iconMembers\fR \fIfile\fR \fIname\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? Returns a list of images that make up the icon with ID \fIname\fR\&. Each element is itself a sublist in the format {name width height bpp}\&. Recognizes the following options: .RS .TP \fB-type\fR fileFormat .RE .sp .TP \fB::ico::getIcon\fR \fIfile\fR \fIname\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? Extracts the icon with ID \fIname\fR from \fIfile\fR\&. The default \fB-format\fR is \fBimage\fR 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 \fB-image\fR may be used to specify the name of the Tk image that is created\&. If \fB-format\fR is \fBcolors\fR 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 \fB-format\fR is \fBname\fR then the resource name of the image chosen is returned\&. This is useful for calling writeIcon or getIconByName\&. Recognizes the following \fIoption\fRs\&. .RS .TP \fB-type\fR fileFormat .TP \fB-format\fR value .TP \fB-image\fR value .TP \fB-res\fR value .TP \fB-bpp\fR value .TP \fB-exact\fR value .RE .sp .TP \fB::ico::getIconByName\fR \fIfile\fR \fIname\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? Extracts the image with ID \fIname\fR from \fIfile\fR\&. This name should be the name of a specific image as returned by \fB::ico::iconMembers\fR, not an icon name returned from \fB::ico::icons\fR\&. If there is no matching resource ID in \fIfile\fR an error is thrown\&. Recognizes the following options: .RS .TP \fB-type\fR fileFormat .TP \fB-format\fR value .RE .sp .TP \fB::ico::getFileIcon\fR \fIfile\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? This command is only functional when running under Windows\&. It reads the Windows registry to determine the display icon for \fIfile\fR as it would appear in Explorer or similar\&. \fIfile\fR does not need to exist and may also be specified as a file extension with a leading dot\&. If \fIfile\fR is a directory or you specify the special name \fBFolder\fR then the icon representing a folder is returned\&. This command takes the same arguments and usage as \fBgetIcon\fR: .RS .TP \fB-format\fR value .TP \fB-image\fR value .TP \fB-res\fR value .TP \fB-bpp\fR value .TP \fB-exact\fR value .RE .sp .TP \fB::ico::writeIcon\fR \fIfile\fR \fIname\fR \fIdepth\fR \fIdata\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? Writes an image to \fIfile\fR\&. \fIname\fR is the resource identifier of the image in \fIfile\fR 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\&. .sp 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\&. .sp 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\&. .RS .TP integer \fIdepth\fR (in) This argument must have a value of \fB1\fR, \fB4\fR, \fB8\fR, \fB24\fR, or \fB32\fR\&. If \fIdata\fR has more colors than the color depth allows an error will be generated\&. .TP options \fIdata\fR (in) This argument is either a list of colors in the format returned by \fB::ico::getIcon -format colors\fR or the name of a Tk image\&. .RE .sp Recognizes the following \fIoption\fRs\&. .RS .TP \fB-type\fR fileFormat .RE .sp .TP \fB::ico::copyIcon\fR \fIfile\fR \fIindex\fR \fIfile2\fR \fIindex2\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? Copies the icon at \fIindex\fR in \fIfile\fR to \fIindex2\fR in \fIfile2\fR\&. .RS .TP \fB-fromtype\fR fileFormat .TP \fB-totype\fR fileFormat .RE .sp .TP \fB::ico::EXEtoICO\fR \fIfile\fR ?dir? Extracts all icons from the executable \fIfile\fR to ICO files placed in \fIdir\fR\&. ?dir? defaults to the directory \fIfile\fR is located in\&. Icon files will be named in the form \fIfile\fR-ID\&.ico where ID is the icon resource identifier\&. .RS .TP \fB-type\fR fileFormat .RE .sp .TP \fB::ico::clearCache\fR ?file? The \fB::ico::getIconList\fR 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\&. .TP \fB::ico::transparentColor\fR \fIimage\fR \fIcolor\fR If \fIimage\fR is a single word it is assumed to be the name of a Tk image\&. All pixels matching \fIcolor\fR in the \fIimage\fR will be set transparent\&. Alternatively, \fIimage\fR may be a color list in which case a modified list is returned\&. .TP \fB::ico::Show\fR \fIfile\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? Application level command which displays a window showing all the icons in \fIfile\fR and their name\&. .RS .TP \fB-type\fR fileFormat .TP \fB-parent\fR pathName .RE .PP .SH EXAMPLE .CS 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] .CE .SH 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\&. .PP 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\&. .PP There is currently no way to read alpha channel information from 32bpp icons\&. .PP 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\&. .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIico\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS dll, entry, exe, ico, iconTk_Library_Source_Code/embedded/man/files/modules/ipentry000075500000000000000000000000001341472355700234525ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files/modules/ipentry/ipentry.n000064400000000000000000000267041341472355700254130ustar00nobodynobody'\" '\" Generated from file 'ipentry\&.man' by tcllib/doctools with format 'nroff' '\" .TH "ipentry" n 0\&.3 tklib "An IP address entry widget" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME ipentry \- An IP address entry widget .SH SYNOPSIS package require \fBTcl 8\&.4\fR .sp package require \fBTk 8\&.4\fR .sp package require \fBipentry ?0\&.3?\fR .sp \fB::ipentry::ipentry\fR \fIpathName\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? .sp \fB::ipentry::ipentry6\fR \fIpathName\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? .sp \fIpathName\fR \fBcomplete\fR .sp \fIpathName\fR \fBget\fR .sp \fIpathName\fR \fBinsert\fR \fIiplist\fR .sp \fIpathName\fR \fBicursor\fR \fIindex\fR .sp \fIpathName\fR \fBconfigure\fR \fIoption\fR \fIvalue\fR\&.\&.\&. .sp \fIpathName\fR \fBcget\fR \fIoption\fR .sp .BE .SH DESCRIPTION This package provides a widget for the entering of a IP address\&. .PP .TP \fB::ipentry::ipentry\fR \fIpathName\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? Creates a new IPv4 ipentry widget and configures it with the given options and their values\&. .TP \fB::ipentry::ipentry6\fR \fIpathName\fR ?\fIoption\fR \fIvalue\fR\&.\&.\&.? Creates a new ipentry widget for the entry of an IPv6 address\&. All options are the same as the IPv4 widget\&. .PP Each widget created with the command above supports the following methods: .TP \fIpathName\fR \fBcomplete\fR 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\&. .TP \fIpathName\fR \fBget\fR Returns the contents of the entry as a list consisting of 4 or 8 elements\&. .TP \fIpathName\fR \fBinsert\fR \fIiplist\fR 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\&. .TP \fIpathName\fR \fBicursor\fR \fIindex\fR 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\&. .TP \fIpathName\fR \fBconfigure\fR \fIoption\fR \fIvalue\fR\&.\&.\&. Modifies the configuration of the widget\&. For options and their meaning see the widget options section\&. .TP \fIpathName\fR \fBcget\fR \fIoption\fR Returns information about the current configuration of the widget, for the specified option\&. For options and their meaning see the widget options section\&. .PP .SH "WIDGET OPTIONS" .LP .nf .ta 6c Command-Line Switch: \fB-textvariable\fR Database Name: \fBtextvariable\fR Database Class: \fBVariable\fR .fi .IP 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\&. .LP .nf .ta 6c Command-Line Switch: \fB-state\fR Database Name: \fBstate\fR Database Class: \fBState\fR .fi .IP Specifies one of three states for the entry: \fBnormal\fR, \fBdisabled\fR, or \fBreadonly\fR\&. .LP .nf .ta 6c Command-Line Switch: \fB-font\fR Database Name: \fBfont\fR Database Class: \fBFont\fR .fi .LP .nf .ta 6c Command-Line Switch: \fB-bd\fR Database Name: \fBborderWidth\fR Database Class: \fBBorderWidth\fR .fi .LP .nf .ta 6c Command-Line Switch: \fB-fg\fR Database Name: \fBforeground\fR Database Class: \fBForeground\fR .fi .LP .nf .ta 6c Command-Line Switch: \fB-bg\fR Database Name: \fBbackground\fR Database Class: \fBBackground\fR .fi .LP .nf .ta 6c Command-Line Switch: \fB-relief\fR Database Name: \fBrelief\fR Database Class: \fBRelief\fR .fi .LP .nf .ta 6c Command-Line Switch: \fB-highlightthickness\fR Database Name: \fBhighlightThickness\fR Database Class: \fBHighlightThickness\fR .fi .LP .nf .ta 6c Command-Line Switch: \fB-highlightcolor\fR Database Name: \fBhighlightColor\fR Database Class: \fBHighlightColor\fR .fi .LP .nf .ta 6c Command-Line Switch: \fB-highlightbackground\fR Database Name: \fBhighlightBackground\fR Database Class: \fBHighlightBackground\fR .fi .LP .nf .ta 6c Command-Line Switch: \fB-selectbackground\fR Database Name: \fBselectBackground\fR Database Class: \fBBackground\fR .fi .LP .nf .ta 6c Command-Line Switch: \fB-selectforeground\fR Database Name: \fBselectForeground\fR Database Class: \fBForeground\fR .fi .LP .nf .ta 6c Command-Line Switch: \fB-selectborderwidth\fR Database Name: \fBselectBorderWidth\fR Database Class: \fBBorderWidth\fR .fi .LP .nf .ta 6c Command-Line Switch: \fB-disabledbackground\fR Database Name: \fBdisabledBackground\fR Database Class: \fBDisabledBackground\fR .fi .LP .nf .ta 6c Command-Line Switch: \fB-disabledforeground\fR Database Name: \fBdisabledForeground\fR Database Class: \fBDisabledForeground\fR .fi .LP .nf .ta 6c Command-Line Switch: \fB-readonlybackground\fR Database Name: \fBreadonlyBackground\fR Database Class: \fBReadonlyBackground\fR .fi .LP .nf .ta 6c Command-Line Switch: \fB-insertbackground\fR Database Name: \fBinsertBackground\fR Database Class: \fBBackground\fR .fi .IP Standard widget options\&. See \fBoptions\fR for a description of their meanings and values\&. .PP .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIipentry\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS entry, ip address, network .SH CATEGORY WidgetTk_Library_Source_Code/embedded/man/files/modules/khim000075500000000000000000000000001341472355700227105ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files/modules/khim/khim.n000064400000000000000000000275041341472355700241060ustar00nobodynobody'\" '\" Generated from file 'khim\&.man' by tcllib/doctools with format 'nroff' '\" .TH "khim" n 1\&.0 tklib "Kevin's Hacky Input Method" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME khim \- Provides key bindings for entering international characters on a keyboard that does not support them .SH SYNOPSIS package require \fBTcl \fR .sp package require \fBkhim ?1\&.0?\fR .sp \fB::khim::getOptions\fR \fIpath\fR .sp \fB::khim::getConfig\fR .sp \fB::khim::setConfig\fR \fIversion\fR \fIenabled\fR \fIcompose\fR \fImap\fR .sp \fB::khim::showHelp\fR \fIpath\fR .sp .BE .SH 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\&. .PP The vast bulk of the package's functionality is implemented in a single bindtag, \fBKHIM\fR\&. 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 \fBText\fR or \fBEntry\fR binding tag for the widget: .CS text \&.t -width 80 -height 24 bindtags \&.t {\&.t KHIM Text \&. all} .CE Note that the \fBKHIM\fR tag must precede the \fBText\fR or \fBEntry\fR class binding, or the package will not function correctly\&. .SH PROCEDURES In addition to commands supporting the KHIM binding tag, the following commands are exported from the package: .TP \fB::khim::getOptions\fR \fIpath\fR Posts a top-level modal dialog with the path name \fIpath\fR 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\&. .TP \fB::khim::getConfig\fR 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: .CS # Save KHIM configuration set f [open ~/\&.khimrc w] puts $f [::khim::getConfig] close $f # Restore KHIM configuration source ~/\&.khimrc .CE .TP \fB::khim::setConfig\fR \fIversion\fR \fIenabled\fR \fIcompose\fR \fImap\fR Restores an earlier saved configuration\&. Few, if any, applications will call this command in any other way than to evaluate it as returned from \fB::khim::getConfig\fR\&. .TP \fB::khim::showHelp\fR \fIpath\fR Displays a top-level dialog giving user-level help for KHIM; the dialog will have the path name \fIpath\fR\&. .PP .SH LOCALISATION .PP Programmers who wish to make KHIM available in a non-English-speaking locale may do so by providing a \fB\&.msg\fR file with the appropriate localised text\&. The catalog requires the following messages: .TP \fBApply\fR Text that will appear on the "Apply" button in the dialog that sets KHIM options\&. .TP \fBCancel\fR Text that will appear on the "Cancel" button in several dialogs\&. .TP \fBChange\fR Text that will appear on the "Change" button, which alters the binding of a pair of composed characters (creating or replacing as appropriate)\&. .TP \fBCharacter\fR Text that will appear on the label of the entry widget that accepts a character resulting from a composed sequence\&. .TP \fB{Compose Key}\fR Window title for a dialog that prompts the user to strike the key that will be used for the "Compose" key\&. .TP \fB{Compose key:}\fR Label that identifies a component showing the "Compose" key choice in the KHIM options dialog\&. .TP \fB{Composed sequence must be two characters long}\fR Error message that is displayed if the user attempts to define a "Compose" sequence that is shorter or longer than two characters\&. .TP \fBDelete\fR Text for a button that deletes a "Compose" sequence\&. .TP \fBHelp\&.\&.\&.\fR Text for a button that displays the KHIM user help dialog\&. .TP \fBHELPTEXT\fR Complete text for the user-level help for KHIM\&. Refer to "\fIen\&.msg\fR" for the English-language version of the help\&. .TP \fB{Input key sequence}\fR Text for a label of the entry widget that prompts the user for a two-character sequence to use with the "Compose" key\&. .TP \fB{Insert Character}\fR Window title of the dialog box that displays a Unicode character map and prompts the user to select a character to insert\&. .TP \fB{Key sequences}\fR Text for a label at the head of a listbox showing the composed sequences that are currently bound\&. .TP \fB{KHIM Controls}\fR Window title for the dialog box that prompts for KHIM settings\&. .TP \fB{KHIM Help}\fR Window title for the window that display help text for KHIM\&. .TP \fBOK\fR Label for the OK button on several dialogs\&. .TP \fBSelect code page:\fR Label for a spinbox that prompts the user for a Unicode code page number\&. .TP \fBSELECT COMPOSE KEY\fR A message, which should be composed in short lines, prompting the user to press the key that will become the "Compose" key in KHIM\&. .TP \fBUnicode\&.\&.\&.\fR Text for a button that brings up the character map to select the character to which a composed sequence binds\&. .TP \fB{Use KHIM}\fR Text for a checkbutton that asks whether the user wishes to use KHIM to manage composed key sequences\&. .PP .SH 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'\&. .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIkhim\fR of the \fITklib Trackers\fR [http://core\&.tcl\&.tk/tklib/reportlist]\&. Please also report any ideas for enhancements you may have for either package and/or documentation\&. .SH KEYWORDS character, i18n, input, international, methodTk_Library_Source_Code/embedded/man/files/modules/menubar000075500000000000000000000000001341472355700234115ustar00nobodynobodyTk_Library_Source_Code/embedded/man/files/modules/menubar/menubar.n000064400000000000000000000741641341472355700253140ustar00nobodynobody'\" '\" Generated from file 'menubar\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2009 Tom Krehbiel All rights reserved\&. '\" .TH "menubar" n 0\&.5 tklib "Create and manipulate menubars" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME menubar \- Creates an instance of the \fImenubar\fR Class\&. .SH SYNOPSIS package require \fBTcl 8\&.6\fR .sp package require \fBTk 8\&.6\fR .sp package require \fBmenubar ?0\&.5?\fR .sp \fBmenubar new\fR ?options? .sp \fImBarInst\fR \fBdefine\fR \fIbody\fR .sp \fImBarInst\fR \fBinstall\fR \fIpathName body\fR .sp \fImBarInst\fR \fBmenu\&.configure\fR \fIoption tag-settings ?option tag-settings \&.\&.\&.?\fR .sp \fImBarInst\fR \fBmenu\&.namespace\fR \fItag namespace\fR .sp \fImBarInst\fR \fBmenu\&.hide\fR \fItag\fR .sp \fImBarInst\fR \fBmenu\&.show\fR \fItag\fR .sp \fImBarInst\fR \fBtag\&.add\fR \fItag value\fR .sp \fImBarInst\fR \fBtag\&.configure\fR \fIpathName tag ?option value \&.\&.\&.option value?\fR .sp \fImBarInst\fR \fBtag\&.cget\fR \fIpathName tag ?option?\fR .sp \fImBarInst\fR \fBgroup\&.add\fR \fItag label ?cmd? ?accel? ?sequence? ?state?\fR .sp \fImBarInst\fR \fBgroup\&.delete\fR \fItag label\fR .sp \fImBarInst\fR \fBgroup\&.move\fR \fIdirection tag label\fR .sp \fImBarInst\fR \fBgroup\&.configure\fR \fItag label ?option value \&.\&.\&.option value?\fR .sp \fImBarInst\fR \fBgroup\&.serialize\fR \fItag\fR .sp \fImBarInst\fR \fBgroup\&.deserialize\fR \fItag stream\fR .sp \fImBarInst\fR \fBnotebook\&.addTabStore\fR \fIpathname\fR .sp \fImBarInst\fR \fBnotebook\&.deleteTabStore\fR \fIpathname\fR .sp \fImBarInst\fR \fBnotebook\&.setTabValue\fR \fIpathname tag\fR .sp \fImBarInst\fR \fBnotebook\&.restoreTabValues\fR \fIpathname\fR .sp .BE .SH DESCRIPTION .TP \fBmenubar new\fR ?options? .PP .PP 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 \fIpathName\fR argument because menubars are handled by the window manager (i\&.e\&. wm) and not the application\&. .SH OPTIONS The following options can be passed to the \fImenubar new\fR command\&. .PP These options are inherited from the Tk menu command, their effect is platform specific\&. .TP \fB\fI-activebackground\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-activebackground]\fR .TP \fB\fI-activeborderwidth\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-activeborderwidth]\fR .TP \fB\fI-activeforeground\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-activeforeground]\fR .TP \fB\fI-background\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-background]\fR .TP \fB\fI-borderwidth\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-borderwidth]\fR .TP \fB\fI-cursor\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-cursor]\fR .TP \fB\fI-disabledforeground\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-disabledforeground]\fR .TP \fB\fI-font\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-font]\fR .TP \fB\fI-foreground\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-foreground]\fR .TP \fB\fI-relief\fR [http://docs\&.activestate\&.com/activetcl/8\&.5/tcl/TkCmd/options\&.htm#M-relief]\fR .PP .SH INTRODUCTION .PP 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\&. .PP 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\&. .PP The menubar class provides many unique capabilities that are not found in other tcl/tk menubar implementation\&. Some of these are: .IP \(bu A tagging system that simplifies access to menu entries in the menu tree\&. .IP \(bu Support for user defined tags that depend on the toplevel window context\&. .IP \(bu A simplified and uniform interface for all callback commands\&. .IP \(bu Namespace support for all callback commands so callback commands can be easily grouped into namespaces\&. .IP \(bu Support for hiding and exposing menus on the menubar\&. .IP \(bu A simplified method for creating radiobutton groups\&. .IP \(bu Automatic management of state variables for checkbuttons and radiobuttons\&. .IP \(bu Scope control for the state variables of checkbuttons and radiobuttons\&. .IP \(bu Tear-off menu management that ensures only one tearoff menu is created\&. .IP \(bu Support for dynamic menu extension to simplify the creation of recent document menus\&. .IP \(bu Support for saving and restoring dynamic menu extensions\&. .PP .SH TERMINOLOGY .TP MENUBAR The visible rendering of a menubar in a toplevel window is a horizontally group of cascading Tk menus\&. .TP 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\&. .TP 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: \fICommand\fR, \fICheckbutton\fR, \fIRadiobutton\fR, \fISeparator\fR, \fIGroup\fR and \fIMenu\fR\&. .TP ENTRY LABEL Each menu entry has a visible string that is called the entry label\&. .TP 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\&. .PP .SH METHODS .TP \fImBarInst\fR \fBdefine\fR \fIbody\fR Compiles \fIbody\fR into a tree of menu entries which define the visual layout of the menubar\&. The \fIbody\fR argument describes the layout using the following syntax, where the elements of the syntax are described below\&. .sp \fIbody == definitions\fR .CS definitions ::= { | | } ignore ::= { | | # } definition ::= { | | | | | } command ::=