home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume25 / tcl / part05 < prev    next >
Encoding:
Text File  |  1991-11-14  |  48.4 KB  |  1,693 lines

  1. Newsgroups: comp.sources.misc
  2. From: karl@sugar.neosoft.com (Karl Lehenbauer)
  3. Subject:  v25i073:  tcl - tool command language, version 6.1, Part05/33
  4. Message-ID: <1991Nov14.202716.23458@sparky.imd.sterling.com>
  5. X-Md4-Signature: c3f11c6192843647928857426e4feae6
  6. Date: Thu, 14 Nov 1991 20:27:16 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: karl@sugar.neosoft.com (Karl Lehenbauer)
  10. Posting-number: Volume 25, Issue 73
  11. Archive-name: tcl/part05
  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 5 (of 33)."
  21. # Contents:  tcl6.1/doc/AssembCmd.man tcl6.1/doc/CrtPipelin.man
  22. #   tcl6.1/doc/Eval.man tcl6.1/doc/ExprLong.man tcl6.1/doc/GetInt.man
  23. #   tcl6.1/tclUnix.h
  24. # Wrapped by karl@one on Tue Nov 12 19:44:14 1991
  25. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  26. if test -f 'tcl6.1/doc/AssembCmd.man' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'tcl6.1/doc/AssembCmd.man'\"
  28. else
  29. echo shar: Extracting \"'tcl6.1/doc/AssembCmd.man'\" \(6500 characters\)
  30. sed "s/^X//" >'tcl6.1/doc/AssembCmd.man' <<'END_OF_FILE'
  31. X'\" Copyright 1989 Regents of the University of California
  32. X'\" Permission to use, copy, modify, and distribute this
  33. X'\" documentation for any purpose and without fee is hereby
  34. X'\" granted, provided that this notice appears in all copies.
  35. X'\" The University of California makes no representations about
  36. X'\" the suitability of this material for any purpose.  It is
  37. X'\" provided "as is" without express or implied warranty.
  38. X'\" 
  39. X'\" $Header: /sprite/src/lib/tcl/RCS/Tcl_AssembleCmd.man,v 1.1 90/03/11 10:30:28 ouster Exp $ SPRITE (Berkeley)
  40. X'\" 
  41. X.\" The definitions below are for supplemental macros used in Sprite
  42. X.\" manual entries.
  43. X.\"
  44. X.\" .HS name section [date [version]]
  45. X.\"    Replacement for .TH in other man pages.  See below for valid
  46. X.\"    section names.
  47. X.\"
  48. X.\" .AP type name in/out [indent]
  49. X.\"    Start paragraph describing an argument to a library procedure.
  50. X.\"    type is type of argument (int, etc.), in/out is either "in", "out",
  51. X.\"    or "in/out" to describe whether procedure reads or modifies arg,
  52. X.\"    and indent is equivalent to second arg of .IP (shouldn't ever be
  53. X.\"    needed;  use .AS below instead)
  54. X.\"
  55. X.\" .AS [type [name]]
  56. X.\"    Give maximum sizes of arguments for setting tab stops.  Type and
  57. X.\"    name are examples of largest possible arguments that will be passed
  58. X.\"    to .AP later.  If args are omitted, default tab stops are used.
  59. X.\"
  60. X.\" .BS
  61. X.\"    Start box enclosure.  From here until next .BE, everything will be
  62. X.\"    enclosed in one large box.
  63. X.\"
  64. X.\" .BE
  65. X.\"    End of box enclosure.
  66. X.\"
  67. X.\" .VS
  68. X.\"    Begin vertical sidebar, for use in marking newly-changed parts
  69. X.\"    of man pages.
  70. X.\"
  71. X.\" .VE
  72. X.\"    End of vertical sidebar.
  73. X.\"
  74. X.\" .DS
  75. X.\"    Begin an indented unfilled display.
  76. X.\"
  77. X.\" .DE
  78. X.\"    End of indented unfilled display.
  79. X.\"
  80. X'    # Heading for Sprite man pages
  81. X.de HS
  82. X.if '\\$2'cmds'       .TH \\$1 1 \\$3 \\$4
  83. X.if '\\$2'lib'        .TH \\$1 3 \\$3 \\$4
  84. X.if '\\$2'tcl'        .TH \\$1 3 \\$3 \\$4
  85. X.if '\\$2'tk'         .TH \\$1 3 \\$3 \\$4
  86. X.if t .wh -1.3i ^B
  87. X.nr ^l \\n(.l
  88. X.ad b
  89. X..
  90. X'    # Start an argument description
  91. X.de AP
  92. X.ie !"\\$4"" .TP \\$4
  93. X.el \{\
  94. X.   ie !"\\$2"" .TP \\n()Cu
  95. X.   el          .TP 15
  96. X.\}
  97. X.ie !"\\$3"" \{\
  98. X.ta \\n()Au \\n()Bu
  99. X\&\\$1    \\fI\\$2\\fP    (\\$3)
  100. X.\".b
  101. X.\}
  102. X.el \{\
  103. X.br
  104. X.ie !"\\$2"" \{\
  105. X\&\\$1    \\fI\\$2\\fP
  106. X.\}
  107. X.el \{\
  108. X\&\\fI\\$1\\fP
  109. X.\}
  110. X.\}
  111. X..
  112. X'    # define tabbing values for .AP
  113. X.de AS
  114. X.nr )A 10n
  115. X.if !"\\$1"" .nr )A \\w'\\$1'u+3n
  116. X.nr )B \\n()Au+15n
  117. X.\"
  118. X.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
  119. X.nr )C \\n()Bu+\\w'(in/out)'u+2n
  120. X..
  121. X'    # BS - start boxed text
  122. X'    # ^y = starting y location
  123. X'    # ^b = 1
  124. X.de BS
  125. X.br
  126. X.mk ^y
  127. X.nr ^b 1u
  128. X.if n .nf
  129. X.if n .ti 0
  130. X.if n \l'\\n(.lu\(ul'
  131. X.if n .fi
  132. X..
  133. X'    # BE - end boxed text (draw box now)
  134. X.de BE
  135. X.nf
  136. X.ti 0
  137. X.mk ^t
  138. X.ie n \l'\\n(^lu\(ul'
  139. X.el \{\
  140. X.\"    Draw four-sided box normally, but don't draw top of
  141. X.\"    box if the box started on an earlier page.
  142. X.ie !\\n(^b-1 \{\
  143. X\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  144. X.\}
  145. X.el \}\
  146. X\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  147. X.\}
  148. X.\}
  149. X.fi
  150. X.br
  151. X.nr ^b 0
  152. X..
  153. X'    # VS - start vertical sidebar
  154. X'    # ^Y = starting y location
  155. X'    # ^v = 1 (for troff;  for nroff this doesn't matter)
  156. X.de VS
  157. X.mk ^Y
  158. X.ie n 'mc \s12\(br\s0
  159. X.el .nr ^v 1u
  160. X..
  161. X'    # VE - end of vertical sidebar
  162. X.de VE
  163. X.ie n 'mc
  164. X.el \{\
  165. X.ev 2
  166. X.nf
  167. X.ti 0
  168. X.mk ^t
  169. X\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
  170. X.sp -1
  171. X.fi
  172. X.ev
  173. X.\}
  174. X.nr ^v 0
  175. X..
  176. X'    # Special macro to handle page bottom:  finish off current
  177. X'    # box/sidebar if in box/sidebar mode, then invoked standard
  178. X'    # page bottom macro.
  179. X.de ^B
  180. X.ev 2
  181. X'ti 0
  182. X'nf
  183. X.mk ^t
  184. X.if \\n(^b \{\
  185. X.\"    Draw three-sided box if this is the box's first page,
  186. X.\"    draw two sides but no top otherwise.
  187. X.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  188. X.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  189. X.\}
  190. X.if \\n(^v \{\
  191. X.nr ^x \\n(^tu+1v-\\n(^Yu
  192. X\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
  193. X.\}
  194. X.bp
  195. X'fi
  196. X.ev
  197. X.if \\n(^b \{\
  198. X.mk ^y
  199. X.nr ^b 2
  200. X.\}
  201. X.if \\n(^v \{\
  202. X.mk ^Y
  203. X.\}
  204. X..
  205. X'    # DS - begin display
  206. X.de DS
  207. X.RS
  208. X.nf
  209. X.sp
  210. X..
  211. X'    # DE - end display
  212. X.de DE
  213. X.fi
  214. X.RE
  215. X.sp .5
  216. X..
  217. X.HS Tcl_AssembleCmd tcl
  218. X.BS
  219. X.SH NAME
  220. XTcl_CreateCmdBuf, Tcl_AssembleCmd, Tcl_DeleteCmdBuf \- buffer pieces of Tcl commands
  221. X.SH SYNOPSIS
  222. X.nf
  223. X\fB#include <tcl.h>\fR
  224. X.sp
  225. XTcl_CmdBuf
  226. X\fBTcl_CreateCmdBuf\fR()
  227. X.sp
  228. X\fBTcl_DeleteCmdBuf\fR(\fIbuffer\fR)
  229. X.sp
  230. Xchar *
  231. X\fBTcl_AssembleCmd\fR(\fIbuffer\fR, \fIstring\fR)
  232. X.SH ARGUMENTS
  233. X.AS Tcl_CmdBuf *string;
  234. X.AP Tcl_CmdBuf buffer in
  235. XToken for a command buffer (the result of some previous call to
  236. X\fBTcl_CreateCmdBuf\fR).
  237. X.AP char *string in
  238. XAdditional piece of command input to be added to anything currently
  239. Xbuffered.
  240. X.BE
  241. X
  242. X.SH DESCRIPTION
  243. X.PP
  244. XThese three procedures provide a convenient mechanism for assembling
  245. XTcl commands from an input source where command boundaries are not
  246. Xobvious.  For example, if input is being read from a terminal, a user
  247. Xmay type commands that span multiple lines.  In situations like
  248. Xthis, \fBTcl_AssembleCmd\fR can be called with the individual lines
  249. Xas they are received.  It buffers the lines internally and returns
  250. Xfull commands when they are complete.
  251. X.PP
  252. XA command buffer is created by calling \fBTcl_CreateCmdBuf\fR, and
  253. Xit is deleted by calling \fBTcl_DeleteCmdBuf\fR.  There may be any
  254. Xnumber of command buffers for a particular program or even for a
  255. Xparticular interpreter;  in most cases there should be one
  256. Xbuffer for each independent source of command input.
  257. X.PP
  258. XWhen input arrives from a source you should call \fBTcl_AssembleCmd\fR,
  259. Xpassing it the new input as the \fIstring\fR argument.
  260. X\fBTcl_AssembleCmd\fR will add the new input to anything currently
  261. Xbuffered in \fIbuffer\fR.  If the information now buffered represents
  262. Xa complete Tcl command (i.e. the whole command ends with a newline
  263. Xcharacter and there are no unmatched quotes, braces, or brackets),
  264. Xthen \fBTcl_AssembleCmd\fR returns a pointer to the complete command
  265. Xand arranges for the buffer to be cleared on the next call to
  266. X\fBTcl_AssembleCmd\fR.  If the command is still incomplete (because,
  267. Xfor example, there are unmatched braces) then \fBTcl_AssembleCmd\fR
  268. Xreturns NULL.  \fBTcl_AssembleCmd\fR keeps a private copy of the
  269. Xcommand being assembled, so that the caller need not preserve the
  270. Xcontents of \fIstring\fR between calls to \fBTcl_AssembleCmd\fR.
  271. X\fBTcl_AssembleCmd\fR supports commands of arbitrary length (up to
  272. Xthe total memory limit imposed by the operating system, if any).
  273. X
  274. X.SH KEYWORDS
  275. Xassemble, buffer, partial command
  276. END_OF_FILE
  277. if test 6500 -ne `wc -c <'tcl6.1/doc/AssembCmd.man'`; then
  278.     echo shar: \"'tcl6.1/doc/AssembCmd.man'\" unpacked with wrong size!
  279. fi
  280. # end of 'tcl6.1/doc/AssembCmd.man'
  281. fi
  282. if test -f 'tcl6.1/doc/CrtPipelin.man' -a "${1}" != "-c" ; then 
  283.   echo shar: Will not clobber existing file \"'tcl6.1/doc/CrtPipelin.man'\"
  284. else
  285. echo shar: Extracting \"'tcl6.1/doc/CrtPipelin.man'\" \(8122 characters\)
  286. sed "s/^X//" >'tcl6.1/doc/CrtPipelin.man' <<'END_OF_FILE'
  287. X'\" Copyright 1989 Regents of the University of California
  288. X'\" Permission to use, copy, modify, and distribute this
  289. X'\" documentation for any purpose and without fee is hereby
  290. X'\" granted, provided that this notice appears in all copies.
  291. X'\" The University of California makes no representations about
  292. X'\" the suitability of this material for any purpose.  It is
  293. X'\" provided "as is" without express or implied warranty.
  294. X'\" 
  295. X'\" $Header: /user6/ouster/tcl/doc/RCS/CrtPipelin.man,v 1.1 91/07/20 11:21:26 ouster Exp $ SPRITE (Berkeley)
  296. X'\" 
  297. X.\" The definitions below are for supplemental macros used in Sprite
  298. X.\" manual entries.
  299. X.\"
  300. X.\" .HS name section [date [version]]
  301. X.\"    Replacement for .TH in other man pages.  See below for valid
  302. X.\"    section names.
  303. X.\"
  304. X.\" .AP type name in/out [indent]
  305. X.\"    Start paragraph describing an argument to a library procedure.
  306. X.\"    type is type of argument (int, etc.), in/out is either "in", "out",
  307. X.\"    or "in/out" to describe whether procedure reads or modifies arg,
  308. X.\"    and indent is equivalent to second arg of .IP (shouldn't ever be
  309. X.\"    needed;  use .AS below instead)
  310. X.\"
  311. X.\" .AS [type [name]]
  312. X.\"    Give maximum sizes of arguments for setting tab stops.  Type and
  313. X.\"    name are examples of largest possible arguments that will be passed
  314. X.\"    to .AP later.  If args are omitted, default tab stops are used.
  315. X.\"
  316. X.\" .BS
  317. X.\"    Start box enclosure.  From here until next .BE, everything will be
  318. X.\"    enclosed in one large box.
  319. X.\"
  320. X.\" .BE
  321. X.\"    End of box enclosure.
  322. X.\"
  323. X.\" .VS
  324. X.\"    Begin vertical sidebar, for use in marking newly-changed parts
  325. X.\"    of man pages.
  326. X.\"
  327. X.\" .VE
  328. X.\"    End of vertical sidebar.
  329. X.\"
  330. X.\" .DS
  331. X.\"    Begin an indented unfilled display.
  332. X.\"
  333. X.\" .DE
  334. X.\"    End of indented unfilled display.
  335. X.\"
  336. X'    # Heading for Sprite man pages
  337. X.de HS
  338. X.if '\\$2'cmds'       .TH \\$1 1 \\$3 \\$4
  339. X.if '\\$2'lib'        .TH \\$1 3 \\$3 \\$4
  340. X.if '\\$2'tcl'        .TH \\$1 3 \\$3 \\$4
  341. X.if '\\$2'tk'         .TH \\$1 3 \\$3 \\$4
  342. X.if t .wh -1.3i ^B
  343. X.nr ^l \\n(.l
  344. X.ad b
  345. X..
  346. X'    # Start an argument description
  347. X.de AP
  348. X.ie !"\\$4"" .TP \\$4
  349. X.el \{\
  350. X.   ie !"\\$2"" .TP \\n()Cu
  351. X.   el          .TP 15
  352. X.\}
  353. X.ie !"\\$3"" \{\
  354. X.ta \\n()Au \\n()Bu
  355. X\&\\$1    \\fI\\$2\\fP    (\\$3)
  356. X.\".b
  357. X.\}
  358. X.el \{\
  359. X.br
  360. X.ie !"\\$2"" \{\
  361. X\&\\$1    \\fI\\$2\\fP
  362. X.\}
  363. X.el \{\
  364. X\&\\fI\\$1\\fP
  365. X.\}
  366. X.\}
  367. X..
  368. X'    # define tabbing values for .AP
  369. X.de AS
  370. X.nr )A 10n
  371. X.if !"\\$1"" .nr )A \\w'\\$1'u+3n
  372. X.nr )B \\n()Au+15n
  373. X.\"
  374. X.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
  375. X.nr )C \\n()Bu+\\w'(in/out)'u+2n
  376. X..
  377. X'    # BS - start boxed text
  378. X'    # ^y = starting y location
  379. X'    # ^b = 1
  380. X.de BS
  381. X.br
  382. X.mk ^y
  383. X.nr ^b 1u
  384. X.if n .nf
  385. X.if n .ti 0
  386. X.if n \l'\\n(.lu\(ul'
  387. X.if n .fi
  388. X..
  389. X'    # BE - end boxed text (draw box now)
  390. X.de BE
  391. X.nf
  392. X.ti 0
  393. X.mk ^t
  394. X.ie n \l'\\n(^lu\(ul'
  395. X.el \{\
  396. X.\"    Draw four-sided box normally, but don't draw top of
  397. X.\"    box if the box started on an earlier page.
  398. X.ie !\\n(^b-1 \{\
  399. X\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  400. X.\}
  401. X.el \}\
  402. X\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  403. X.\}
  404. X.\}
  405. X.fi
  406. X.br
  407. X.nr ^b 0
  408. X..
  409. X'    # VS - start vertical sidebar
  410. X'    # ^Y = starting y location
  411. X'    # ^v = 1 (for troff;  for nroff this doesn't matter)
  412. X.de VS
  413. X.mk ^Y
  414. X.ie n 'mc \s12\(br\s0
  415. X.el .nr ^v 1u
  416. X..
  417. X'    # VE - end of vertical sidebar
  418. X.de VE
  419. X.ie n 'mc
  420. X.el \{\
  421. X.ev 2
  422. X.nf
  423. X.ti 0
  424. X.mk ^t
  425. X\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
  426. X.sp -1
  427. X.fi
  428. X.ev
  429. X.\}
  430. X.nr ^v 0
  431. X..
  432. X'    # Special macro to handle page bottom:  finish off current
  433. X'    # box/sidebar if in box/sidebar mode, then invoked standard
  434. X'    # page bottom macro.
  435. X.de ^B
  436. X.ev 2
  437. X'ti 0
  438. X'nf
  439. X.mk ^t
  440. X.if \\n(^b \{\
  441. X.\"    Draw three-sided box if this is the box's first page,
  442. X.\"    draw two sides but no top otherwise.
  443. X.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  444. X.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  445. X.\}
  446. X.if \\n(^v \{\
  447. X.nr ^x \\n(^tu+1v-\\n(^Yu
  448. X\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
  449. X.\}
  450. X.bp
  451. X'fi
  452. X.ev
  453. X.if \\n(^b \{\
  454. X.mk ^y
  455. X.nr ^b 2
  456. X.\}
  457. X.if \\n(^v \{\
  458. X.mk ^Y
  459. X.\}
  460. X..
  461. X'    # DS - begin display
  462. X.de DS
  463. X.RS
  464. X.nf
  465. X.sp
  466. X..
  467. X'    # DE - end display
  468. X.de DE
  469. X.fi
  470. X.RE
  471. X.sp .5
  472. X..
  473. X.HS Tcl_CreatePipeline tcl
  474. X.VS
  475. X.BS
  476. X.SH NAME
  477. XTcl_CreatePipeline \- create one or more child processes, with I/O redirection
  478. X.SH SYNOPSIS
  479. X.nf
  480. X\fB#include <tcl.h>\fR
  481. X.sp
  482. Xint
  483. X\fBTcl_CreatePipeline\fR(\fIinterp, argc, argv, pidArrayPtr, inPipePtr, outPipePtr, errFilePtr\fR)
  484. X.SH ARGUMENTS
  485. X.AS Tcl_Interp **pidArrayPtr
  486. X.AP Tcl_Interp *interp in
  487. XInterpreter to use for error reporting.
  488. X.AP int argc in
  489. XNumber of strings in \fIargv\fR array.
  490. X.AP char **argv in
  491. XArray of strings describing command(s) and I/O redirection.
  492. X.AP int **pidArrayPtr out
  493. XThe value at \fI*pidArrayPtr\fR is modified to hold a pointer to
  494. Xan array of process identifiers.  The array is dynamically
  495. Xallocated and must be freed by the caller.
  496. X.AP char *inPipePtr out
  497. XIf this argument is NULL then standard input for the first command
  498. Xin the pipeline comes from the current standard input.
  499. XIf \fIinPipePtr\fR is not NULL then \fBTcl_CreatePipeline\fR will
  500. Xcreate a pipe, arrange for it to be used for standard input
  501. Xto the first command,
  502. Xand store a file id for writing to that pipe at \fI*inPipePtr\fR.
  503. XIf the command specified its own input using redirection, then
  504. Xno pipe is created and -1 is stored at \fI*inPipePtr\fR.
  505. X.AP char *outPipePtr out
  506. XIf this argument is NULL then standard output for the last command
  507. Xin the pipeline goes to the current standard output.
  508. XIf \fIoutPipePtr\fR is not NULL then \fBTcl_CreatePipeline\fR will
  509. Xcreate a pipe, arrange for it to be used for standard output from
  510. Xthe last command, and store a file id for reading from that
  511. Xpipe at \fI*outPipePtr\fR.
  512. XIf the command specified its own output using redirection then
  513. Xno pipe is created and -1 is stored at \fI*outPipePtr\fR.
  514. X.AP char *errFilePtr out
  515. XIf this argument is NULL then error output for all the commands
  516. Xin the pipeline will go to the current standard error file.
  517. XIf \fIerrFilePtr\fR is not NULL, error output from all the commands
  518. Xin the pipeline will go to a temporary file created by
  519. X\fBTcl_CreatePipeline\fR.
  520. XA file id to read from that file will be stored at \fI*errFilePtr\fR.
  521. XThe file will already have been removed, so closing the file
  522. Xdescriptor at \fI*errFilePtr\fR will cause the file to be flushed
  523. Xcompletely.
  524. X.BE
  525. X
  526. X.SH DESCRIPTION
  527. X.PP
  528. X\fBTcl_CreatePipeline\fR processes the \fIargv\fR array and sets
  529. Xup one or more child processes in a pipeline configuration.
  530. X\fBTcl_CreatePipeline\fR handles pipes specified with ``|'',
  531. Xinput redirection specified with ``<'' or ``<<'', and output
  532. Xredirection specified with ``>'';  see the documentation for
  533. Xthe \fBexec\fR command for details on these specifications.
  534. XThe return value from \fBTcl_CreatePipeline\fR is a count of
  535. Xthe number of child processes created;  the process identifiers
  536. Xfor those processes are stored in a \fImalloc\fR-ed array and
  537. Xa pointer to that array is stored at \fI*pidArrayPtr\fR.
  538. XIt is the caller's responsibility to free the array when finished
  539. Xwith it.
  540. X.PP
  541. XIf the \fIinPipePtr\fR, \fIoutPipePtr\fR, and \fIerrFilePtr\fR
  542. Xarguments are NULL then the pipeline's standard input, standard
  543. Xoutput, and standard error are taken from the corresponding
  544. Xstreams of the process.  Non-NULL values may be specified for
  545. Xthese arguments to use pipes for standard input and standard
  546. Xoutput and a file for standard error.  \fBTcl_CreatePipeline\fR
  547. Xwill create the requested pipes or file and return file identifiers
  548. Xthat may be used to read or write them.  It is the caller's
  549. Xresponsibility to close all of these files when they are no
  550. Xlonger needed.  If \fIargv\fR specifies redirection for standard
  551. Xinput or standard output, then pipes will not be created even
  552. Xif requested by the \fIinPipePtr\fR and \fIoutPipePtr\fR
  553. Xarguments.
  554. X.PP
  555. XIf an error occurs in \fBTcl_CreatePipeline\fR (e.g. ``|'' or
  556. X``<'' was the last argument in \fIargv\fR, or it wasn't possible
  557. Xto fork off a child), then -1 is returned
  558. Xand \fIinterp->result\fR is set to an error message.
  559. X
  560. X.SH "SEE ALSO"
  561. X\fBTcl_WaitPids\fR, \fBTcl_DetachPids\fR
  562. X
  563. X.SH KEYWORDS
  564. Xbackground, child, detach, fork, process, status, wait
  565. X.VE
  566. END_OF_FILE
  567. if test 8122 -ne `wc -c <'tcl6.1/doc/CrtPipelin.man'`; then
  568.     echo shar: \"'tcl6.1/doc/CrtPipelin.man'\" unpacked with wrong size!
  569. fi
  570. # end of 'tcl6.1/doc/CrtPipelin.man'
  571. fi
  572. if test -f 'tcl6.1/doc/Eval.man' -a "${1}" != "-c" ; then 
  573.   echo shar: Will not clobber existing file \"'tcl6.1/doc/Eval.man'\"
  574. else
  575. echo shar: Extracting \"'tcl6.1/doc/Eval.man'\" \(8197 characters\)
  576. sed "s/^X//" >'tcl6.1/doc/Eval.man' <<'END_OF_FILE'
  577. X'\" Copyright 1989 Regents of the University of California
  578. X'\" Permission to use, copy, modify, and distribute this
  579. X'\" documentation for any purpose and without fee is hereby
  580. X'\" granted, provided that this notice appears in all copies.
  581. X'\" The University of California makes no representations about
  582. X'\" the suitability of this material for any purpose.  It is
  583. X'\" provided "as is" without express or implied warranty.
  584. X'\" 
  585. X'\" $Header: /user6/ouster/tcl/doc/RCS/Eval.man,v 1.6 91/10/24 16:23:51 ouster Exp $ SPRITE (Berkeley)
  586. X'\" 
  587. X.\" The definitions below are for supplemental macros used in Sprite
  588. X.\" manual entries.
  589. X.\"
  590. X.\" .HS name section [date [version]]
  591. X.\"    Replacement for .TH in other man pages.  See below for valid
  592. X.\"    section names.
  593. X.\"
  594. X.\" .AP type name in/out [indent]
  595. X.\"    Start paragraph describing an argument to a library procedure.
  596. X.\"    type is type of argument (int, etc.), in/out is either "in", "out",
  597. X.\"    or "in/out" to describe whether procedure reads or modifies arg,
  598. X.\"    and indent is equivalent to second arg of .IP (shouldn't ever be
  599. X.\"    needed;  use .AS below instead)
  600. X.\"
  601. X.\" .AS [type [name]]
  602. X.\"    Give maximum sizes of arguments for setting tab stops.  Type and
  603. X.\"    name are examples of largest possible arguments that will be passed
  604. X.\"    to .AP later.  If args are omitted, default tab stops are used.
  605. X.\"
  606. X.\" .BS
  607. X.\"    Start box enclosure.  From here until next .BE, everything will be
  608. X.\"    enclosed in one large box.
  609. X.\"
  610. X.\" .BE
  611. X.\"    End of box enclosure.
  612. X.\"
  613. X.\" .VS
  614. X.\"    Begin vertical sidebar, for use in marking newly-changed parts
  615. X.\"    of man pages.
  616. X.\"
  617. X.\" .VE
  618. X.\"    End of vertical sidebar.
  619. X.\"
  620. X.\" .DS
  621. X.\"    Begin an indented unfilled display.
  622. X.\"
  623. X.\" .DE
  624. X.\"    End of indented unfilled display.
  625. X.\"
  626. X'    # Heading for Sprite man pages
  627. X.de HS
  628. X.if '\\$2'cmds'       .TH \\$1 1 \\$3 \\$4
  629. X.if '\\$2'lib'        .TH \\$1 3 \\$3 \\$4
  630. X.if '\\$2'tcl'        .TH \\$1 3 \\$3 \\$4
  631. X.if '\\$2'tk'         .TH \\$1 3 \\$3 \\$4
  632. X.if t .wh -1.3i ^B
  633. X.nr ^l \\n(.l
  634. X.ad b
  635. X..
  636. X'    # Start an argument description
  637. X.de AP
  638. X.ie !"\\$4"" .TP \\$4
  639. X.el \{\
  640. X.   ie !"\\$2"" .TP \\n()Cu
  641. X.   el          .TP 15
  642. X.\}
  643. X.ie !"\\$3"" \{\
  644. X.ta \\n()Au \\n()Bu
  645. X\&\\$1    \\fI\\$2\\fP    (\\$3)
  646. X.\".b
  647. X.\}
  648. X.el \{\
  649. X.br
  650. X.ie !"\\$2"" \{\
  651. X\&\\$1    \\fI\\$2\\fP
  652. X.\}
  653. X.el \{\
  654. X\&\\fI\\$1\\fP
  655. X.\}
  656. X.\}
  657. X..
  658. X'    # define tabbing values for .AP
  659. X.de AS
  660. X.nr )A 10n
  661. X.if !"\\$1"" .nr )A \\w'\\$1'u+3n
  662. X.nr )B \\n()Au+15n
  663. X.\"
  664. X.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
  665. X.nr )C \\n()Bu+\\w'(in/out)'u+2n
  666. X..
  667. X'    # BS - start boxed text
  668. X'    # ^y = starting y location
  669. X'    # ^b = 1
  670. X.de BS
  671. X.br
  672. X.mk ^y
  673. X.nr ^b 1u
  674. X.if n .nf
  675. X.if n .ti 0
  676. X.if n \l'\\n(.lu\(ul'
  677. X.if n .fi
  678. X..
  679. X'    # BE - end boxed text (draw box now)
  680. X.de BE
  681. X.nf
  682. X.ti 0
  683. X.mk ^t
  684. X.ie n \l'\\n(^lu\(ul'
  685. X.el \{\
  686. X.\"    Draw four-sided box normally, but don't draw top of
  687. X.\"    box if the box started on an earlier page.
  688. X.ie !\\n(^b-1 \{\
  689. X\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  690. X.\}
  691. X.el \}\
  692. X\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  693. X.\}
  694. X.\}
  695. X.fi
  696. X.br
  697. X.nr ^b 0
  698. X..
  699. X'    # VS - start vertical sidebar
  700. X'    # ^Y = starting y location
  701. X'    # ^v = 1 (for troff;  for nroff this doesn't matter)
  702. X.de VS
  703. X.mk ^Y
  704. X.ie n 'mc \s12\(br\s0
  705. X.el .nr ^v 1u
  706. X..
  707. X'    # VE - end of vertical sidebar
  708. X.de VE
  709. X.ie n 'mc
  710. X.el \{\
  711. X.ev 2
  712. X.nf
  713. X.ti 0
  714. X.mk ^t
  715. X\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
  716. X.sp -1
  717. X.fi
  718. X.ev
  719. X.\}
  720. X.nr ^v 0
  721. X..
  722. X'    # Special macro to handle page bottom:  finish off current
  723. X'    # box/sidebar if in box/sidebar mode, then invoked standard
  724. X'    # page bottom macro.
  725. X.de ^B
  726. X.ev 2
  727. X'ti 0
  728. X'nf
  729. X.mk ^t
  730. X.if \\n(^b \{\
  731. X.\"    Draw three-sided box if this is the box's first page,
  732. X.\"    draw two sides but no top otherwise.
  733. X.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  734. X.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  735. X.\}
  736. X.if \\n(^v \{\
  737. X.nr ^x \\n(^tu+1v-\\n(^Yu
  738. X\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
  739. X.\}
  740. X.bp
  741. X'fi
  742. X.ev
  743. X.if \\n(^b \{\
  744. X.mk ^y
  745. X.nr ^b 2
  746. X.\}
  747. X.if \\n(^v \{\
  748. X.mk ^Y
  749. X.\}
  750. X..
  751. X'    # DS - begin display
  752. X.de DS
  753. X.RS
  754. X.nf
  755. X.sp
  756. X..
  757. X'    # DE - end display
  758. X.de DE
  759. X.fi
  760. X.RE
  761. X.sp .5
  762. X..
  763. X.HS Tcl_Eval tcl
  764. X.BS
  765. X.SH NAME
  766. XTcl_Eval, Tcl_VarEval, Tcl_EvalFile \- execute Tcl commands
  767. X.SH SYNOPSIS
  768. X.nf
  769. X\fB#include <tcl.h>\fR
  770. X.sp
  771. Xint
  772. X\fBTcl_Eval\fR(\fIinterp, cmd, flags, termPtr\fR)
  773. X.sp
  774. Xint
  775. X\fBTcl_VarEval\fR(\fIinterp, string, string, ... \fB(char *) NULL\fR)
  776. X.sp
  777. Xint
  778. X\fBTcl_EvalFile\fR(\fIinterp, fileName\fR)
  779. X.SH ARGUMENTS
  780. X.AS Tcl_Interp **termPtr;
  781. X.AP Tcl_Interp *interp in
  782. XInterpreter in which to execute the command.  String result will be
  783. Xstored in \fIinterp->result\fR.
  784. X.AP char *cmd in
  785. XCommand (or sequence of commands) to execute.
  786. X.AP int flags in
  787. XEither \fBTCL_BRACKET_TERM\fR or 0.
  788. XIf 0, then \fBTcl_Eval\fR will process commands from \fIcmd\fR until
  789. Xit reaches the null character at the end of the string.
  790. XIf \fBTCL_BRACKET_TERM\fR,
  791. Xthen \fBTcl_Eval\fR will process comands from \fIcmd\fR until either it
  792. Xreaches a null character or it encounters a close bracket that isn't
  793. Xbackslashed or enclosed in braces, at which point it will return.
  794. XUnder normal conditions, \fIflags\fR should be 0.
  795. X.AP char **termPtr out
  796. XIf \fItermPtr\fR is non-NULL, \fBTcl_Eval\fR fills in *\fItermPtr\fR with
  797. Xthe address of the character just after the last one in the last command
  798. Xsuccessfully executed (normally the null character at the end of \fIcmd\fR).
  799. XIf an error occurs in the first command in \fIcmd\fR, then \fI*termPtr\fR
  800. Xwill be set to \fIcmd\fR.
  801. X.AP char *string in
  802. XString forming part of Tcl command.
  803. X.AP char *fileName in
  804. XName of file containing Tcl command string.
  805. X.BE
  806. X
  807. X.SH DESCRIPTION
  808. X.PP
  809. XAll three of these procedures execute Tcl commands.
  810. X\fBTcl_Eval\fR is the core procedure:  it parses commands
  811. Xfrom \fIcmd\fR and executes them in
  812. Xorder until either an error occurs or \fBTcl_Eval\fR reaches a terminating
  813. Xcharacter (']' or '\e0', depending on the value of \fIflags\fR).
  814. XThe return value from \fBTcl_Eval\fR is one
  815. Xof the Tcl return codes \fBTCL_OK\fR, \fBTCL_ERROR\fR, \fBTCL_RETURN\fR, \fBTCL_BREAK\fR, or
  816. X\fBTCL_CONTINUE\fR, and \fIinterp->result\fR will point to
  817. Xa string with additional information (result value or error message).
  818. XThis return information corresponds to the last command executed from
  819. X\fIcmd\fR.
  820. X.PP
  821. X\fBTcl_VarEval\fR takes any number of string arguments
  822. Xof any length, concatenates
  823. Xthem into a single string, then calls \fBTcl_Eval\fR to
  824. Xexecute that string as a Tcl command.
  825. XIt returns the result of the command and also modifies
  826. X\fIinterp->result\fR in the usual fashion for Tcl commands.  The
  827. Xlast argument to \fBTcl_VarEval\fR must be NULL to indicate the end
  828. Xof arguments.
  829. X.PP
  830. X\fBTcl_EvalFile\fR reads the file given by \fIfileName\fR and evaluates
  831. Xits contents as a Tcl command by calling \fBTcl_Eval\fR.  It returns
  832. Xa standard Tcl result that reflects the result of evaluating the
  833. Xfile.
  834. XIf the file couldn't be read then a Tcl error is returned to describe
  835. Xwhy the file couldn't be read.
  836. X.PP
  837. XDuring the processing of a Tcl command it is legal to make nested
  838. Xcalls to evaluate other commands (this is how conditionals, loops,
  839. Xand procedures are implemented).
  840. XIf a code other than
  841. X\fBTCL_OK\fR is returned from a nested \fBTcl_Eval\fR invocation, then the
  842. Xcaller should normally return immediately, passing that same
  843. Xreturn code back to its caller, and so on until the top-level application is
  844. Xreached.  A few commands, like \fBfor\fR, will check for certain
  845. Xreturn codes, like \fBTCL_BREAK\fR and \fBTCL_CONTINUE\fR, and process them
  846. Xspecially without returning.
  847. X.PP
  848. X\fBTcl_Eval\fR keeps track of how many nested Tcl_Eval invocations are
  849. Xin progress for \fIinterp\fR.
  850. XIf a code of \fBTCL_RETURN\fR, \fBTCL_BREAK\fR, or \fBTCL_CONTINUE\fR is
  851. Xabout to be returned from the topmost \fBTcl_Eval\fR invocation for
  852. X\fIinterp\fR, then \fBTcl_Eval\fR converts the return code to \fBTCL_ERROR\fR
  853. Xand sets \fIinterp->result\fR to point to an error message indicating that
  854. Xthe \fBreturn\fR, \fBbreak\fR, or \fBcontinue\fR command was
  855. Xinvoked in an inappropriate place.  This means that top-level
  856. Xapplications should never see a return code from \fBTcl_Eval\fR other then
  857. X\fBTCL_OK\fR or \fBTCL_ERROR\fR.
  858. X
  859. X.SH KEYWORDS
  860. Xcommand, execute, file, interpreter
  861. END_OF_FILE
  862. if test 8197 -ne `wc -c <'tcl6.1/doc/Eval.man'`; then
  863.     echo shar: \"'tcl6.1/doc/Eval.man'\" unpacked with wrong size!
  864. fi
  865. # end of 'tcl6.1/doc/Eval.man'
  866. fi
  867. if test -f 'tcl6.1/doc/ExprLong.man' -a "${1}" != "-c" ; then 
  868.   echo shar: Will not clobber existing file \"'tcl6.1/doc/ExprLong.man'\"
  869. else
  870. echo shar: Extracting \"'tcl6.1/doc/ExprLong.man'\" \(7263 characters\)
  871. sed "s/^X//" >'tcl6.1/doc/ExprLong.man' <<'END_OF_FILE'
  872. X'\" Copyright 1989 Regents of the University of California
  873. X'\" Permission to use, copy, modify, and distribute this
  874. X'\" documentation for any purpose and without fee is hereby
  875. X'\" granted, provided that this notice appears in all copies.
  876. X'\" The University of California makes no representations about
  877. X'\" the suitability of this material for any purpose.  It is
  878. X'\" provided "as is" without express or implied warranty.
  879. X'\" 
  880. X'\" $Header: /user6/ouster/tcl/doc/RCS/ExprLong.man,v 1.2 91/05/31 11:52:56 ouster Exp $ SPRITE (Berkeley)
  881. X'\" 
  882. X.\" The definitions below are for supplemental macros used in Sprite
  883. X.\" manual entries.
  884. X.\"
  885. X.\" .HS name section [date [version]]
  886. X.\"    Replacement for .TH in other man pages.  See below for valid
  887. X.\"    section names.
  888. X.\"
  889. X.\" .AP type name in/out [indent]
  890. X.\"    Start paragraph describing an argument to a library procedure.
  891. X.\"    type is type of argument (int, etc.), in/out is either "in", "out",
  892. X.\"    or "in/out" to describe whether procedure reads or modifies arg,
  893. X.\"    and indent is equivalent to second arg of .IP (shouldn't ever be
  894. X.\"    needed;  use .AS below instead)
  895. X.\"
  896. X.\" .AS [type [name]]
  897. X.\"    Give maximum sizes of arguments for setting tab stops.  Type and
  898. X.\"    name are examples of largest possible arguments that will be passed
  899. X.\"    to .AP later.  If args are omitted, default tab stops are used.
  900. X.\"
  901. X.\" .BS
  902. X.\"    Start box enclosure.  From here until next .BE, everything will be
  903. X.\"    enclosed in one large box.
  904. X.\"
  905. X.\" .BE
  906. X.\"    End of box enclosure.
  907. X.\"
  908. X.\" .VS
  909. X.\"    Begin vertical sidebar, for use in marking newly-changed parts
  910. X.\"    of man pages.
  911. X.\"
  912. X.\" .VE
  913. X.\"    End of vertical sidebar.
  914. X.\"
  915. X.\" .DS
  916. X.\"    Begin an indented unfilled display.
  917. X.\"
  918. X.\" .DE
  919. X.\"    End of indented unfilled display.
  920. X.\"
  921. X'    # Heading for Sprite man pages
  922. X.de HS
  923. X.if '\\$2'cmds'       .TH \\$1 1 \\$3 \\$4
  924. X.if '\\$2'lib'        .TH \\$1 3 \\$3 \\$4
  925. X.if '\\$2'tcl'        .TH \\$1 3 \\$3 \\$4
  926. X.if '\\$2'tk'         .TH \\$1 3 \\$3 \\$4
  927. X.if t .wh -1.3i ^B
  928. X.nr ^l \\n(.l
  929. X.ad b
  930. X..
  931. X'    # Start an argument description
  932. X.de AP
  933. X.ie !"\\$4"" .TP \\$4
  934. X.el \{\
  935. X.   ie !"\\$2"" .TP \\n()Cu
  936. X.   el          .TP 15
  937. X.\}
  938. X.ie !"\\$3"" \{\
  939. X.ta \\n()Au \\n()Bu
  940. X\&\\$1    \\fI\\$2\\fP    (\\$3)
  941. X.\".b
  942. X.\}
  943. X.el \{\
  944. X.br
  945. X.ie !"\\$2"" \{\
  946. X\&\\$1    \\fI\\$2\\fP
  947. X.\}
  948. X.el \{\
  949. X\&\\fI\\$1\\fP
  950. X.\}
  951. X.\}
  952. X..
  953. X'    # define tabbing values for .AP
  954. X.de AS
  955. X.nr )A 10n
  956. X.if !"\\$1"" .nr )A \\w'\\$1'u+3n
  957. X.nr )B \\n()Au+15n
  958. X.\"
  959. X.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
  960. X.nr )C \\n()Bu+\\w'(in/out)'u+2n
  961. X..
  962. X'    # BS - start boxed text
  963. X'    # ^y = starting y location
  964. X'    # ^b = 1
  965. X.de BS
  966. X.br
  967. X.mk ^y
  968. X.nr ^b 1u
  969. X.if n .nf
  970. X.if n .ti 0
  971. X.if n \l'\\n(.lu\(ul'
  972. X.if n .fi
  973. X..
  974. X'    # BE - end boxed text (draw box now)
  975. X.de BE
  976. X.nf
  977. X.ti 0
  978. X.mk ^t
  979. X.ie n \l'\\n(^lu\(ul'
  980. X.el \{\
  981. X.\"    Draw four-sided box normally, but don't draw top of
  982. X.\"    box if the box started on an earlier page.
  983. X.ie !\\n(^b-1 \{\
  984. X\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  985. X.\}
  986. X.el \}\
  987. X\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  988. X.\}
  989. X.\}
  990. X.fi
  991. X.br
  992. X.nr ^b 0
  993. X..
  994. X'    # VS - start vertical sidebar
  995. X'    # ^Y = starting y location
  996. X'    # ^v = 1 (for troff;  for nroff this doesn't matter)
  997. X.de VS
  998. X.mk ^Y
  999. X.ie n 'mc \s12\(br\s0
  1000. X.el .nr ^v 1u
  1001. X..
  1002. X'    # VE - end of vertical sidebar
  1003. X.de VE
  1004. X.ie n 'mc
  1005. X.el \{\
  1006. X.ev 2
  1007. X.nf
  1008. X.ti 0
  1009. X.mk ^t
  1010. X\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
  1011. X.sp -1
  1012. X.fi
  1013. X.ev
  1014. X.\}
  1015. X.nr ^v 0
  1016. X..
  1017. X'    # Special macro to handle page bottom:  finish off current
  1018. X'    # box/sidebar if in box/sidebar mode, then invoked standard
  1019. X'    # page bottom macro.
  1020. X.de ^B
  1021. X.ev 2
  1022. X'ti 0
  1023. X'nf
  1024. X.mk ^t
  1025. X.if \\n(^b \{\
  1026. X.\"    Draw three-sided box if this is the box's first page,
  1027. X.\"    draw two sides but no top otherwise.
  1028. X.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  1029. X.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  1030. X.\}
  1031. X.if \\n(^v \{\
  1032. X.nr ^x \\n(^tu+1v-\\n(^Yu
  1033. X\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
  1034. X.\}
  1035. X.bp
  1036. X'fi
  1037. X.ev
  1038. X.if \\n(^b \{\
  1039. X.mk ^y
  1040. X.nr ^b 2
  1041. X.\}
  1042. X.if \\n(^v \{\
  1043. X.mk ^Y
  1044. X.\}
  1045. X..
  1046. X'    # DS - begin display
  1047. X.de DS
  1048. X.RS
  1049. X.nf
  1050. X.sp
  1051. X..
  1052. X'    # DE - end display
  1053. X.de DE
  1054. X.fi
  1055. X.RE
  1056. X.sp .5
  1057. X..
  1058. X.HS Tcl_ExprLong tcl
  1059. X.BS
  1060. X.SH NAME
  1061. XTcl_ExprLong, Tcl_ExprDouble, Tcl_ExprBool, Tcl_ExprString \- evaluate an expression
  1062. X.SH SYNOPSIS
  1063. X.nf
  1064. X\fB#include <tcl.h>\fR
  1065. X.VS
  1066. X.sp
  1067. Xint
  1068. X\fBTcl_ExprLong\fR(\fIinterp, string, longPtr\fR)
  1069. X.sp
  1070. Xint
  1071. X\fBTcl_ExprDouble\fR(\fIinterp, string, doublePtr\fR)
  1072. X.sp
  1073. Xint
  1074. X\fBTcl_ExprBoolean\fR(\fIinterp, string, booleanPtr\fR)
  1075. X.sp
  1076. Xint
  1077. X\fBTcl_ExprString\fR(\fIinterp, string\fR)
  1078. X.SH ARGUMENTS
  1079. X.AS Tcl_Interp *interp
  1080. X.AP Tcl_Interp *interp in
  1081. XInterpreter in whose context to evaluate \fIstring\fR.
  1082. X.AP char *string in
  1083. XExpression to be evaluated.
  1084. X.AP long *longPtr out
  1085. XPointer to location in which to store the integer value of the
  1086. Xexpression.
  1087. X.AP int *doublePtr out
  1088. XPointer to location in which to store the floating-point value of the
  1089. Xexpression.
  1090. X.AP int *booleanPtr out
  1091. XPointer to location in which to store the 0/1 boolean value of the
  1092. Xexpression.
  1093. X.BE
  1094. X
  1095. X.SH DESCRIPTION
  1096. X.PP
  1097. XThese four procedures all evaluate a string expression, returning
  1098. Xthe result in one of four different forms.
  1099. XThe expression is given by the \fIstring\fR argument, and it
  1100. Xcan have any of the forms accepted by the \fBexpr\fR command.
  1101. XThe \fIinterp\fR argument refers to an interpreter used to
  1102. Xevaluate the expression (e.g. for variables and nested Tcl
  1103. Xcommands) and to return error information.  \fIInterp->result\fR
  1104. Xis assumed to be initialized in the standard fashion when any
  1105. Xof the procedures are invoked.
  1106. X.PP
  1107. XFor all of these procedures the return value is a standard
  1108. XTcl result:  \fBTCL_OK\fR means the expression was succesfully
  1109. Xevaluated, and \fBTCL_ERROR\fR means that an error occurred while
  1110. Xevaluating the expression.  If \fBTCL_ERROR\fR is returned then
  1111. X\fIinterp->result\fR will hold a message describing the error.
  1112. XIf an error occurs while executing a Tcl command embedded in
  1113. X\fIstring\fR, then that error will be returned.
  1114. X.PP
  1115. XIf the expression is successfully evaluated, then its value will
  1116. Xbe returned in one of four forms, depending on which procedure
  1117. Xis invoked.
  1118. X\fBTcl_ExprLong\fR stores an integer value at \fI*longPtr\fR.
  1119. XIf the expression's actual value was a floating-point number,
  1120. Xthen it is truncated to an integer.
  1121. XIf the expression's actual value was a non-numeric string then
  1122. Xan error is returned.
  1123. X.PP
  1124. X\fBTcl_ExprDouble\fR stores a floating-point value at \fI*doublePtr\fR.
  1125. XIf the expression's actual value was an integer, it is converted to
  1126. Xfloating-point.
  1127. XIf the expression's actual value was a non-numeric string then
  1128. Xan error is returned.
  1129. X.PP
  1130. X\fBTcl_ExprBoolean\fR stores a 0/1 integer value at \fI*booleanPtr\fR.
  1131. XIf the expression's actual value was an integer or floating-point
  1132. Xnumber, then \fBTcl_ExprBoolean\fR stores 0 at \fI*booleanPtr\fR if
  1133. Xthe value was zero and 1 otherwise.
  1134. XIf the expression's actual value was a non-numeric string then
  1135. Xan error is returned.
  1136. X.PP
  1137. X\fBTcl_ExprString\fR returns the value of the expression as a
  1138. Xstring stored in \fIinterp->result\fR.
  1139. XIf the expression's actual value was an integer or floating-point
  1140. Xnumber, then \fBTcl_ExprString\fR converts it to string (using \fBsprintf\fR
  1141. Xwith a ``%d'' or ``%g'' converter).
  1142. X
  1143. X.SH KEYWORDS
  1144. Xboolean, double, evaluate, expression, integer, string
  1145. X.VE
  1146. END_OF_FILE
  1147. if test 7263 -ne `wc -c <'tcl6.1/doc/ExprLong.man'`; then
  1148.     echo shar: \"'tcl6.1/doc/ExprLong.man'\" unpacked with wrong size!
  1149. fi
  1150. # end of 'tcl6.1/doc/ExprLong.man'
  1151. fi
  1152. if test -f 'tcl6.1/doc/GetInt.man' -a "${1}" != "-c" ; then 
  1153.   echo shar: Will not clobber existing file \"'tcl6.1/doc/GetInt.man'\"
  1154. else
  1155. echo shar: Extracting \"'tcl6.1/doc/GetInt.man'\" \(6873 characters\)
  1156. sed "s/^X//" >'tcl6.1/doc/GetInt.man' <<'END_OF_FILE'
  1157. X'\" Copyright 1989 Regents of the University of California
  1158. X'\" Permission to use, copy, modify, and distribute this
  1159. X'\" documentation for any purpose and without fee is hereby
  1160. X'\" granted, provided that this notice appears in all copies.
  1161. X'\" The University of California makes no representations about
  1162. X'\" the suitability of this material for any purpose.  It is
  1163. X'\" provided "as is" without express or implied warranty.
  1164. X'\" 
  1165. X'\" $Header: /user6/ouster/tcl/doc/RCS/GetInt.man,v 1.2 90/07/28 10:59:43 ouster Exp $ SPRITE (Berkeley)
  1166. X'\" 
  1167. X.\" The definitions below are for supplemental macros used in Sprite
  1168. X.\" manual entries.
  1169. X.\"
  1170. X.\" .HS name section [date [version]]
  1171. X.\"    Replacement for .TH in other man pages.  See below for valid
  1172. X.\"    section names.
  1173. X.\"
  1174. X.\" .AP type name in/out [indent]
  1175. X.\"    Start paragraph describing an argument to a library procedure.
  1176. X.\"    type is type of argument (int, etc.), in/out is either "in", "out",
  1177. X.\"    or "in/out" to describe whether procedure reads or modifies arg,
  1178. X.\"    and indent is equivalent to second arg of .IP (shouldn't ever be
  1179. X.\"    needed;  use .AS below instead)
  1180. X.\"
  1181. X.\" .AS [type [name]]
  1182. X.\"    Give maximum sizes of arguments for setting tab stops.  Type and
  1183. X.\"    name are examples of largest possible arguments that will be passed
  1184. X.\"    to .AP later.  If args are omitted, default tab stops are used.
  1185. X.\"
  1186. X.\" .BS
  1187. X.\"    Start box enclosure.  From here until next .BE, everything will be
  1188. X.\"    enclosed in one large box.
  1189. X.\"
  1190. X.\" .BE
  1191. X.\"    End of box enclosure.
  1192. X.\"
  1193. X.\" .VS
  1194. X.\"    Begin vertical sidebar, for use in marking newly-changed parts
  1195. X.\"    of man pages.
  1196. X.\"
  1197. X.\" .VE
  1198. X.\"    End of vertical sidebar.
  1199. X.\"
  1200. X.\" .DS
  1201. X.\"    Begin an indented unfilled display.
  1202. X.\"
  1203. X.\" .DE
  1204. X.\"    End of indented unfilled display.
  1205. X.\"
  1206. X'    # Heading for Sprite man pages
  1207. X.de HS
  1208. X.if '\\$2'cmds'       .TH \\$1 1 \\$3 \\$4
  1209. X.if '\\$2'lib'        .TH \\$1 3 \\$3 \\$4
  1210. X.if '\\$2'tcl'        .TH \\$1 3 \\$3 \\$4
  1211. X.if '\\$2'tk'         .TH \\$1 3 \\$3 \\$4
  1212. X.if t .wh -1.3i ^B
  1213. X.nr ^l \\n(.l
  1214. X.ad b
  1215. X..
  1216. X'    # Start an argument description
  1217. X.de AP
  1218. X.ie !"\\$4"" .TP \\$4
  1219. X.el \{\
  1220. X.   ie !"\\$2"" .TP \\n()Cu
  1221. X.   el          .TP 15
  1222. X.\}
  1223. X.ie !"\\$3"" \{\
  1224. X.ta \\n()Au \\n()Bu
  1225. X\&\\$1    \\fI\\$2\\fP    (\\$3)
  1226. X.\".b
  1227. X.\}
  1228. X.el \{\
  1229. X.br
  1230. X.ie !"\\$2"" \{\
  1231. X\&\\$1    \\fI\\$2\\fP
  1232. X.\}
  1233. X.el \{\
  1234. X\&\\fI\\$1\\fP
  1235. X.\}
  1236. X.\}
  1237. X..
  1238. X'    # define tabbing values for .AP
  1239. X.de AS
  1240. X.nr )A 10n
  1241. X.if !"\\$1"" .nr )A \\w'\\$1'u+3n
  1242. X.nr )B \\n()Au+15n
  1243. X.\"
  1244. X.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
  1245. X.nr )C \\n()Bu+\\w'(in/out)'u+2n
  1246. X..
  1247. X'    # BS - start boxed text
  1248. X'    # ^y = starting y location
  1249. X'    # ^b = 1
  1250. X.de BS
  1251. X.br
  1252. X.mk ^y
  1253. X.nr ^b 1u
  1254. X.if n .nf
  1255. X.if n .ti 0
  1256. X.if n \l'\\n(.lu\(ul'
  1257. X.if n .fi
  1258. X..
  1259. X'    # BE - end boxed text (draw box now)
  1260. X.de BE
  1261. X.nf
  1262. X.ti 0
  1263. X.mk ^t
  1264. X.ie n \l'\\n(^lu\(ul'
  1265. X.el \{\
  1266. X.\"    Draw four-sided box normally, but don't draw top of
  1267. X.\"    box if the box started on an earlier page.
  1268. X.ie !\\n(^b-1 \{\
  1269. X\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  1270. X.\}
  1271. X.el \}\
  1272. X\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  1273. X.\}
  1274. X.\}
  1275. X.fi
  1276. X.br
  1277. X.nr ^b 0
  1278. X..
  1279. X'    # VS - start vertical sidebar
  1280. X'    # ^Y = starting y location
  1281. X'    # ^v = 1 (for troff;  for nroff this doesn't matter)
  1282. X.de VS
  1283. X.mk ^Y
  1284. X.ie n 'mc \s12\(br\s0
  1285. X.el .nr ^v 1u
  1286. X..
  1287. X'    # VE - end of vertical sidebar
  1288. X.de VE
  1289. X.ie n 'mc
  1290. X.el \{\
  1291. X.ev 2
  1292. X.nf
  1293. X.ti 0
  1294. X.mk ^t
  1295. X\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
  1296. X.sp -1
  1297. X.fi
  1298. X.ev
  1299. X.\}
  1300. X.nr ^v 0
  1301. X..
  1302. X'    # Special macro to handle page bottom:  finish off current
  1303. X'    # box/sidebar if in box/sidebar mode, then invoked standard
  1304. X'    # page bottom macro.
  1305. X.de ^B
  1306. X.ev 2
  1307. X'ti 0
  1308. X'nf
  1309. X.mk ^t
  1310. X.if \\n(^b \{\
  1311. X.\"    Draw three-sided box if this is the box's first page,
  1312. X.\"    draw two sides but no top otherwise.
  1313. X.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  1314. X.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  1315. X.\}
  1316. X.if \\n(^v \{\
  1317. X.nr ^x \\n(^tu+1v-\\n(^Yu
  1318. X\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
  1319. X.\}
  1320. X.bp
  1321. X'fi
  1322. X.ev
  1323. X.if \\n(^b \{\
  1324. X.mk ^y
  1325. X.nr ^b 2
  1326. X.\}
  1327. X.if \\n(^v \{\
  1328. X.mk ^Y
  1329. X.\}
  1330. X..
  1331. X'    # DS - begin display
  1332. X.de DS
  1333. X.RS
  1334. X.nf
  1335. X.sp
  1336. X..
  1337. X'    # DE - end display
  1338. X.de DE
  1339. X.fi
  1340. X.RE
  1341. X.sp .5
  1342. X..
  1343. X.HS Tcl_GetInt tcl
  1344. X.BS
  1345. X.SH NAME
  1346. XTcl_GetInt, Tcl_GetDouble, Tcl_GetBoolean \- convert from string to integer, double, or boolean
  1347. X.SH SYNOPSIS
  1348. X.nf
  1349. X\fB#include <tcl.h>\fR
  1350. X.sp
  1351. Xint
  1352. X\fBTcl_GetInt\fR(\fIinterp, string, intPtr\fR)
  1353. X.sp
  1354. Xint
  1355. X\fBTcl_GetDouble\fR(\fIinterp, string, doublePtr\fR)
  1356. X.sp
  1357. Xint
  1358. X\fBTcl_GetBoolean\fR(\fIinterp, string, boolPtr\fR)
  1359. X.SH ARGUMENTS
  1360. X.AS Tcl_Interp *interp
  1361. X.AP Tcl_Interp *interp in
  1362. XInterpreter to use for error reporting.
  1363. X.AP char *string in
  1364. XTextual value to be converted.
  1365. X.AP int *intPtr out
  1366. XPoints to place to store integer value converted from \fIstring\fR.
  1367. X.AP double *doublePtr out
  1368. XPoints to place to store double-precision floating-point
  1369. Xvalue converted from \fIstring\fR.
  1370. X.AP int *boolPtr out
  1371. XPoints to place to store boolean value (0 or 1) converted from \fIstring\fR.
  1372. X.BE
  1373. X
  1374. X.SH DESCRIPTION
  1375. X.PP
  1376. XThese procedures convert from strings to integers or double-precision
  1377. Xfloating-point values or booleans (represented as 0- or 1-valued
  1378. Xintegers).  Each of the procedures takes a \fIstring\fR argument,
  1379. Xconverts it to an internal form of a particular type, and stores
  1380. Xthe converted value at the location indicated by the procedure's
  1381. Xthird argument.  If all goes well, each of the procedures returns
  1382. XTCL_OK.  If \fIstring\fR doesn't have the proper syntax for the
  1383. Xdesired type then TCL_ERROR is returned, an error message is left
  1384. Xin \fIinterp->result\fR, and nothing is stored at *\fIintPtr\fR
  1385. Xor *\fIdoublePtr\fR or *\fIboolPtr\fR.
  1386. X.PP
  1387. X\fBTcl_GetInt\fR expects \fIstring\fR to consist of a collection
  1388. Xof integer digits, optionally signed and optionally preceded by
  1389. Xwhite space.  If the first two characters of \fIstring\fR are ``0x''
  1390. Xthen \fIstring\fR is expected to be in hexadecimal form;  otherwise,
  1391. Xif the first character of \fIstring\fR is ``0'' then \fIstring\fR
  1392. Xis expected to be in octal form;  otherwise, \fIstring\fR is
  1393. Xexpected to be in decimal form.
  1394. X.PP
  1395. X\fBTcl_GetDouble\fR expects \fIstring\fR to consist of a floating-point
  1396. Xnumber, which is:  white space;  a sign; a sequence of digits;  a
  1397. Xdecimal point;  a sequence of digits;  the letter ``e'';  and a
  1398. Xsigned decimal exponent.  Any of the fields may be omitted, except that
  1399. Xthe digits either before or after the decimal point must be present
  1400. Xand if the ``e'' is present then it must be followed by the
  1401. Xexponent number.
  1402. X.PP
  1403. X\fBTcl_GetBoolean\fR expects \fIstring\fR to specify a boolean
  1404. Xvalue.  If \fIstring\fR is any of \fB0\fR, \fBfalse\fR, or
  1405. X\fBno\fR, then \fBTcl_GetBoolean\fR stores a zero value at
  1406. X\fI*boolPtr\fR.  If \fIstring\fR is any of \fB1\fR, \fBtrue\fR,
  1407. Xor \fByes\fR, then 1 is stored at \fI*boolPtr\fR.  Any of these
  1408. Xvalues may be abbreviated, and upper-case spellings are also
  1409. Xacceptable.
  1410. X
  1411. X.SH KEYWORDS
  1412. Xboolean, conversion, double, floating-point, integer
  1413. END_OF_FILE
  1414. if test 6873 -ne `wc -c <'tcl6.1/doc/GetInt.man'`; then
  1415.     echo shar: \"'tcl6.1/doc/GetInt.man'\" unpacked with wrong size!
  1416. fi
  1417. # end of 'tcl6.1/doc/GetInt.man'
  1418. fi
  1419. if test -f 'tcl6.1/tclUnix.h' -a "${1}" != "-c" ; then 
  1420.   echo shar: Will not clobber existing file \"'tcl6.1/tclUnix.h'\"
  1421. else
  1422. echo shar: Extracting \"'tcl6.1/tclUnix.h'\" \(6487 characters\)
  1423. sed "s/^X//" >'tcl6.1/tclUnix.h' <<'END_OF_FILE'
  1424. X/*
  1425. X * tclUnix.h --
  1426. X *
  1427. X *    This file reads in UNIX-related header files and sets up
  1428. X *    UNIX-related macros for Tcl's UNIX core.  It should be the
  1429. X *    only file that contains #ifdefs to handle different flavors
  1430. X *    of UNIX.  This file sets up the union of all UNIX-related
  1431. X *    things needed by any of the Tcl core files.  This file
  1432. X *    depends on configuration #defines in tclConfig.h
  1433. X *
  1434. X *    The material in this file was originally contributed by
  1435. X *    Karl Lehenbauer, Mark Diekhans and Peter da Silva.
  1436. X *
  1437. X * Copyright 1991 Regents of the University of California
  1438. X * Permission to use, copy, modify, and distribute this
  1439. X * software and its documentation for any purpose and without
  1440. X * fee is hereby granted, provided that this copyright
  1441. X * notice appears in all copies.  The University of California
  1442. X * makes no representations about the suitability of this
  1443. X * software for any purpose.  It is provided "as is" without
  1444. X * express or implied warranty.
  1445. X *
  1446. X * $Header: /user6/ouster/tcl/RCS/tclUnix.h,v 1.21 91/11/07 09:41:54 ouster Exp $ SPRITE (Berkeley)
  1447. X */
  1448. X
  1449. X#ifndef _TCLUNIX
  1450. X#define _TCLUNIX
  1451. X
  1452. X/*
  1453. X * The following #defines are used to distinguish between different
  1454. X * UNIX systems.  These #defines are normally set by the "config" script
  1455. X * based on information it gets by looking in the include and library
  1456. X * areas.  The defaults below are for BSD-based systems like SunOS
  1457. X * or Ultrix.
  1458. X *
  1459. X * TCL_GETTOD -            1 means there exists a library procedure
  1460. X *                "gettimeofday" (e.g. BSD systems).  0 means
  1461. X *                have to use "times" instead.
  1462. X * TCL_GETWD -            1 means there exists a library procedure
  1463. X *                "getwd" (e.g. BSD systems).  0 means
  1464. X *                have to use "getcwd" instead.
  1465. X * TCL_SYS_ERRLIST -        1 means that the array sys_errlist is
  1466. X *                defined as part of the C library.
  1467. X * TCL_SYS_TIME_H -        1 means there exists an include file
  1468. X *                <sys/time.h> (e.g. BSD derivatives).
  1469. X * TCL_SYS_WAIT_H -        1 means there exists an include file
  1470. X *                <sys/wait.h> that defines constants related
  1471. X *                to the results of "wait".
  1472. X * TCL_UNION_WAIT -        1 means that the "wait" system call returns
  1473. X *                a structure of type "union wait" (e.g. BSD
  1474. X *                systems).  0 means "wait" returns an int
  1475. X *                (e.g. System V and POSIX).
  1476. X * TCL_PID_T -            1 means that <sys/types> defines types
  1477. X *                pid_t and uid_t.  0 means that it doesn't.
  1478. X */
  1479. X
  1480. X#define TCL_GETTOD 0
  1481. X#define TCL_GETWD 0
  1482. X#define TCL_SYS_ERRLIST 1
  1483. X#define TCL_SYS_TIME_H 1
  1484. X#define TCL_SYS_WAIT_H 1
  1485. X#define TCL_UNION_WAIT 0
  1486. X#define TCL_PID_T 1
  1487. X
  1488. X#include <errno.h>
  1489. X#include <fcntl.h>
  1490. X#include <limits.h>
  1491. X#include <pwd.h>
  1492. X#include <signal.h>
  1493. X#include <sys/param.h>
  1494. X#include <sys/types.h>
  1495. X#include <dirent.h>
  1496. X#include <sys/file.h>
  1497. X#include <sys/stat.h>
  1498. X#if TCL_SYS_TIME_H
  1499. X#   include <sys/time.h>
  1500. X#else
  1501. X#   include <time.h>
  1502. X#endif
  1503. X#if TCL_SYS_WAIT_H
  1504. X#   include <sys/wait.h>
  1505. X#endif
  1506. X
  1507. X/*
  1508. X * Not all systems declare the errno variable in errno.h. so this
  1509. X * file does it explicitly.  The list of system error messages also
  1510. X * isn't generally declared in a header file anywhere.
  1511. X */
  1512. X
  1513. Xextern int errno;
  1514. Xextern int sys_nerr;
  1515. Xextern char *sys_errlist[];
  1516. X
  1517. X/*
  1518. X * The type of the status returned by wait varies from UNIX system
  1519. X * to UNIX system.  The macro below defines it:
  1520. X */
  1521. X
  1522. X#if TCL_UNION_WAIT
  1523. X#   define WAIT_STATUS_TYPE union wait
  1524. X#else
  1525. X#   define WAIT_STATUS_TYPE int
  1526. X#endif
  1527. X
  1528. X/*
  1529. X * Supply definitions for macros to query wait status, if not already
  1530. X * defined in header files above.
  1531. X */
  1532. X
  1533. X#ifndef WIFEXITED
  1534. X#   define WIFEXITED(stat)  (((*((int *) &(stat))) & 0xff) == 0)
  1535. X#endif
  1536. X
  1537. X#ifndef WEXITSTATUS
  1538. X#   define WEXITSTATUS(stat) (((*((int *) &(stat))) >> 8) & 0xff)
  1539. X#endif
  1540. X
  1541. X#ifndef WIFSIGNALED
  1542. X#   define WIFSIGNALED(stat) (((*((int *) &(stat)))) && ((*((int *) &(stat))) == ((*((int *) &(stat))) & 0x00ff)))
  1543. X#endif
  1544. X
  1545. X#ifndef WTERMSIG
  1546. X#   define WTERMSIG(stat)    ((*((int *) &(stat))) & 0x7f)
  1547. X#endif
  1548. X
  1549. X#ifndef WIFSTOPPED
  1550. X#   define WIFSTOPPED(stat)  (((*((int *) &(stat))) & 0xff) == 0177)
  1551. X#endif
  1552. X
  1553. X#ifndef WSTOPSIG
  1554. X#   define WSTOPSIG(stat)    (((*((int *) &(stat))) >> 8) & 0xff)
  1555. X#endif
  1556. X
  1557. X/*
  1558. X * Supply macros for seek offsets, if they're not already provided by
  1559. X * an include file.
  1560. X */
  1561. X
  1562. X#ifndef SEEK_SET
  1563. X#   define SEEK_SET 0
  1564. X#endif
  1565. X
  1566. X#ifndef SEEK_CUR
  1567. X#   define SEEK_CUR 1
  1568. X#endif
  1569. X
  1570. X#ifndef SEEK_END
  1571. X#   define SEEK_END 2
  1572. X#endif
  1573. X
  1574. X/*
  1575. X * The stuff below is needed by the "time" command.  If this
  1576. X * system has no gettimeofday call, then must use times and the
  1577. X * CLK_TCK #define (from sys/param.h) to compute elapsed time.
  1578. X * Unfortunately, some systems only have HZ and no CLK_TCK, and
  1579. X * some might not even have HZ.
  1580. X */
  1581. X
  1582. X#if ! TCL_GETTOD
  1583. X#   include <sys/times.h>
  1584. X#   include <sys/param.h>
  1585. X#   ifndef CLK_TCK
  1586. X#       ifdef HZ
  1587. X#           define CLK_TCK HZ
  1588. X#       else
  1589. X#           define CLK_TCK 60
  1590. X#       endif
  1591. X#   endif
  1592. X#endif
  1593. X
  1594. X/*
  1595. X * Define access mode constants if they aren't already defined.
  1596. X */
  1597. X
  1598. X#ifndef F_OK
  1599. X#    define F_OK 00
  1600. X#endif
  1601. X#ifndef X_OK
  1602. X#    define X_OK 01
  1603. X#endif
  1604. X#ifndef W_OK
  1605. X#    define W_OK 02
  1606. X#endif
  1607. X#ifndef R_OK
  1608. X#    define R_OK 04
  1609. X#endif
  1610. X
  1611. X/*
  1612. X * Make sure that MAXPATHLEN is defined.
  1613. X */
  1614. X
  1615. X#ifndef MAXPATHLEN
  1616. X#   ifdef _POSIX_PATH_MAX
  1617. X#       define MAXPATHLEN _POSIX_PATH_MAX
  1618. X#   else
  1619. X#       define MAXPATHLEN 2048
  1620. X#   endif
  1621. X#endif
  1622. X
  1623. X/*
  1624. X * Define pid_t and uid_t if they're not already defined.
  1625. X */
  1626. X
  1627. X#if ! TCL_PID_T
  1628. X#   define pid_t int
  1629. X#   define uid_t int
  1630. X#endif
  1631. X
  1632. X/*
  1633. X * Variables provided by the C library:
  1634. X */
  1635. X
  1636. Xextern char **environ;
  1637. X
  1638. X/*
  1639. X * Library procedures used by Tcl but not declared in a header file:
  1640. X */
  1641. X
  1642. Xextern int    access    _ANSI_ARGS_((CONST char *path, int mode));
  1643. Xextern int    chdir    _ANSI_ARGS_((CONST char *path));
  1644. Xextern int    close    _ANSI_ARGS_((int fd));
  1645. Xextern int    dup2    _ANSI_ARGS_((int src, int dst));
  1646. Xextern int    execvp    _ANSI_ARGS_((CONST char *name, char **argv));
  1647. Xextern void    _exit     _ANSI_ARGS_((int status));
  1648. Xextern pid_t    fork    _ANSI_ARGS_((void));
  1649. Xextern uid_t    geteuid    _ANSI_ARGS_((void));
  1650. Xextern pid_t    getpid    _ANSI_ARGS_((void));
  1651. Xextern char *    getcwd  _ANSI_ARGS_((char *buffer, int size));
  1652. Xextern char *    getwd   _ANSI_ARGS_((char *buffer));
  1653. Xextern int    kill    _ANSI_ARGS_((pid_t pid, int sig));
  1654. Xextern long    lseek    _ANSI_ARGS_((int fd, int offset, int whence));
  1655. Xextern char *    mktemp    _ANSI_ARGS_((char *template));
  1656. Xextern int    open    _ANSI_ARGS_((CONST char *path, int flags, int mode));
  1657. Xextern int    pipe    _ANSI_ARGS_((int *fdPtr));
  1658. Xextern int    read    _ANSI_ARGS_((int fd, char *buf, int numBytes));
  1659. Xextern int    unlink    _ANSI_ARGS_((CONST char *path));
  1660. Xextern int    write    _ANSI_ARGS_((int fd, char *buf, int numBytes));
  1661. X
  1662. X#endif /* _TCLUNIX */
  1663. END_OF_FILE
  1664. if test 6487 -ne `wc -c <'tcl6.1/tclUnix.h'`; then
  1665.     echo shar: \"'tcl6.1/tclUnix.h'\" unpacked with wrong size!
  1666. fi
  1667. # end of 'tcl6.1/tclUnix.h'
  1668. fi
  1669. echo shar: End of archive 5 \(of 33\).
  1670. cp /dev/null ark5isdone
  1671. MISSING=""
  1672. 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 24 25 26 27 28 29 30 31 32 33 ; do
  1673.     if test ! -f ark${I}isdone ; then
  1674.     MISSING="${MISSING} ${I}"
  1675.     fi
  1676. done
  1677. if test "${MISSING}" = "" ; then
  1678.     echo You have unpacked all 33 archives.
  1679.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1680. else
  1681.     echo You still need to unpack the following archives:
  1682.     echo "        " ${MISSING}
  1683. fi
  1684. ##  End of shell archive.
  1685. exit 0
  1686.  
  1687. exit 0 # Just in case...
  1688. -- 
  1689. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1690. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1691. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1692. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1693.