home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume26 / tclx / part03 < prev    next >
Encoding:
Text File  |  1991-11-19  |  53.1 KB  |  1,170 lines

  1. Newsgroups: comp.sources.misc
  2. From: karl@sugar.neosoft.com (Karl Lehenbauer)
  3. Subject:  v26i003:  tclx - extensions and on-line help for tcl 6.1, Part03/23
  4. Message-ID: <1991Nov19.005226.8441@sparky.imd.sterling.com>
  5. X-Md4-Signature: 986cf6c41f40e249d3873af0ee25a6eb
  6. Date: Tue, 19 Nov 1991 00:52:26 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: karl@sugar.neosoft.com (Karl Lehenbauer)
  10. Posting-number: Volume 26, Issue 3
  11. Archive-name: tclx/part03
  12. Environment: UNIX
  13.  
  14. #! /bin/sh
  15. # This is a shell archive.  Remove anything before this line, then unpack
  16. # it by saving it into a file and typing "sh file".  To overwrite existing
  17. # files, type "sh file -c".  You can also feed this as standard input via
  18. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  19. # will see the following message at the end:
  20. #        "End of archive 3 (of 23)."
  21. # Contents:  extended/tcllib/8queens.tcl
  22. #   extended/tcllib/help/commands/cd
  23. #   extended/tcllib/help/commands/close
  24. #   extended/tcllib/help/commands/env
  25. #   extended/tcllib/help/commands/foreach
  26. #   extended/tcllib/help/commands/glob
  27. #   extended/tcllib/help/commands/if
  28. #   extended/tcllib/help/commands/lappend
  29. #   extended/tcllib/help/commands/lindex
  30. #   extended/tcllib/help/commands/linsert
  31. #   extended/tcllib/help/commands/list
  32. #   extended/tcllib/help/commands/lrange
  33. #   extended/tcllib/help/commands/puts
  34. #   extended/tcllib/help/commands/read
  35. #   extended/tcllib/help/commands/scan
  36. #   extended/tcllib/help/commands/source
  37. #   extended/tcllib/help/commands/split
  38. #   extended/tcllib/help/commands/unset
  39. #   extended/tcllib/help/commands/while
  40. #   extended/tcllib/help/extended/chmod
  41. #   extended/tcllib/help/extended/chown
  42. #   extended/tcllib/help/extended/dup
  43. #   extended/tcllib/help/extended/fork
  44. #   extended/tcllib/help/extended/keylget
  45. #   extended/tcllib/help/extended/pipe
  46. #   extended/tcllib/help/extended/random
  47. #   extended/tcllib/help/extended/wait
  48. #   extended/tcllib/help/intro/comments
  49. #   extended/tcllib/help/intro/procedures
  50. #   extended/tcllib/help/tcl.tlib/assign_fields
  51. #   extended/tcllib/help/tclshell/autoload
  52. #   extended/tcllib/help/tclshell/loadlibindex
  53. #   extended/tcllib/help/tclshell/results
  54. #   extended/tcllib/help/tclshell/tclinit
  55. #   extended/tcllib/help/tclshell/unixcommands
  56. #   extended/tclsrc/Makefile extended/tclsrc/edprocs.tcl
  57. #   extended/tclsrc/pushd.tcl extended/tests/asgnfield.test
  58. #   extended/tests/stringfil.test
  59. # Wrapped by karl@one on Wed Nov 13 21:50:12 1991
  60. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  61. if test -f 'extended/tcllib/8queens.tcl' -a "${1}" != "-c" ; then 
  62.   echo shar: Will not clobber existing file \"'extended/tcllib/8queens.tcl'\"
  63. else
  64. echo shar: Extracting \"'extended/tcllib/8queens.tcl'\" \(764 characters\)
  65. sed "s/^X//" >'extended/tcllib/8queens.tcl' <<'END_OF_FILE'
  66. X#
  67. X# Eight Queens in Unix Tcl
  68. X#
  69. X# by Karl Lehenbauer, 23 Nov 1990
  70. X#
  71. X#
  72. X#
  73. Xproc none_attacking {rank position} {
  74. X    global queens
  75. X    loop i 1 $rank {
  76. X    set j $queens([expr {$rank - $i}])
  77. X    if {($j==$position-$i) || ($j==$position) || ($j==$position+$i)} {
  78. X        return 0
  79. X    }
  80. X    }
  81. X    return 1
  82. X}
  83. X
  84. Xproc solution {} {
  85. X    global queens
  86. X    echo $queens(1) $queens(2) $queens(3) $queens(4) $queens(5) $queens(6) $queens(7) $queens(8)
  87. X}
  88. X
  89. Xproc x8queens {rank} {
  90. X    global queens
  91. X    set queens($rank) 1
  92. X    loop i 1 9 {
  93. X    if [none_attacking $rank $i] {
  94. X        set queens($rank) $i
  95. X        if {$rank != 8} {
  96. X        x8queens [expr $rank+1]
  97. X        } else {
  98. X        solution
  99. X        return
  100. X        }
  101. X    }
  102. X    }
  103. X}
  104. X
  105. Xproc 8queens {} {
  106. X    x8queens 1
  107. X}
  108. X
  109. Xglobal interactiveSession
  110. Xif !$interactiveSession 8queens
  111. END_OF_FILE
  112. if test 764 -ne `wc -c <'extended/tcllib/8queens.tcl'`; then
  113.     echo shar: \"'extended/tcllib/8queens.tcl'\" unpacked with wrong size!
  114. fi
  115. # end of 'extended/tcllib/8queens.tcl'
  116. fi
  117. if test -f 'extended/tcllib/help/commands/cd' -a "${1}" != "-c" ; then 
  118.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/cd'\"
  119. else
  120. echo shar: Extracting \"'extended/tcllib/help/commands/cd'\" \(549 characters\)
  121. sed "s/^X//" >'extended/tcllib/help/commands/cd' <<'END_OF_FILE'
  122. X          cd ?dirName?
  123. X               Change the current working directory to dirName, or  to
  124. X               the   home   directory   (as   specified  in  the  HOME
  125. X               environment variable) if  dirName  is  not  given.   If
  126. X               dirName  starts  with  a tilde, then tilde-expansion is
  127. X               done as described for Tcl_TildeSubst.  Returns an empty
  128. X               string.   This command can potentially be disruptive to
  129. X               an  application,  so  it  may  be   removed   in   some
  130. X               applications.
  131. END_OF_FILE
  132. if test 549 -ne `wc -c <'extended/tcllib/help/commands/cd'`; then
  133.     echo shar: \"'extended/tcllib/help/commands/cd'\" unpacked with wrong size!
  134. fi
  135. # end of 'extended/tcllib/help/commands/cd'
  136. fi
  137. if test -f 'extended/tcllib/help/commands/close' -a "${1}" != "-c" ; then 
  138.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/close'\"
  139. else
  140. echo shar: Extracting \"'extended/tcllib/help/commands/close'\" \(616 characters\)
  141. sed "s/^X//" >'extended/tcllib/help/commands/close' <<'END_OF_FILE'
  142. X          close fileId
  143. X               Closes  the  file  given by fileId.  FileId must be the
  144. X               return value from a previous  invocation  of  the  open
  145. X               command;  after  this  command,  it  should not be used
  146. X               anymore.   If  fileId  refers  to  a  command  pipeline
  147. X               instead of a file, then close waits for the children to
  148. X               complete.  The normal result  of  this  command  is  an
  149. X               empty  string,  but  errors  are  returned if there are
  150. X               problems in closing the file or waiting for children to
  151. X               complete.
  152. END_OF_FILE
  153. if test 616 -ne `wc -c <'extended/tcllib/help/commands/close'`; then
  154.     echo shar: \"'extended/tcllib/help/commands/close'\" unpacked with wrong size!
  155. fi
  156. # end of 'extended/tcllib/help/commands/close'
  157. fi
  158. if test -f 'extended/tcllib/help/commands/env' -a "${1}" != "-c" ; then 
  159.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/env'\"
  160. else
  161. echo shar: Extracting \"'extended/tcllib/help/commands/env'\" \(840 characters\)
  162. sed "s/^X//" >'extended/tcllib/help/commands/env' <<'END_OF_FILE'
  163. X          env
  164. X               This variable is maintained by Tcl as  an  array  whose
  165. X               elements are the environment variables for the process.
  166. X               Reading  an  element  will  return  the  value  of  the
  167. X               corresponding environment variable.  Setting an element
  168. X               of the array will modify the corresponding  environment
  169. X               variable  or  create  a  new  one if it doesn't already
  170. X               exist.  Unsetting an element of  env  will  remove  the
  171. X               corresponding environment variable.  Changes to the env
  172. X               array will affect the environment passed to children by
  173. X               commands  like  exec.  If the entire env array is unset
  174. X               then Tcl will stop monitoring env accesses and will not
  175. X               update environment variables.
  176. END_OF_FILE
  177. if test 840 -ne `wc -c <'extended/tcllib/help/commands/env'`; then
  178.     echo shar: \"'extended/tcllib/help/commands/env'\" unpacked with wrong size!
  179. fi
  180. # end of 'extended/tcllib/help/commands/env'
  181. fi
  182. if test -f 'extended/tcllib/help/commands/foreach' -a "${1}" != "-c" ; then 
  183.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/foreach'\"
  184. else
  185. echo shar: Extracting \"'extended/tcllib/help/commands/foreach'\" \(704 characters\)
  186. sed "s/^X//" >'extended/tcllib/help/commands/foreach' <<'END_OF_FILE'
  187. X          foreach varname list body
  188. X               In this command, varname is the  name  of  a  variable,
  189. X               list is a list of values to assign to varname, and body
  190. X               is a collection of Tcl commands.   For  each  field  in
  191. X               list (in order from left to right), foreach assigns the
  192. X               contents of the field to  varname  (as  if  the  lindex
  193. X               command had been used to extract the field), then calls
  194. X               the Tcl interpreter to execute  body.   The  break  and
  195. X               continue  statements  may  be invoked inside body, with
  196. X               the same effect as in  the  for  command.   Foreach  an
  197. X               empty string.
  198. END_OF_FILE
  199. if test 704 -ne `wc -c <'extended/tcllib/help/commands/foreach'`; then
  200.     echo shar: \"'extended/tcllib/help/commands/foreach'\" unpacked with wrong size!
  201. fi
  202. # end of 'extended/tcllib/help/commands/foreach'
  203. fi
  204. if test -f 'extended/tcllib/help/commands/glob' -a "${1}" != "-c" ; then 
  205.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/glob'\"
  206. else
  207. echo shar: Extracting \"'extended/tcllib/help/commands/glob'\" \(541 characters\)
  208. sed "s/^X//" >'extended/tcllib/help/commands/glob' <<'END_OF_FILE'
  209. X          glob ?-nocomplain? filename ?filename ...?
  210. X               This command  performs  filename  globbing,  using  csh
  211. X               rules.   The  returned  value  from glob is the list of
  212. X               expanded filenames.  If -nocomplain is specified as the
  213. X               first  argument  then  an  empty  list may be returned;
  214. X               otherwise an error is returned if the expanded list  is
  215. X               empty.   The  -nocomplain  argument  must  be  provided
  216. X               exactly: an abbreviation will not be accepted.
  217. END_OF_FILE
  218. if test 541 -ne `wc -c <'extended/tcllib/help/commands/glob'`; then
  219.     echo shar: \"'extended/tcllib/help/commands/glob'\" unpacked with wrong size!
  220. fi
  221. # end of 'extended/tcllib/help/commands/glob'
  222. fi
  223. if test -f 'extended/tcllib/help/commands/if' -a "${1}" != "-c" ; then 
  224.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/if'\"
  225. else
  226. echo shar: Extracting \"'extended/tcllib/help/commands/if'\" \(956 characters\)
  227. sed "s/^X//" >'extended/tcllib/help/commands/if' <<'END_OF_FILE'
  228. X          if test ?then? trueBody ?else? ?falseBody?
  229. X               The if command evaluates test as an expression (in  the
  230. X               same  way that expr evaluates its argument).  The value
  231. X               of the expression must be numeric; if  it  is  non-zero
  232. X               then  trueBody  is  called  by  passing  it  to the Tcl
  233. X               interpreter.   Otherwise  falseBody  is   executed   by
  234. X               passing  it  to the Tcl interpreter.  The then and else
  235. X               arguments are optional  ``noise  words''  to  make  the
  236. X               command easier to read.  FalseBody is also optional; if
  237. X               it isn't specified then the  command  does  nothing  if
  238. X               test  evaluates  to  zero.  The return value from if is
  239. X               the value of the last command executed in  trueBody  or
  240. X               falseBody,  or  the  empty  string if test evaluates to
  241. X               zero and falseBody isn't specified.
  242. END_OF_FILE
  243. if test 956 -ne `wc -c <'extended/tcllib/help/commands/if'`; then
  244.     echo shar: \"'extended/tcllib/help/commands/if'\" unpacked with wrong size!
  245. fi
  246. # end of 'extended/tcllib/help/commands/if'
  247. fi
  248. if test -f 'extended/tcllib/help/commands/lappend' -a "${1}" != "-c" ; then 
  249.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/lappend'\"
  250. else
  251. echo shar: Extracting \"'extended/tcllib/help/commands/lappend'\" \(784 characters\)
  252. sed "s/^X//" >'extended/tcllib/help/commands/lappend' <<'END_OF_FILE'
  253. X          lappend varName value ?value value ...?
  254. X               Treat the variable given  by  varName  as  a  list  and
  255. X               append  each  of  the value arguments to that list as a
  256. X               separate element, with  spaces  between  elements.   If
  257. X               varName  doesn't  exist,  it  is created as a list with
  258. X               elements given by  the  value  arguments.   Lappend  is
  259. X               similar  to  append except that the values are appended
  260. X               as list elements rather than raw  text.   This  command
  261. X               provides  a  relatively efficient way to build up large
  262. X               lists.  For example, ``lappend  a  $b''  is  much  more
  263. X               efficient  than ``set a [concat $a [list $b]]'' when $a
  264. X               is long.
  265. END_OF_FILE
  266. if test 784 -ne `wc -c <'extended/tcllib/help/commands/lappend'`; then
  267.     echo shar: \"'extended/tcllib/help/commands/lappend'\" unpacked with wrong size!
  268. fi
  269. # end of 'extended/tcllib/help/commands/lappend'
  270. fi
  271. if test -f 'extended/tcllib/help/commands/lindex' -a "${1}" != "-c" ; then 
  272.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/lindex'\"
  273. else
  274. echo shar: Extracting \"'extended/tcllib/help/commands/lindex'\" \(621 characters\)
  275. sed "s/^X//" >'extended/tcllib/help/commands/lindex' <<'END_OF_FILE'
  276. X          lindex list index
  277. X               Treats  list  as  a  Tcl  list and returns the index'th
  278. X               element from it (0 refers to the first element  of  the
  279. X               list).   In extracting the element, lindex observes the
  280. X               same rules concerning braces and quotes and backslashes
  281. X               as  the  Tcl  command  interpreter;  however,  variable
  282. X               substitution and command substitution do not occur.  If
  283. X               index  is  negative  or  greater  than  or equal to the
  284. X               number of elements in value, then an  empty  string  is
  285. X               returned.
  286. END_OF_FILE
  287. if test 621 -ne `wc -c <'extended/tcllib/help/commands/lindex'`; then
  288.     echo shar: \"'extended/tcllib/help/commands/lindex'\" unpacked with wrong size!
  289. fi
  290. # end of 'extended/tcllib/help/commands/lindex'
  291. fi
  292. if test -f 'extended/tcllib/help/commands/linsert' -a "${1}" != "-c" ; then 
  293.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/linsert'\"
  294. else
  295. echo shar: Extracting \"'extended/tcllib/help/commands/linsert'\" \(626 characters\)
  296. sed "s/^X//" >'extended/tcllib/help/commands/linsert' <<'END_OF_FILE'
  297. X          linsert list index element ?element element ...?
  298. X               This command produces a new list from list by inserting
  299. X               all of the element arguments just  before  the  indexth
  300. X               element  of  list.  Each element argument will become a
  301. X               separate element of the new list.   If  index  is  less
  302. X               than  or  equal  to  zero,  then  the  new elements are
  303. X               inserted at the beginning of the  list.   If  index  is
  304. X               greater  than or equal to the number of elements in the
  305. X               list, then the new elements are appended to the list.
  306. X
  307. END_OF_FILE
  308. if test 626 -ne `wc -c <'extended/tcllib/help/commands/linsert'`; then
  309.     echo shar: \"'extended/tcllib/help/commands/linsert'\" unpacked with wrong size!
  310. fi
  311. # end of 'extended/tcllib/help/commands/linsert'
  312. fi
  313. if test -f 'extended/tcllib/help/commands/list' -a "${1}" != "-c" ; then 
  314.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/list'\"
  315. else
  316. echo shar: Extracting \"'extended/tcllib/help/commands/list'\" \(998 characters\)
  317. sed "s/^X//" >'extended/tcllib/help/commands/list' <<'END_OF_FILE'
  318. X          list arg ?arg ...?
  319. X               This command returns a list comprised of all the  args.
  320. X               Braces  and backslashes get added as necessary, so that
  321. X               the index command may be used  on  the  result  to  re-
  322. X               extract  the  original arguments, and also so that eval
  323. X               may be used to execute the resulting  list,  with  arg1
  324. X               comprising  the  command's  name  and  the  other  args
  325. X               comprising  its  arguments.   List  produces   slightly
  326. X               different  results  than  concat:   concat  removes one
  327. X               level of grouping before forming the list,  while  list
  328. X               works   directly  from  the  original  arguments.   For
  329. X               example, the command
  330. X
  331. X                    list a b {c d e} {f {g h}}
  332. X
  333. X               will return
  334. X
  335. X                    a b {c d e} {f {g h}}
  336. X               while concat with the same arguments will return
  337. X
  338. X                    a b c d e f {g h}
  339. X
  340. END_OF_FILE
  341. if test 998 -ne `wc -c <'extended/tcllib/help/commands/list'`; then
  342.     echo shar: \"'extended/tcllib/help/commands/list'\" unpacked with wrong size!
  343. fi
  344. # end of 'extended/tcllib/help/commands/list'
  345. fi
  346. if test -f 'extended/tcllib/help/commands/lrange' -a "${1}" != "-c" ; then 
  347.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/lrange'\"
  348. else
  349. echo shar: Extracting \"'extended/tcllib/help/commands/lrange'\" \(980 characters\)
  350. sed "s/^X//" >'extended/tcllib/help/commands/lrange' <<'END_OF_FILE'
  351. X          lrange list first last
  352. X               List  must  be  a  valid  Tcl  list.  This command will
  353. X               return a new list consisting of elements first  through
  354. X               last,  inclusive.  Last may be end (or any abbreviation
  355. X               of it) to refer to the last element of  the  list.   If
  356. X               first  is  less  than zero, it is treated as if it were
  357. X               zero.  If last is greater than or equal to  the  number
  358. X               of  elements  in  the list, then it is treated as if it
  359. X               were end.  If first is greater than last then an  empty
  360. X               string  is returned.  Note: ``lrange list first first''
  361. X               does not always produce the  same  result  as  ``lindex
  362. X               list  first'' (although it often does for simple fields
  363. X               that aren't enclosed  in  braces);  it  does,  however,
  364. X               produce exactly the same results as ``list [lindex list
  365. X               first]''
  366. END_OF_FILE
  367. if test 980 -ne `wc -c <'extended/tcllib/help/commands/lrange'`; then
  368.     echo shar: \"'extended/tcllib/help/commands/lrange'\" unpacked with wrong size!
  369. fi
  370. # end of 'extended/tcllib/help/commands/lrange'
  371. fi
  372. if test -f 'extended/tcllib/help/commands/puts' -a "${1}" != "-c" ; then 
  373.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/puts'\"
  374. else
  375. echo shar: Extracting \"'extended/tcllib/help/commands/puts'\" \(719 characters\)
  376. sed "s/^X//" >'extended/tcllib/help/commands/puts' <<'END_OF_FILE'
  377. X          puts fileId string ?nonewline?
  378. X               Writes the characters given by string to the file given
  379. X               by  fileId.   Puts normally outputs a newline character
  380. X               after string, but this feature  may  be  suppressed  by
  381. X               specifying  the nonewline argument.  Output to files is
  382. X               buffered internally by Tcl; the flush  command  may  be
  383. X               used to force buffered characters to be output.  FileId
  384. X               must have been the return value from a previous call to
  385. X               open,  or it may be stdout or stderr to refer to one of
  386. X               the standard I/O channels; it must refer to a file that
  387. X               was opened for writing.
  388. END_OF_FILE
  389. if test 719 -ne `wc -c <'extended/tcllib/help/commands/puts'`; then
  390.     echo shar: \"'extended/tcllib/help/commands/puts'\" unpacked with wrong size!
  391. fi
  392. # end of 'extended/tcllib/help/commands/puts'
  393. fi
  394. if test -f 'extended/tcllib/help/commands/read' -a "${1}" != "-c" ; then 
  395.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/read'\"
  396. else
  397. echo shar: Extracting \"'extended/tcllib/help/commands/read'\" \(912 characters\)
  398. sed "s/^X//" >'extended/tcllib/help/commands/read' <<'END_OF_FILE'
  399. X          read fileId
  400. X
  401. X          read fileId nonewline
  402. X
  403. X          read fileId numBytes
  404. X               In  the first form, all of the remaining bytes are read
  405. X               from the file given by fileId; they are returned as the
  406. X               result of the command.  If nonewline is specified as an
  407. X               additional argument, then the  last  character  of  the
  408. X               file  is  discarded  if  it is a newline.  In the third
  409. X               form, the extra argument specifies how  many  bytes  to
  410. X               read;   exactly  this  many  bytes  will  be  read  and
  411. X               returned, unless there are fewer  than  numBytes  bytes
  412. X               left in the file; in this case, all the remaining bytes
  413. X               are returned.  FileId must be stdin or the return value
  414. X               from  a  previous call to open; it must refer to a file
  415. X               that was opened for reading.
  416. END_OF_FILE
  417. if test 912 -ne `wc -c <'extended/tcllib/help/commands/read'`; then
  418.     echo shar: \"'extended/tcllib/help/commands/read'\" unpacked with wrong size!
  419. fi
  420. # end of 'extended/tcllib/help/commands/read'
  421. fi
  422. if test -f 'extended/tcllib/help/commands/scan' -a "${1}" != "-c" ; then 
  423.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/scan'\"
  424. else
  425. echo shar: Extracting \"'extended/tcllib/help/commands/scan'\" \(952 characters\)
  426. sed "s/^X//" >'extended/tcllib/help/commands/scan' <<'END_OF_FILE'
  427. X          scan string format varname1 ?varname2 ...?
  428. X               This command parses fields from an input string in  the
  429. X               same  fashion  as the C sscanf procedure.  String gives
  430. X               the input to be parsed  and  format  indicates  how  to
  431. X               parse  it,  using  %  fields  as in sscanf.  All of the
  432. X               sscanf options are valid; see the sscanf man  page  for
  433. X               details.   Each  varname  gives the name of a variable;
  434. X               when a field is scanned  from  string,  the  result  is
  435. X               converted  back  into  a  string  and  assigned  to the
  436. X               corresponding varname.  The only unusual conversion  is
  437. X               for %c.  For %c conversions a single character value is
  438. X               converted to a decimal string, which is  then  assigned
  439. X               to  the  corresponding  varname;  no field width may be
  440. X               specified for this conversion.
  441. X
  442. END_OF_FILE
  443. if test 952 -ne `wc -c <'extended/tcllib/help/commands/scan'`; then
  444.     echo shar: \"'extended/tcllib/help/commands/scan'\" unpacked with wrong size!
  445. fi
  446. # end of 'extended/tcllib/help/commands/scan'
  447. fi
  448. if test -f 'extended/tcllib/help/commands/source' -a "${1}" != "-c" ; then 
  449.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/source'\"
  450. else
  451. echo shar: Extracting \"'extended/tcllib/help/commands/source'\" \(851 characters\)
  452. sed "s/^X//" >'extended/tcllib/help/commands/source' <<'END_OF_FILE'
  453. X          source fileName
  454. X               Read file fileName and pass the  contents  to  the  Tcl
  455. X               interpreter as a sequence of commands to execute in the
  456. X               normal fashion.  The return  value  of  source  is  the
  457. X               return  value  of  the  last  command executed from the
  458. X               file.  If an error occurs in executing the contents  of
  459. X               the  file,  then  the  source  command will return that
  460. X               error.  If a return command is invoked from within  the
  461. X               file, the remainder of the file will be skipped and the
  462. X               source command will return  normally  with  the  result
  463. X               from  the  return  command.   If fileName starts with a
  464. X               tilde, then it is tilde-substituted as described in the
  465. X               Tcl_TildeSubst manual entry.
  466. END_OF_FILE
  467. if test 851 -ne `wc -c <'extended/tcllib/help/commands/source'`; then
  468.     echo shar: \"'extended/tcllib/help/commands/source'\" unpacked with wrong size!
  469. fi
  470. # end of 'extended/tcllib/help/commands/source'
  471. fi
  472. if test -f 'extended/tcllib/help/commands/split' -a "${1}" != "-c" ; then 
  473.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/split'\"
  474. else
  475. echo shar: Extracting \"'extended/tcllib/help/commands/split'\" \(994 characters\)
  476. sed "s/^X//" >'extended/tcllib/help/commands/split' <<'END_OF_FILE'
  477. X          split string ?splitChars?
  478. X               Returns a list created  by  splitting  string  at  each
  479. X               character  that  is  in  the splitChars argument.  Each
  480. X               element  of  the  result  list  will  consist  of   the
  481. X               characters   from   string  between  instances  of  the
  482. X               characters in splitChars.  Empty list elements will  be
  483. X               generated  if  string  contains  adjacent characters in
  484. X               splitChars, or if the first or last character of string
  485. X               is  in  splitChars.   If  splitChars is an empty string
  486. X               then  each  character  of  string  becomes  a  separate
  487. X               element of the result list.  SplitChars defaults to the
  488. X               standard white-space characters.  For example,
  489. X
  490. X                    split "comp.unix.misc" .
  491. X
  492. X               returns "comp unix misc" and
  493. X
  494. X                    split "Hello world" {}
  495. X
  496. X               returns "H e l l o { } w o r l d".
  497. END_OF_FILE
  498. if test 994 -ne `wc -c <'extended/tcllib/help/commands/split'`; then
  499.     echo shar: \"'extended/tcllib/help/commands/split'\" unpacked with wrong size!
  500. fi
  501. # end of 'extended/tcllib/help/commands/split'
  502. fi
  503. if test -f 'extended/tcllib/help/commands/unset' -a "${1}" != "-c" ; then 
  504.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/unset'\"
  505. else
  506. echo shar: Extracting \"'extended/tcllib/help/commands/unset'\" \(698 characters\)
  507. sed "s/^X//" >'extended/tcllib/help/commands/unset' <<'END_OF_FILE'
  508. X          unset name ?name name ...?
  509. X               Remove  one or more variables.  Each name is a variable
  510. X               name, specified in any of the ways  acceptable  to  the
  511. X               set  command.   If  a  name  refers to an element of an
  512. X               array, then that element is removed  without  affecting
  513. X               the  rest of the array.  If a name consists of an array
  514. X               name with no parenthesized index, then the entire array
  515. X               is  deleted.  The unset command returns an empty string
  516. X               as result.  An error occurs if  any  of  the  variables
  517. X               doesn't exist, or if any of the variables has an active
  518. X               trace.
  519. END_OF_FILE
  520. if test 698 -ne `wc -c <'extended/tcllib/help/commands/unset'`; then
  521.     echo shar: \"'extended/tcllib/help/commands/unset'\" unpacked with wrong size!
  522. fi
  523. # end of 'extended/tcllib/help/commands/unset'
  524. fi
  525. if test -f 'extended/tcllib/help/commands/while' -a "${1}" != "-c" ; then 
  526.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/while'\"
  527. else
  528. echo shar: Extracting \"'extended/tcllib/help/commands/while'\" \(854 characters\)
  529. sed "s/^X//" >'extended/tcllib/help/commands/while' <<'END_OF_FILE'
  530. X          while test body
  531. X               The while command evaluates test as an  expression  (in
  532. X               the  same  way  that expr evaluates its argument).  The
  533. X               value of the expression must be numeric; if it is  non-
  534. X               zero  then  body  is  executed by passing it to the Tcl
  535. X               interpreter.  Once body has been executed then test  is
  536. X               evaluated   again,   and   the  process  repeats  until
  537. X               eventually test evaluates  to  a  zero  numeric  value.
  538. X               Continue  commands  may  be  executed  inside  body  to
  539. X               terminate the current iteration of the loop, and  break
  540. X               commands may be executed inside body to cause immediate
  541. X               termination of the while command.   The  while  command
  542. X               always returns an empty string.
  543. END_OF_FILE
  544. if test 854 -ne `wc -c <'extended/tcllib/help/commands/while'`; then
  545.     echo shar: \"'extended/tcllib/help/commands/while'\" unpacked with wrong size!
  546. fi
  547. # end of 'extended/tcllib/help/commands/while'
  548. fi
  549. if test -f 'extended/tcllib/help/extended/chmod' -a "${1}" != "-c" ; then 
  550.   echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/chmod'\"
  551. else
  552. echo shar: Extracting \"'extended/tcllib/help/extended/chmod'\" \(550 characters\)
  553. sed "s/^X//" >'extended/tcllib/help/extended/chmod' <<'END_OF_FILE'
  554. X
  555. X
  556. X          chmod [-i] mode filelist
  557. X               Set permissions of each of the files in the list
  558. X               filelist to mode, which is an absolute numeric mode or
  559. X               symbolic permissions as in the chmod(C) UNIX command.
  560. X               Normally absolute modes are assumed to be specified in
  561. X               octal.  However Tcl stores numbers internally as
  562. X               integers.  The -i option causes an absolute mode to be
  563. X               treated as a standard Tcl integer (decimal unless
  564. X               prefixed by "0" of "0x").
  565. END_OF_FILE
  566. if test 550 -ne `wc -c <'extended/tcllib/help/extended/chmod'`; then
  567.     echo shar: \"'extended/tcllib/help/extended/chmod'\" unpacked with wrong size!
  568. fi
  569. # end of 'extended/tcllib/help/extended/chmod'
  570. fi
  571. if test -f 'extended/tcllib/help/extended/chown' -a "${1}" != "-c" ; then 
  572.   echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/chown'\"
  573. else
  574. echo shar: Extracting \"'extended/tcllib/help/extended/chown'\" \(554 characters\)
  575. sed "s/^X//" >'extended/tcllib/help/extended/chown' <<'END_OF_FILE'
  576. X
  577. X
  578. X          chown owner|{owner group} filelist
  579. X               Set owner of each file in the list filelist to owner,
  580. X               which is a owner name or numeric owner id.  If the
  581. X               first parameter is a list, then the owner is set to the
  582. X               first element of the list and the group is set to the
  583. X               second element of the list. Group is a group name or
  584. X               numeric group id.  If group is {}, then the file group
  585. X               will be set to the group for the associated the
  586. X               specified user.
  587. END_OF_FILE
  588. if test 554 -ne `wc -c <'extended/tcllib/help/extended/chown'`; then
  589.     echo shar: \"'extended/tcllib/help/extended/chown'\" unpacked with wrong size!
  590. fi
  591. # end of 'extended/tcllib/help/extended/chown'
  592. fi
  593. if test -f 'extended/tcllib/help/extended/dup' -a "${1}" != "-c" ; then 
  594.   echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/dup'\"
  595. else
  596. echo shar: Extracting \"'extended/tcllib/help/extended/dup'\" \(945 characters\)
  597. sed "s/^X//" >'extended/tcllib/help/extended/dup' <<'END_OF_FILE'
  598. X
  599. X
  600. X          dup filehandle [stdhandle]
  601. X               Duplicate an open file.  A file handle is created that
  602. X               addresses the same file as filehandle.
  603. X
  604. X               A special case is allowed for dup-ing files to stdin,
  605. X               stdout or stderr.  If stdhandle is specified, then it
  606. X               must be one of the standard handles to dup filehandle
  607. X               to.
  608. X
  609. X                   proc ChildProcess {cmd inPipe outPipe} {
  610. X                       if {[set childPid [fork]] == 0} {
  611. X                           close stdin
  612. X                           dup $inPipe stdin
  613. X                           close $inPipe
  614. X
  615. X                           close stdout
  616. X                           dup $outPipe stdout
  617. X                           close $outPipe
  618. X
  619. X                           execvp $cmd
  620. X                           # will never make it here...
  621. X                       }
  622. X                       return $childPid
  623. X                   }
  624. END_OF_FILE
  625. if test 945 -ne `wc -c <'extended/tcllib/help/extended/dup'`; then
  626.     echo shar: \"'extended/tcllib/help/extended/dup'\" unpacked with wrong size!
  627. fi
  628. # end of 'extended/tcllib/help/extended/dup'
  629. fi
  630. if test -f 'extended/tcllib/help/extended/fork' -a "${1}" != "-c" ; then 
  631.   echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/fork'\"
  632. else
  633. echo shar: Extracting \"'extended/tcllib/help/extended/fork'\" \(580 characters\)
  634. sed "s/^X//" >'extended/tcllib/help/extended/fork' <<'END_OF_FILE'
  635. X
  636. X
  637. X          fork
  638. X               Fork the current TCL process.  Fork returns zero to the
  639. X               child process and the process number of the child to
  640. X               the parent process.  If an execvp is not going to be
  641. X               performed before the forked process does output, then a
  642. X               flush should be issued against stdout, stderr and any
  643. X               other open output file before doing the fork.
  644. X               Otherwise, output from the parent process pending in
  645. X               the buffers will also be outputted by the child
  646. X               process.
  647. END_OF_FILE
  648. if test 580 -ne `wc -c <'extended/tcllib/help/extended/fork'`; then
  649.     echo shar: \"'extended/tcllib/help/extended/fork'\" unpacked with wrong size!
  650. fi
  651. # end of 'extended/tcllib/help/extended/fork'
  652. fi
  653. if test -f 'extended/tcllib/help/extended/keylget' -a "${1}" != "-c" ; then 
  654.   echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/keylget'\"
  655. else
  656. echo shar: Extracting \"'extended/tcllib/help/extended/keylget'\" \(755 characters\)
  657. sed "s/^X//" >'extended/tcllib/help/extended/keylget' <<'END_OF_FILE'
  658. X
  659. X
  660. X          keylget listvar key [retvar | {}]
  661. X               Return the value associated with the key out of keyed
  662. X               list in the variable listvar.  If retvar is not
  663. X               specified, then the value will be returned as the
  664. X               result of the command.  If key is not found in the
  665. X               list, an error will result.  If retvar is specified and
  666. X               key is in the list, then the value is returned in the
  667. X               variable retvar and the command returns one. If key is
  668. X               not in the list, the command will return 0 and retvar
  669. X               will be unchanged.  If {} is specified for retvar, the
  670. X               value is not returned, only the presence of the key is
  671. X               determined.
  672. END_OF_FILE
  673. if test 755 -ne `wc -c <'extended/tcllib/help/extended/keylget'`; then
  674.     echo shar: \"'extended/tcllib/help/extended/keylget'\" unpacked with wrong size!
  675. fi
  676. # end of 'extended/tcllib/help/extended/keylget'
  677. fi
  678. if test -f 'extended/tcllib/help/extended/pipe' -a "${1}" != "-c" ; then 
  679.   echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/pipe'\"
  680. else
  681. echo shar: Extracting \"'extended/tcllib/help/extended/pipe'\" \(545 characters\)
  682. sed "s/^X//" >'extended/tcllib/help/extended/pipe' <<'END_OF_FILE'
  683. X
  684. X
  685. X          pipe [handle_var_r handle_var_w]
  686. X               Create a pipe (see the pipe system call manual page).
  687. X               If handle_var_r and handle_var_r are specified, then
  688. X               variable handle_var_r will contain the handle opened
  689. X               for reading and handle_var_w will contain the handle
  690. X               opened for writing.  If the handle variables are not
  691. X               specified, then a list containing the read followed by
  692. X               the write handle is returned as the result of the
  693. X               command.
  694. END_OF_FILE
  695. if test 545 -ne `wc -c <'extended/tcllib/help/extended/pipe'`; then
  696.     echo shar: \"'extended/tcllib/help/extended/pipe'\" unpacked with wrong size!
  697. fi
  698. # end of 'extended/tcllib/help/extended/pipe'
  699. fi
  700. if test -f 'extended/tcllib/help/extended/random' -a "${1}" != "-c" ; then 
  701.   echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/random'\"
  702. else
  703. echo shar: Extracting \"'extended/tcllib/help/extended/random'\" \(631 characters\)
  704. sed "s/^X//" >'extended/tcllib/help/extended/random' <<'END_OF_FILE'
  705. X
  706. X
  707. X          random limit | seed [seedval]
  708. X               Generate a pseudorandom integer number greater than or
  709. X               equal to zero and less than limit.  If seed is
  710. X               specified, then the command resets the random number
  711. X               generator to a starting point derived from the seedval.
  712. X               This allows one to reproduce a random number sequence
  713. X               for testing purposes.  If seedval is omitted, then the
  714. X               seed is set to a value based on current system state
  715. X               and the current time, providing a reasonably
  716. X               interesting and ever-changing seed.
  717. END_OF_FILE
  718. if test 631 -ne `wc -c <'extended/tcllib/help/extended/random'`; then
  719.     echo shar: \"'extended/tcllib/help/extended/random'\" unpacked with wrong size!
  720. fi
  721. # end of 'extended/tcllib/help/extended/random'
  722. fi
  723. if test -f 'extended/tcllib/help/extended/wait' -a "${1}" != "-c" ; then 
  724.   echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/wait'\"
  725. else
  726. echo shar: Extracting \"'extended/tcllib/help/extended/wait'\" \(691 characters\)
  727. sed "s/^X//" >'extended/tcllib/help/extended/wait' <<'END_OF_FILE'
  728. X
  729. X
  730. X          wait proclist
  731. X               Waits for an any of the immediate child processes
  732. X               specified in the list proclist to terminate or a signal
  733. X               to be received.  Wait returns a list of three elements:
  734. X               The first element is process id of the terminating
  735. X               process. If the process exited normally, the second
  736. X               element is `EXIT', followed by the error code.  If the
  737. X               process terminated because of a signal, the second
  738. X               element is `SIG', followed by the signal name.  If the
  739. X               process is currently stopped, the second element is
  740. X               `STOP', followed by the signal name.
  741. END_OF_FILE
  742. if test 691 -ne `wc -c <'extended/tcllib/help/extended/wait'`; then
  743.     echo shar: \"'extended/tcllib/help/extended/wait'\" unpacked with wrong size!
  744. fi
  745. # end of 'extended/tcllib/help/extended/wait'
  746. fi
  747. if test -f 'extended/tcllib/help/intro/comments' -a "${1}" != "-c" ; then 
  748.   echo shar: Will not clobber existing file \"'extended/tcllib/help/intro/comments'\"
  749. else
  750. echo shar: Extracting \"'extended/tcllib/help/intro/comments'\" \(604 characters\)
  751. sed "s/^X//" >'extended/tcllib/help/intro/comments' <<'END_OF_FILE'
  752. X     COMMENTS
  753. X          If the first non-blank character in a  command  is  #,  then
  754. X          everything  from the # up through the next newline character
  755. X          is treated as a comment  and  ignored.   When  comments  are
  756. X          embedded  inside  nested  commands  (e.g. fields enclosed in
  757. X          braces) they must  have  properly-matched  braces  (this  is
  758. X          necessary  because  when Tcl parses the top-level command it
  759. X          doesn't yet know that the nested field will  be  used  as  a
  760. X          command so it cannot process the nested comment character as
  761. X          a comment).
  762. END_OF_FILE
  763. if test 604 -ne `wc -c <'extended/tcllib/help/intro/comments'`; then
  764.     echo shar: \"'extended/tcllib/help/intro/comments'\" unpacked with wrong size!
  765. fi
  766. # end of 'extended/tcllib/help/intro/comments'
  767. fi
  768. if test -f 'extended/tcllib/help/intro/procedures' -a "${1}" != "-c" ; then 
  769.   echo shar: Will not clobber existing file \"'extended/tcllib/help/intro/procedures'\"
  770. else
  771. echo shar: Extracting \"'extended/tcllib/help/intro/procedures'\" \(554 characters\)
  772. sed "s/^X//" >'extended/tcllib/help/intro/procedures' <<'END_OF_FILE'
  773. X     PROCEDURES
  774. X          Tcl allows you to extend the command interface  by  defining
  775. X          procedures.   A  Tcl  procedure can be invoked just like any
  776. X          other Tcl command (it has a name and it receives one or more
  777. X          arguments).   The  only  difference is that its body isn't a
  778. X          piece of C code linked into the  program;  it  is  a  string
  779. X          containing  one  or  more  other Tcl commands.  See the proc
  780. X          command for information on how to define procedures and what
  781. X          happens when they are invoked.
  782. END_OF_FILE
  783. if test 554 -ne `wc -c <'extended/tcllib/help/intro/procedures'`; then
  784.     echo shar: \"'extended/tcllib/help/intro/procedures'\" unpacked with wrong size!
  785. fi
  786. # end of 'extended/tcllib/help/intro/procedures'
  787. fi
  788. if test -f 'extended/tcllib/help/tcl.tlib/assign_fields' -a "${1}" != "-c" ; then 
  789.   echo shar: Will not clobber existing file \"'extended/tcllib/help/tcl.tlib/assign_fields'\"
  790. else
  791. echo shar: Extracting \"'extended/tcllib/help/tcl.tlib/assign_fields'\" \(532 characters\)
  792. sed "s/^X//" >'extended/tcllib/help/tcl.tlib/assign_fields' <<'END_OF_FILE'
  793. X
  794. X
  795. X          assign_fields list var [var...]
  796. X               Assign successive elements in a list to specified
  797. X               variables.  Any leftover fields are discarded.  When
  798. X               there are more variable names than fields, the
  799. X               remaining variables are set to the empty string.
  800. X
  801. X               For example,
  802. X
  803. X                  assign_fields {dave 100 200 "Dave Foo"} name uid gid longName
  804. X
  805. X               Assigns name to ``dave'', uid to ``100'', gid to
  806. X               ``200'', and longName to ``Dave Foo''.
  807. END_OF_FILE
  808. if test 532 -ne `wc -c <'extended/tcllib/help/tcl.tlib/assign_fields'`; then
  809.     echo shar: \"'extended/tcllib/help/tcl.tlib/assign_fields'\" unpacked with wrong size!
  810. fi
  811. # end of 'extended/tcllib/help/tcl.tlib/assign_fields'
  812. fi
  813. if test -f 'extended/tcllib/help/tclshell/autoload' -a "${1}" != "-c" ; then 
  814.   echo shar: Will not clobber existing file \"'extended/tcllib/help/tclshell/autoload'\"
  815. else
  816. echo shar: Extracting \"'extended/tcllib/help/tclshell/autoload'\" \(725 characters\)
  817. sed "s/^X//" >'extended/tcllib/help/tclshell/autoload' <<'END_OF_FILE'
  818. X
  819. X
  820. X          autoload file proc1 [..procN]
  821. X
  822. X          The autoload procedure, defined in TclInit.tcl, allows the
  823. X          Tcl programmer to name one or more procedures and the file
  824. X          they are defined in.  After autoload has been executed to
  825. X          inform Tcl of the presence of them, a subsequent attempt to
  826. X          execute one of the procedures will cause the corresponding
  827. X          file to be loaded transparently prior to executing the
  828. X          function.  For example, executing:
  829. X
  830. X               autoload showproc.tcl showproc showprocs
  831. X
  832. X          tells Tcl to automatically load the file showproc.tcl the
  833. X          first time in the current session that either showproc or
  834. X          showprocs is executed.
  835. END_OF_FILE
  836. if test 725 -ne `wc -c <'extended/tcllib/help/tclshell/autoload'`; then
  837.     echo shar: \"'extended/tcllib/help/tclshell/autoload'\" unpacked with wrong size!
  838. fi
  839. # end of 'extended/tcllib/help/tclshell/autoload'
  840. fi
  841. if test -f 'extended/tcllib/help/tclshell/loadlibindex' -a "${1}" != "-c" ; then 
  842.   echo shar: Will not clobber existing file \"'extended/tcllib/help/tclshell/loadlibindex'\"
  843. else
  844. echo shar: Extracting \"'extended/tcllib/help/tclshell/loadlibindex'\" \(517 characters\)
  845. sed "s/^X//" >'extended/tcllib/help/tclshell/loadlibindex' <<'END_OF_FILE'
  846. X
  847. X          loadlibindex libfile Load the package library index of the
  848. X          library file libfile (which must have the suffix .tlib).
  849. X          Package library indexes along the TCLPATH are loaded
  850. X          automatically on the first demand_load; this command is
  851. X          provided to explicitly load libraries that are not in the
  852. X          path.  If the index file (with a .tndx suffix) does not
  853. X          exists or is out of date, it will be rebuilt if the user has
  854. X          directory permissions to create it.
  855. END_OF_FILE
  856. if test 517 -ne `wc -c <'extended/tcllib/help/tclshell/loadlibindex'`; then
  857.     echo shar: \"'extended/tcllib/help/tclshell/loadlibindex'\" unpacked with wrong size!
  858. fi
  859. # end of 'extended/tcllib/help/tclshell/loadlibindex'
  860. fi
  861. if test -f 'extended/tcllib/help/tclshell/results' -a "${1}" != "-c" ; then 
  862.   echo shar: Will not clobber existing file \"'extended/tcllib/help/tclshell/results'\"
  863. else
  864. echo shar: Extracting \"'extended/tcllib/help/tclshell/results'\" \(600 characters\)
  865. sed "s/^X//" >'extended/tcllib/help/tclshell/results' <<'END_OF_FILE'
  866. X
  867. X
  868. X          The string result of a command typed at the Tcl shell
  869. X          command prompt is normally echoed back to the user.  If an
  870. X          error occurs, then the string result is displayed, along
  871. X          with the error message.  The error message will be preceded
  872. X          by the string ``Error:''.
  873. X
  874. X          The set command is a special case.  If the command is called
  875. X          to set a variable (i.e. with two arguments), then the result
  876. X          will not be echoed.  If only one argument, the name of a
  877. X          variable, is supplied to set, then the result will be
  878. X          echoed.
  879. END_OF_FILE
  880. if test 600 -ne `wc -c <'extended/tcllib/help/tclshell/results'`; then
  881.     echo shar: \"'extended/tcllib/help/tclshell/results'\" unpacked with wrong size!
  882. fi
  883. # end of 'extended/tcllib/help/tclshell/results'
  884. fi
  885. if test -f 'extended/tcllib/help/tclshell/tclinit' -a "${1}" != "-c" ; then 
  886.   echo shar: Will not clobber existing file \"'extended/tcllib/help/tclshell/tclinit'\"
  887. else
  888. echo shar: Extracting \"'extended/tcllib/help/tclshell/tclinit'\" \(703 characters\)
  889. sed "s/^X//" >'extended/tcllib/help/tclshell/tclinit' <<'END_OF_FILE'
  890. X
  891. X
  892. X          The Tcl initialization file, normally TclInit.tcl in the
  893. X          main Tcl script directory, initializes the Tcl shell.  It
  894. X          defines various Tcl procedures that are required to
  895. X          implement loading of Tcl source from libraries via the
  896. X          package libraries and autoload facilities.
  897. X
  898. X          If the Tcl is invoked interactively, it will source a .tclrc
  899. X          in the user's home directory, if it exists.  Tcl is viewed
  900. X          primarly as a programming language, not an interactive
  901. X          shell, so the .tclrc is intended for use for loading
  902. X          development utilities, not to support programs, which should
  903. X          not rely on the user's environment.
  904. END_OF_FILE
  905. if test 703 -ne `wc -c <'extended/tcllib/help/tclshell/tclinit'`; then
  906.     echo shar: \"'extended/tcllib/help/tclshell/tclinit'\" unpacked with wrong size!
  907. fi
  908. # end of 'extended/tcllib/help/tclshell/tclinit'
  909. fi
  910. if test -f 'extended/tcllib/help/tclshell/unixcommands' -a "${1}" != "-c" ; then 
  911.   echo shar: Will not clobber existing file \"'extended/tcllib/help/tclshell/unixcommands'\"
  912. else
  913. echo shar: Extracting \"'extended/tcllib/help/tclshell/unixcommands'\" \(595 characters\)
  914. sed "s/^X//" >'extended/tcllib/help/tclshell/unixcommands' <<'END_OF_FILE'
  915. X
  916. X
  917. X          If an unknown Tcl command is entered from the command line,
  918. X          then the Unix command path, specified in the environment
  919. X          variable PATH, will be searched for a command of the same
  920. X          name.  If found, the command will be executed.  This feature
  921. X          is provided to enhance the interactive environment for
  922. X          developing Tcl scripts. This is only supported from the
  923. X          command line, not in script files or in procedures, to
  924. X          eliminate confusion.  The exec or system command should be
  925. X          used to run Unix commands inside scripts.
  926. END_OF_FILE
  927. if test 595 -ne `wc -c <'extended/tcllib/help/tclshell/unixcommands'`; then
  928.     echo shar: \"'extended/tcllib/help/tclshell/unixcommands'\" unpacked with wrong size!
  929. fi
  930. # end of 'extended/tcllib/help/tclshell/unixcommands'
  931. fi
  932. if test -f 'extended/tclsrc/Makefile' -a "${1}" != "-c" ; then 
  933.   echo shar: Will not clobber existing file \"'extended/tclsrc/Makefile'\"
  934. else
  935. echo shar: Extracting \"'extended/tclsrc/Makefile'\" \(774 characters\)
  936. sed "s/^X//" >'extended/tclsrc/Makefile' <<'END_OF_FILE'
  937. X#
  938. X# Makefile for Extended Tcl package library. This file is designed to be run
  939. X# under the top-level Makefile and expects the following macros to be passed
  940. X# in via the environment for a 'all' make:
  941. X#   o TCL_UCB_DIR - The location of the UCB Tcl distribution relative to this
  942. X#     directory.
  943. X#
  944. X
  945. XSHELL=/bin/sh
  946. XTCL.TLIB=../tcllib/tcl.tlib
  947. XTCL.TNDX=../tcllib/tcl.tndx
  948. X
  949. XTCL_LIBFILES=arrayprocs.tcl   asgnfields.tcl   edprocs.tcl      forfile.tcl   \
  950. X             forrecur.tcl     globrecur.tcl    help.tcl         packages.tcl  \
  951. X             pushd.tcl        setfuncs.tcl     showprocs.tcl    stringfile.tcl
  952. X
  953. Xall: made.tmp
  954. X
  955. Xclean:
  956. X    -rm -f made.tmp $(TCL.TLIB) $(TCL.TNDX)
  957. Xmade.tmp: $(TCL.TLIB)
  958. X    touch made.tmp
  959. X
  960. X$(TCL.TLIB): $(TCL_LIBFILES)
  961. X    cat $(TCL_LIBFILES)  >$(TCL.TLIB)
  962. END_OF_FILE
  963. if test 774 -ne `wc -c <'extended/tclsrc/Makefile'`; then
  964.     echo shar: \"'extended/tclsrc/Makefile'\" unpacked with wrong size!
  965. fi
  966. # end of 'extended/tclsrc/Makefile'
  967. fi
  968. if test -f 'extended/tclsrc/edprocs.tcl' -a "${1}" != "-c" ; then 
  969.   echo shar: Will not clobber existing file \"'extended/tclsrc/edprocs.tcl'\"
  970. else
  971. echo shar: Extracting \"'extended/tclsrc/edprocs.tcl'\" \(852 characters\)
  972. sed "s/^X//" >'extended/tclsrc/edprocs.tcl' <<'END_OF_FILE'
  973. X#@package: develop_functions saveprocs edprocs
  974. X
  975. Xproc saveprocs {fileName args} {
  976. X    set fp [open $fileName w]
  977. X    puts $fp "# tcl procs saved on [fmtclock [getclock]]\n"
  978. X    puts $fp [eval "showprocs $args"]
  979. X    close $fp
  980. X}
  981. X
  982. Xproc edprocs {args} {
  983. X    global env
  984. X
  985. X    set tmpFilename /tmp/tcldev.[id process]
  986. X
  987. X    set fp [open $tmpFilename w]
  988. X    puts $fp "\n# TEMP EDIT BUFFER -- YOUR CHANGES ARE FOR THIS SESSION ONLY\n"
  989. X    puts $fp [eval "showprocs $args"]
  990. X    close $fp
  991. X
  992. X    if [info exists env(EDITOR)] {
  993. X        set editor $env(EDITOR)
  994. X    } else {
  995. X    set editor vi
  996. X    }
  997. X
  998. X    set startMtime [file mtime $tmpFilename]
  999. X    system "$editor $tmpFilename"
  1000. X
  1001. X    if {[file mtime $tmpFilename] != $startMtime} {
  1002. X    source $tmpFilename
  1003. X    echo "Procedures were reloaded."
  1004. X    } else {
  1005. X    echo "No changes were made."
  1006. X    }
  1007. X    unlink $tmpFilename
  1008. X    return
  1009. X}
  1010. X
  1011. END_OF_FILE
  1012. if test 852 -ne `wc -c <'extended/tclsrc/edprocs.tcl'`; then
  1013.     echo shar: \"'extended/tclsrc/edprocs.tcl'\" unpacked with wrong size!
  1014. fi
  1015. # end of 'extended/tclsrc/edprocs.tcl'
  1016. fi
  1017. if test -f 'extended/tclsrc/pushd.tcl' -a "${1}" != "-c" ; then 
  1018.   echo shar: Will not clobber existing file \"'extended/tclsrc/pushd.tcl'\"
  1019. else
  1020. echo shar: Extracting \"'extended/tclsrc/pushd.tcl'\" \(617 characters\)
  1021. sed "s/^X//" >'extended/tclsrc/pushd.tcl' <<'END_OF_FILE'
  1022. X#@package: directory_stack pushd popd dirs
  1023. X
  1024. Xglobal TCLENV(dirPushList)
  1025. X
  1026. Xset TCLENV(dirPushList) ""
  1027. X
  1028. Xproc pushd {args} {
  1029. X    global TCLENV
  1030. X
  1031. X    if {[llength $args] > 1} {
  1032. X        error "bad # args: pushd [dir_to_cd_to]"
  1033. X    }
  1034. X    set TCLENV(dirPushList) [linsert $TCLENV(dirPushList) 0 [pwd]]
  1035. X
  1036. X    if {[llength $args] != 0} {
  1037. X        cd [glob $args]
  1038. X    }
  1039. X}
  1040. X
  1041. Xproc popd {} {
  1042. X    global TCLENV
  1043. X
  1044. X    if [llength $TCLENV(dirPushList)] {
  1045. X        cd [lvarpop TCLENV(dirPushList)]
  1046. X        pwd
  1047. X    } else {
  1048. X        error "directory stack empty"
  1049. X    }
  1050. X}
  1051. X
  1052. Xproc dirs {} { 
  1053. X    global TCLENV
  1054. X    echo [pwd] $TCLENV(dirPushList)
  1055. X}
  1056. END_OF_FILE
  1057. if test 617 -ne `wc -c <'extended/tclsrc/pushd.tcl'`; then
  1058.     echo shar: \"'extended/tclsrc/pushd.tcl'\" unpacked with wrong size!
  1059. fi
  1060. # end of 'extended/tclsrc/pushd.tcl'
  1061. fi
  1062. if test -f 'extended/tests/asgnfield.test' -a "${1}" != "-c" ; then 
  1063.   echo shar: Will not clobber existing file \"'extended/tests/asgnfield.test'\"
  1064. else
  1065. echo shar: Extracting \"'extended/tests/asgnfield.test'\" \(940 characters\)
  1066. sed "s/^X//" >'extended/tests/asgnfield.test' <<'END_OF_FILE'
  1067. X#
  1068. X# asgnfield.test
  1069. X#
  1070. X# Tests for tcl.tlib field assignment routines.
  1071. X#---------------------------------------------------------------------------
  1072. X# Copyright 1991 Karl Lehenbauer and Mark Diekhans.
  1073. X#
  1074. X# Permission to use, copy, modify, and distribute this software and its
  1075. X# documentation for any purpose and without fee is hereby granted, provided
  1076. X# that the above copyright notice appear in all copies.  Karl Lehenbauer and
  1077. X# Mark Diekhans make no representations about the suitability of this
  1078. X# software for any purpose.  It is provided "as is" without express or
  1079. X# implied warranty.
  1080. X#
  1081. X
  1082. Xif {[string compare test [info procs test]] == 1} then {source defs}
  1083. Xrename SAVED_UNKNOWN unknown
  1084. X
  1085. Xtest assign_fields-1.1 {assign_fields command} {
  1086. X    assign_fields "a b {c d} e" alpha beta gamma delta epsilon
  1087. X    return [list $alpha $beta $gamma $delta $epsilon]
  1088. X} "a b {c d} e {}"
  1089. X
  1090. Xunset alpha beta gamma delta epsilon
  1091. Xrename unknown SAVED_UNKNOWN
  1092. END_OF_FILE
  1093. if test 940 -ne `wc -c <'extended/tests/asgnfield.test'`; then
  1094.     echo shar: \"'extended/tests/asgnfield.test'\" unpacked with wrong size!
  1095. fi
  1096. # end of 'extended/tests/asgnfield.test'
  1097. fi
  1098. if test -f 'extended/tests/stringfil.test' -a "${1}" != "-c" ; then 
  1099.   echo shar: Will not clobber existing file \"'extended/tests/stringfil.test'\"
  1100. else
  1101. echo shar: Extracting \"'extended/tests/stringfil.test'\" \(975 characters\)
  1102. sed "s/^X//" >'extended/tests/stringfil.test' <<'END_OF_FILE'
  1103. X#
  1104. X# stringfil.test
  1105. X#
  1106. X# Tests for tcl.tlib stringfile functions.
  1107. X#---------------------------------------------------------------------------
  1108. X# Copyright 1991 Karl Lehenbauer and Mark Diekhans.
  1109. X#
  1110. X# Permission to use, copy, modify, and distribute this software and its
  1111. X# documentation for any purpose and without fee is hereby granted, provided
  1112. X# that the above copyright notice appear in all copies.  Karl Lehenbauer and
  1113. X# Mark Diekhans make no representations about the suitability of this
  1114. X# software for any purpose.  It is provided "as is" without express or
  1115. X# implied warranty.
  1116. X#
  1117. X
  1118. Xif {[string compare test [info procs test]] == 1} then {source defs}
  1119. Xrename SAVED_UNKNOWN unknown
  1120. X
  1121. Xset stringfileTestVar {a
  1122. Xb
  1123. Xc
  1124. Xd
  1125. Xe
  1126. Xf
  1127. Xg}
  1128. X
  1129. Xtest write_file-1.1 {write_file command} {
  1130. X    write_file STRINGFIL.TEST $stringfileTestVar
  1131. X} ""
  1132. X
  1133. Xtest read_file-1.1 {read_file command} {
  1134. X    read_file STRINGFIL.TEST
  1135. X} "$stringfileTestVar\n"
  1136. X
  1137. Xcatch {unlink STRINGFIL.TEST}
  1138. Xrename unknown SAVED_UNKNOWN
  1139. END_OF_FILE
  1140. if test 975 -ne `wc -c <'extended/tests/stringfil.test'`; then
  1141.     echo shar: \"'extended/tests/stringfil.test'\" unpacked with wrong size!
  1142. fi
  1143. # end of 'extended/tests/stringfil.test'
  1144. fi
  1145. echo shar: End of archive 3 \(of 23\).
  1146. cp /dev/null ark3isdone
  1147. MISSING=""
  1148. 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
  1149.     if test ! -f ark${I}isdone ; then
  1150.     MISSING="${MISSING} ${I}"
  1151.     fi
  1152. done
  1153. if test "${MISSING}" = "" ; then
  1154.     echo You have unpacked all 23 archives.
  1155.     echo "Now cd to "extended", edit the makefile, then do a "make""
  1156.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1157. else
  1158.     echo You still need to unpack the following archives:
  1159.     echo "        " ${MISSING}
  1160. fi
  1161. ##  End of shell archive.
  1162. exit 0
  1163.  
  1164. exit 0 # Just in case...
  1165. -- 
  1166. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1167. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1168. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1169. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1170.