home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume26 / tclx / part04 < prev    next >
Encoding:
Text File  |  1991-11-19  |  52.5 KB  |  1,200 lines

  1. Newsgroups: comp.sources.misc
  2. From: karl@sugar.neosoft.com (Karl Lehenbauer)
  3. Subject:  v26i004:  tclx - extensions and on-line help for tcl 6.1, Part04/23
  4. Message-ID: <1991Nov19.005306.8510@sparky.imd.sterling.com>
  5. X-Md4-Signature: a962c98ade3be7faaf3ae36a388078ce
  6. Date: Tue, 19 Nov 1991 00:53:06 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: karl@sugar.neosoft.com (Karl Lehenbauer)
  10. Posting-number: Volume 26, Issue 4
  11. Archive-name: tclx/part04
  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 4 (of 23)."
  21. # Contents:  extended/src/Makefile extended/src/Makefile.t
  22. #   extended/src/matherr.c extended/tcllib/help/commands/catch
  23. #   extended/tcllib/help/commands/for
  24. #   extended/tcllib/help/commands/format
  25. #   extended/tcllib/help/commands/gets
  26. #   extended/tcllib/help/commands/lreplace
  27. #   extended/tcllib/help/commands/seek
  28. #   extended/tcllib/help/commands/set
  29. #   extended/tcllib/help/commands/unknown
  30. #   extended/tcllib/help/extended/bsearch
  31. #   extended/tcllib/help/extended/commandloop
  32. #   extended/tcllib/help/extended/fstat
  33. #   extended/tcllib/help/extended/infox
  34. #   extended/tcllib/help/extended/keyedlists
  35. #   extended/tcllib/help/extended/scancontext
  36. #   extended/tcllib/help/intro/data_types
  37. #   extended/tcllib/help/intro/double_quotes
  38. #   extended/tcllib/help/tclshell/flags
  39. #   extended/tcllib/help/tclshell/intro extended/tests/arrayproc.test
  40. #   extended/tests/clock.test extended/tests/defs
  41. #   extended/tests/forfile.test extended/tests/pushd.test
  42. #   extended/tests/showprocs.test extended/ucbsrc/ucbman.names
  43. # Wrapped by karl@one on Wed Nov 13 21:50:13 1991
  44. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  45. if test -f 'extended/src/Makefile' -a "${1}" != "-c" ; then 
  46.   echo shar: Will not clobber existing file \"'extended/src/Makefile'\"
  47. else
  48. echo shar: Extracting \"'extended/src/Makefile'\" \(1343 characters\)
  49. sed "s/^X//" >'extended/src/Makefile' <<'END_OF_FILE'
  50. X#
  51. X# Makefile for Extended Tcl C sources.  This will compile all of Extended Tcl
  52. X# and add it to the libtcl.a in the parent directory.  It will also build a
  53. X# tclshell under the name 'tcl' in the parent directory.  This file is
  54. X# designed to be run under the top-level Makefile and expects the following
  55. X# macros to be passed in via the environment for a 'all' make:
  56. X#    o CFLAGS - Flags for the C-compile, including -I to find the UCB Tcl .h
  57. X#      files.
  58. X#    o HISTORY_FLAG - Can contain a define to turn off history.
  59. X#    o TCL_DEFAULT - The name of the Tcl default file.
  60. X#
  61. XSHELL=/bin/sh
  62. XLIBTCL=../libtcl.a
  63. X
  64. XOBJS= \
  65. X    chmod.o        clock.o        cmdloop.o      debug.o        extendUtil.o \
  66. X    filescan.o     fmath.o        general.o      handles.o      id.o         \
  67. X    iocmds.o       list.o         main.o         math.o         matherr.o    \
  68. X    regexputil.o   signal.o       string.o       tclstartup.o   unixcmds.o   \
  69. X    createExtd.o
  70. X
  71. Xall: made.tmp
  72. X
  73. Xmade.tmp: $(OBJS)
  74. X    $(AR) cruv $(LIBTCL) $(OBJS)
  75. X    touch made.tmp
  76. X
  77. Xmain.o: patchlevel.h main.c
  78. X    cc -c $(CFLAGS) $(HISTORY_FLAG) -DTCL_DEFAULT=\"$(TCL_DEFAULT)\" main.c
  79. X
  80. X#
  81. X# This is just to test if it compiles.
  82. X#
  83. Xtcl++:
  84. X    CC -c $(CFLAGS) $(HISTORY_FLAG) -DTCL_DEFAULT=\"$(TCL_DEFAULT)\" \
  85. X            tcl++.C
  86. X    -rm -f tcl++.o
  87. Xclean:
  88. X    -rm -f made.tmp
  89. X    -rm -f *.o
  90. X    -rm -f tcl++.o
  91. X
  92. END_OF_FILE
  93. if test 1343 -ne `wc -c <'extended/src/Makefile'`; then
  94.     echo shar: \"'extended/src/Makefile'\" unpacked with wrong size!
  95. fi
  96. # end of 'extended/src/Makefile'
  97. fi
  98. if test -f 'extended/src/Makefile.t' -a "${1}" != "-c" ; then 
  99.   echo shar: Will not clobber existing file \"'extended/src/Makefile.t'\"
  100. else
  101. echo shar: Extracting \"'extended/src/Makefile.t'\" \(1298 characters\)
  102. sed "s/^X//" >'extended/src/Makefile.t' <<'END_OF_FILE'
  103. X
  104. X#==============================================================================
  105. X#
  106. X# Portable makefile for TCL extended commands sources.
  107. X# This section of this Makefile is extracted from Makefile.t by Configure.
  108. X#
  109. X# @(#) Makefile.t 2.3 10/2/90
  110. X#
  111. X#------------------------------------------------------------------------------
  112. X
  113. XSHELL=/bin/sh
  114. X
  115. XOBJS= \
  116. X    boyermoo.o     chartype.o     chmod.o        clock.o        cmdloop.o \
  117. X    debug.o        extendUtil.o   filescan.o     fmath.o        general.o \
  118. X    handles.o      id.o           iocmds.o       list.o         math.o    \
  119. X    matherr.o      regexp.o       regexpcmds.o   signal.o  \
  120. X    string.o       unixcmds.o     tclstartup.o
  121. X
  122. XBASEDIR= ../..
  123. X
  124. XCFLAGS= -I../../baseline/src ${C_FLAGS} ${GLOBAL_DEFS}
  125. X
  126. Xall: ${BASEDIR}/tcl
  127. X
  128. X${BASEDIR}/tcl:    $(BASEDIR)/tcl.a $(OBJS) main.o
  129. X    cc ${CFLAGS} main.o ${BASEDIR}/tcl.a ${LINKFLAGS} -o ${BASEDIR}/tcl
  130. X    $(STRIP) ${BASEDIR}/tcl
  131. X    $(MCS) ${BASEDIR}/tcl
  132. X
  133. Xmain.o: patchlevel.h Makefile
  134. X    cc -c ${CFLAGS} ${DEFAULTFILE} main.c
  135. X
  136. X${BASEDIR}/tcl.a: $(OBJS) 
  137. X    ar cru ${BASEDIR}/tcl.a $(OBJS)
  138. X    $(RANLIB) ${BASEDIR}/tcl.a
  139. X
  140. X#
  141. X# This is just to test if it compiles.
  142. X#
  143. Xtcl++:
  144. X    CC -c -I../../baseline/src tcl++.C
  145. X    -rm -f tcl++.o
  146. Xclean:
  147. X    -rm -f *.o
  148. X    -rm -f ../../tcl
  149. X    -rm -f tcl++.o
  150. X
  151. Xrealclean: clean
  152. X    -rm -f Makefile
  153. X
  154. X
  155. END_OF_FILE
  156. if test 1298 -ne `wc -c <'extended/src/Makefile.t'`; then
  157.     echo shar: \"'extended/src/Makefile.t'\" unpacked with wrong size!
  158. fi
  159. # end of 'extended/src/Makefile.t'
  160. fi
  161. if test -f 'extended/src/matherr.c' -a "${1}" != "-c" ; then 
  162.   echo shar: Will not clobber existing file \"'extended/src/matherr.c'\"
  163. else
  164. echo shar: Extracting \"'extended/src/matherr.c'\" \(1272 characters\)
  165. sed "s/^X//" >'extended/src/matherr.c' <<'END_OF_FILE'
  166. X/* 
  167. X * matherr.c --
  168. X *
  169. X *   Extended Tcl default matherr routine, may be replace by an application
  170. X *   specified version.
  171. X *---------------------------------------------------------------------------
  172. X * Copyright 1991 Karl Lehenbauer and Mark Diekhans.
  173. X *
  174. X * Permission to use, copy, modify, and distribute this software and its
  175. X * documentation for any purpose and without fee is hereby granted, provided
  176. X * that the above copyright notice appear in all copies.  Karl Lehenbauer and
  177. X * Mark Diekhans make no representations about the suitability of this
  178. X * software for any purpose.  It is provided "as is" without express or
  179. X * implied warranty.
  180. X */
  181. X
  182. X#include <math.h>
  183. X
  184. X/*
  185. X *----------------------------------------------------------------------
  186. X *
  187. X * matherr --
  188. X *    Default matherr routine for extended Tcl.  If the error does not
  189. X *  belong to Tcl, standard math error processing is done.  An
  190. X *  aplication may replace this routine with their own, however it must
  191. X *  call \fBTcl_MathError\fR to check if the error belongs to tcl.
  192. X *
  193. X *----------------------------------------------------------------------
  194. X */
  195. Xint
  196. Xmatherr (except)
  197. X    struct exception *except;
  198. X{
  199. X    if (Tcl_MathError (except->name, except->type))
  200. X        return 1;
  201. X    else
  202. X        return 0;
  203. X}
  204. END_OF_FILE
  205. if test 1272 -ne `wc -c <'extended/src/matherr.c'`; then
  206.     echo shar: \"'extended/src/matherr.c'\" unpacked with wrong size!
  207. fi
  208. # end of 'extended/src/matherr.c'
  209. fi
  210. if test -f 'extended/tcllib/help/commands/catch' -a "${1}" != "-c" ; then 
  211.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/catch'\"
  212. else
  213. echo shar: Extracting \"'extended/tcllib/help/commands/catch'\" \(1059 characters\)
  214. sed "s/^X//" >'extended/tcllib/help/commands/catch' <<'END_OF_FILE'
  215. X          catch command ?varName?
  216. X               The catch command may be used to  prevent  errors  from
  217. X               aborting  command  interpretation.  Catch calls the Tcl
  218. X               interpreter recursively to execute command, and  always
  219. X               returns  a  TCL_OK  code, regardless of any errors that
  220. X               might occur while executing command.  The return  value
  221. X               from catch is a decimal string giving the code returned
  222. X               by the Tcl interpreter after executing  command.   This
  223. X               will  be 0 (TCL_OK) if there were no errors in command;
  224. X               otherwise it will have a non-zero  value  corresponding
  225. X               to  one  of the exceptional return codes (see tcl.h for
  226. X               the  definitions  of  code  values).   If  the  varName
  227. X               argument  is  given,  then  it  gives  the  name  of  a
  228. X               variable; catch will set the value of the  variable  to
  229. X               the string returned from command (either a result or an
  230. X               error message).
  231. END_OF_FILE
  232. if test 1059 -ne `wc -c <'extended/tcllib/help/commands/catch'`; then
  233.     echo shar: \"'extended/tcllib/help/commands/catch'\" unpacked with wrong size!
  234. fi
  235. # end of 'extended/tcllib/help/commands/catch'
  236. fi
  237. if test -f 'extended/tcllib/help/commands/for' -a "${1}" != "-c" ; then 
  238.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/for'\"
  239. else
  240. echo shar: Extracting \"'extended/tcllib/help/commands/for'\" \(1233 characters\)
  241. sed "s/^X//" >'extended/tcllib/help/commands/for' <<'END_OF_FILE'
  242. X          for start test next body
  243. X               For is a looping command, similar in structure to the C
  244. X               for  statement.   The  start,  next, and body arguments
  245. X               must be Tcl command strings, and test is an  expression
  246. X               string.    The   for  command  first  invokes  the  Tcl
  247. X               interpreter  to  execute  start.   Then  it  repeatedly
  248. X               evaluates  test as an expression; if the result is non-
  249. X               zero it invokes  the  Tcl  interpreter  on  body,  then
  250. X               invokes  the  Tcl interpreter on next, then repeats the
  251. X               loop.  The command terminates when test evaluates to 0.
  252. X               If  a  continue command is invoked within body then any
  253. X               remaining commands in the current execution of body are
  254. X               skipped;  processing  continues  by  invoking  the  Tcl
  255. X               interpreter on next, then evaluating test, and  so  on.
  256. X               If a break command is invoked within body or next, then
  257. X               the for command will return immediately.  The operation
  258. X               of  break and continue are similar to the corresponding
  259. X               statements in C.  For returns an empty string.
  260. END_OF_FILE
  261. if test 1233 -ne `wc -c <'extended/tcllib/help/commands/for'`; then
  262.     echo shar: \"'extended/tcllib/help/commands/for'\" unpacked with wrong size!
  263. fi
  264. # end of 'extended/tcllib/help/commands/for'
  265. fi
  266. if test -f 'extended/tcllib/help/commands/format' -a "${1}" != "-c" ; then 
  267.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/format'\"
  268. else
  269. echo shar: Extracting \"'extended/tcllib/help/commands/format'\" \(1359 characters\)
  270. sed "s/^X//" >'extended/tcllib/help/commands/format' <<'END_OF_FILE'
  271. X          format formatString ?arg arg ...?
  272. X               This command generates a formatted string in  the  same
  273. X               way  as the C sprintf procedure (it uses sprintf in its
  274. X               implementation).  FormatString indicates how to  format
  275. X               the  result,  using  %  fields  as  in sprintf, and the
  276. X               additional arguments, if  any,  provide  values  to  be
  277. X               substituted  into  the  result.   All  of  the  sprintf
  278. X               options  are  valid;  see  the  sprintf  man  page  for
  279. X               details.   Each  arg  must match the expected type from
  280. X               the  %  field  in  formatString;  the  format   command
  281. X               converts  each  argument to the correct type (floating,
  282. X               integer,  etc.)  before  passing  it  to  sprintf   for
  283. X               formatting.   The only unusual conversion is for %c; in
  284. X               this case the argument must be a decimal string,  which
  285. X               will  then  be  converted  to  the  corresponding ASCII
  286. X               character value.  Format does backslash substitution on
  287. X               its  formatString  argument,  so backslash sequences in
  288. X               formatString will be  handled  correctly  even  if  the
  289. X               argument is in braces.  The return value from format is
  290. X               the formatted string.
  291. END_OF_FILE
  292. if test 1359 -ne `wc -c <'extended/tcllib/help/commands/format'`; then
  293.     echo shar: \"'extended/tcllib/help/commands/format'\" unpacked with wrong size!
  294. fi
  295. # end of 'extended/tcllib/help/commands/format'
  296. fi
  297. if test -f 'extended/tcllib/help/commands/gets' -a "${1}" != "-c" ; then 
  298.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/gets'\"
  299. else
  300. echo shar: Extracting \"'extended/tcllib/help/commands/gets'\" \(1375 characters\)
  301. sed "s/^X//" >'extended/tcllib/help/commands/gets' <<'END_OF_FILE'
  302. X          gets fileId ?varName?
  303. X               Reads the next line from the file given by  fileId  and
  304. X               discards the terminating newline character.  If varName
  305. X               is specified, then the line is placed in  the  variable
  306. X               by  that  name  and  the return value is a count of the
  307. X               number of characters read (not including the  newline).
  308. X               If  the  end  of the file is reached before reading any
  309. X               characters then -1 is returned and varName is set to an
  310. X               empty  string.   If  varName  is not specified then the
  311. X               return value  will  be  the  line  (minus  the  newline
  312. X               character) or an empty string if the end of the file is
  313. X               reached before reading any characters.  An empty string
  314. X               will  also be returned if a line contains no characters
  315. X               except the newline, so eof  may  have  to  be  used  to
  316. X               determine  what really happened.  If the last character
  317. X               in the file is  not  a  newline  character,  then  gets
  318. X               behaves   as   if  there  were  an  additional  newline
  319. X               character at the end of the file.  FileId must be stdin
  320. X               or  the  return  value from a previous call to open; it
  321. X               must refer to a file that was opened for reading.
  322. END_OF_FILE
  323. if test 1375 -ne `wc -c <'extended/tcllib/help/commands/gets'`; then
  324.     echo shar: \"'extended/tcllib/help/commands/gets'\" unpacked with wrong size!
  325. fi
  326. # end of 'extended/tcllib/help/commands/gets'
  327. fi
  328. if test -f 'extended/tcllib/help/commands/lreplace' -a "${1}" != "-c" ; then 
  329.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/lreplace'\"
  330. else
  331. echo shar: Extracting \"'extended/tcllib/help/commands/lreplace'\" \(1157 characters\)
  332. sed "s/^X//" >'extended/tcllib/help/commands/lreplace' <<'END_OF_FILE'
  333. X          lreplace list first last ?element element ...?
  334. X               Returns  a  new  list  formed  by replacing one or more
  335. X               elements of list with  the  element  arguments.   First
  336. X               gives  the  index  in  list  of the first element to be
  337. X               replaced.  If first is less than zero then it refers to
  338. X               the  first  element  of list;  the element indicated by
  339. X               first must exist in the list.  Last gives the index  in
  340. X               list  of  the  last element to be replaced;  it must be
  341. X               greater than or equal to first.  Last may  be  end  (or
  342. X               any  abbreviation  of it) to indicate that all elements
  343. X               between first  and  the  end  of  the  list  should  be
  344. X               replaced.   The  element arguments specify zero or more
  345. X               new arguments to be added to the list in place of those
  346. X               that were deleted.  Each element argument will become a
  347. X               separate element of the list.  If no element  arguments
  348. X               are specified, then the elements between first and last
  349. X               are simply deleted.
  350. END_OF_FILE
  351. if test 1157 -ne `wc -c <'extended/tcllib/help/commands/lreplace'`; then
  352.     echo shar: \"'extended/tcllib/help/commands/lreplace'\" unpacked with wrong size!
  353. fi
  354. # end of 'extended/tcllib/help/commands/lreplace'
  355. fi
  356. if test -f 'extended/tcllib/help/commands/seek' -a "${1}" != "-c" ; then 
  357.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/seek'\"
  358. else
  359. echo shar: Extracting \"'extended/tcllib/help/commands/seek'\" \(1403 characters\)
  360. sed "s/^X//" >'extended/tcllib/help/commands/seek' <<'END_OF_FILE'
  361. X          seek fileId offset ?origin?
  362. X               Change  the  current  access  position for fileId.  The
  363. X               offset and origin arguments  specify  the  position  at
  364. X               which  the  next  read  or write will occur for fileId.
  365. X               Offset must be a number (which  may  be  negative)  and
  366. X               origin must be one of the following:
  367. X
  368. X               start
  369. X                    The  new access position will be origin bytes from
  370. X                    the start of the file.
  371. X
  372. X               current
  373. X                    The  new access position will be origin bytes from
  374. X                    the current access  position;  a  negative  origin
  375. X                    moves the access position backwards in the file.
  376. X
  377. X               end
  378. X                    The  new access position will be origin bytes from
  379. X                    the end of the file.  A negative origin places the
  380. X                    access  position  before  the  end-of-file,  and a
  381. X                    positive origin places the access  position  after
  382. X                    the end-of-file.
  383. X
  384. X               The origin argument defaults  to  start.   FileId  must
  385. X               have  been  the  return  value  from a previous call to
  386. X               open, or it may be stdin, stdout, or stderr to refer to
  387. X               one of the standard I/O channels.  This command returns
  388. X               an empty string.
  389. END_OF_FILE
  390. if test 1403 -ne `wc -c <'extended/tcllib/help/commands/seek'`; then
  391.     echo shar: \"'extended/tcllib/help/commands/seek'\" unpacked with wrong size!
  392. fi
  393. # end of 'extended/tcllib/help/commands/seek'
  394. fi
  395. if test -f 'extended/tcllib/help/commands/set' -a "${1}" != "-c" ; then 
  396.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/set'\"
  397. else
  398. echo shar: Extracting \"'extended/tcllib/help/commands/set'\" \(1009 characters\)
  399. sed "s/^X//" >'extended/tcllib/help/commands/set' <<'END_OF_FILE'
  400. X          set varname ?value?
  401. X               Returns the value of variable  varname.   If  value  is
  402. X               specified,  then  set  the  value  of varname to value,
  403. X               creating a new variable if one doesn't  already  exist,
  404. X               and  return  its  value.   If  varName contains an open
  405. X               parenthesis and ends with a close parenthesis, then  it
  406. X               refers  to an array element:  the characters before the
  407. X               open parenthesis are the name of  the  array,  and  the
  408. X               characters between the parentheses are the index within
  409. X               the  array.   Otherwise  varName  refers  to  a  scalar
  410. X               variable.   If  no  procedure  is  active, then varname
  411. X               refers to a global variable.  If a procedure is active,
  412. X               then varname refers to a parameter or local variable of
  413. X               the procedure,  unless  the  global  command  has  been
  414. X               invoked to declare varname to be global.
  415. END_OF_FILE
  416. if test 1009 -ne `wc -c <'extended/tcllib/help/commands/set'`; then
  417.     echo shar: \"'extended/tcllib/help/commands/set'\" unpacked with wrong size!
  418. fi
  419. # end of 'extended/tcllib/help/commands/set'
  420. fi
  421. if test -f 'extended/tcllib/help/commands/unknown' -a "${1}" != "-c" ; then 
  422.   echo shar: Will not clobber existing file \"'extended/tcllib/help/commands/unknown'\"
  423. else
  424. echo shar: Extracting \"'extended/tcllib/help/commands/unknown'\" \(1301 characters\)
  425. sed "s/^X//" >'extended/tcllib/help/commands/unknown' <<'END_OF_FILE'
  426. X          unknown cmdName ?arg arg ...?
  427. X               This command doesn't actually exist as part of Tcl, but
  428. X               Tcl will invoke it  if  it  does  exist.   If  the  Tcl
  429. X               interpreter  encounters  a command name for which there
  430. X               is not a defined  command,  then  Tcl  checks  for  the
  431. X               existence  of  a command named unknown.  If there is no
  432. X               such command, then the interpeter returns an error.  If
  433. X               the  unknown  command  exists,  then it is invoked with
  434. X               arguments consisting of the fully-substituted name  and
  435. X               arguments  for  the original non-existent command.  The
  436. X               unknown command typically does  things  like  searching
  437. X               through  library  directories  for  a command procedure
  438. X               with the name cmdName, or expanding abbreviated command
  439. X               names   to   full-length,  or  automatically  executing
  440. X               unknown commands as UNIX sub-processes.  In some  cases
  441. X               (such  as  expanding abbreviations) unknown will change
  442. X               the original command slightly and then (re-)execute it.
  443. X               The result of the unknown command is used as the result
  444. X               for the original non-existent command.
  445. END_OF_FILE
  446. if test 1301 -ne `wc -c <'extended/tcllib/help/commands/unknown'`; then
  447.     echo shar: \"'extended/tcllib/help/commands/unknown'\" unpacked with wrong size!
  448. fi
  449. # end of 'extended/tcllib/help/commands/unknown'
  450. fi
  451. if test -f 'extended/tcllib/help/extended/bsearch' -a "${1}" != "-c" ; then 
  452.   echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/bsearch'\"
  453. else
  454. echo shar: Extracting \"'extended/tcllib/help/extended/bsearch'\" \(1352 characters\)
  455. sed "s/^X//" >'extended/tcllib/help/extended/bsearch' <<'END_OF_FILE'
  456. X
  457. X
  458. X          bsearch filehandle key [retvar] [compare_proc]
  459. X               Search an opened sorted data file, filehandle, for a
  460. X               line matching key. If retvar is specified, then the
  461. X               line from the file is returned in retvar and the
  462. X               command returns 1 if key was found, and 0 if it was not
  463. X               found.  If retvar is not specified or is a null name,
  464. X               then the command returns the line that was found, or an
  465. X               empty string if key is not found.
  466. X
  467. X               By default, the key is matched against the first
  468. X               white-space seperated field in each line.  The field is
  469. X               treated as an ASCII string.  If compare_proc is
  470. X               specified, then it is the name of a Tcl procedure to
  471. X               evaluate against each line read from the file.  This
  472. X               compare_proc takes two arguments, the key and a line
  473. X               extracted from the file.  The compare routine should
  474. X               return a number less than zero if the key is less than
  475. X               the line, zero if the key matches the line or greater
  476. X               than zero if the key is greater than the line.  The
  477. X               file must be sorted in assending order by whatever
  478. X               criteria compare_proc uses to compare the key with the
  479. X               line.
  480. END_OF_FILE
  481. if test 1352 -ne `wc -c <'extended/tcllib/help/extended/bsearch'`; then
  482.     echo shar: \"'extended/tcllib/help/extended/bsearch'\" unpacked with wrong size!
  483. fi
  484. # end of 'extended/tcllib/help/extended/bsearch'
  485. fi
  486. if test -f 'extended/tcllib/help/extended/commandloop' -a "${1}" != "-c" ; then 
  487.   echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/commandloop'\"
  488. else
  489. echo shar: Extracting \"'extended/tcllib/help/extended/commandloop'\" \(1155 characters\)
  490. sed "s/^X//" >'extended/tcllib/help/extended/commandloop' <<'END_OF_FILE'
  491. X
  492. X
  493. X          commandloop [prompt] [prompt2]
  494. X               Create an interactive command loop for the current TCL
  495. X               interpreter.  This command receives commands from stdin
  496. X               and executes them.  This command is useful for non-
  497. X               interactive TCL scripts that want to enter an
  498. X               interactive mode.  Prompt is a command string to set
  499. X               the top level prompt hook to
  500. X                to, the contents of which is executed to generate the
  501. X               main prompt.  Prompt2 is a command string to set the
  502. X               down level prompt to, which is generates the prompt
  503. X               command for continuation input.  When the command
  504. X               terminates, the variables for the prompt hooks will be
  505. X               set to their old value.  If these arguments are not
  506. X               specified, the prompt hooks use their current value.
  507. X               Prompt hooks are TCL code that return as their result
  508. X               the prompt to output.  The result of the last command
  509. X               executed in the command string (which may be a return)
  510. X               will be outputted as the prompt.
  511. END_OF_FILE
  512. if test 1155 -ne `wc -c <'extended/tcllib/help/extended/commandloop'`; then
  513.     echo shar: \"'extended/tcllib/help/extended/commandloop'\" unpacked with wrong size!
  514. fi
  515. # end of 'extended/tcllib/help/extended/commandloop'
  516. fi
  517. if test -f 'extended/tcllib/help/extended/fstat' -a "${1}" != "-c" ; then 
  518.   echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/fstat'\"
  519. else
  520. echo shar: Extracting \"'extended/tcllib/help/extended/fstat'\" \(1117 characters\)
  521. sed "s/^X//" >'extended/tcllib/help/extended/fstat' <<'END_OF_FILE'
  522. X
  523. X
  524. X          fstat handle [arrayvar]
  525. X               Obtain the status of an open file.  This differs from
  526. X               the file stat command in that it takes a file handle
  527. X               rather than a file name.  If arrayvar is specified, the
  528. X               status information is returned in the following
  529. X               elements of this array variable: atime, ctime, dev,
  530. X               gid, ino, mode, mtime, nlink, size, uid.  Each element
  531. X               is a decimal string with the value of the corresponding
  532. X               field from the stat return structure; see the manual
  533. X               entry for stat for details on the meanings of the
  534. X               values.  If arrayvar is not specified, then the
  535. X               information is returned as a keyed list.  Each element
  536. X               of the list is itself a list with the status value name
  537. X               paired with its value, in alphabetical order.  For
  538. X               example:
  539. X
  540. X
  541. X               {atime 683617279} {ctime 683617310} {dev 298} {gid 50}
  542. X               {ino 6317} {mode 33152} {mtime 683617310} {nlink 1}
  543. X               {size 924} {uid 200}
  544. END_OF_FILE
  545. if test 1117 -ne `wc -c <'extended/tcllib/help/extended/fstat'`; then
  546.     echo shar: \"'extended/tcllib/help/extended/fstat'\" unpacked with wrong size!
  547. fi
  548. # end of 'extended/tcllib/help/extended/fstat'
  549. fi
  550. if test -f 'extended/tcllib/help/extended/infox' -a "${1}" != "-c" ; then 
  551.   echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/infox'\"
  552. else
  553. echo shar: Extracting \"'extended/tcllib/help/extended/infox'\" \(1592 characters\)
  554. sed "s/^X//" >'extended/tcllib/help/extended/infox' <<'END_OF_FILE'
  555. X
  556. X
  557. X          infox option
  558. X               Return information about extended Tcl or the current
  559. X               application. The following infox command options are
  560. X               available.
  561. X
  562. X               version
  563. X                    Return the version number of Extended Tcl.  The
  564. X                    version number for extended Tcl is generated by
  565. X                    combining the base version of the standard Tcl
  566. X                    code with a letter indicating the version of
  567. X                    Extended Tcl being used.  This is the
  568. X                    documentation for version tcl6.1a.
  569. X
  570. X               patchlevel
  571. X                    Return the patchlevel for Extended Tcl.
  572. X
  573. X               appname
  574. X                    Return the symbolic application name of the
  575. X                    current application linked with the Extended Tcl
  576. X                    library.  The C variable tclAppName must be set by
  577. X                    the application to return an application specific
  578. X                    value for this variable.
  579. X
  580. X               applongname
  581. X                    Return a natural language name for the current
  582. X                    application. The C variable tclLongAppName must be
  583. X                    set by the application to return an application
  584. X                    specific value for this variable.
  585. X
  586. X               appversion
  587. X                    Return the version number for the current
  588. X                    application.  The C variable tclAppVersion must be
  589. X                    set by the application to return an application
  590. X                    specific value for this variable.
  591. END_OF_FILE
  592. if test 1592 -ne `wc -c <'extended/tcllib/help/extended/infox'`; then
  593.     echo shar: \"'extended/tcllib/help/extended/infox'\" unpacked with wrong size!
  594. fi
  595. # end of 'extended/tcllib/help/extended/infox'
  596. fi
  597. if test -f 'extended/tcllib/help/extended/keyedlists' -a "${1}" != "-c" ; then 
  598.   echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/keyedlists'\"
  599. else
  600. echo shar: Extracting \"'extended/tcllib/help/extended/keyedlists'\" \(1312 characters\)
  601. sed "s/^X//" >'extended/tcllib/help/extended/keyedlists' <<'END_OF_FILE'
  602. X
  603. X
  604. X     KEYED LISTS
  605. X          Extended Tcl defines a special type of list referred to as
  606. X          keyed lists.  These lists provided a structured data type
  607. X          built upon standard Tcl lists.  This provides a
  608. X          functionality similar to structs in the C programming
  609. X          language.  A keyed list is a list in which each element is a
  610. X          key and value pair field.  These elements are actually lists
  611. X          themselves, were the key is the first element of the list,
  612. X          and the value is the second.  The key-value pairs are
  613. X          refered to as fields.  This is an example of a keyed list:
  614. X
  615. X                   {{NAME {Frank Zappa}} {JOB {musician and composer}}
  616. X
  617. X          By convention, `.' is a field name separator, allowing
  618. X          nesting of fields, even though keyed list are only one level
  619. X          deep.  Currently none of the commands explictly function on
  620. X          nested field names, but they may in a future release, so `.'
  621. X          should not be used for other than a field separator in a
  622. X          name.  For example:
  623. X
  624. X                   {{ID 106} {NAME.FIRST Frank} {NAME.LAST Zappa}}
  625. X
  626. X          All key list functions take the name of the variable
  627. X          containing the keyed list as an argument (i.e. passed by
  628. X          reference) rather than the value.
  629. END_OF_FILE
  630. if test 1312 -ne `wc -c <'extended/tcllib/help/extended/keyedlists'`; then
  631.     echo shar: \"'extended/tcllib/help/extended/keyedlists'\" unpacked with wrong size!
  632. fi
  633. # end of 'extended/tcllib/help/extended/keyedlists'
  634. fi
  635. if test -f 'extended/tcllib/help/extended/scancontext' -a "${1}" != "-c" ; then 
  636.   echo shar: Will not clobber existing file \"'extended/tcllib/help/extended/scancontext'\"
  637. else
  638. echo shar: Extracting \"'extended/tcllib/help/extended/scancontext'\" \(1070 characters\)
  639. sed "s/^X//" >'extended/tcllib/help/extended/scancontext' <<'END_OF_FILE'
  640. X
  641. X
  642. X          scancontext [option]
  643. X               This command manages file scan contexts.  A scan
  644. X               context is a collection of regular expressions and
  645. X               commands to execute when that regular expression
  646. X               matches a line of the file.  A context may also have a
  647. X               single default match, to be applied against lines that
  648. X               do not match any of the regular expressions.  Multiple
  649. X               scan contexts may be defined and the may be reused on
  650. X               multiple files.  A scan context is identified by a
  651. X               context handle.  The scancontext command takes the
  652. X               following forms:
  653. X
  654. X          scancontext create
  655. X               Create a new scan context.  The scanmatch command is
  656. X               used to define patterns in the context.
  657. X
  658. X          scancontext delete contexthandle
  659. X               Delete the scan context identified by contexthandle and
  660. X               free all the match statements and compiled regular
  661. X               expressions associated with the specified context.
  662. END_OF_FILE
  663. if test 1070 -ne `wc -c <'extended/tcllib/help/extended/scancontext'`; then
  664.     echo shar: \"'extended/tcllib/help/extended/scancontext'\" unpacked with wrong size!
  665. fi
  666. # end of 'extended/tcllib/help/extended/scancontext'
  667. fi
  668. if test -f 'extended/tcllib/help/intro/data_types' -a "${1}" != "-c" ; then 
  669.   echo shar: Will not clobber existing file \"'extended/tcllib/help/intro/data_types'\"
  670. else
  671. echo shar: Extracting \"'extended/tcllib/help/intro/data_types'\" \(1429 characters\)
  672. sed "s/^X//" >'extended/tcllib/help/intro/data_types' <<'END_OF_FILE'
  673. X     DATA TYPES
  674. X          Tcl supports only one type of data:  strings.  All commands,
  675. X          all  arguments  to  commands,  all  command results, and all
  676. X          variable values are strings.  Where commands require numeric
  677. X          arguments  or  return  numeric  results,  the  arguments and
  678. X          results are passed as strings.  Many commands  expect  their
  679. X          string   arguments   to   have  certain  formats,  but  this
  680. X          interpretation  is  up  to  the  individual  commands.   For
  681. X          example,  arguments often contain Tcl command strings, which
  682. X          may get executed as part of the commands.  The  easiest  way
  683. X          to  understand  the  Tcl  interpreter  is  to  remember that
  684. X          everything is just an operation on a string.  In many  cases
  685. X          Tcl   constructs   will  look  similar  to  more  structured
  686. X          constructs  from  other   languages.    However,   the   Tcl
  687. X          constructs  are not structured at all; they are just strings
  688. X          of characters, and this gives them a different behavior than
  689. X          the structures they may look like.
  690. X
  691. X          Although the exact interpretation of a Tcl string depends on
  692. X          who  is  doing  the  interpretation,  there are three common
  693. X          forms that strings take:  commands, expressions, and  lists.
  694. X          The  major  sections below discuss these three forms in more
  695. X          detail.
  696. END_OF_FILE
  697. if test 1429 -ne `wc -c <'extended/tcllib/help/intro/data_types'`; then
  698.     echo shar: \"'extended/tcllib/help/intro/data_types'\" unpacked with wrong size!
  699. fi
  700. # end of 'extended/tcllib/help/intro/data_types'
  701. fi
  702. if test -f 'extended/tcllib/help/intro/double_quotes' -a "${1}" != "-c" ; then 
  703.   echo shar: Will not clobber existing file \"'extended/tcllib/help/intro/double_quotes'\"
  704. else
  705. echo shar: Extracting \"'extended/tcllib/help/intro/double_quotes'\" \(1064 characters\)
  706. sed "s/^X//" >'extended/tcllib/help/intro/double_quotes' <<'END_OF_FILE'
  707. X     GROUPING ARGUMENTS WITH DOUBLE-QUOTES
  708. X          Normally each argument field ends at the next  white  space,
  709. X          but  double-quotes  may  be  used  to  create arguments with
  710. X          embedded space.  If an argument field begins with a  double-
  711. X          quote,  then  the  argument  isn't terminated by white space
  712. X          (including  newlines)  or  a  semi-colon  (see   below   for
  713. X          information  on  semi-colons);  instead  it ends at the next
  714. X          double-quote character.  The double-quotes are not  included
  715. X          in the resulting argument.  For example, the command
  716. X
  717. X               set a "This is a single argument"
  718. X
  719. X          will pass two arguments to set:  a  and  This  is  a  single
  720. X          argument.    Within  double-quotes,  command  substitutions,
  721. X          variable substitutions, and  backslash  substitutions  still
  722. X          occur,  as  described  below.   If  the first character of a
  723. X          command field is not a quote, then quotes receive no special
  724. X          interpretation in the parsing of that field.
  725. END_OF_FILE
  726. if test 1064 -ne `wc -c <'extended/tcllib/help/intro/double_quotes'`; then
  727.     echo shar: \"'extended/tcllib/help/intro/double_quotes'\" unpacked with wrong size!
  728. fi
  729. # end of 'extended/tcllib/help/intro/double_quotes'
  730. fi
  731. if test -f 'extended/tcllib/help/tclshell/flags' -a "${1}" != "-c" ; then 
  732.   echo shar: Will not clobber existing file \"'extended/tcllib/help/tclshell/flags'\"
  733. else
  734. echo shar: Extracting \"'extended/tcllib/help/tclshell/flags'\" \(1441 characters\)
  735. sed "s/^X//" >'extended/tcllib/help/tclshell/flags' <<'END_OF_FILE'
  736. X
  737. X
  738. X          -q   Quick initialization flag.  If this flag is set the
  739. X               only initialization step performed is to locate the Tcl
  740. X               default file and save its name in the Tcl variable
  741. X               TCLDEFAULT.  The file is not evaluated nor is the
  742. X               TclInit.tcl file.  This provides for a faster start up,
  743. X               but does not make any of the standard Tcl procedures
  744. X               and facilities available.
  745. X
  746. X          -f   Take the next argument as a Tcl script to source rather
  747. X               than enter interactive mode.  The -f flag is optional.
  748. X               Normally the first argument that does not start with a
  749. X               `-' is taken as the script to execute unless the `-c'
  750. X               option is specified.  All following arguments are
  751. X               passed to the script in argv, thus any other Tcl shell
  752. X               flags must precede this option.
  753. X
  754. X          -c   Take the next argument as a Tcl command to execute.  It
  755. X               may be series of commands to execute, separated by `;'.
  756. X               All following arguments are passed in argv, thus any
  757. X               other Tcl shell flags must precede this option.
  758. X
  759. X          --   Mark the end of the arguments to the Tcl shell. All
  760. X               arguments following this are passed in the Tcl variable
  761. X               argv.  This is useful to pass arguments without
  762. X               attempting to execute a Tcl script.
  763. END_OF_FILE
  764. if test 1441 -ne `wc -c <'extended/tcllib/help/tclshell/flags'`; then
  765.     echo shar: \"'extended/tcllib/help/tclshell/flags'\" unpacked with wrong size!
  766. fi
  767. # end of 'extended/tcllib/help/tclshell/flags'
  768. fi
  769. if test -f 'extended/tcllib/help/tclshell/intro' -a "${1}" != "-c" ; then 
  770.   echo shar: Will not clobber existing file \"'extended/tcllib/help/tclshell/intro'\"
  771. else
  772. echo shar: Extracting \"'extended/tcllib/help/tclshell/intro'\" \(1256 characters\)
  773. sed "s/^X//" >'extended/tcllib/help/tclshell/intro' <<'END_OF_FILE'
  774. X
  775. X          tcl [-q] [[-f] script]|[-c command] [args]
  776. X
  777. X          Tcl starts the interactive Tcl command interpreter.  The Tcl
  778. X          shell provides an environment for writing, debugging and
  779. X          executing Tcl scripts.  The functionality of the Tcl shell
  780. X          can also be obtained in any Tcl-based application.
  781. X
  782. X          The tcl command, issued without any arguments, invokes an
  783. X          interactive Tcl shell.  If script is specified, then the
  784. X          script is executed noninteractively with args being supplied
  785. X          in the Tcl variable `argv'.  If command is supplied, then
  786. X          this command (or series of commands, separated by `;') is
  787. X          executed, with `argv' containing args.
  788. X
  789. X          The Tcl shell is intended as an environment for Tcl program
  790. X          development and execution.  While it is not a full-featured
  791. X          interactive shell, it provides a comfortable environment for
  792. X          the interactive development of Tcl code.  Note that the
  793. X          package library code described here overrides the unknown
  794. X          command provided as part of the standard Berkeley Tcl
  795. X          library facility, although Tcl source libraries coded to
  796. X          that standard can be loaded and used by Extended Tcl.
  797. END_OF_FILE
  798. if test 1256 -ne `wc -c <'extended/tcllib/help/tclshell/intro'`; then
  799.     echo shar: \"'extended/tcllib/help/tclshell/intro'\" unpacked with wrong size!
  800. fi
  801. # end of 'extended/tcllib/help/tclshell/intro'
  802. fi
  803. if test -f 'extended/tests/arrayproc.test' -a "${1}" != "-c" ; then 
  804.   echo shar: Will not clobber existing file \"'extended/tests/arrayproc.test'\"
  805. else
  806. echo shar: Extracting \"'extended/tests/arrayproc.test'\" \(1203 characters\)
  807. sed "s/^X//" >'extended/tests/arrayproc.test' <<'END_OF_FILE'
  808. X#
  809. X# arrayproc.test
  810. X#
  811. X# Tests for tcl.tlib array routines.
  812. X#---------------------------------------------------------------------------
  813. X# Copyright 1991 Karl Lehenbauer and Mark Diekhans.
  814. X#
  815. X# Permission to use, copy, modify, and distribute this software and its
  816. X# documentation for any purpose and without fee is hereby granted, provided
  817. X# that the above copyright notice appear in all copies.  Karl Lehenbauer and
  818. X# Mark Diekhans make no representations about the suitability of this
  819. X# software for any purpose.  It is provided "as is" without express or
  820. X# implied warranty.
  821. X#
  822. X
  823. Xif {[string compare test [info procs test]] == 1} then {source defs}
  824. Xrename SAVED_UNKNOWN unknown
  825. X
  826. Xset testArray(foo) bar
  827. Xset testArray(snap) frammistan
  828. Xset testArray(0) zero
  829. Xset testArray(william) dafoe
  830. X
  831. Xtest for_array_keys-1.1 {for_array_keys command} {
  832. X    for_array_keys key testArray {lappend result $key}
  833. X    lsort $result
  834. X} "0 foo snap william"
  835. X
  836. Xunset result
  837. X
  838. Xtest for_array_keys-1.2 {errors in for_array_keys command} {
  839. X    list [catch {for_array_keys key _non_existent_ {lappend result $key}} \
  840. X       msg] $msg $errorCode
  841. X} {1 {"_non_existent_" isn't an array} NONE}
  842. X
  843. Xunset testArray
  844. Xrename unknown SAVED_UNKNOWN
  845. X
  846. X
  847. END_OF_FILE
  848. if test 1203 -ne `wc -c <'extended/tests/arrayproc.test'`; then
  849.     echo shar: \"'extended/tests/arrayproc.test'\" unpacked with wrong size!
  850. fi
  851. # end of 'extended/tests/arrayproc.test'
  852. fi
  853. if test -f 'extended/tests/clock.test' -a "${1}" != "-c" ; then 
  854.   echo shar: Will not clobber existing file \"'extended/tests/clock.test'\"
  855. else
  856. echo shar: Extracting \"'extended/tests/clock.test'\" \(1186 characters\)
  857. sed "s/^X//" >'extended/tests/clock.test' <<'END_OF_FILE'
  858. X#
  859. X# clock.test
  860. X#
  861. X# Tests for the getclock and fmtclock commands.
  862. X#---------------------------------------------------------------------------
  863. X# Copyright 1991 Karl Lehenbauer and Mark Diekhans.
  864. X#
  865. X# Permission to use, copy, modify, and distribute this software and its
  866. X# documentation for any purpose and without fee is hereby granted, provided
  867. X# that the above copyright notice appear in all copies.  Karl Lehenbauer and
  868. X# Mark Diekhans make no representations about the suitability of this
  869. X# software for any purpose.  It is provided "as is" without express or
  870. X# implied warranty.
  871. X#
  872. Xif {[info procs test] != "test"} then {source defs}
  873. X
  874. X# Try  getclock, hard to test the result.
  875. X
  876. Xtest clock-1.1 {getclock tests} {
  877. X    list [catch {set clockval [getclock];expr $clockval+1} msg]
  878. X} {0}
  879. Xtest clock-1.2 {getclock tests} {
  880. X    list [catch {getclock 1990} msg] $msg
  881. X} {1 {wrong # args: getclock}}
  882. X
  883. X# Test fmtclock
  884. X
  885. Xtest clock-2.1 {fmtclock tests} {
  886. X    set clockval 657687766
  887. X    fmtclock $clockval {%a %b %d %I:%M:%S %p %Y} GMT
  888. X} {Sun Nov 04 03:02:46 AM 1990}
  889. X
  890. Xtest clock-2.2 {fmtclock tests} {
  891. X    list [catch {fmtclock} msg] $msg
  892. X} {1 {wrong # args: fmtclock clockval [format] [GMT|{}]}}
  893. X
  894. END_OF_FILE
  895. if test 1186 -ne `wc -c <'extended/tests/clock.test'`; then
  896.     echo shar: \"'extended/tests/clock.test'\" unpacked with wrong size!
  897. fi
  898. # end of 'extended/tests/clock.test'
  899. fi
  900. if test -f 'extended/tests/defs' -a "${1}" != "-c" ; then 
  901.   echo shar: Will not clobber existing file \"'extended/tests/defs'\"
  902. else
  903. echo shar: Extracting \"'extended/tests/defs'\" \(1522 characters\)
  904. sed "s/^X//" >'extended/tests/defs' <<'END_OF_FILE'
  905. X# This file contains support code for the Tcl test suite.  It is
  906. X# normally sourced by the individual files in the test suite before
  907. X# they run their tests.  This improved approach to testing was designed
  908. X# and initially implemented by Mary Ann May-Pumphrey of Sun Microsystems.
  909. X
  910. Xset VERBOSE 0
  911. Xset TESTS {}
  912. Xrename unknown SAVED_UNKNOWN
  913. X
  914. Xproc print_verbose {test_name test_description contents_of_test answer} {
  915. X    puts stdout "\n"
  916. X    puts stdout "==== $test_name $test_description"
  917. X    puts stdout "==== Contents of test case:"
  918. X    puts stdout "$contents_of_test"
  919. X    puts stdout "==== Result was:"
  920. X    puts stdout "$answer"
  921. X}
  922. X
  923. Xproc test {test_name test_description contents_of_test passing_results} {
  924. X    global VERBOSE
  925. X    global TESTS
  926. X    if {[string compare $TESTS ""] != 0} then {
  927. X    set ok 0
  928. X    foreach test $TESTS {
  929. X        if [string match $test $test_name] then {
  930. X        set ok 1
  931. X        break
  932. X        }
  933. X        }
  934. X    if !$ok then return
  935. X    }
  936. X    set answer [uplevel $contents_of_test]
  937. X    if {[string compare $answer $passing_results] == 0} then { 
  938. X    if $VERBOSE then {
  939. X        print_verbose $test_name $test_description $contents_of_test $answer
  940. X        puts stdout "++++ $test_name PASSED"
  941. X    }
  942. X    } else { 
  943. X    print_verbose $test_name $test_description $contents_of_test $answer 
  944. X    puts stdout "---- Result should have been:"
  945. X    puts stdout "$passing_results"
  946. X    puts stdout "---- $test_name FAILED" 
  947. X    }
  948. X}
  949. X
  950. Xproc dotests {file args} {
  951. X    global TESTS
  952. X    set savedTests $TESTS
  953. X    set TESTS $args
  954. X    source $file
  955. X    set TESTS $savedTests
  956. X}
  957. END_OF_FILE
  958. if test 1522 -ne `wc -c <'extended/tests/defs'`; then
  959.     echo shar: \"'extended/tests/defs'\" unpacked with wrong size!
  960. fi
  961. # end of 'extended/tests/defs'
  962. fi
  963. if test -f 'extended/tests/forfile.test' -a "${1}" != "-c" ; then 
  964.   echo shar: Will not clobber existing file \"'extended/tests/forfile.test'\"
  965. else
  966. echo shar: Extracting \"'extended/tests/forfile.test'\" \(1259 characters\)
  967. sed "s/^X//" >'extended/tests/forfile.test' <<'END_OF_FILE'
  968. X#
  969. X# forfile.test
  970. X#
  971. X# Tests for tcl.tlib for_file routine.
  972. X#---------------------------------------------------------------------------
  973. X# Copyright 1991 Karl Lehenbauer and Mark Diekhans.
  974. X#
  975. X# Permission to use, copy, modify, and distribute this software and its
  976. X# documentation for any purpose and without fee is hereby granted, provided
  977. X# that the above copyright notice appear in all copies.  Karl Lehenbauer and
  978. X# Mark Diekhans make no representations about the suitability of this
  979. X# software for any purpose.  It is provided "as is" without express or
  980. X# implied warranty.
  981. X#
  982. X
  983. Xif {[string compare test [info procs test]] == 1} then {source defs}
  984. Xrename SAVED_UNKNOWN unknown
  985. X
  986. Xset outfp [open FORFILE.TMP w]
  987. Xputs $outfp line1
  988. Xputs $outfp line2
  989. Xputs $outfp line3
  990. Xclose $outfp
  991. Xunset outfp
  992. X
  993. Xtest for_file-1.1 {for_file command} {
  994. X    for_file line FORFILE.TMP {lappend result $line}
  995. X    list $result
  996. X} {{line1 line2 line3}}
  997. X
  998. Xtest for_file-1.2 {errors in for_file command} {
  999. X    string tolower [list [catch {for_file line _non_existent_ {echo $line}} \
  1000. X       msg] $msg $errorCode]
  1001. X} {1 {couldn't open "_non_existent_": no such file or directory} \
  1002. X{unix enoent {no such file or directory}}}
  1003. X
  1004. Xcatch {unlink FORFILE.TMP}
  1005. X
  1006. Xunset result
  1007. Xrename unknown SAVED_UNKNOWN
  1008. END_OF_FILE
  1009. if test 1259 -ne `wc -c <'extended/tests/forfile.test'`; then
  1010.     echo shar: \"'extended/tests/forfile.test'\" unpacked with wrong size!
  1011. fi
  1012. # end of 'extended/tests/forfile.test'
  1013. fi
  1014. if test -f 'extended/tests/pushd.test' -a "${1}" != "-c" ; then 
  1015.   echo shar: Will not clobber existing file \"'extended/tests/pushd.test'\"
  1016. else
  1017. echo shar: Extracting \"'extended/tests/pushd.test'\" \(1311 characters\)
  1018. sed "s/^X//" >'extended/tests/pushd.test' <<'END_OF_FILE'
  1019. X#
  1020. X# pushd.test
  1021. X#
  1022. X# Tests for tcl.tlib directory push routine
  1023. X#
  1024. X#---------------------------------------------------------------------------
  1025. X# Copyright 1991 Karl Lehenbauer and Mark Diekhans.
  1026. X#
  1027. X# Permission to use, copy, modify, and distribute this software and its
  1028. X# documentation for any purpose and without fee is hereby granted, provided
  1029. X# that the above copyright notice appear in all copies.  Karl Lehenbauer and
  1030. X# Mark Diekhans make no representations about the suitability of this
  1031. X# software for any purpose.  It is provided "as is" without express or
  1032. X# implied warranty.
  1033. X#
  1034. X
  1035. Xif {[string compare test [info procs test]] == 1} then {source defs}
  1036. Xrename SAVED_UNKNOWN unknown
  1037. X
  1038. Xset CWD [pwd]
  1039. X
  1040. Xcd /tmp
  1041. X
  1042. Xtest pushd-1.1 {pushd command} {
  1043. X    pushd
  1044. X} ""
  1045. X
  1046. Xtest pushd-1.2 {pushd command} {
  1047. X    set dummy $TCLENV(dirPushList)
  1048. X} /tmp
  1049. X
  1050. Xtest pushd-1.3 {pushd command} {
  1051. X    pushd /
  1052. X} ""
  1053. X
  1054. Xtest pushd-1.4 {pushd command} {
  1055. X    set dummy $TCLENV(dirPushList)
  1056. X} "/tmp /tmp"
  1057. X
  1058. Xcd $CWD
  1059. X
  1060. Xtest popd-1.1 {popd command} {
  1061. X    popd
  1062. X} "/tmp"
  1063. X
  1064. Xtest popd-1.2 {popd command} {
  1065. X    set dummy $TCLENV(dirPushList)
  1066. X} "/tmp"
  1067. X
  1068. Xtest popd-1.3 {popd command} {
  1069. X    popd
  1070. X    list [catch popd msg] $msg
  1071. X} {1 {directory stack empty}}
  1072. X
  1073. Xtest popd-1.4 {popd command} {
  1074. X    set dummy $TCLENV(dirPushList)
  1075. X} ""
  1076. X
  1077. Xcd $CWD
  1078. Xrename unknown SAVED_UNKNOWN
  1079. END_OF_FILE
  1080. if test 1311 -ne `wc -c <'extended/tests/pushd.test'`; then
  1081.     echo shar: \"'extended/tests/pushd.test'\" unpacked with wrong size!
  1082. fi
  1083. # end of 'extended/tests/pushd.test'
  1084. fi
  1085. if test -f 'extended/tests/showprocs.test' -a "${1}" != "-c" ; then 
  1086.   echo shar: Will not clobber existing file \"'extended/tests/showprocs.test'\"
  1087. else
  1088. echo shar: Extracting \"'extended/tests/showprocs.test'\" \(1209 characters\)
  1089. sed "s/^X//" >'extended/tests/showprocs.test' <<'END_OF_FILE'
  1090. X#
  1091. X# showprocs.test
  1092. X#
  1093. X# Tests for tcl.tlib showproc routines.
  1094. X#---------------------------------------------------------------------------
  1095. X# Copyright 1991 Karl Lehenbauer and Mark Diekhans.
  1096. X#
  1097. X# Permission to use, copy, modify, and distribute this software and its
  1098. X# documentation for any purpose and without fee is hereby granted, provided
  1099. X# that the above copyright notice appear in all copies.  Karl Lehenbauer and
  1100. X# Mark Diekhans make no representations about the suitability of this
  1101. X# software for any purpose.  It is provided "as is" without express or
  1102. X# implied warranty.
  1103. X#
  1104. X
  1105. Xif {[string compare test [info procs test]] == 1} then {source defs}
  1106. Xrename SAVED_UNKNOWN unknown
  1107. X
  1108. Xset testProcVar {proc testproc {testVar} {
  1109. X    return 1
  1110. X}}
  1111. X
  1112. Xeval $testProcVar
  1113. X
  1114. Xtest showproc-1.1 {showproc command} {
  1115. X    showproc testproc
  1116. X} "$testProcVar\n"
  1117. X
  1118. Xtest showprocs-1.1 {showprocs command} {
  1119. X    showprocs testproc
  1120. X} "$testProcVar\n\n"
  1121. X
  1122. Xtest showprocs-1.2 {showprocs command} {
  1123. X    set result ""
  1124. X    foreach i [split [showprocs] "\n"] {
  1125. X    if {[lindex $i 0] == "proc"} {
  1126. X        lappend result [lindex $i 1]
  1127. X    }
  1128. X    }
  1129. X    lsort $result
  1130. X} [lsort [info procs]]
  1131. X
  1132. Xunset testProcVar
  1133. Xrename testproc ""
  1134. Xrename unknown SAVED_UNKNOWN
  1135. END_OF_FILE
  1136. if test 1209 -ne `wc -c <'extended/tests/showprocs.test'`; then
  1137.     echo shar: \"'extended/tests/showprocs.test'\" unpacked with wrong size!
  1138. fi
  1139. # end of 'extended/tests/showprocs.test'
  1140. fi
  1141. if test -f 'extended/ucbsrc/ucbman.names' -a "${1}" != "-c" ; then 
  1142.   echo shar: Will not clobber existing file \"'extended/ucbsrc/ucbman.names'\"
  1143. else
  1144. echo shar: Extracting \"'extended/ucbsrc/ucbman.names'\" \(1326 characters\)
  1145. sed "s/^X//" >'extended/ucbsrc/ucbman.names' <<'END_OF_FILE'
  1146. XAddErrInfo.man {Tcl_AddErrorInfo Tcl_SetErrorCode Tcl_UnixError Tcl_CheckStatus}
  1147. XAssembCmd.man {Tcl_CreateCmdBuf Tcl_AssembleCmd Tcl_DeleteCmdBuf}
  1148. XBackslash.man Tcl_Backslash
  1149. XConcat.man Tcl_Concat
  1150. XCrtCommand.man {Tcl_CreateCommand Tcl_DeleteCommand}
  1151. XCrtInterp.man {Tcl_CreateInterp Tcl_DeleteInterp}
  1152. XCrtPipelin.man Tcl_CreatePipeline
  1153. XCrtTrace.man {Tcl_CreateTrace Tcl_DeleteTrace}
  1154. XEval.man {Tcl_Eval Tcl_VarEval Tcl_EvalFile}
  1155. XExprLong.man {Tcl_ExprLong Tcl_ExprDouble Tcl_ExprBool Tcl_ExprString}
  1156. XFork.man {Tcl_Fork Tcl_WaitPids Tcl_DetachPids}
  1157. XGetInt.man {Tcl_GetInt Tcl_GetDouble Tcl_GetBoolean}
  1158. XHash.man {Tcl_InitHashTable Tcl_DeleteHashTable Tcl_CreateHashEntry Tcl_DeleteHashEntry Tcl_FindHashEntry Tcl_GetHashValue Tcl_SetHashValue Tcl_GetHashKey Tcl_FirstHashEntry Tcl_NextHashEntry Tcl_HashStats}
  1159. XInterp.man Tcl_Interp
  1160. XHistory.man {Tcl_InitHistory Tcl_RecordAndEval}
  1161. XSetResult.man {Tcl_SetResult Tcl_AppendResult Tcl_AppendElement Tcl_ResetResult}
  1162. XSetVar.man {Tcl_SetVar Tcl_SetVar2 Tcl_GetVar Tcl_GetVar2 Tcl_UnsetVar Tcl_UnsetVar2}
  1163. XSplitList.man {Tcl_SplitList Tcl_Merge Tcl_ScanElement Tcl_ConvertElement}
  1164. XStrMatch.man Tcl_StringMatch
  1165. XTcl.man {Tcl tcl}
  1166. XTildeSubst.man {Tcl_TildeSubst}
  1167. XTraceVar.man {Tcl_TraceVar Tcl_TraceVar2 Tcl_UntraceVar Tcl_UntraceVar2 Tcl_VarTraceInfo Tcl_VarTraceInfo2}
  1168. Xlibrary.man {library}
  1169. END_OF_FILE
  1170. if test 1326 -ne `wc -c <'extended/ucbsrc/ucbman.names'`; then
  1171.     echo shar: \"'extended/ucbsrc/ucbman.names'\" unpacked with wrong size!
  1172. fi
  1173. # end of 'extended/ucbsrc/ucbman.names'
  1174. fi
  1175. echo shar: End of archive 4 \(of 23\).
  1176. cp /dev/null ark4isdone
  1177. MISSING=""
  1178. 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
  1179.     if test ! -f ark${I}isdone ; then
  1180.     MISSING="${MISSING} ${I}"
  1181.     fi
  1182. done
  1183. if test "${MISSING}" = "" ; then
  1184.     echo You have unpacked all 23 archives.
  1185.     echo "Now cd to "extended", edit the makefile, then do a "make""
  1186.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1187. else
  1188.     echo You still need to unpack the following archives:
  1189.     echo "        " ${MISSING}
  1190. fi
  1191. ##  End of shell archive.
  1192. exit 0
  1193.  
  1194. exit 0 # Just in case...
  1195. -- 
  1196. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1197. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1198. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1199. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1200.