home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / Libraries / tcl7.4b3 / README < prev    next >
Encoding:
Text File  |  1995-03-24  |  12.6 KB  |  287 lines

  1. Tcl
  2.  
  3. by John Ousterhout
  4. john.ousterhout@eng.sun.com
  5.  
  6. @(#) README 1.10 95/03/24 09:38:11
  7.  
  8. 1. Introduction
  9. ---------------
  10.  
  11. This directory contains the sources and documentation for Tcl, an
  12. embeddable tool command language.  The information here corresponds
  13. to release 7.4b3 (a beta release of Tcl 7.4).  This release contains
  14. many bug fixes and a few new features; it should be backwards
  15. compatible with Tcl 7.3 except for one change related to Tcl_AppInit
  16. (see below for details).
  17.  
  18. 2. Documentation
  19. ----------------
  20.  
  21. The best way to get started is to read "the Tcl book":
  22.  
  23.     Title:            Tcl and the Tk Toolkit
  24.     Author:            John K. Ousterhout
  25.     Publisher:            Addison-Wesley
  26.     ISBN:            0-201-63337-X
  27.  
  28. The "doc" subdirectory in this release contains a complete set of reference
  29. manual entries for Tcl.  Files with extension ".1" are for programs (for
  30. example, tclsh.1); files with extension ".3" are for C library procedures;
  31. and files with extension ".n" describe Tcl commands.  The file "doc/Tcl.n"
  32. gives a quick summary of the Tcl language syntax.  To print any of the man
  33. pages, cd to the "doc" directory and invoke your favorite variant of
  34. troff using the normal -man macros, for example
  35.  
  36.         ditroff -man Tcl.n
  37.  
  38. to print Tcl.n.  If Tcl has been installed correctly and your "man"
  39. program supports it, you should be able to access the Tcl manual entries
  40. using the normal "man" mechanisms, such as
  41.  
  42.         man Tcl
  43.  
  44. 3. Compiling and installing Tcl
  45. -------------------------------
  46.  
  47. This release should compile and run either "out of the box" or with
  48. trivial changes on any UNIX-like system that approximates POSIX, BSD,
  49. or System V.  I know that it runs on workstations from Sun, H-P, and
  50. DEC.  To compile Tcl, do the following:
  51.  
  52.     (a) Check for patches.  Look in the FTP directory from which you
  53.         retrieved the base distribution and see if there are files with
  54.     names like tcl7.4p1.patch, tcl7.4p2patch, etc.  These files may
  55.     also have .Z extensions to indicate compression.  If you find
  56.     any patch files, apply them to the source directory in order
  57.     from "p1" up.  To apply an uncompressed patch file such as
  58.     tcl7.4p1.patch, invoke a shell command like the following from
  59.     the directory containing this file:
  60.         patch -p < tcl7.4p1.patch
  61.     If the patch file is compressed, invoke a command like the following:
  62.         zcat tcl7.4p2.patch.Z | patch -p
  63.  
  64.     (b) Type "./configure" in this directory.  This runs a configuration
  65.     script created by GNU autoconf, which configures Tcl for your
  66.     system and creates a Makefile.  The configure script allows you
  67.     to customize the Tcl configuration for your site;  for details on
  68.     how you can do this, check out the autoconf documenation (not
  69.     included here).
  70.  
  71.     (c) Type "make".  This will create a library archive called "libtcl.a"
  72.     and an interpreter application called "tclsh" that allows you to type
  73.     Tcl commands interactively or execute script files.
  74.  
  75.     (d) If the make fails then you'll have to personalize the Makefile
  76.         for your site or possibly modify the distribution in other ways.
  77.     First check the file "porting.notes" to see if there are hints
  78.     for compiling on your system.  If you need to modify Makefile,
  79.     there are comments at the beginning of it that describe the things
  80.     you might want to change and how to change them.
  81.  
  82.     (e) Type "make install" to install Tcl binaries and script files in
  83.         standard places.  You'll need write permission on /usr/local to
  84.     do this.  See the Makefile for details on where things get
  85.     installed.
  86.  
  87.     (f) At this point you can play with Tcl by invoking the "tclsh"
  88.     program and typing Tcl commands.  However, if you haven't installed
  89.     Tcl then you'll first need to set your TCL_LIBRARY variable to
  90.     hold the full path name of the "library" subdirectory.
  91.  
  92. If you have trouble compiling Tcl, I'd suggest looking at the file
  93. "porting.notes".  It contains information that people have sent me about
  94. changes they had to make to compile Tcl in various environments.  I make
  95. no guarantees that this information is accurate, complete, or up-to-date,
  96. but you may find it useful.  If you get Tcl running on a new configuration,
  97. I'd be happy to receive new information to add to "porting.notes".  I'm
  98. also interested in hearing how to change the configuration setup so that
  99. Tcl compiles on additional platforms "out of the box".
  100.  
  101. 4. Test suite
  102. -------------
  103.  
  104. There is a relatively complete test suite for all of the Tcl core in
  105. the subdirectory "tests".  To use it just type "make test" in this
  106. directory.  You should then see a printout of the test files processed.
  107. If any errors occur, you'll see a much more substantial printout for
  108. each error.  See the README file in the "tests" directory for more
  109. information on the test suite.
  110.  
  111. The Tcl test suite is very sensitive to proper implementation of
  112. ANSI C library procedures such as sprintf and sscanf.  If the test
  113. suite generates errors, most likely they are due to non-conformance
  114. of your system's ANSI C library;  such problems are unlikely to
  115. affect any real applications so it's probably safe to ignore them.
  116.  
  117. 5. Additional release information
  118. ---------------------------------
  119.  
  120. We're in the process of setting up a collection of Web pages for Tcl and
  121. Tk.  It should become available sometime early in January 1994.  Initially
  122. the Web information will be available under the URL
  123.     http://playground.sun.com/~ouster
  124. but eventually it will move to one of the following URLs:
  125.     http://www.smli.com/tcl
  126.     http://www.smli.com/research/tcl
  127.     http://www.smli.com/research/~ouster
  128. The Web pages will include release updates, reports on bug fixes and
  129. porting issues, and other useful information.  Check them out!
  130.  
  131. 6. Summary of changes in recent releases
  132. ----------------------------------------
  133.  
  134. This is the third beta release of Tcl 7.4.  Tcl7.4b3 contains a few bug
  135. fixes, plus two new features:
  136.  
  137.     1. Tcl_CreateCommand returns a token that can be used to find the
  138.     command later with Tcl_GetCommandName, even if it changes names
  139.     later.  This makes it easier for objects to handle command renames.
  140.  
  141.     2. The parsing code for expressions has been changed to treat
  142.     numbers like "089" as syntax errors instead of floating-point numbers.
  143.  
  144. The Tcl 7.4b2 release contains only a few bug fixes and no new features.
  145.  
  146. Tcl 7.4 is a minor release.  There are many bug fixes (most of them
  147. minor), but only a few new features and just one potential
  148. incompatibility.  For complete information on what has changed, see
  149. the file "changes".
  150.  
  151. The one incompatible change is that Tcl no longer provides a "main"
  152. procedure by default.  What used to be "main" is now called "Tcl_Main",
  153. and each application needs to provide a "main" that calls "Tcl_Main".
  154. Typically this is done in the tclAppInit.c file;  see the tclAppInit.c
  155. file in the distribution for an example.
  156.  
  157. Here is a summary of the new features in Tcl 7.4:
  158.  
  159.     1. Added new "subst" command for making $ and [] substitutions on
  160.     an strings.
  161.  
  162.     2. The "array" command has several new features:
  163.     - "get" and "set" commands for conversion between arrays
  164.       and strings.
  165.     - "exists" command for checking for array element existence.
  166.     - "names" and "size" commands now treat a non-existent array
  167.       the same as an empty one.
  168.     - "names" takes an optional pattern argument.
  169.  
  170.     3. "lindex", "linsert", "lrange", and "lreplace" all accept
  171.     "end" as an index.
  172.  
  173.     4. Expressions support unary "+".
  174.  
  175.     5. The "string" command has new "wordstart" and "wordend" options.
  176.  
  177.     6. Tcl now exports the procedures Tcl_RegExpCompile, Tcl_RegExpExec,
  178.     and Tcl_RegExpRange for C-level access to pattern matching.
  179.  
  180.     7. When an error occurs while creating a pipeline with "open", it
  181.     is returned immediately as the result of the "open" rather than being
  182.     delayed until the "close" command.
  183.  
  184.     8. "regsub" now returns a count of the number of matches and
  185.     replacements, rather than 0/1.
  186.  
  187.     9. Added mechanism for tracking renames of commands.  See the
  188.     new procedure Tcl_GetCommandName.
  189.  
  190.  
  191. 7. Tcl newsgroup
  192. -----------------
  193.  
  194. There is a network news group "comp.lang.tcl" intended for the exchange
  195. of information about Tcl, Tk, and related applications.  Feel free to use
  196. the newsgroup both for general information questions and for bug reports.
  197. I read the newsgroup and will attempt to fix bugs and problems reported
  198. to it.
  199.  
  200. 8. Tcl contributed archive
  201. --------------------------
  202.  
  203. Many people have created exciting packages and applications based on Tcl
  204. and made them freely available to the Tcl community.  An archive of these
  205. contributions is kept on the machine ftp.aud.alcatel.com.  You can
  206. access the archive using anonymous FTP;  the Tcl contributed archive is
  207. in the directory "/tcl".  The archive also contains several FAQ ("frequently
  208. asked questions") documents that provide solutions to problems commonly
  209. encountered by TCL newcomers.
  210.  
  211. 9. Support and bug fixes
  212. ------------------------
  213.  
  214. We're very interested in receiving bug reports and suggestions for
  215. improvements.  I suggest sending this information to the comp.lang.tcl
  216. newsgroup rather than to me.  We'll see anything on comp.lang.tcl,
  217. and in addition someone else who reads comp.lang.tcl may be able to
  218. offer a solution.  Bugs usually get fixed in 1-3 weeks, but enhancements
  219. may take a while and may not happen at all unless there is widespread
  220. support for them (I'm trying to slow the rate at which Tcl turns into
  221. a kitchen sink).  It's almost impossible to make incompatible changes
  222. to Tcl at this point.
  223.  
  224. When reporting bugs, please provide a short tclsh script that we can
  225. use to reproduce the bug.  Make sure that the script runs with a
  226. bare-bones tclsh and doesn't depend on any extensions or other
  227. programs, particularly those that exist only  at your site.  Also,
  228. please include three additional pieces of information with the
  229. script:
  230.     (a) how do we use the script to make the problem happen (e.g.
  231.     what things do we click on, in what order)?
  232.     (b) what happens when you do these things (presumably this is
  233.         undesirable)?
  234.     (c) what did you expect to happen instead?
  235.  
  236. The Tcl community is too large for us to provide much individual
  237. support for users.  If you need help I suggest that you post questions
  238. to comp.lang.tcl.  We read the newsgroup and will attempt to answer
  239. esoteric questions for which no-one else is likely to know the answer.
  240. In addition, Tcl support and training are available commercially from
  241. NeoSoft ("info@neosoft.com") and from Computerized Processes Unlimited
  242. ("gwl@cpu.com").
  243.  
  244. 9. Tcl release organization
  245. ---------------------------
  246.  
  247. Each Tcl release is identified by two numbers separated by a dot, e.g.
  248. 6.7 or 7.0.  If a new release contains changes that are likely to break
  249. existing C code or Tcl scripts then the major release number increments
  250. and the minor number resets to zero: 6.0, 7.0, etc.  If a new release
  251. contains only bug fixes and compatible changes, then the minor number
  252. increments without changing the major number, e.g. 7.1, 7.2, etc.  If
  253. you have C code or Tcl scripts that work with release X.Y, then they
  254. should also work with any release X.Z as long as Z > Y.
  255.  
  256. Beta releases have an additional suffix of the form bx.  For example,
  257. Tcl 7.0b1 is the first beta release of Tcl version 7.0, Tcl 7.0b2 is
  258. the second beta release, and so on.  A beta release is an initial
  259. version of a new release, used to fix bugs and bad features before
  260. declaring the release stable.  Each new release will be preceded by
  261. one or more beta releases.  We hope that lots of people will try out
  262. the beta releases and report problems back to me.  We'll make new beta
  263. releases to fix the problems, until eventually there is a beta release
  264. that appears to be stable.  Once this occurs we'll remove the beta
  265. suffix so that the last beta release becomes the official release.
  266.  
  267. If a new release contains incompatibilities (e.g. 7.0) then we can't
  268. promise to maintain compatibility among its beta releases.  For example,
  269. release 7.0b2 may not be backward compatible with 7.0b1.  we'll try
  270. to minimize incompatibilities between beta releases, but if a major
  271. problem turns up then we'll fix it even if it introduces an
  272. incompatibility.  Once the official release is made then there won't
  273. be any more incompatibilities until the next release with a new major
  274. version number.
  275.  
  276. 10. Compiling on non-UNIX systems
  277. --------------------------------
  278.  
  279. The Tcl features that depend on system calls peculiar to UNIX (stat,
  280. fork, exec, times, etc.) are now separate from the main body of Tcl,
  281. which only requires a few generic library procedures such as malloc
  282. and strcpy.  Thus it should be relatively easy to compile Tcl for
  283. non-UNIX machines such as MACs and DOS PC's, although a number of
  284. UNIX-specific commands will be absent (e.g.  exec, time, and glob).
  285. See the comments at the top of Makefile for information on how to
  286. compile without the UNIX features.
  287.