home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-11-19 | 53.1 KB | 1,170 lines |
- Newsgroups: comp.sources.misc
- From: karl@sugar.neosoft.com (Karl Lehenbauer)
- Subject: v26i003: tclx - extensions and on-line help for tcl 6.1, Part03/23
- Message-ID: <1991Nov19.005226.8441@sparky.imd.sterling.com>
- X-Md4-Signature: 986cf6c41f40e249d3873af0ee25a6eb
- Date: Tue, 19 Nov 1991 00:52:26 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: karl@sugar.neosoft.com (Karl Lehenbauer)
- Posting-number: Volume 26, Issue 3
- Archive-name: tclx/part03
- Environment: UNIX
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 3 (of 23)."
- # Contents: extended/tcllib/8queens.tcl
- # extended/tcllib/help/commands/cd
- # extended/tcllib/help/commands/close
- # extended/tcllib/help/commands/env
- # extended/tcllib/help/commands/foreach
- # extended/tcllib/help/commands/glob
- # extended/tcllib/help/commands/if
- # extended/tcllib/help/commands/lappend
- # extended/tcllib/help/commands/lindex
- # extended/tcllib/help/commands/linsert
- # extended/tcllib/help/commands/list
- # extended/tcllib/help/commands/lrange
- # extended/tcllib/help/commands/puts
- # extended/tcllib/help/commands/read
- # extended/tcllib/help/commands/scan
- # extended/tcllib/help/commands/source
- # extended/tcllib/help/commands/split
- # extended/tcllib/help/commands/unset
- # extended/tcllib/help/commands/while
- # extended/tcllib/help/extended/chmod
- # extended/tcllib/help/extended/chown
- # extended/tcllib/help/extended/dup
- # extended/tcllib/help/extended/fork
- # extended/tcllib/help/extended/keylget
- # extended/tcllib/help/extended/pipe
- # extended/tcllib/help/extended/random
- # extended/tcllib/help/extended/wait
- # extended/tcllib/help/intro/comments
- # extended/tcllib/help/intro/procedures
- # extended/tcllib/help/tcl.tlib/assign_fields
- # extended/tcllib/help/tclshell/autoload
- # extended/tcllib/help/tclshell/loadlibindex
- # extended/tcllib/help/tclshell/results
- # extended/tcllib/help/tclshell/tclinit
- # extended/tcllib/help/tclshell/unixcommands
- # extended/tclsrc/Makefile extended/tclsrc/edprocs.tcl
- # extended/tclsrc/pushd.tcl extended/tests/asgnfield.test
- # extended/tests/stringfil.test
- # Wrapped by karl@one on Wed Nov 13 21:50:12 1991
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'extended/tcllib/8queens.tcl' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/8queens.tcl'\"
- else
- echo shar: Extracting \"'extended/tcllib/8queens.tcl'\" \(764 characters\)
- sed "s/^X//" >'extended/tcllib/8queens.tcl' <<'END_OF_FILE'
- X#
- X# Eight Queens in Unix Tcl
- X#
- X# by Karl Lehenbauer, 23 Nov 1990
- X#
- X#
- X#
- Xproc none_attacking {rank position} {
- X global queens
- X loop i 1 $rank {
- X set j $queens([expr {$rank - $i}])
- X if {($j==$position-$i) || ($j==$position) || ($j==$position+$i)} {
- X return 0
- X }
- X }
- X return 1
- X}
- X
- Xproc solution {} {
- X global queens
- X echo $queens(1) $queens(2) $queens(3) $queens(4) $queens(5) $queens(6) $queens(7) $queens(8)
- X}
- X
- Xproc x8queens {rank} {
- X global queens
- X set queens($rank) 1
- X loop i 1 9 {
- X if [none_attacking $rank $i] {
- X set queens($rank) $i
- X if {$rank != 8} {
- X x8queens [expr $rank+1]
- X } else {
- X solution
- X return
- X }
- X }
- X }
- X}
- X
- Xproc 8queens {} {
- X x8queens 1
- X}
- X
- Xglobal interactiveSession
- Xif !$interactiveSession 8queens
- END_OF_FILE
- if test 764 -ne `wc -c <'extended/tcllib/8queens.tcl'`; then
- echo shar: \"'extended/tcllib/8queens.tcl'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/8queens.tcl'
- fi
- if test -f 'extended/tcllib/help/commands/cd' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/cd'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/commands/cd'\" \(549 characters\)
- sed "s/^X//" >'extended/tcllib/help/commands/cd' <<'END_OF_FILE'
- X cd ?dirName?
- X Change the current working directory to dirName, or to
- X the home directory (as specified in the HOME
- X environment variable) if dirName is not given. If
- X dirName starts with a tilde, then tilde-expansion is
- X done as described for Tcl_TildeSubst. Returns an empty
- X string. This command can potentially be disruptive to
- X an application, so it may be removed in some
- X applications.
- END_OF_FILE
- if test 549 -ne `wc -c <'extended/tcllib/help/commands/cd'`; then
- echo shar: \"'extended/tcllib/help/commands/cd'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/commands/cd'
- fi
- if test -f 'extended/tcllib/help/commands/close' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/close'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/commands/close'\" \(616 characters\)
- sed "s/^X//" >'extended/tcllib/help/commands/close' <<'END_OF_FILE'
- X close fileId
- X Closes the file given by fileId. FileId must be the
- X return value from a previous invocation of the open
- X command; after this command, it should not be used
- X anymore. If fileId refers to a command pipeline
- X instead of a file, then close waits for the children to
- X complete. The normal result of this command is an
- X empty string, but errors are returned if there are
- X problems in closing the file or waiting for children to
- X complete.
- END_OF_FILE
- if test 616 -ne `wc -c <'extended/tcllib/help/commands/close'`; then
- echo shar: \"'extended/tcllib/help/commands/close'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/commands/close'
- fi
- if test -f 'extended/tcllib/help/commands/env' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/env'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/commands/env'\" \(840 characters\)
- sed "s/^X//" >'extended/tcllib/help/commands/env' <<'END_OF_FILE'
- X env
- X This variable is maintained by Tcl as an array whose
- X elements are the environment variables for the process.
- X Reading an element will return the value of the
- X corresponding environment variable. Setting an element
- X of the array will modify the corresponding environment
- X variable or create a new one if it doesn't already
- X exist. Unsetting an element of env will remove the
- X corresponding environment variable. Changes to the env
- X array will affect the environment passed to children by
- X commands like exec. If the entire env array is unset
- X then Tcl will stop monitoring env accesses and will not
- X update environment variables.
- END_OF_FILE
- if test 840 -ne `wc -c <'extended/tcllib/help/commands/env'`; then
- echo shar: \"'extended/tcllib/help/commands/env'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/commands/env'
- fi
- if test -f 'extended/tcllib/help/commands/foreach' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/foreach'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/commands/foreach'\" \(704 characters\)
- sed "s/^X//" >'extended/tcllib/help/commands/foreach' <<'END_OF_FILE'
- X foreach varname list body
- X In this command, varname is the name of a variable,
- X list is a list of values to assign to varname, and body
- X is a collection of Tcl commands. For each field in
- X list (in order from left to right), foreach assigns the
- X contents of the field to varname (as if the lindex
- X command had been used to extract the field), then calls
- X the Tcl interpreter to execute body. The break and
- X continue statements may be invoked inside body, with
- X the same effect as in the for command. Foreach an
- X empty string.
- END_OF_FILE
- if test 704 -ne `wc -c <'extended/tcllib/help/commands/foreach'`; then
- echo shar: \"'extended/tcllib/help/commands/foreach'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/commands/foreach'
- fi
- if test -f 'extended/tcllib/help/commands/glob' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/glob'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/commands/glob'\" \(541 characters\)
- sed "s/^X//" >'extended/tcllib/help/commands/glob' <<'END_OF_FILE'
- X glob ?-nocomplain? filename ?filename ...?
- X This command performs filename globbing, using csh
- X rules. The returned value from glob is the list of
- X expanded filenames. If -nocomplain is specified as the
- X first argument then an empty list may be returned;
- X otherwise an error is returned if the expanded list is
- X empty. The -nocomplain argument must be provided
- X exactly: an abbreviation will not be accepted.
- END_OF_FILE
- if test 541 -ne `wc -c <'extended/tcllib/help/commands/glob'`; then
- echo shar: \"'extended/tcllib/help/commands/glob'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/commands/glob'
- fi
- if test -f 'extended/tcllib/help/commands/if' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/if'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/commands/if'\" \(956 characters\)
- sed "s/^X//" >'extended/tcllib/help/commands/if' <<'END_OF_FILE'
- X if test ?then? trueBody ?else? ?falseBody?
- X The if command evaluates test as an expression (in the
- X same way that expr evaluates its argument). The value
- X of the expression must be numeric; if it is non-zero
- X then trueBody is called by passing it to the Tcl
- X interpreter. Otherwise falseBody is executed by
- X passing it to the Tcl interpreter. The then and else
- X arguments are optional ``noise words'' to make the
- X command easier to read. FalseBody is also optional; if
- X it isn't specified then the command does nothing if
- X test evaluates to zero. The return value from if is
- X the value of the last command executed in trueBody or
- X falseBody, or the empty string if test evaluates to
- X zero and falseBody isn't specified.
- END_OF_FILE
- if test 956 -ne `wc -c <'extended/tcllib/help/commands/if'`; then
- echo shar: \"'extended/tcllib/help/commands/if'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/commands/if'
- fi
- if test -f 'extended/tcllib/help/commands/lappend' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/lappend'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/commands/lappend'\" \(784 characters\)
- sed "s/^X//" >'extended/tcllib/help/commands/lappend' <<'END_OF_FILE'
- X lappend varName value ?value value ...?
- X Treat the variable given by varName as a list and
- X append each of the value arguments to that list as a
- X separate element, with spaces between elements. If
- X varName doesn't exist, it is created as a list with
- X elements given by the value arguments. Lappend is
- X similar to append except that the values are appended
- X as list elements rather than raw text. This command
- X provides a relatively efficient way to build up large
- X lists. For example, ``lappend a $b'' is much more
- X efficient than ``set a [concat $a [list $b]]'' when $a
- X is long.
- END_OF_FILE
- if test 784 -ne `wc -c <'extended/tcllib/help/commands/lappend'`; then
- echo shar: \"'extended/tcllib/help/commands/lappend'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/commands/lappend'
- fi
- if test -f 'extended/tcllib/help/commands/lindex' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/lindex'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/commands/lindex'\" \(621 characters\)
- sed "s/^X//" >'extended/tcllib/help/commands/lindex' <<'END_OF_FILE'
- X lindex list index
- X Treats list as a Tcl list and returns the index'th
- X element from it (0 refers to the first element of the
- X list). In extracting the element, lindex observes the
- X same rules concerning braces and quotes and backslashes
- X as the Tcl command interpreter; however, variable
- X substitution and command substitution do not occur. If
- X index is negative or greater than or equal to the
- X number of elements in value, then an empty string is
- X returned.
- END_OF_FILE
- if test 621 -ne `wc -c <'extended/tcllib/help/commands/lindex'`; then
- echo shar: \"'extended/tcllib/help/commands/lindex'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/commands/lindex'
- fi
- if test -f 'extended/tcllib/help/commands/linsert' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/linsert'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/commands/linsert'\" \(626 characters\)
- sed "s/^X//" >'extended/tcllib/help/commands/linsert' <<'END_OF_FILE'
- X linsert list index element ?element element ...?
- X This command produces a new list from list by inserting
- X all of the element arguments just before the indexth
- X element of list. Each element argument will become a
- X separate element of the new list. If index is less
- X than or equal to zero, then the new elements are
- X inserted at the beginning of the list. If index is
- X greater than or equal to the number of elements in the
- X list, then the new elements are appended to the list.
- X
- END_OF_FILE
- if test 626 -ne `wc -c <'extended/tcllib/help/commands/linsert'`; then
- echo shar: \"'extended/tcllib/help/commands/linsert'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/commands/linsert'
- fi
- if test -f 'extended/tcllib/help/commands/list' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/list'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/commands/list'\" \(998 characters\)
- sed "s/^X//" >'extended/tcllib/help/commands/list' <<'END_OF_FILE'
- X list arg ?arg ...?
- X This command returns a list comprised of all the args.
- X Braces and backslashes get added as necessary, so that
- X the index command may be used on the result to re-
- X extract the original arguments, and also so that eval
- X may be used to execute the resulting list, with arg1
- X comprising the command's name and the other args
- X comprising its arguments. List produces slightly
- X different results than concat: concat removes one
- X level of grouping before forming the list, while list
- X works directly from the original arguments. For
- X example, the command
- X
- X list a b {c d e} {f {g h}}
- X
- X will return
- X
- X a b {c d e} {f {g h}}
- X while concat with the same arguments will return
- X
- X a b c d e f {g h}
- X
- END_OF_FILE
- if test 998 -ne `wc -c <'extended/tcllib/help/commands/list'`; then
- echo shar: \"'extended/tcllib/help/commands/list'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/commands/list'
- fi
- if test -f 'extended/tcllib/help/commands/lrange' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/lrange'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/commands/lrange'\" \(980 characters\)
- sed "s/^X//" >'extended/tcllib/help/commands/lrange' <<'END_OF_FILE'
- X lrange list first last
- X List must be a valid Tcl list. This command will
- X return a new list consisting of elements first through
- X last, inclusive. Last may be end (or any abbreviation
- X of it) to refer to the last element of the list. If
- X first is less than zero, it is treated as if it were
- X zero. If last is greater than or equal to the number
- X of elements in the list, then it is treated as if it
- X were end. If first is greater than last then an empty
- X string is returned. Note: ``lrange list first first''
- X does not always produce the same result as ``lindex
- X list first'' (although it often does for simple fields
- X that aren't enclosed in braces); it does, however,
- X produce exactly the same results as ``list [lindex list
- X first]''
- END_OF_FILE
- if test 980 -ne `wc -c <'extended/tcllib/help/commands/lrange'`; then
- echo shar: \"'extended/tcllib/help/commands/lrange'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/commands/lrange'
- fi
- if test -f 'extended/tcllib/help/commands/puts' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/puts'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/commands/puts'\" \(719 characters\)
- sed "s/^X//" >'extended/tcllib/help/commands/puts' <<'END_OF_FILE'
- X puts fileId string ?nonewline?
- X Writes the characters given by string to the file given
- X by fileId. Puts normally outputs a newline character
- X after string, but this feature may be suppressed by
- X specifying the nonewline argument. Output to files is
- X buffered internally by Tcl; the flush command may be
- X used to force buffered characters to be output. FileId
- X must have been the return value from a previous call to
- X open, or it may be stdout or stderr to refer to one of
- X the standard I/O channels; it must refer to a file that
- X was opened for writing.
- END_OF_FILE
- if test 719 -ne `wc -c <'extended/tcllib/help/commands/puts'`; then
- echo shar: \"'extended/tcllib/help/commands/puts'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/commands/puts'
- fi
- if test -f 'extended/tcllib/help/commands/read' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/read'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/commands/read'\" \(912 characters\)
- sed "s/^X//" >'extended/tcllib/help/commands/read' <<'END_OF_FILE'
- X read fileId
- X
- X read fileId nonewline
- X
- X read fileId numBytes
- X In the first form, all of the remaining bytes are read
- X from the file given by fileId; they are returned as the
- X result of the command. If nonewline is specified as an
- X additional argument, then the last character of the
- X file is discarded if it is a newline. In the third
- X form, the extra argument specifies how many bytes to
- X read; exactly this many bytes will be read and
- X returned, unless there are fewer than numBytes bytes
- X left in the file; in this case, all the remaining bytes
- X are returned. FileId must be stdin or the return value
- X from a previous call to open; it must refer to a file
- X that was opened for reading.
- END_OF_FILE
- if test 912 -ne `wc -c <'extended/tcllib/help/commands/read'`; then
- echo shar: \"'extended/tcllib/help/commands/read'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/commands/read'
- fi
- if test -f 'extended/tcllib/help/commands/scan' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/scan'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/commands/scan'\" \(952 characters\)
- sed "s/^X//" >'extended/tcllib/help/commands/scan' <<'END_OF_FILE'
- X scan string format varname1 ?varname2 ...?
- X This command parses fields from an input string in the
- X same fashion as the C sscanf procedure. String gives
- X the input to be parsed and format indicates how to
- X parse it, using % fields as in sscanf. All of the
- X sscanf options are valid; see the sscanf man page for
- X details. Each varname gives the name of a variable;
- X when a field is scanned from string, the result is
- X converted back into a string and assigned to the
- X corresponding varname. The only unusual conversion is
- X for %c. For %c conversions a single character value is
- X converted to a decimal string, which is then assigned
- X to the corresponding varname; no field width may be
- X specified for this conversion.
- X
- END_OF_FILE
- if test 952 -ne `wc -c <'extended/tcllib/help/commands/scan'`; then
- echo shar: \"'extended/tcllib/help/commands/scan'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/commands/scan'
- fi
- if test -f 'extended/tcllib/help/commands/source' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/source'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/commands/source'\" \(851 characters\)
- sed "s/^X//" >'extended/tcllib/help/commands/source' <<'END_OF_FILE'
- X source fileName
- X Read file fileName and pass the contents to the Tcl
- X interpreter as a sequence of commands to execute in the
- X normal fashion. The return value of source is the
- X return value of the last command executed from the
- X file. If an error occurs in executing the contents of
- X the file, then the source command will return that
- X error. If a return command is invoked from within the
- X file, the remainder of the file will be skipped and the
- X source command will return normally with the result
- X from the return command. If fileName starts with a
- X tilde, then it is tilde-substituted as described in the
- X Tcl_TildeSubst manual entry.
- END_OF_FILE
- if test 851 -ne `wc -c <'extended/tcllib/help/commands/source'`; then
- echo shar: \"'extended/tcllib/help/commands/source'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/commands/source'
- fi
- if test -f 'extended/tcllib/help/commands/split' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/split'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/commands/split'\" \(994 characters\)
- sed "s/^X//" >'extended/tcllib/help/commands/split' <<'END_OF_FILE'
- X split string ?splitChars?
- X Returns a list created by splitting string at each
- X character that is in the splitChars argument. Each
- X element of the result list will consist of the
- X characters from string between instances of the
- X characters in splitChars. Empty list elements will be
- X generated if string contains adjacent characters in
- X splitChars, or if the first or last character of string
- X is in splitChars. If splitChars is an empty string
- X then each character of string becomes a separate
- X element of the result list. SplitChars defaults to the
- X standard white-space characters. For example,
- X
- X split "comp.unix.misc" .
- X
- X returns "comp unix misc" and
- X
- X split "Hello world" {}
- X
- X returns "H e l l o { } w o r l d".
- END_OF_FILE
- if test 994 -ne `wc -c <'extended/tcllib/help/commands/split'`; then
- echo shar: \"'extended/tcllib/help/commands/split'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/commands/split'
- fi
- if test -f 'extended/tcllib/help/commands/unset' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/unset'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/commands/unset'\" \(698 characters\)
- sed "s/^X//" >'extended/tcllib/help/commands/unset' <<'END_OF_FILE'
- X unset name ?name name ...?
- X Remove one or more variables. Each name is a variable
- X name, specified in any of the ways acceptable to the
- X set command. If a name refers to an element of an
- X array, then that element is removed without affecting
- X the rest of the array. If a name consists of an array
- X name with no parenthesized index, then the entire array
- X is deleted. The unset command returns an empty string
- X as result. An error occurs if any of the variables
- X doesn't exist, or if any of the variables has an active
- X trace.
- END_OF_FILE
- if test 698 -ne `wc -c <'extended/tcllib/help/commands/unset'`; then
- echo shar: \"'extended/tcllib/help/commands/unset'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/commands/unset'
- fi
- if test -f 'extended/tcllib/help/commands/while' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/while'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/commands/while'\" \(854 characters\)
- sed "s/^X//" >'extended/tcllib/help/commands/while' <<'END_OF_FILE'
- X while test body
- X The while command evaluates test as an expression (in
- X the same way that expr evaluates its argument). The
- X value of the expression must be numeric; if it is non-
- X zero then body is executed by passing it to the Tcl
- X interpreter. Once body has been executed then test is
- X evaluated again, and the process repeats until
- X eventually test evaluates to a zero numeric value.
- X Continue commands may be executed inside body to
- X terminate the current iteration of the loop, and break
- X commands may be executed inside body to cause immediate
- X termination of the while command. The while command
- X always returns an empty string.
- END_OF_FILE
- if test 854 -ne `wc -c <'extended/tcllib/help/commands/while'`; then
- echo shar: \"'extended/tcllib/help/commands/while'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/commands/while'
- fi
- if test -f 'extended/tcllib/help/extended/chmod' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/chmod'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/extended/chmod'\" \(550 characters\)
- sed "s/^X//" >'extended/tcllib/help/extended/chmod' <<'END_OF_FILE'
- X
- X
- X chmod [-i] mode filelist
- X Set permissions of each of the files in the list
- X filelist to mode, which is an absolute numeric mode or
- X symbolic permissions as in the chmod(C) UNIX command.
- X Normally absolute modes are assumed to be specified in
- X octal. However Tcl stores numbers internally as
- X integers. The -i option causes an absolute mode to be
- X treated as a standard Tcl integer (decimal unless
- X prefixed by "0" of "0x").
- END_OF_FILE
- if test 550 -ne `wc -c <'extended/tcllib/help/extended/chmod'`; then
- echo shar: \"'extended/tcllib/help/extended/chmod'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/extended/chmod'
- fi
- if test -f 'extended/tcllib/help/extended/chown' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/chown'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/extended/chown'\" \(554 characters\)
- sed "s/^X//" >'extended/tcllib/help/extended/chown' <<'END_OF_FILE'
- X
- X
- X chown owner|{owner group} filelist
- X Set owner of each file in the list filelist to owner,
- X which is a owner name or numeric owner id. If the
- X first parameter is a list, then the owner is set to the
- X first element of the list and the group is set to the
- X second element of the list. Group is a group name or
- X numeric group id. If group is {}, then the file group
- X will be set to the group for the associated the
- X specified user.
- END_OF_FILE
- if test 554 -ne `wc -c <'extended/tcllib/help/extended/chown'`; then
- echo shar: \"'extended/tcllib/help/extended/chown'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/extended/chown'
- fi
- if test -f 'extended/tcllib/help/extended/dup' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/dup'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/extended/dup'\" \(945 characters\)
- sed "s/^X//" >'extended/tcllib/help/extended/dup' <<'END_OF_FILE'
- X
- X
- X dup filehandle [stdhandle]
- X Duplicate an open file. A file handle is created that
- X addresses the same file as filehandle.
- X
- X A special case is allowed for dup-ing files to stdin,
- X stdout or stderr. If stdhandle is specified, then it
- X must be one of the standard handles to dup filehandle
- X to.
- X
- X proc ChildProcess {cmd inPipe outPipe} {
- X if {[set childPid [fork]] == 0} {
- X close stdin
- X dup $inPipe stdin
- X close $inPipe
- X
- X close stdout
- X dup $outPipe stdout
- X close $outPipe
- X
- X execvp $cmd
- X # will never make it here...
- X }
- X return $childPid
- X }
- END_OF_FILE
- if test 945 -ne `wc -c <'extended/tcllib/help/extended/dup'`; then
- echo shar: \"'extended/tcllib/help/extended/dup'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/extended/dup'
- fi
- if test -f 'extended/tcllib/help/extended/fork' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/fork'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/extended/fork'\" \(580 characters\)
- sed "s/^X//" >'extended/tcllib/help/extended/fork' <<'END_OF_FILE'
- X
- X
- X fork
- X Fork the current TCL process. Fork returns zero to the
- X child process and the process number of the child to
- X the parent process. If an execvp is not going to be
- X performed before the forked process does output, then a
- X flush should be issued against stdout, stderr and any
- X other open output file before doing the fork.
- X Otherwise, output from the parent process pending in
- X the buffers will also be outputted by the child
- X process.
- END_OF_FILE
- if test 580 -ne `wc -c <'extended/tcllib/help/extended/fork'`; then
- echo shar: \"'extended/tcllib/help/extended/fork'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/extended/fork'
- fi
- if test -f 'extended/tcllib/help/extended/keylget' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/keylget'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/extended/keylget'\" \(755 characters\)
- sed "s/^X//" >'extended/tcllib/help/extended/keylget' <<'END_OF_FILE'
- X
- X
- X keylget listvar key [retvar | {}]
- X Return the value associated with the key out of keyed
- X list in the variable listvar. If retvar is not
- X specified, then the value will be returned as the
- X result of the command. If key is not found in the
- X list, an error will result. If retvar is specified and
- X key is in the list, then the value is returned in the
- X variable retvar and the command returns one. If key is
- X not in the list, the command will return 0 and retvar
- X will be unchanged. If {} is specified for retvar, the
- X value is not returned, only the presence of the key is
- X determined.
- END_OF_FILE
- if test 755 -ne `wc -c <'extended/tcllib/help/extended/keylget'`; then
- echo shar: \"'extended/tcllib/help/extended/keylget'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/extended/keylget'
- fi
- if test -f 'extended/tcllib/help/extended/pipe' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/pipe'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/extended/pipe'\" \(545 characters\)
- sed "s/^X//" >'extended/tcllib/help/extended/pipe' <<'END_OF_FILE'
- X
- X
- X pipe [handle_var_r handle_var_w]
- X Create a pipe (see the pipe system call manual page).
- X If handle_var_r and handle_var_r are specified, then
- X variable handle_var_r will contain the handle opened
- X for reading and handle_var_w will contain the handle
- X opened for writing. If the handle variables are not
- X specified, then a list containing the read followed by
- X the write handle is returned as the result of the
- X command.
- END_OF_FILE
- if test 545 -ne `wc -c <'extended/tcllib/help/extended/pipe'`; then
- echo shar: \"'extended/tcllib/help/extended/pipe'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/extended/pipe'
- fi
- if test -f 'extended/tcllib/help/extended/random' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/random'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/extended/random'\" \(631 characters\)
- sed "s/^X//" >'extended/tcllib/help/extended/random' <<'END_OF_FILE'
- X
- X
- X random limit | seed [seedval]
- X Generate a pseudorandom integer number greater than or
- X equal to zero and less than limit. If seed is
- X specified, then the command resets the random number
- X generator to a starting point derived from the seedval.
- X This allows one to reproduce a random number sequence
- X for testing purposes. If seedval is omitted, then the
- X seed is set to a value based on current system state
- X and the current time, providing a reasonably
- X interesting and ever-changing seed.
- END_OF_FILE
- if test 631 -ne `wc -c <'extended/tcllib/help/extended/random'`; then
- echo shar: \"'extended/tcllib/help/extended/random'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/extended/random'
- fi
- if test -f 'extended/tcllib/help/extended/wait' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/wait'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/extended/wait'\" \(691 characters\)
- sed "s/^X//" >'extended/tcllib/help/extended/wait' <<'END_OF_FILE'
- X
- X
- X wait proclist
- X Waits for an any of the immediate child processes
- X specified in the list proclist to terminate or a signal
- X to be received. Wait returns a list of three elements:
- X The first element is process id of the terminating
- X process. If the process exited normally, the second
- X element is `EXIT', followed by the error code. If the
- X process terminated because of a signal, the second
- X element is `SIG', followed by the signal name. If the
- X process is currently stopped, the second element is
- X `STOP', followed by the signal name.
- END_OF_FILE
- if test 691 -ne `wc -c <'extended/tcllib/help/extended/wait'`; then
- echo shar: \"'extended/tcllib/help/extended/wait'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/extended/wait'
- fi
- if test -f 'extended/tcllib/help/intro/comments' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/intro/comments'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/intro/comments'\" \(604 characters\)
- sed "s/^X//" >'extended/tcllib/help/intro/comments' <<'END_OF_FILE'
- X COMMENTS
- X If the first non-blank character in a command is #, then
- X everything from the # up through the next newline character
- X is treated as a comment and ignored. When comments are
- X embedded inside nested commands (e.g. fields enclosed in
- X braces) they must have properly-matched braces (this is
- X necessary because when Tcl parses the top-level command it
- X doesn't yet know that the nested field will be used as a
- X command so it cannot process the nested comment character as
- X a comment).
- END_OF_FILE
- if test 604 -ne `wc -c <'extended/tcllib/help/intro/comments'`; then
- echo shar: \"'extended/tcllib/help/intro/comments'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/intro/comments'
- fi
- if test -f 'extended/tcllib/help/intro/procedures' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/intro/procedures'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/intro/procedures'\" \(554 characters\)
- sed "s/^X//" >'extended/tcllib/help/intro/procedures' <<'END_OF_FILE'
- X PROCEDURES
- X Tcl allows you to extend the command interface by defining
- X procedures. A Tcl procedure can be invoked just like any
- X other Tcl command (it has a name and it receives one or more
- X arguments). The only difference is that its body isn't a
- X piece of C code linked into the program; it is a string
- X containing one or more other Tcl commands. See the proc
- X command for information on how to define procedures and what
- X happens when they are invoked.
- END_OF_FILE
- if test 554 -ne `wc -c <'extended/tcllib/help/intro/procedures'`; then
- echo shar: \"'extended/tcllib/help/intro/procedures'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/intro/procedures'
- fi
- if test -f 'extended/tcllib/help/tcl.tlib/assign_fields' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/tcl.tlib/assign_fields'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/tcl.tlib/assign_fields'\" \(532 characters\)
- sed "s/^X//" >'extended/tcllib/help/tcl.tlib/assign_fields' <<'END_OF_FILE'
- X
- X
- X assign_fields list var [var...]
- X Assign successive elements in a list to specified
- X variables. Any leftover fields are discarded. When
- X there are more variable names than fields, the
- X remaining variables are set to the empty string.
- X
- X For example,
- X
- X assign_fields {dave 100 200 "Dave Foo"} name uid gid longName
- X
- X Assigns name to ``dave'', uid to ``100'', gid to
- X ``200'', and longName to ``Dave Foo''.
- END_OF_FILE
- if test 532 -ne `wc -c <'extended/tcllib/help/tcl.tlib/assign_fields'`; then
- echo shar: \"'extended/tcllib/help/tcl.tlib/assign_fields'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/tcl.tlib/assign_fields'
- fi
- if test -f 'extended/tcllib/help/tclshell/autoload' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/tclshell/autoload'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/tclshell/autoload'\" \(725 characters\)
- sed "s/^X//" >'extended/tcllib/help/tclshell/autoload' <<'END_OF_FILE'
- X
- X
- X autoload file proc1 [..procN]
- X
- X The autoload procedure, defined in TclInit.tcl, allows the
- X Tcl programmer to name one or more procedures and the file
- X they are defined in. After autoload has been executed to
- X inform Tcl of the presence of them, a subsequent attempt to
- X execute one of the procedures will cause the corresponding
- X file to be loaded transparently prior to executing the
- X function. For example, executing:
- X
- X autoload showproc.tcl showproc showprocs
- X
- X tells Tcl to automatically load the file showproc.tcl the
- X first time in the current session that either showproc or
- X showprocs is executed.
- END_OF_FILE
- if test 725 -ne `wc -c <'extended/tcllib/help/tclshell/autoload'`; then
- echo shar: \"'extended/tcllib/help/tclshell/autoload'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/tclshell/autoload'
- fi
- if test -f 'extended/tcllib/help/tclshell/loadlibindex' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/tclshell/loadlibindex'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/tclshell/loadlibindex'\" \(517 characters\)
- sed "s/^X//" >'extended/tcllib/help/tclshell/loadlibindex' <<'END_OF_FILE'
- X
- X loadlibindex libfile Load the package library index of the
- X library file libfile (which must have the suffix .tlib).
- X Package library indexes along the TCLPATH are loaded
- X automatically on the first demand_load; this command is
- X provided to explicitly load libraries that are not in the
- X path. If the index file (with a .tndx suffix) does not
- X exists or is out of date, it will be rebuilt if the user has
- X directory permissions to create it.
- END_OF_FILE
- if test 517 -ne `wc -c <'extended/tcllib/help/tclshell/loadlibindex'`; then
- echo shar: \"'extended/tcllib/help/tclshell/loadlibindex'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/tclshell/loadlibindex'
- fi
- if test -f 'extended/tcllib/help/tclshell/results' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/tclshell/results'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/tclshell/results'\" \(600 characters\)
- sed "s/^X//" >'extended/tcllib/help/tclshell/results' <<'END_OF_FILE'
- X
- X
- X The string result of a command typed at the Tcl shell
- X command prompt is normally echoed back to the user. If an
- X error occurs, then the string result is displayed, along
- X with the error message. The error message will be preceded
- X by the string ``Error:''.
- X
- X The set command is a special case. If the command is called
- X to set a variable (i.e. with two arguments), then the result
- X will not be echoed. If only one argument, the name of a
- X variable, is supplied to set, then the result will be
- X echoed.
- END_OF_FILE
- if test 600 -ne `wc -c <'extended/tcllib/help/tclshell/results'`; then
- echo shar: \"'extended/tcllib/help/tclshell/results'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/tclshell/results'
- fi
- if test -f 'extended/tcllib/help/tclshell/tclinit' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/tclshell/tclinit'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/tclshell/tclinit'\" \(703 characters\)
- sed "s/^X//" >'extended/tcllib/help/tclshell/tclinit' <<'END_OF_FILE'
- X
- X
- X The Tcl initialization file, normally TclInit.tcl in the
- X main Tcl script directory, initializes the Tcl shell. It
- X defines various Tcl procedures that are required to
- X implement loading of Tcl source from libraries via the
- X package libraries and autoload facilities.
- X
- X If the Tcl is invoked interactively, it will source a .tclrc
- X in the user's home directory, if it exists. Tcl is viewed
- X primarly as a programming language, not an interactive
- X shell, so the .tclrc is intended for use for loading
- X development utilities, not to support programs, which should
- X not rely on the user's environment.
- END_OF_FILE
- if test 703 -ne `wc -c <'extended/tcllib/help/tclshell/tclinit'`; then
- echo shar: \"'extended/tcllib/help/tclshell/tclinit'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/tclshell/tclinit'
- fi
- if test -f 'extended/tcllib/help/tclshell/unixcommands' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tcllib/help/tclshell/unixcommands'\"
- else
- echo shar: Extracting \"'extended/tcllib/help/tclshell/unixcommands'\" \(595 characters\)
- sed "s/^X//" >'extended/tcllib/help/tclshell/unixcommands' <<'END_OF_FILE'
- X
- X
- X If an unknown Tcl command is entered from the command line,
- X then the Unix command path, specified in the environment
- X variable PATH, will be searched for a command of the same
- X name. If found, the command will be executed. This feature
- X is provided to enhance the interactive environment for
- X developing Tcl scripts. This is only supported from the
- X command line, not in script files or in procedures, to
- X eliminate confusion. The exec or system command should be
- X used to run Unix commands inside scripts.
- END_OF_FILE
- if test 595 -ne `wc -c <'extended/tcllib/help/tclshell/unixcommands'`; then
- echo shar: \"'extended/tcllib/help/tclshell/unixcommands'\" unpacked with wrong size!
- fi
- # end of 'extended/tcllib/help/tclshell/unixcommands'
- fi
- if test -f 'extended/tclsrc/Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tclsrc/Makefile'\"
- else
- echo shar: Extracting \"'extended/tclsrc/Makefile'\" \(774 characters\)
- sed "s/^X//" >'extended/tclsrc/Makefile' <<'END_OF_FILE'
- X#
- X# Makefile for Extended Tcl package library. This file is designed to be run
- X# under the top-level Makefile and expects the following macros to be passed
- X# in via the environment for a 'all' make:
- X# o TCL_UCB_DIR - The location of the UCB Tcl distribution relative to this
- X# directory.
- X#
- X
- XSHELL=/bin/sh
- XTCL.TLIB=../tcllib/tcl.tlib
- XTCL.TNDX=../tcllib/tcl.tndx
- X
- XTCL_LIBFILES=arrayprocs.tcl asgnfields.tcl edprocs.tcl forfile.tcl \
- X forrecur.tcl globrecur.tcl help.tcl packages.tcl \
- X pushd.tcl setfuncs.tcl showprocs.tcl stringfile.tcl
- X
- Xall: made.tmp
- X
- Xclean:
- X -rm -f made.tmp $(TCL.TLIB) $(TCL.TNDX)
- Xmade.tmp: $(TCL.TLIB)
- X touch made.tmp
- X
- X$(TCL.TLIB): $(TCL_LIBFILES)
- X cat $(TCL_LIBFILES) >$(TCL.TLIB)
- END_OF_FILE
- if test 774 -ne `wc -c <'extended/tclsrc/Makefile'`; then
- echo shar: \"'extended/tclsrc/Makefile'\" unpacked with wrong size!
- fi
- # end of 'extended/tclsrc/Makefile'
- fi
- if test -f 'extended/tclsrc/edprocs.tcl' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tclsrc/edprocs.tcl'\"
- else
- echo shar: Extracting \"'extended/tclsrc/edprocs.tcl'\" \(852 characters\)
- sed "s/^X//" >'extended/tclsrc/edprocs.tcl' <<'END_OF_FILE'
- X#@package: develop_functions saveprocs edprocs
- X
- Xproc saveprocs {fileName args} {
- X set fp [open $fileName w]
- X puts $fp "# tcl procs saved on [fmtclock [getclock]]\n"
- X puts $fp [eval "showprocs $args"]
- X close $fp
- X}
- X
- Xproc edprocs {args} {
- X global env
- X
- X set tmpFilename /tmp/tcldev.[id process]
- X
- X set fp [open $tmpFilename w]
- X puts $fp "\n# TEMP EDIT BUFFER -- YOUR CHANGES ARE FOR THIS SESSION ONLY\n"
- X puts $fp [eval "showprocs $args"]
- X close $fp
- X
- X if [info exists env(EDITOR)] {
- X set editor $env(EDITOR)
- X } else {
- X set editor vi
- X }
- X
- X set startMtime [file mtime $tmpFilename]
- X system "$editor $tmpFilename"
- X
- X if {[file mtime $tmpFilename] != $startMtime} {
- X source $tmpFilename
- X echo "Procedures were reloaded."
- X } else {
- X echo "No changes were made."
- X }
- X unlink $tmpFilename
- X return
- X}
- X
- END_OF_FILE
- if test 852 -ne `wc -c <'extended/tclsrc/edprocs.tcl'`; then
- echo shar: \"'extended/tclsrc/edprocs.tcl'\" unpacked with wrong size!
- fi
- # end of 'extended/tclsrc/edprocs.tcl'
- fi
- if test -f 'extended/tclsrc/pushd.tcl' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tclsrc/pushd.tcl'\"
- else
- echo shar: Extracting \"'extended/tclsrc/pushd.tcl'\" \(617 characters\)
- sed "s/^X//" >'extended/tclsrc/pushd.tcl' <<'END_OF_FILE'
- X#@package: directory_stack pushd popd dirs
- X
- Xglobal TCLENV(dirPushList)
- X
- Xset TCLENV(dirPushList) ""
- X
- Xproc pushd {args} {
- X global TCLENV
- X
- X if {[llength $args] > 1} {
- X error "bad # args: pushd [dir_to_cd_to]"
- X }
- X set TCLENV(dirPushList) [linsert $TCLENV(dirPushList) 0 [pwd]]
- X
- X if {[llength $args] != 0} {
- X cd [glob $args]
- X }
- X}
- X
- Xproc popd {} {
- X global TCLENV
- X
- X if [llength $TCLENV(dirPushList)] {
- X cd [lvarpop TCLENV(dirPushList)]
- X pwd
- X } else {
- X error "directory stack empty"
- X }
- X}
- X
- Xproc dirs {} {
- X global TCLENV
- X echo [pwd] $TCLENV(dirPushList)
- X}
- END_OF_FILE
- if test 617 -ne `wc -c <'extended/tclsrc/pushd.tcl'`; then
- echo shar: \"'extended/tclsrc/pushd.tcl'\" unpacked with wrong size!
- fi
- # end of 'extended/tclsrc/pushd.tcl'
- fi
- if test -f 'extended/tests/asgnfield.test' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tests/asgnfield.test'\"
- else
- echo shar: Extracting \"'extended/tests/asgnfield.test'\" \(940 characters\)
- sed "s/^X//" >'extended/tests/asgnfield.test' <<'END_OF_FILE'
- X#
- X# asgnfield.test
- X#
- X# Tests for tcl.tlib field assignment routines.
- X#---------------------------------------------------------------------------
- X# Copyright 1991 Karl Lehenbauer and Mark Diekhans.
- X#
- X# Permission to use, copy, modify, and distribute this software and its
- X# documentation for any purpose and without fee is hereby granted, provided
- X# that the above copyright notice appear in all copies. Karl Lehenbauer and
- X# Mark Diekhans make no representations about the suitability of this
- X# software for any purpose. It is provided "as is" without express or
- X# implied warranty.
- X#
- X
- Xif {[string compare test [info procs test]] == 1} then {source defs}
- Xrename SAVED_UNKNOWN unknown
- X
- Xtest assign_fields-1.1 {assign_fields command} {
- X assign_fields "a b {c d} e" alpha beta gamma delta epsilon
- X return [list $alpha $beta $gamma $delta $epsilon]
- X} "a b {c d} e {}"
- X
- Xunset alpha beta gamma delta epsilon
- Xrename unknown SAVED_UNKNOWN
- END_OF_FILE
- if test 940 -ne `wc -c <'extended/tests/asgnfield.test'`; then
- echo shar: \"'extended/tests/asgnfield.test'\" unpacked with wrong size!
- fi
- # end of 'extended/tests/asgnfield.test'
- fi
- if test -f 'extended/tests/stringfil.test' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'extended/tests/stringfil.test'\"
- else
- echo shar: Extracting \"'extended/tests/stringfil.test'\" \(975 characters\)
- sed "s/^X//" >'extended/tests/stringfil.test' <<'END_OF_FILE'
- X#
- X# stringfil.test
- X#
- X# Tests for tcl.tlib stringfile functions.
- X#---------------------------------------------------------------------------
- X# Copyright 1991 Karl Lehenbauer and Mark Diekhans.
- X#
- X# Permission to use, copy, modify, and distribute this software and its
- X# documentation for any purpose and without fee is hereby granted, provided
- X# that the above copyright notice appear in all copies. Karl Lehenbauer and
- X# Mark Diekhans make no representations about the suitability of this
- X# software for any purpose. It is provided "as is" without express or
- X# implied warranty.
- X#
- X
- Xif {[string compare test [info procs test]] == 1} then {source defs}
- Xrename SAVED_UNKNOWN unknown
- X
- Xset stringfileTestVar {a
- Xb
- Xc
- Xd
- Xe
- Xf
- Xg}
- X
- Xtest write_file-1.1 {write_file command} {
- X write_file STRINGFIL.TEST $stringfileTestVar
- X} ""
- X
- Xtest read_file-1.1 {read_file command} {
- X read_file STRINGFIL.TEST
- X} "$stringfileTestVar\n"
- X
- Xcatch {unlink STRINGFIL.TEST}
- Xrename unknown SAVED_UNKNOWN
- END_OF_FILE
- if test 975 -ne `wc -c <'extended/tests/stringfil.test'`; then
- echo shar: \"'extended/tests/stringfil.test'\" unpacked with wrong size!
- fi
- # end of 'extended/tests/stringfil.test'
- fi
- echo shar: End of archive 3 \(of 23\).
- cp /dev/null ark3isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 23 archives.
- echo "Now cd to "extended", edit the makefile, then do a "make""
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
- exit 0 # Just in case...
- --
- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM
- Sterling Software, IMD UUCP: uunet!sparky!kent
- Phone: (402) 291-8300 FAX: (402) 291-4362
- Please send comp.sources.misc-related mail to kent@uunet.uu.net.
-