home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume32 / ecu / part37 < prev    next >
Text File  |  1992-09-15  |  58KB  |  1,956 lines

  1. Newsgroups: comp.sources.misc
  2. From: wht@n4hgf.Mt-Park.GA.US (Warren Tucker)
  3. Subject:  v32i072:  ecu - ECU Asynchronous Communications v3.20, Part37/40
  4. Message-ID: <1992Sep15.153736.20912@sparky.imd.sterling.com>
  5. X-Md4-Signature: be316a86a0a934c6654e8d45a7a3c6a6
  6. Date: Tue, 15 Sep 1992 15:37:36 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: wht@n4hgf.Mt-Park.GA.US (Warren Tucker)
  10. Posting-number: Volume 32, Issue 72
  11. Archive-name: ecu/part37
  12. Environment: SCO,XENIX,ISC,SUNOS,SYSVR4,HDB,Curses
  13. Supersedes: ecu: Volume 21, Issue 53-89
  14.  
  15. ---- Cut Here and feed the following to sh ----
  16. #!/bin/sh
  17. # this is ecu320.37 (part 37 of ecu320)
  18. # do not concatenate these parts, unpack them in order with /bin/sh
  19. # file doc/_icmd.txt continued
  20. #
  21. if test ! -r _shar_seq_.tmp; then
  22.     echo 'Please unpack part 1 first!'
  23.     exit 1
  24. fi
  25. (read Scheck
  26.  if test "$Scheck" != 37; then
  27.     echo Please unpack part "$Scheck" next!
  28.     exit 1
  29.  else
  30.     exit 0
  31.  fi
  32. ) < _shar_seq_.tmp || exit 1
  33. if test ! -f _shar_wnt_.tmp; then
  34.     echo 'x - still skipping doc/_icmd.txt'
  35. else
  36. echo 'x - continuing file doc/_icmd.txt'
  37. sed 's/^X//' << 'SHAR_EOF' >> 'doc/_icmd.txt' &&
  38. Xor later.  The file ~/.kermrc must be set up to have any desired
  39. Xinitialization parameters you desire (refer to C-Kermit
  40. Xdocumentation for more information).
  41. XThe remote protocol must have been started prior to the
  42. Xexecution of this command.
  43. X
  44. XWARNING: until further notice, avoid suspending Kermit
  45. Xwith ^\Z.  ECU is totally unprepared to act as a job control
  46. Xprocess group leader.
  47. X
  48. X.*s 2 "RS : receive via SEAlink"
  49. X.DS L
  50. Xusage: rs
  51. X.DE
  52. X
  53. XThis command invokes a SEAlink receive protocol.
  54. X
  55. X.*s 2 "RTScts : control RTS/CTS flow control"
  56. X.DS L
  57. Xusage: rtscts [ off | on | no | yes | 0..7 ]
  58. X.DE
  59. X
  60. XThis command controls the RTS/CTS flow control feature of
  61. Xthe line driver (which may or may not work).
  62. XThis is a very confusing area though it should not be.
  63. X
  64. XIf no argument is supplied, the current setting is
  65. Xdisplayed.  Specifying 0 or n disables the facility;
  66. X1 or y causes RTS/CTS flow control to be enabled.
  67. X
  68. XWhat the command does is to manipulate the RTSFLOW and CTSFLOW
  69. Xbits of the termio c_cflag word (see 
  70. X.B termio(S) ).
  71. X
  72. XSCO's sio driver before UNIX 3.2v4/ODT 2.0
  73. Xdoes half duplex flow control.
  74. XFAS does hardware flow control based on the device magic
  75. Xnumber, but if you use a device number specifying no hardware flow
  76. Xcontrol, RTSFLOW and CTSFLOW can be used to specify SCO-style flow
  77. Xcontrol.
  78. XCRTSFL offers full duplex line control
  79. Xon 3.2v4 and later ONLY for SCO's sio driver.
  80. X
  81. X.DS I
  82. X arg | RTSFLOW | CTSFLOW    arg | RTSFLOW | CTSFLOW | CRTSFL
  83. X-----+---------+---------  -----+---------+---------+--------
  84. X off |   0     |   0         0  |   0     |   0     |
  85. X on  |   0     |   1         1  |   0     |   1     |
  86. X no  |   0     |   0         2  |   1     |   0     |
  87. X yes |   0     |   1         3  |   1     |   1     |
  88. X                             4  |   0     |   0     |   1
  89. X.DE
  90. XChoice 4 only works on SCO 3.2v4 and ODT 2.0.
  91. XAs you can see, numeric values are masks.
  92. XIf the 4 bit is present in the numeric value, it
  93. Xoverrides the lower-order bits:  Specifying 7 as an argument
  94. Xspecifies CRTSFL is to be used if it is supported, otherwise
  95. XRTSFLOW and CTSFLOW.
  96. X
  97. XUnder System V Release 4, an TCGETX/TCSETX manipulation
  98. Xis performed, modifying the x_hflag bits as follows:
  99. X.DS I
  100. Xargument | RTSXOFF | CTSXON    argument | RTSXOFF | CTSXON 
  101. X---------+---------+---------  ---------+---------+---------
  102. X  off    |   0     |   0         0      |   0     |   0
  103. X  on     |   0     |   1         1      |   0     |   1
  104. X  no     |   0     |   0         2      |   1     |   0
  105. X  yes    |   0     |   1         3      |   1     |   1
  106. X.DE
  107. XUnder SunOS 4.1, only CTS support is provided.  You should read
  108. Xthe termio and zs man pages.  Arguments result in the stated
  109. Xmanipulations of the termio element c_cflag:
  110. X.DS I
  111. Xargument | CRTSCTS    argument | CRTSCTS
  112. X---------+---------  ----------+---------
  113. X  off    |   0           0     |   0
  114. X  on     |   1           1     |   1
  115. X  no     |   0     
  116. X  yes    |   1    
  117. X.DE
  118. X
  119. X.*s 2 "RX : receive via XMODEM/CRC"
  120. X.DS L
  121. Xusage: rx
  122. X.DE
  123. X
  124. XThis command invokes ecurz to receive files from the remote
  125. Xsystem using XMODEM/CRC.
  126. X
  127. XAfter entering the command, you are prompted as to whether
  128. Xor not file CR/LF characters are to be converted to
  129. Xnewlines.  If you are transferring text files from a system
  130. Xwhich contain CR/LF line terminators, you must answer yes
  131. Xto this question.  You should answer no when transferring
  132. Xbinary files, such as executables, .arc files and the like.
  133. XFile transfer progress is presented on a visual display.  To
  134. Xabort the transfer, press your interrupt key (usually DEL
  135. Xunless reset with stty(C)).
  136. X
  137. X
  138. X.*s 2 "RY : receive via YMODEM Batch"
  139. X.DS L
  140. Xusage: ry
  141. X.DE
  142. X
  143. XThis command invokes ecurz to receive files from the remote
  144. Xsystem using YMODEM batch with CRC-16 error correction.  The
  145. XYMODEM is "true YMODEM", not XMODEM-1k.  File transfer
  146. Xprogress is presented on a visual display.  To abort the
  147. Xtransfer, press your interrupt key (usually DEL unless reset
  148. Xwith stty(C)).
  149. X
  150. X
  151. X.*s 2 "RZ : receive via ZMODEM/CRC32"
  152. X.DS L
  153. Xusage: rz
  154. X.DE
  155. X
  156. XThis command invokes ecurz to receive files from the remote
  157. Xsystem using ZMODEM/CRC32.  
  158. XThe remote sender must have been started prior to the
  159. Xexecution of this command.
  160. XFile transfer progress is
  161. Xpresented on a visual display.  
  162. XTo abort the transfer, press
  163. Xyour interrupt key (usually DEL unless reset with stty(C)).
  164. X
  165. XIf automatic ZMODEM frame detection is enabled and
  166. XECU is in the interactive mode,
  167. Xthis command is executed automatically.
  168. XAutomatic ZMODEM frame detection is NOT supported 
  169. Xduring procedure execution.
  170. X
  171. X
  172. X.*s 2 "SDNAME : select screen dump file name"
  173. X.DS L
  174. Xusage: sdname [<filename>]
  175. X.DE
  176. X
  177. XWhen the "cursor 5" key is pressed, the screen contents are
  178. Xdumped to a file.  By default, this file is named '~/.ecu/screen.dump'.
  179. XThis command either displays or changes the current screen
  180. Xdump file name, depending upon whether or not a argument
  181. Xis supplied.
  182. X
  183. XThe actions of this command have no effect on the
  184. Xoperation of the
  185. X.b scrdump
  186. Xprocedure command.
  187. X
  188. XSee the section titled "Screen Dump" for more information.
  189. X
  190. X.*s 2 "SK : send via C-Kermit"
  191. X.DS L
  192. Xusage: sk [<file-list>]
  193. X.DE
  194. X
  195. XThis command invokes C-Kermit to
  196. Xsend
  197. Xfiles. ECU searches the PATH list for 'kermit' or 'ckermit',
  198. Xexpecting to find Columbia University C-Kermit version 5A(173)
  199. Xor later.  The file ~/.kermrc must be set up to have any desired
  200. Xinitialization parameters you desire (refer to C-Kermit
  201. Xdocumentation for more information).
  202. XThe remote protocol must have been started prior to the
  203. Xexecution of this command.
  204. X
  205. XWARNING: until further notice, avoid suspending Kermit
  206. Xwith ^\Z.  ECU is totally unprepared to act as a job control
  207. Xprocess group leader.
  208. X
  209. XAfter entering the command, you are prompted as to whether
  210. Xor not file newline characters are to be converted to CR/LF.
  211. XIf you are transferring text files to a system which
  212. Xrequires CR/LF line terminators, you must answer yes to this
  213. Xquestion.  You should answer no when transferring binary
  214. Xfiles, such as executables, .arc files and the like.  You
  215. Xare prompted to enter a list of files to send, which may
  216. Xcontain one or more wildcard specifications.
  217. X
  218. X.*s 2 "SS : send via SEAlink"
  219. X.DS L
  220. Xusage: ss [<file-list>]
  221. X.DE
  222. X
  223. XThis command invokes a SEAlink file transmission protocol.
  224. X.DS L
  225. X
  226. X .--[ Send SEAlink ]-------- dir: /u1/src/ecu ------------------.
  227. X |                                                              |
  228. X |  File(s) to send:                                            |
  229. X |  ___________________________________________________________ |
  230. X |                                                              |
  231. X |    TAB:next  ^B:prev  END:perform transfer  ESC:abort        |
  232. X `-- enter file(s) to send -------------------------------------'
  233. X.DE
  234. X
  235. X.*s 2 "STat : verbose status summary"
  236. X.DS L
  237. Xusage: stat
  238. X.DE
  239. X
  240. XThis command displays comprehensive status and statistics.
  241. XExample display:
  242. X.DS L
  243. X % stat
  244. XDate: 08-17-1992 05:47:49 (UTC 09:47)
  245. XCommunications line: /dev/tty2b 9600-N-1 
  246. XXON/XOFF input on output on
  247. XHardware flow control configuration:
  248. XRTSFLOW off CTSFLOW off CRTSFL off
  249. XNot connected to a remote
  250. XDuplex: full  DCD watcher: off
  251. XConsole: /dev/ttyp7 80x43 <pty>
  252. XAcquired by ecuungetty: /dev/tty2b
  253. XCurrent directory: /u1/src/ecu
  254. XTotal chars transmitted: 234 (since CONNECT 142)
  255. XTotal chars received:    2278 (since CONNECT 1478)
  256. XNo function key set loaded
  257. XSession logging not active
  258. XBell notify is ON
  259. XCR conversion:  incoming CR  outgoing CR
  260. XKeyboard ESC/funckey time constant = 300 msec
  261. XPids: xmtr=20878 rcvr=20882 parent=19476 pgrp=19476
  262. X.DE
  263. X
  264. X.*s 2 "SX : send via XMODEM/CRC"
  265. X.DS L
  266. Xusage: sx [<file-name>]
  267. X.DE
  268. X
  269. XThis command invokes ecusz to send a file to the remote
  270. Xsystem using XMODEM/CRC.
  271. X
  272. XAfter entering the command, you are prompted as to whether
  273. Xor not file CR/LF characters are to be converted to
  274. Xnewlines.  If you are transferring text files from a system
  275. Xwhich contain CR/LF line terminators, you must answer yes
  276. Xto this question.  You should answer no when transferring
  277. Xbinary files, such as executables, .arc files and the like.
  278. X
  279. XYou are prompted to enter a filename to send.  File transfer
  280. Xprogress is presented on a visual display.  To abort the
  281. Xtransfer, press your interrupt key (usually DEL unless reset
  282. Xwith stty(C)).
  283. X.DS L
  284. X .--[ Send XMODEM/CRC ]----- dir: /u1/src/ecu -----------.
  285. X |                                                       |
  286. X |  File to send:                                        |
  287. X |  ____________________________________________________ |
  288. X |                                                       |
  289. X |  Binary: Y (no NL-CR/LF translation)                  |
  290. X |                                                       |
  291. X |   TAB:next  ^B:prev  END:perform transfer  ESC:abort  |
  292. X `-- enter file(s) to send ------------------------------'
  293. X.DE
  294. X
  295. X.*s 2 "SY : send via YMODEM Batch"
  296. X.DS L
  297. Xusage: sy [<file-list>]
  298. X.DE
  299. X
  300. XThis command invokes ecusz to send file(s) to the remote
  301. Xsystem using YMODEM/CRC.
  302. X
  303. XYou are prompted to enter filename(s) to send, which may
  304. Xconsist of one or more wildcard specifications.  File
  305. Xtransfer progress is presented on a visual display.  To
  306. Xabort the transfer, press your interrupt key (usually DEL
  307. Xunless reset with stty(C)).
  308. X.DS L
  309. X .--[ Send YMODEM/CRC ]----- dir: /u1/src/ecu -----------.
  310. X |                                                       |
  311. X |  File to send:                                        |
  312. X |  ____________________________________________________ |
  313. X |                                                       |
  314. X |  Binary: Y (no NL-CR/LF translation)                  |
  315. X |                                                       |
  316. X |   TAB:next  ^B:prev  END:perform transfer  ESC:abort  |
  317. X `-- enter file(s) to send ------------------------------'
  318. X.DE
  319. X
  320. X.*s 2 "SZ : send via ZMODEM/CRC32"
  321. X.DS L
  322. Xusage: sz [<file-list>]
  323. X.DE
  324. X
  325. XThis command sends files to the remote system using ZMODEM/CRC32.
  326. XThe remote receiver must have been started prior to the
  327. Xexecution of this command unless the remote has automatic
  328. XZMODEM frame detection.
  329. X
  330. XYou are prompted to enter filename(s) to send, which may
  331. Xconsist of one or more wildcard specifications.  File
  332. Xtransfer progress is presented on a visual display.  To
  333. Xabort the transfer, press your interrupt key (usually DEL
  334. Xunless reset with stty(C)).
  335. X
  336. XNote: not all ZMODEM receiving software supports transfer of only
  337. Xnewer files or of resuming interrupted transfers.  If the remote
  338. Xreceiver does not support the feature, it may skip (reject) all
  339. Xyour files.  Retry the transfer specifying 'N' to 'Transfer only
  340. Xnewer files' and/or 'Resume interrupted transfer'.
  341. X
  342. X.pp
  343. X.DS L
  344. X.--[ Send ZMODEM/CRC32 ]--- dir: /tmp ---------------------------.
  345. X|                                                                |
  346. X|  File(s) to send:                                              |
  347. X|  ckermit-5a-130                                                |
  348. X|                                                                |
  349. X|  Binary: Y (no NL-CR/LF translation)                           |
  350. X|  Overwrite destination files: Y                                |
  351. X|  Send full pathames:  N                                        |
  352. X|  Transfer only newer files:   N                                |
  353. X|  Resume interrupted transfer: N                                |
  354. X|  Window size: 0                                                |
  355. X|                                                                |
  356. X|     TAB:next  ^B:prev  END:perform transfer  ESC:abort         |
  357. X`-- enter file(s) to send ---------------------------------------'
  358. X`-- Y: no conversion, N: NLs converted to CR/LF -----------------'
  359. X`-- Y: overwrite, N: protect destination files ------------------'
  360. X`-- Y: full pathnames, N: strip directory portion from names ----'
  361. X`-- Y: resume transfer at remote file EOF, N send all -----------'
  362. X`-- Y: send only if source newer than destination, N send all ---'
  363. X`-- window size (max bytes sent before ACK required) 0 = stream -'
  364. X.DE
  365. X
  366. X.*s 2 "TIme : time of day"
  367. X.DS L
  368. Xusage: time
  369. X.DE
  370. X
  371. XThis command displays the local date and time as well as the
  372. Xcurrent UTC.
  373. X
  374. X.*s 2 "TTy : console tty name"
  375. X.DS L
  376. Xusage: tty
  377. X.DE
  378. X
  379. XThis command displays the current console tty name.
  380. X
  381. X
  382. X.*s 2 "XA : hex to ascii char"
  383. X.DS L
  384. Xusage: xa [<hex-val>]
  385. X.DE
  386. X
  387. X<hex-val> is a hexadecimal value between 0 and FF; the
  388. Xparity (sign) bit is stripped and the equivalent ASCII
  389. Xcharacter value is displayed.
  390. X
  391. XIf no argument is supplied, a table of control characters
  392. Xis printed containing decimal, octal, hex, ASCII identifiers
  393. Xand two-character control character identifier.
  394. X
  395. X
  396. X.*s 2 "XON : xon/xoff flow control"
  397. X.DS L
  398. Xusage: xon [<arg>]
  399. Xwhere <arg> is on    input and output flow control
  400. X               off   no flow control
  401. X               in    input flow control
  402. X               out   output flow control
  403. X.DE
  404. X
  405. XThis command enables or disables xon/xoff flow control.
  406. XIf the argument is omitted, the current flow control state is displayed.
  407. X
  408. X.*s 2 "! : execute shell"
  409. X.DS L
  410. Xusage: !
  411. X       !<command>
  412. X.DE
  413. X
  414. XThe '!' command is a shell escape.  The environment variable
  415. XSHELL is read to determine what shell program to execute
  416. X(e.g., /bin/sh, etc).  If '!' is entered by itself, an
  417. Xinteractive shell is started; press ^D to exit back to ECU.
  418. XIf <command> is supplied, it is executed by the shell with
  419. Xan immediate return to ECU.
  420. X
  421. SHAR_EOF
  422. echo 'File doc/_icmd.txt is complete' &&
  423. chmod 0644 doc/_icmd.txt ||
  424. echo 'restore of doc/_icmd.txt failed'
  425. Wc_c="`wc -c < 'doc/_icmd.txt'`"
  426. test 38646 -eq "$Wc_c" ||
  427.     echo 'doc/_icmd.txt: original size 38646, current size' "$Wc_c"
  428. rm -f _shar_wnt_.tmp
  429. fi
  430. # ============= doc/_intro.txt ==============
  431. if test -f 'doc/_intro.txt' -a X"$1" != X"-c"; then
  432.     echo 'x - skipping doc/_intro.txt (File already exists)'
  433.     rm -f _shar_wnt_.tmp
  434. else
  435. > _shar_wnt_.tmp
  436. echo 'x - extracting doc/_intro.txt (Text)'
  437. sed 's/^X//' << 'SHAR_EOF' > 'doc/_intro.txt' &&
  438. X.*s 1 "Introduction"
  439. X
  440. XECU (Extended Call Utility) is a personal and research
  441. Xcommunications program originally written for
  442. Xusers of SCO UNIX V.3.2/386 and XENIX V on 80286 and 80386 systems.
  443. XSupport for other systems has been added and further porting
  444. Xis possible with "minor" effort to other systems based on or
  445. Xsimilar to UNIX System V.
  446. XThis preliminary document describes ECU functionality and implementation
  447. Xfrom a technical point of view and provides at least rudimentary
  448. Xdocumentation for its features and commands.
  449. X
  450. XECU provides the classic terminal communications facility of passing
  451. Xkeyboard data to a serial line and incoming data to the computer video
  452. Xdisplay.  In addition, a dialing directory, a function key mapping
  453. Xfeature, and session logging are available.
  454. X
  455. XA very flexible procedure (script) language is also incorporated to
  456. Xautomate many communications tasks.  In addition to
  457. Xaugmenting interactive tasks, by using shell scripts and ECU
  458. Xprocedures, ECU can perform batch-style communications sessions
  459. Xin an entirely "unattended" fashion.
  460. XBecause of limitations of my nroff program, the procedure language
  461. Xis described in a separate document.
  462. X
  463. XECU presents to the host a flexible "ANSI" terminal type, accepting
  464. Xany valid video control sequences from MS-DOS or SCO documentation
  465. Xas of late 1990.  It also fares well, though imperfectly, with
  466. XSun and VT-100 in-band video control sequences.
  467. XStandards are great: everybody should have one, especially if
  468. Xthey call it "ANSI."
  469. XFor more information,
  470. Xrefer to the section below titled "ANSI Filter."
  471. X
  472. XThe program supports almost any local terminal (console) which
  473. Xcan be described in a termcap database entry.
  474. XFor more information, refer to "Supported Terminals."
  475. X
  476. XECU supports numerous file transfer protocols: as of this writing,
  477. XXMODEM, XMODEM/CRC, XMODEM-1K, YMODEM/CRC Batch, ZMODEM/CRC-16,
  478. XZMODEM/CRC-32, Kermit and SEAlink are supported.
  479. XFor more information, refer to the sections describing the
  480. Xindividual interactive and procedure file transfer commands.
  481. X
  482. XThis document is better than that supplied with
  483. XECU 2.0, but is still rough in many places.
  484. XIt attempts to get across to the inquiring mind how ECU
  485. Xworks.  In places, an understanding of the UNIX programming model, UNIX,
  486. XXENIX and UUCP constructs and asynchronous communications techniques
  487. Xis assumed.  In other places, the document goes into tedious detail
  488. Xabout the simplest of concepts.  A great deal of attention has been
  489. Xplaced in accurate and robust coding of the program.  Perhaps, time
  490. Xpermitting, one day I can say the same for this document.
  491. SHAR_EOF
  492. chmod 0644 doc/_intro.txt ||
  493. echo 'restore of doc/_intro.txt failed'
  494. Wc_c="`wc -c < 'doc/_intro.txt'`"
  495. test 2580 -eq "$Wc_c" ||
  496.     echo 'doc/_intro.txt: original size 2580, current size' "$Wc_c"
  497. rm -f _shar_wnt_.tmp
  498. fi
  499. # ============= doc/_p_cmd.txt ==============
  500. if test -f 'doc/_p_cmd.txt' -a X"$1" != X"-c"; then
  501.     echo 'x - skipping doc/_p_cmd.txt (File already exists)'
  502.     rm -f _shar_wnt_.tmp
  503. else
  504. > _shar_wnt_.tmp
  505. echo 'x - extracting doc/_p_cmd.txt (Text)'
  506. sed 's/^X//' << 'SHAR_EOF' > 'doc/_p_cmd.txt' &&
  507. X.*s 1 "Commands"
  508. X
  509. X.*s 2 "autorz"
  510. X
  511. Xusage: autorz [off | on]
  512. X
  513. XECU in the interactive mode (no procedure executing) can interpret a
  514. XSUB, 'B', '0', '0' receive data sequence as a ZMODEM ZRQINIT frame and
  515. Xautomatically begin a ZMODEM receive operation.  This command controls
  516. Xthis feature.  By default, this feature is turned on.
  517. X
  518. X.*s 2 "baud"
  519. X
  520. Xusage: baud <baud-int>
  521. X
  522. XThis command sets the baud rate for the attached line.
  523. XThe integer argument <baud-int> must be one of
  524. X110, 300, 600, 1200, 2400, 4800, 9600, 19200 and 38400.
  525. X
  526. XUsing the 'baud' procedure command in the ECU initialization
  527. Xprocedure "_rc.ep" serves as an exact analog of the -b command.  The
  528. X.B baud
  529. Xcommand with the
  530. X.B setline
  531. Xcommand gives you programatic control over the actual choice of the
  532. Xline and rate or the defaults for the setup screen, depending upon
  533. Xother options.  NOTE: using the baud command in _rc.ep will override
  534. Xany command line -b specification.
  535. X
  536. X.DS L
  537. XExample:
  538. X    baud 9600
  539. X    set $i0=2400; baud $i0
  540. X.DE
  541. X
  542. X.*s 2 "break"
  543. X
  544. Xusage: break
  545. X
  546. XThis command is used inside a
  547. X.B whilei
  548. Xor
  549. X.B whiles
  550. Xcompound statement to exit the loop.
  551. X
  552. XThis is not to be confused with the interactive command
  553. X"break" when sends an asynchronous BREAK signal.  Use the procedure
  554. Xcommand 
  555. X.B lbreak
  556. Xfor this purpose.
  557. X
  558. X.DS L
  559. XExample:
  560. X
  561. X    whilei 1=1 #forever unless break command executed
  562. X    {
  563. X        echo -n 'Answer yes or no: '
  564. X        set $s0=%cgets # get answer
  565. X        ifi %instr($s0,'y') == 0 set $i0 = 1; break
  566. X        ifi %instr($s0,'n') == 0 set $i0 = 0; break
  567. X        # got neither 'y' nor 'n' ... keep trying
  568. X    }
  569. X    # now $i0 = 1 if yes, 0 if no
  570. X.DE
  571. X
  572. XNOTE: further examples of
  573. X.B break
  574. Xusage may be found in the example for the
  575. Xelse
  576. Xcommand.
  577. X
  578. X.*s 2 "cd"
  579. X
  580. Xusage: cd <directory-path>
  581. X
  582. XThis command changes ECU's current working directory.
  583. XThe string argument <directory-path> may contain any
  584. Xdirectory pathname specification legal to be submitted to
  585. Xthe shell csh.  Wild card characters may be used, provided
  586. Xthe expansion produces only one pathname.
  587. X
  588. X.DS L
  589. XExample:
  590. X
  591. X    cd '~user/bin'
  592. X    cd %envvar('HOME')+'/bin'
  593. X.DE
  594. X
  595. X.*s 2 "clrx"
  596. X
  597. Xusage: clrx
  598. X
  599. XThis command clears  the attached line's transmitter XOFF state.
  600. XIssuing the command is the equivalent to receiving an XON from
  601. Xthe remote system.
  602. X
  603. X.*s 2 "cls"
  604. X
  605. Xusage: cls
  606. X
  607. XThis command clears the screen.
  608. X
  609. X.*s 2 "color"
  610. X
  611. X.DS L
  612. Xusage: color <normal-foreground> [<normal-background>]
  613. Xusage: color -r <reverse-foreground> [<reverse-background>]
  614. X.DE
  615. X
  616. XThis command changes the current normal or reverse video colors in a
  617. Xmanner similar to the setcolor(C) command.  It has no effect on systems
  618. Xusing other than an SCO multiscreen color monitor.  
  619. XIf the second (background) color is
  620. Xomitted, it is assumed to be black.
  621. X
  622. XThe command also forces normal video mode.  Refer to the
  623. X.B vidnorm
  624. Xand
  625. X.B vidrev
  626. Xcommands.
  627. XRefer also to the
  628. X.B vidcolor
  629. Xcommand.
  630. X
  631. X.DS L
  632. XColor names
  633. X   blue      magenta      brown      black
  634. X   lt_blue   lt_magenta   yellow     gray
  635. X   cyan      white        green      red
  636. X   lt_cyan   hi_white     lt_green   lt_red
  637. X.DE
  638. X.DS L
  639. XExample:
  640. X
  641. X    color lt_green  # normal video light green on black
  642. X    color -r red white # reverse video red on white
  643. X.DE
  644. X
  645. X.*s 2 "continue"
  646. X
  647. Xusage: continue
  648. X
  649. XThis command is used inside a
  650. X.B whilei
  651. Xor
  652. X.B whiles
  653. Xcompound statement to skip the remainder of any
  654. Xcommands in the loop and continue execution at the first
  655. Xcommand in the loop.
  656. X.DS L
  657. XExample:
  658. X
  659. X    send '' # send ENTER to get prompt
  660. X    whilei 1=1 # forever unless break command executed
  661. X    {
  662. X        lookfor -e 'login: ' # look for login prompt
  663. X        ifi $i0 == 0         # if we dont get prompt ...
  664. X        {
  665. X            send ''          # send ENTER again
  666. X            continue         # and look for login prompt
  667. X        }
  668. X        send $s_name         # send username
  669. X        lookfor -e 'Password:'
  670. X        send $s_password
  671. X        get -e 0 50          # wait 10 seconds for response
  672. X
  673. X        # if incorrect not found in response, ...
  674. X        if %instr($s0,'incorrect') < 0 # ... must have won
  675. X            break
  676. X
  677. X        # garbled line?: system will send another 'login: '
  678. X    }
  679. X
  680. X.DE
  681. X
  682. XNOTE: further examples of
  683. X.B continue
  684. Xusage may be found in the example for the
  685. X.B else
  686. Xcommand.
  687. X
  688. X.*s 2 "cursor"
  689. X
  690. Xusage: cursor <row> [<col>]
  691. X
  692. XThis command places the cursor at a specified position on
  693. Xthe video screen.  The top left of the scrren is row 0, column 0.
  694. XIf <col> is not specified, it is assumed 0 (left margin).
  695. X.DS L
  696. XExample:
  697. X
  698. X    cls
  699. X    $i0 = 5
  700. X    whilei $i5 < 12
  701. X    {
  702. X        cursor $i5
  703. X        echo 'This is line '+%itos($i5,2d)+' of the display'
  704. X    }
  705. X.DE
  706. X
  707. X.*s 2 "dcdwatch"
  708. X
  709. Xusage: dcdwatch [<dcdwatch-param>]
  710. X
  711. XThis command controls the DCD watcher.  The optional argument may be:
  712. X.DS L
  713. X   y or yes         enable DCD watcher
  714. X   n or no          disable DCD watcher
  715. X   t or terminate   terminate ECU on loss of DCD
  716. X.DE
  717. X
  718. XThe DCD watcher when enabled causes ECU to monitor the DCD line
  719. X(within the limits imposed by the OS with its CLOCAL=0 functionality).
  720. XWhen the watcher is on and DCD drops, ecu automatically performs
  721. Xthe action of the interactive or procedure
  722. X.B hangup
  723. Xcommand.  If the 't'erminate option is chosen, then after
  724. Xhangup processing is complete, the ECU program will terminate.  
  725. X
  726. XThe state of the watcher may be changed by the use of the dial
  727. Xcommand which uses a directory entry which changes the
  728. XDCD watcher status.
  729. X
  730. XThe DCD watcher depends upon the tty driver to return zero characters
  731. Xon a read when DCD is low when the termio flag CLOCAL is reset.
  732. XThe tty driver must ignore DCD if CLOCAL is set.
  733. XIf your system offers a "modem" and "direct" choice (by choice
  734. Xof filename), you probably need to use the "modem" choice for
  735. Xthis to work properly.  This decision is made properly for you
  736. Xon SCO if you are using SCO "standard" tty line
  737. Xnaming conventions.  This is true even though ECU appears to force
  738. Xa tty name with trailing upper case characters (modem) to 
  739. Xone with a lower case character (direct).
  740. X
  741. X.*s 2 "delline"
  742. X
  743. Xusage: delline
  744. X
  745. XThis command deletes the current line from the video display.
  746. X
  747. X.*s 2 "dial"
  748. X
  749. Xusage: dial <remote>
  750. X
  751. XThis command causes an outgoing call to be placed.  The string
  752. Xargument <remote> can take one of two forms: a numeric telephone
  753. Xnumber or an alphanumeric "logical" number or system name.
  754. X
  755. XA numeric phone number ('1(800)555-1212' or '2345678') must begin
  756. Xwith a digit and must consist entirely of digits, parentheses
  757. Xor hyphens.
  758. XIf a telephone number is supplied, the phone number is
  759. Xdialed; you must first have set the desired baud rate and
  760. Xparity using the 'baud' and 'parity' commands.
  761. X(If the last character of a telephone number is a dollar sign,
  762. Xit is removed and is replaced with the contents of the first line
  763. Xin ~/.ecu/credit.  See the description of the dialing directory.)
  764. X
  765. XIf a logical name is entered, the phone directory (managed by
  766. Xthe interactive
  767. X.B dial
  768. Xcommand) is searched;
  769. Xif the entry is found, the baud rate and parity
  770. Xis automatically set from values in the directory entry; then,
  771. Xthe number in the directory entry is dialed.
  772. X
  773. XUsing the dial command with a directory entry may change the 
  774. XDCD watcher (dcdwatch) status.
  775. XSee the section on the
  776. X.B dcdwatch
  777. Xcommand and the section titled "Choosing a Dialout Line" for
  778. Xmore information.
  779. X
  780. XWhen the
  781. X.B dial
  782. Xcommand returns, integer variable $i0 is set to a status code
  783. Xand string variable $s0 has a text message (the modem verbal
  784. Xresult code if the ECU dialer is used, a representation of
  785. Xthe return status code if a uucp dialer is used [see below]).
  786. X.DS L
  787. X.B
  788. XDial Command $i0 Status Codes
  789. X.R
  790. X
  791. X    0  successful connect
  792. X    1  failed to connect (call progress)
  793. X    2  dial interrupted by signal
  794. X    3  modem error (non responsive or commands rejected)
  795. X.DE
  796. X.DS L
  797. X.B
  798. XDial Command $s0 Status Messages (uucp dialer)
  799. X.R
  800. X
  801. X    CONNECT ####           #### = baud rate
  802. X    BUSY                   only some modems
  803. X    NO ANSWER              only some modems
  804. X    NO CARRIER             most generic "fail to connect"
  805. X    NO DIAL TONE           only some modems
  806. X    !Connect bad baud rate modem reported different rate
  807. X    !Interrupted           call interrupted by signal
  808. X    !Invalid arguments     ECU error
  809. X    !Invalid phone number  too long or bad characters
  810. X    !Ioctl error           should not be reported here
  811. X    !Line in use           should not be reported here
  812. X    !Line open error       should not be reported here
  813. X    !Modem Error           modem did not respond
  814. X
  815. XNote: if the ECU dialer is used, the actual modem result code
  816. Xis returned in $s0 or one of the following two strings:
  817. X
  818. X    !Interrupted           call interrupted by signal
  819. X    !Modem Error           modem did not respond
  820. X.DE
  821. X
  822. X.*s 2 "do"
  823. X
  824. Xusage: do <procname> [<arg> ...]
  825. X
  826. XThis command executes a procedure whose name appears as the command's
  827. Xfirst (string) argument.  One or more arguments (up to 19) may be passed
  828. Xto the called procedure; an argument may consist of any valid string
  829. Xexpression, provided, that, when expanded,  the argument does not
  830. Xexceed 256 characters in length.
  831. X
  832. XThe called procedure may read its arguments using the
  833. X.B %argv
  834. Xstring function.  %argv(0) is the name of the procedure.
  835. XThe quantity of arguments may be obtained using the
  836. X.B %argc
  837. Xinteger function.
  838. X
  839. X.DS L
  840. XExample:
  841. X
  842. X    do 'proc' %rname %date+' '+%time %argv(0)
  843. X
  844. XNote: in this example, the called procedure is passed the name
  845. Xof the calling procedure as the last argument.
  846. X.DE
  847. X
  848. X.*s 2 "duplex"
  849. X
  850. X.DS L
  851. Xusage: duplex full | half
  852. X       duplex 'full' | 'half'
  853. X.DE
  854. X
  855. XThis command specifies whether or not ECU is to locally echo
  856. Xcharacters typed by you at the keyboard.  The overwhelming
  857. Xmajority of remote systems provide the echo function, in
  858. Xwhich case full duplex must be used.  For the rare occasions
  859. Xwhen the remote system does not echo your keyboard input,
  860. Xsetting half duplex will allow you to see what you are
  861. Xtyping.
  862. X
  863. XWhen communicating with another terminal in a "teletype
  864. Xconversation", setting half duplex is generally required.
  865. XIn such cases, use of the interactive
  866. X.B nl ,
  867. X.B nlin
  868. Xand
  869. X.B nlout
  870. Xcommands may also be required.
  871. X.DS L
  872. XExample:
  873. X
  874. X    duplex full
  875. X    $s0 = 'full'; duplex $s0
  876. X.DE
  877. X
  878. X
  879. X.*s 2 "echo"
  880. X
  881. Xusage: echo [-n] <string>
  882. X
  883. XThis command prints the contents of the string argument <string>
  884. Xon the screen.  If the -n switch is not present, a newline follows
  885. Xthe output of <string>.
  886. X.DS L
  887. XExample:
  888. X
  889. X    echo 'Procedure '+%argv(0)+' executing at '+%time
  890. X    echo -n 'Enter your first name: '; $s0 = %cgets
  891. X.DE
  892. X
  893. X.*s 2 "eeol"
  894. X
  895. Xusage: eeol
  896. X
  897. XThis command erases the video display to the end of the line.
  898. X
  899. X.*s 2 "else"
  900. X
  901. X.DS L
  902. Xusage: else <statement>
  903. X
  904. X       else
  905. X           <statement>
  906. X
  907. X       else
  908. X       {
  909. X            any kind and number of statements
  910. X       }
  911. X
  912. X       else <if> <statement>
  913. X
  914. X       else <if>
  915. X       {
  916. X            any kind and number of statements
  917. X       }
  918. X
  919. X.DE
  920. X
  921. XThis statement may follow an
  922. X.B ifi
  923. Xor
  924. X.B ifs 
  925. Xcommand to specify one or more statements to be executed if
  926. Xthe if-type command condition is false.  Else commands may be
  927. Xchained together in the traditional structured language manner.
  928. X
  929. XFor the purposes of describing this command, <statement> is
  930. Xany single or compound statement
  931. X.B NOT
  932. Xcontaining a
  933. X.B whilei
  934. Xor
  935. X.B whiles
  936. Xcommand.
  937. XIf you wish to have a while-type command executed as part of an
  938. X.B else
  939. Xcondition, the while must occur within braces ("{}").
  940. X
  941. X<if> is an
  942. X.B ifi
  943. Xor
  944. X.B ifs
  945. Xcommand followed by an <if-condition> (see the description of the
  946. X.B ifi
  947. Xor
  948. X.B ifs
  949. Xcommands below).
  950. X.DS L
  951. XExample:
  952. X
  953. X#+------------------------------------------------------
  954. X# finger.ep - procedure to send 'finger' to remote
  955. X# BSD Unix system; print resulting lines in different
  956. X# colors: uucp logins green, root red, others cyan
  957. X#-------------------------------------------------------
  958. X
  959. X    mkvar $icolor; $icolor = %colors
  960. X    mkvar $itimeout
  961. X    $itimeout = 50     # timeout for first line 5 secs
  962. X    send 'ps -aux'     # send command, but do not echo
  963. X    lookfor '\en' 40    # swallow command
  964. X    whilei 1==1        # forever, or until break
  965. X    {
  966. X        lgets 0 $itimeout 1 '\en' #get a line
  967. X        ifi $i0 = 0 break #if no chaacters read
  968. X        $itimeout = 10 #wait 1 sec for later lines
  969. X
  970. X        ifi %instr($s0,'% ') >= 0 # if csh prompt seen
  971. X            break                 # exit while loop
  972. X        else ifi %instr($s0,'Login') >= 0
  973. X            color gray
  974. X        else ifi %instr($s0,'root') >= 0
  975. X            color red
  976. X        else ifi %instr($s0,'uucp') >= 0
  977. X            color green
  978. X        else color cyan
  979. X        echo $s0
  980. X    }
  981. X    icolor $icolor #restore entry colors
  982. X    send ''        #force a new prompt from remote
  983. X
  984. X.DE
  985. X
  986. X.*s 2 "exec"
  987. X
  988. Xusage: exec <string>
  989. X
  990. XThis function executes a string as a procedure statement.
  991. XArgument <string> must contain an ecu statement exactly as
  992. Xmight appear on a procedure line, with a few exceptions.
  993. X
  994. X.DS L
  995. X1. There may be no label: the first command may 
  996. X   start in column one.
  997. X2. You should not execute a goto, gosub or return.
  998. X3. You should not code if, while or compound statement
  999. X   brackets.
  1000. X.DE
  1001. X
  1002. XYou are on your honor with regard to items 2 and 3 above.
  1003. XIf you stretch it, it will break.
  1004. X
  1005. X.DS L
  1006. XExample:
  1007. X
  1008. X    $s20 = 'Home';   $s30 = '^H' 
  1009. X    $s21 = 'End';    $s31 = '^E'
  1010. X    $s22 = 'F1';     $s32 = '^A'
  1011. X    $s23 = 'F2';     $s33 = '^B'
  1012. X    $i10 = 0
  1013. X    whilei $i0 < 4
  1014. X    {
  1015. X        $s0 = 'fkmap '+$s[20+$i10]+' '+$s[30+$i10]
  1016. X        exec $s0
  1017. X        $i10 = $i10 + 1
  1018. X    }
  1019. X.DE
  1020. X        
  1021. X.*s 2 "exit"
  1022. X
  1023. Xusage: exit [<status>]
  1024. X
  1025. XThis command causes an abrupt termination of the ECU program.
  1026. XAny existing connection with a remote system
  1027. Xis terminated immediately.
  1028. XIf no integer argument <status> is found, ECU exits
  1029. Xwith a program exit status of 0.
  1030. XIf <status> is found and the value is zero, then ECU exits
  1031. Xwith a program exit status of 0.
  1032. XIf <status> non-zero,its value must be in the range of 1 to 31,
  1033. Xand ECU exits
  1034. Xwith a program exit status of 192 plus <status>.
  1035. XThis feature allows batch executions of ECU by shell script
  1036. Xto detect user-determined ECU execution status.
  1037. XSee the section titled "Exit Codes".
  1038. X
  1039. X.*s 2 "expresp"
  1040. X
  1041. Xusage: expresp [-v[v...]] <exp-resp-str> [<timeout_msecs>]
  1042. X
  1043. XThis command emulates the uuchat function as described in the
  1044. XSCO HDB UUCP documentation and in the /usr/lib/uucp/Dialers
  1045. Xfile.
  1046. X
  1047. X-v causes the expect-respond conversation between ECU and the
  1048. Xremote system to be displayed on the screen.  This switch is
  1049. Xautomatically enabled if procdedure tracing is enabled.
  1050. X
  1051. XMultiple v's (e.g., -vv, -vvv) up to 3 'v's produce
  1052. Xmore verbose debug output. -vv causes each base level
  1053. Xexpect and respond string to be displayed. -vvv causes
  1054. Xa hexadecimal dump of each  interpreted expect string to be
  1055. Xdisplayed.
  1056. X
  1057. XThe majority of procedure tracing features use the current trace
  1058. Xstate (from the
  1059. X.B ptrace
  1060. Xcommand setting) as a binary condition.  That is, either tracing is done
  1061. Xor not.  However,
  1062. X.B expresp
  1063. Xadds the tracing level to the number of -v switches to determine its
  1064. Xverbosity level.
  1065. X
  1066. XEscape sequences allow you to insert special or variable
  1067. Xinformation in your expect and respond strings.  Escape sequences
  1068. Xbegin with either the backslash or the tilde.  NOTE: remember to
  1069. Xuse two backslashes inside a literal string constant to get one
  1070. Xbackslash in the resulting string.  The procedure language's
  1071. Xstring parser has it's own use for a single backslash followed by
  1072. Xanother character.  For instance:
  1073. X
  1074. X.DS L
  1075. X    set $s0='\e\eM' sets $s00 to '\eM'
  1076. X.DE
  1077. X
  1078. XSome of the escape sequnces have meaning in both expect and respond
  1079. Xtokens while others have a use in only of of the two types.
  1080. X
  1081. X.DS L
  1082. X   Meaning of the escape sequences:
  1083. X   \eD - current phone number
  1084. X   \eE - turn on echo checking when sending (for slow devices)
  1085. X   \eK - send a BREAK
  1086. X   \eM - turn on line CLOCAL 
  1087. X   \eN - null byte (same as \e000)
  1088. X   \eT - current phone number with Dialcodes and
  1089. X         character translation
  1090. X   \ec - append no new-line to send string (must be last
  1091. X            "character" in a send string)
  1092. X   \ed - delay (2 seconds) 
  1093. X   \ee - turn off echo checking when sending
  1094. X   \em - turn off line CLOCAL 
  1095. X   \en - send or expect new-line
  1096. X   \ep - pause (approximately 1/4-1/2 second delay)
  1097. X   \er - send or expect carriage return
  1098. X   \e\e - send or expect backslash (same as \e134)
  1099. X   \e~ - send or expect tilde (same as \e176)
  1100. X   \e### - send or expect character respresenting three
  1101. X           character octal value ### (*MUST* be three digits
  1102. X           with leading zeroes as necessary)
  1103. X   ~m[##] - set expect timeout to ## milliseconds (NOT
  1104. X            SUPPORTED BY DIALERS; SEE BELOW)
  1105. X   ~n[##] - nap ## milliseconds (NOT SUPPORTED BY DIALERS;
  1106. X           SEE BELOW)
  1107. X   ~t[##] - set expect timeout to ## seconds (NOT SUPPORTED
  1108. X            BY DIALERS; SEE BELOW)
  1109. X   Speed - Hayes-style CONNECT handler (as sole contents of
  1110. X           an expect string, equivalent to using CONNECT)
  1111. X.DE
  1112. X
  1113. X<timeout_msecs> specifies an optional timeout in milliseconds
  1114. Xfor waiting on expect strings;  it defaults to 10,000 milliseconds
  1115. X(10 seconds).
  1116. XThe resolution for timeouts is limited to the basic tick time of
  1117. Xyour system (HZ, 10 msec for UNIX/386 3.2.0,
  1118. X16 (1000/60) msec for 3.2.1 (ODT 1.0) and 3.2v2 (ODT 1.1),
  1119. Xback to 10 msec for 3.2v4 (ODT 2.0) and
  1120. X20 msec for XENIX/386 and XENIX/286). Whew!
  1121. XThe timeout for 'Speed' expects is fixed at 90 seconds.
  1122. X
  1123. X~t[##] and ~m[##] may appear at the beginning of an expect portion
  1124. Xof a script.  They set the expect timeout delay in seconds and
  1125. Xmilliseconds, respectively.  The ## is a decimal number; if it is
  1126. Xspecified <= 0, there will be no delay.  The initial timeout set
  1127. Xfor each execution of the expresp command is 10 seconds.  The
  1128. Xtimeout period remains as you set it for the remainder of the
  1129. Xscript unless you change it again.
  1130. X
  1131. X.DS L
  1132. XExamples:
  1133. X
  1134. X    ~t[20]gin:      look for "gin:" for 20 seconds
  1135. X    ~m[500]\001     look for STX for 500 milliseconds
  1136. X    "" ~t[3]gin:--gin: uname ~t[10]word: secret
  1137. X.DE
  1138. X
  1139. X~n[##] may appear anywhere in a respond portion of a script.  
  1140. XIt causes ECU to nap the number of milliseconds specified
  1141. Xby the decimal ## argument.  This function was served by \em prior
  1142. Xto ECU 3.20.  Addition of SVR4 \eM and \em necessitated
  1143. Xthe change.
  1144. X
  1145. X.DS L
  1146. XExample:
  1147. X
  1148. X    a~n[20]b~n[20]c   send "abc" with 20 msec between each
  1149. X                      character
  1150. X.DE
  1151. X
  1152. X
  1153. XInteger variable $i0 is set to one if the expect-respond script 
  1154. Xfails, else it is set to 0.
  1155. X
  1156. X.*s 2 "fchmod"
  1157. X
  1158. Xusage: fchmod <mode> <filenum>
  1159. X
  1160. XThis command sets the mode of <filenum> to <mode>.
  1161. XThe <mode> argument takes one of two forms, a nine-character
  1162. Xmode string (e.g., 'rwxr-xr-x') or an integer value (0755).
  1163. XThe <filenum> argument is either a string value forming a
  1164. Xfilename or an integer file number representing a file opened with the
  1165. X.B fopen
  1166. Xcommand.
  1167. X
  1168. XThe command sets $i0 = 0 if successful, else to the
  1169. X.B errno
  1170. Xfrom the associated system call (refer to the 
  1171. X.B %errstr
  1172. Xstring function and/or /usr/include/sys/errno.h).
  1173. X
  1174. X.DS L
  1175. XExample:
  1176. X
  1177. X    fopen 1 '/tmp/123'; fchmod 'rwxrwxrwx' 1
  1178. X    fchmod 'rwxrwxrwx' '/tmp/123'
  1179. X    fopen 1 '/tmp/123'; fchmod 0777 1
  1180. X    $i0 = 0777; fchmod $i0 '/tmp/123'
  1181. X
  1182. XAll of the above example result in the same result.
  1183. X.DE
  1184. X
  1185. X.*s 2 "fclose"
  1186. X
  1187. Xusage: fclose <filenum>
  1188. X
  1189. XThis command closes <filenum>.
  1190. XThe <filenum> argument is an
  1191. Xinteger file number representing a file opened with the
  1192. X.B fopen
  1193. Xcommand.
  1194. X
  1195. XThe command is ignored if <filenum> is not open.
  1196. XNo integer variable is modified by
  1197. X.I fclose .
  1198. X
  1199. X.DS L
  1200. XExample:
  1201. X
  1202. X    fclose 1
  1203. X.DE
  1204. X
  1205. X.*s 2 "fdel"
  1206. X
  1207. Xusage: fdel <filenum>
  1208. X
  1209. XThis command removes a file.
  1210. X
  1211. XThe command sets $i0 = 0 if successful, else to the
  1212. X.B errno
  1213. Xfrom the associated system call (refer to the 
  1214. X.B %errstr
  1215. Xstring function and/or /usr/include/sys/errno.h).
  1216. X
  1217. X.DS L
  1218. XExample:
  1219. X
  1220. X    fdel '/tmp/123'
  1221. X.DE
  1222. X
  1223. X.*s 2 "fgetc"
  1224. X
  1225. Xusage: fgetc <filenum> <destination>
  1226. X
  1227. XThis command reads a character from <filenum>.
  1228. XThe <filenum> argument is an
  1229. Xinteger file number representing a file opened with the
  1230. X.B fopen
  1231. Xcommand.
  1232. X
  1233. XThe argument <destination> is either a string variable
  1234. Xor an integer variable.
  1235. XIf the file has reached end of file: an integer variable
  1236. Xreceives -1; a string variable is returned null.
  1237. XOtherwise, the character's numeric value (0-255) is placed
  1238. Xin an integer variable or a string variable is returned with a
  1239. Xlength of one with the file character as its only character.
  1240. X
  1241. X.DS L
  1242. XExample:
  1243. X
  1244. X    fgetc 1 $s0
  1245. X    fgetc 1 $i_input
  1246. X.DE
  1247. X
  1248. X.*s 2 "fgets"
  1249. X
  1250. Xusage: fgets <filenum> <strvar>
  1251. X
  1252. XThis command reads a character from <filenum>.
  1253. XThe <filenum> argument is an
  1254. Xinteger file number representing a file opened with the
  1255. X.B fopen
  1256. Xcommand.
  1257. X
  1258. XThe argument <strvar> is a string variable.
  1259. XIf the file has reached end of file, <strvar> is returned null and
  1260. Xinteger variable $i0 is set to 1.
  1261. XOtherwise, the <strvar> receives input from the file minus
  1262. Xthe trailing newline and $i0 is returned zero.
  1263. X
  1264. X.DS L
  1265. XExample:
  1266. X
  1267. X    fgets 1 $s0
  1268. X.DE
  1269. X
  1270. X.*s 2 "fkey"
  1271. X
  1272. X.DS L
  1273. Xusage: fkey <str>
  1274. X       fkey -r
  1275. X.DE
  1276. X
  1277. XThis command selects a function key definition from the ~/.ecu/keys
  1278. Xfile.  The -r version resets to the original defaults, plust
  1279. Xloads any entry in keys named "default".
  1280. X
  1281. X.*s 2 "fkmap"
  1282. X.DS L
  1283. Xusage: fkmap 
  1284. X       fkmap <keyname>
  1285. X       fkmap <keyname> <keylist>
  1286. X       fkmap -r
  1287. X       fkmap -s <file>
  1288. X.DE
  1289. X
  1290. XThis command manages the mechanism ECU uses to recognize function
  1291. Xkeys when they are entered at the console.  Entering the command
  1292. Xwith no arguments displays the current mapping in funckeymap format.
  1293. X
  1294. XIf supplied, the first argument to the command must be the
  1295. Xrecognized name of a function key from the list:
  1296. X.DS L
  1297. X F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12
  1298. X Home End PgUp PgDn CUP CUL CU5 CUR CUD
  1299. X.DE
  1300. XThe case of the entered argument is unimportant.
  1301. X
  1302. XIf only one argument is supplied, the mapping for the specified key
  1303. Xis displayed.  If more than one argument is supplied, the keyboard
  1304. Xmapping is changed.  Arguments 2-n are character code specifiers
  1305. Xin the format used to define a funckeymap entry.
  1306. X.B WARNING :
  1307. XIf found to be syntactically correct, a mapping change
  1308. Xis installed immediately.  If incorrect mapping of the HOME
  1309. Xkey is requested, you may lose control of ECU.
  1310. X
  1311. XThe -r form rereads the original funckeymap definition (as
  1312. Xat program invocation), reseting the mapping.  The -s switch
  1313. Xsaves the current mapping to <file>.
  1314. X
  1315. XNote: the fkmap command line must contain literal text.
  1316. XNo variable or expression expansions are not done.
  1317. X
  1318. X.DS L
  1319. XExamples:
  1320. X
  1321. X    fkmap f10       display F10 mapping
  1322. X    fkmap Home ^Z   map Home to ^Z
  1323. X                    after this command, type ^Z for Home
  1324. X.DE
  1325. X
  1326. X.*s 2 "flush"
  1327. X
  1328. Xusage: flush
  1329. X
  1330. XThis command causes any characters received by the system
  1331. Xfrom the line, but not yet read by the procedure to be "forgotten"
  1332. Xor flushed.
  1333. X
  1334. X.*s 2 "fopen"
  1335. X
  1336. Xusage: fopen [-<mode>] <filenum> <filename>
  1337. X
  1338. XThis command opens a file named by the string argument <filename>
  1339. Xand associates it with the user-chosen file number <filenum> (which
  1340. Xmust be an integer value between 0 and 4, inclusive).
  1341. X
  1342. XThe argument switches govern how a file is opened and must be chosen
  1343. Xfrom this list:
  1344. X.VL 15 4
  1345. X.LI -r
  1346. XThe file is opened read-only; if it does not
  1347. Xexist, an error occurs.
  1348. X.LI -r+
  1349. XThe file is opened for reading and writing; if it does not
  1350. Xexist, an error occurs.
  1351. X.LI -w
  1352. XThe file is opened for writing (any previous contents
  1353. Xof the file are lost); if it does not
  1354. Xexist, it is created.
  1355. X.LI -w+
  1356. XThe file is opened for reading and writing (any previous contents
  1357. Xof the file are lost); if it does not
  1358. Xexist, it is created.
  1359. X.LI -a
  1360. XThe file is opened for appending (writes to the file
  1361. Xare added to the previous file contents); if it does not
  1362. Xexist, it is created.
  1363. XAll writes are appended to the file (the
  1364. X.B fseek
  1365. Xcommand has no effect).
  1366. X.LE
  1367. X
  1368. XThe switches argument may be omitted; in such cases,
  1369. Xthe file is opened as though '-r' had been supplied.  However,
  1370. Xif procedure tracing is enabled (see the description of the
  1371. Xinteractive and procedure command
  1372. X.B ptrace ),
  1373. Xa warning message will be issued.
  1374. X
  1375. XThe command sets $i0 = 0 if successful, else to the
  1376. X.B errno
  1377. Xfrom the associated system call (refer to the 
  1378. X.B %errstr
  1379. Xstring function and/or /usr/include/sys/errno.h).
  1380. X.DS L
  1381. XExample:
  1382. X
  1383. X    fopen 0 -r '/etc/passwd'
  1384. X    fopen 1 -w+ '/tmp/123'
  1385. X    fopen 2 -a 'tranact.log'
  1386. X.DE
  1387. X
  1388. X.*s 2 "fputc"
  1389. X
  1390. Xusage: fputc <filenum> <char>
  1391. X
  1392. XThis command writes character <char> into <filenum>.
  1393. XThe <filenum> argument is an
  1394. Xinteger file number representing a file opened with the
  1395. X.B fopen
  1396. Xcommand.
  1397. XArgument <char> is a integer value of which the lower eight
  1398. Xbits are used or a string value of which the first character is used.
  1399. X
  1400. XIf a write error occurs, procedure execution is terminated.
  1401. X.DS L
  1402. XExample:
  1403. X
  1404. X    $s0='abc'; fputc 1 $s0        writes 'a'
  1405. X    $i0=0x30 ; fputc 1 $i0        writes '0'
  1406. X.DE
  1407. X
  1408. X.*s 2 "fputs"
  1409. X
  1410. Xusage: fputs [-n] <filenum> <str>
  1411. X
  1412. XThis command writes the string <str> into <filenum>.
  1413. XThe <filenum> argument is an
  1414. Xinteger file number representing a file opened with the
  1415. X.B fopen
  1416. Xcommand.
  1417. X
  1418. XIf the switch '-n' is omitted, a newline is appended after <str>
  1419. Xin the file; if present, no newline is written.
  1420. X
  1421. XIf a write error occurs, procedure execution is terminated.
  1422. X.DS L
  1423. XExample:
  1424. X
  1425. X    $s0='abc'; fputc 1 $s0        writes 'a'
  1426. X.DE
  1427. X
  1428. X.*s 2 "fseek"
  1429. X
  1430. Xusage: fseek <filenum> <position>
  1431. X
  1432. XThis command sets the file position of <filenum> to <position>,
  1433. Xan integer value.
  1434. XThe corresponding integer function
  1435. X.B %ftell
  1436. Xmay be used to determine the current file position.
  1437. X
  1438. X.B Note :
  1439. Xif <filenum> is open for append ('-a'), then the
  1440. X.B fseek
  1441. Xcommand will have no effect.
  1442. X
  1443. X.*s 2 "getf"
  1444. X
  1445. X.DS L
  1446. Xusage: getf -x <int-var-spec> <offset>
  1447. X
  1448. Xwhere: -x ==
  1449. X   -b byte
  1450. X   -w word (little-endian)
  1451. X   -W word (big-endian)
  1452. X   -l 32-bits (little-endian)
  1453. X   -L 32-bits (big-endian)
  1454. X.DE
  1455. X
  1456. X.*s 2 "gosub"
  1457. X
  1458. Xusage: gosub <label>
  1459. X
  1460. XThis command transfers control of procedure to a statement
  1461. Xother than the one immediately following.  The <label>
  1462. Xargument may be literal text or may be a string, allowing
  1463. Xa "computed gosub" feature.
  1464. X
  1465. XWhen the next return statement is executed, control is
  1466. Xreturned to the 
  1467. Xnext statement after the gosub.
  1468. X
  1469. X.DS L
  1470. XExample:
  1471. X
  1472. X    gosub GET_NEXT
  1473. X    gosub 'GET_NEXT'
  1474. X    gosub 'GET'+'_NEXT'
  1475. X    $s0 = 'GET_NEXT'; gosub $s0
  1476. X    $s0 = 'NEXT'; gosub 'GET_'+$s0
  1477. X
  1478. XNote: all the above examples cause transfer to the label GET_NEXT.
  1479. X.DE
  1480. X.DS L
  1481. XA switch or case function of sorts may be implemented by something like:
  1482. X
  1483. X    #$i0 has been set to the "switch" value
  1484. X    ifi $i0 < 0 || $i0 > 2  # avoid gosub label not found
  1485. X    {
  1486. X        echo 'bad my_case state value'+%itos($i0)
  1487. X        DO SOMETHING LIKE DIE OR DUMP VARS AND DIE
  1488. X    }
  1489. X    $s0 = 'my_case_'+%itos($i0,03)
  1490. X    gosub $s0
  1491. X
  1492. Xmy_case_000
  1493. X    echo 'handle case 0'
  1494. X    return
  1495. X
  1496. Xmy_case_001
  1497. X    echo 'handle case 1'
  1498. X    return
  1499. X
  1500. Xmy_case_002
  1501. X    ifi $i_already_did_002
  1502. X    {
  1503. X        echo 'whoops'
  1504. X        return
  1505. X    }
  1506. X    echo 'handle case 2'
  1507. X    $i_already_did_002 = 1
  1508. X    return
  1509. X.DE
  1510. X
  1511. X.*s 2 "gosubb"
  1512. X
  1513. Xusage: gosubb <label>
  1514. X
  1515. XThis command serves the same function as the
  1516. X.B gosub
  1517. Xcommand except the programmer is signifying that the label
  1518. Xis
  1519. X.B b ehind
  1520. Xthe current statement, resulting in slightly faster execution.
  1521. X(The label is not REQUIRED to be at any specific location
  1522. Xin the procedure relative to the
  1523. X.B gosubb
  1524. Xstatement.)
  1525. X
  1526. X.*s 2 "goto"
  1527. X
  1528. Xusage: goto <label>
  1529. X
  1530. XThis command transfers control of procedure to a statement
  1531. Xother than the one immediately following.  The <label>
  1532. Xargument may be literal text or may be a string, allowing
  1533. Xa "computed goto" feature.
  1534. X.DS L
  1535. XExample:
  1536. X
  1537. X    goto GET_NEXT
  1538. X    goto 'GET_NEXT'
  1539. X    goto 'GET'+'_NEXT'
  1540. X    $s0 = 'GET_NEXT'; goto $s0
  1541. X    $s0 = 'NEXT'; goto 'GET_'+$s0
  1542. X.DE
  1543. XNote: all the above examples cause transfer to the label GET_NEXT.
  1544. X
  1545. X.*s 2 "gotob"
  1546. X
  1547. Xusage: gotob <label>
  1548. X
  1549. XThis command serves the same function as the
  1550. X.B goto
  1551. Xcommand except the programmer is signifying that the label
  1552. Xis
  1553. X.B b ehind
  1554. Xthe current statement, resulting in slightly faster execution.
  1555. X(The label is not REQUIRED to be at any specific location
  1556. Xin the procedure relative to the
  1557. X.B gotob
  1558. Xstatement.)
  1559. X
  1560. X.*s 2 "hangup"
  1561. X
  1562. Xusage: hangup
  1563. X
  1564. XThis command causes Data Terminal Ready (DTR)
  1565. Xto be dropped momentarily, causing (hopefully)
  1566. Xthe termination of any current connection
  1567. Xto a remote system. 
  1568. XThis command is only effective if the attached Data Communications
  1569. XEquipment is configured
  1570. Xto terminate its connection on loss of DTR.
  1571. X
  1572. XIf no line is attached, the command is ignored (a warning
  1573. Xis generated if procedure tracing is enabled).
  1574. X
  1575. X.*s 2 "hexdump"
  1576. X
  1577. X.DS L
  1578. Xusage: hexdump [-s] <str>
  1579. X       hexdump -t[s] <str1> <str>
  1580. X
  1581. X<str> buf to dump
  1582. X<str1> title (if -t)
  1583. X-s short (terse) dump
  1584. X.DE
  1585. X
  1586. XThis command prints a hexadecimal dump of <str> on the screen
  1587. X(and to the procedure log file, if logging enabled with the
  1588. X.B ptrace
  1589. Xcommand).
  1590. X
  1591. XThe switch '-t' signifies that <str1> is a title to be printed
  1592. X.DS L
  1593. XExample:
  1594. X
  1595. X    $s0='The quick brown fox jumped over the lazy dog\e's back'
  1596. X    hexdump -t 'Example hex dump' $s0
  1597. X---------------------------- Example hex dump ----------------------------
  1598. X0000  54 68 65 20 71 75 69 63 6B 20 62 72 6F 77 6E 20 | The quick brown  |
  1599. X0010  66 6F 78 20 6A 75 6D 70 65 64 20 6F 76 65 72 20 | fox jumped over  |
  1600. X0020  74 68 65 20 6C 61 7A 79 20 64 6F 67 27 73 20 62 | the lazy dog's b |
  1601. X0030  61 63 6B                                        | ack              |
  1602. X.DE
  1603. X.DS L
  1604. X    hexdump %left($s0,9)
  1605. X0000  54 68 65 20 71 75 69 63 6B                      | The quick        |
  1606. X.DE
  1607. X.DS L
  1608. X    hexdump -ts 'Example hex dump' %left($s0,9)
  1609. XExample hex dump
  1610. X0000  54 68 65 20 71 75 69 63 6B | The quick |
  1611. X.DE
  1612. X.DS L
  1613. X    hexdump -s %left($s0,9)
  1614. X0000  54 68 65 20 71 75 69 63 6B | The quick |
  1615. X.DE
  1616. X
  1617. X.*s 2 "home"
  1618. X
  1619. Xusage: home
  1620. X
  1621. XThis command homes the video cursor.
  1622. X
  1623. X.*s 2 "icolor"
  1624. X
  1625. Xusage: icolor <int-colors>
  1626. X
  1627. XThis command sets the normal and reverse foreground
  1628. Xand background colors according to <int-colors>, an integer
  1629. Xvalue in the format as that returned by the
  1630. X.B %colors
  1631. Xinteger function.
  1632. X
  1633. XThis command is provided primarily to be able to save the color
  1634. Xstate, modify it temporarily and then restore it.
  1635. X.DS L
  1636. XExample:
  1637. X
  1638. X    mkvar $icolor_save; $icolor_save = %colors
  1639. X    color red; echo 'Connection seems to be dead'
  1640. X    icolor $icolor_save # restore previous colors
  1641. X.DE
  1642. X
  1643. X.*s 2 "ifi"
  1644. X
  1645. X.DS L
  1646. Xusage: ifi <int> <rel-op> <int> <statement>
  1647. X       ifi <int> <rel-op> <int>
  1648. X           <statement>
  1649. X       ifi <int> <rel-op> <int>
  1650. X       {
  1651. X           any kind or number of statements
  1652. X       }
  1653. X.DE
  1654. X
  1655. XThis command selectively executes one or more statements
  1656. Xbased on a test of two integer quantities.  See the
  1657. Xdescription of the
  1658. X.B break ,
  1659. X.B continue ,
  1660. Xand
  1661. X.B else
  1662. Xcommmands for examples of how the command is used.
  1663. X
  1664. X.*s 2 "ifs"
  1665. X
  1666. X.DS L
  1667. Xusage: ifs <str> <rel-op> <str> <statement>
  1668. X       ifs <int> <rel-op> <int>
  1669. X           <statement>
  1670. X       ifs <int> <rel-op> <int>
  1671. X       {
  1672. X           any kind or number of statements
  1673. X       }
  1674. X.DE
  1675. X
  1676. XThis command selectively executes one or more statements
  1677. Xbased on a test of two string values.  See the
  1678. Xdescription of the
  1679. X.B break ,
  1680. X.B continue ,
  1681. Xand
  1682. X.B else
  1683. Xcommmands
  1684. Xand many other examples throughout the document,
  1685. Xfor examples of how the command is used.
  1686. X
  1687. X.*s 2 "insline"
  1688. X
  1689. Xusage: insline
  1690. X
  1691. XThis command inserts a line onto the video screen at the current line.
  1692. X
  1693. X.*s 2 "lbreak"
  1694. X
  1695. Xusage: lbreak
  1696. X
  1697. XThis command transmits a break to the remote system.
  1698. XIt is the procedure command analogous to the
  1699. X.B break
  1700. Xinteractive command.
  1701. X
  1702. X.*s 2 "lgets"
  1703. X
  1704. X.DS L
  1705. Xusage: lgets [-er] <strvar> <t1-int> <t2-int> [<stop-str>]
  1706. X
  1707. X-e echo received characters to screen
  1708. X-r raw read (retain carriage returns)
  1709. X.DE
  1710. X
  1711. XThis command reads a string from the attached communications
  1712. Xline.
  1713. X<t1-int> is the number of tenths of seconds before
  1714. Xtiming out waiting for the first character to be received.
  1715. X<t2-int> is the number of tenths of seconds before
  1716. Xtiming out on later characters.
  1717. X<stop-str> is an optional argument, which if received, immediately
  1718. Xterminates the read.
  1719. XInteger variable $i0 is set to the count of characters received.
  1720. X
  1721. XIf the specified string variable is filled with characters
  1722. Xbefore the <stop-str> has been encountered or before a timeout
  1723. Xoccurs, then the command returns with $i0 set to the maximum
  1724. Xsize of the variable.  
  1725. X
  1726. XMost procedure commands will increase the size of an 
  1727. Xunumbered string variable as needed until the maximum 
  1728. Xstring size is reached.
  1729. XThe
  1730. X.B lgets
  1731. Xcommand
  1732. X.I does
  1733. X.I not .
  1734. XYou must start with the command with a string variable whose maximum size
  1735. Xis already the desired value.
  1736. XRefer to the section on string variables
  1737. Xabove and the section describing the
  1738. X.B mkvar
  1739. Xcommand below for information on the size of string variables.
  1740. X
  1741. X.*s 2 "logevent"
  1742. X
  1743. X.DS L
  1744. Xusage: logevent <str>
  1745. X.DE
  1746. X
  1747. XThis command writes a log item to ~/.ecu/log.
  1748. X
  1749. X.DS L
  1750. XExample:
  1751. X
  1752. X    $s0='/tmp/alm.log'
  1753. X    log 'appending alarm info to '+$s0
  1754. X
  1755. Xwrites:
  1756. X10-02-1989-17:39-01261-PROC appending alarm info to /tmp/alm.log
  1757. X.DE
  1758. Xassuming the transmitter process pid is 1261 and you are living in
  1759. X1989.
  1760. X.*s 2 "lookfor"
  1761. X
  1762. X.DS L
  1763. Xlookfor [-e] [quiet | <str>] [<timeout-int>]
  1764. X
  1765. X-e echo to screen while "looking"
  1766. X.DE
  1767. XThis command is used to read from the attached commuications line
  1768. Xuntil one of two user-specified conditions occurs.
  1769. X
  1770. XThe 'quiet' option waits for the line to become
  1771. Xquiet for the number of tenths of seconds specified  by <timeout-int>.
  1772. X
  1773. XThe other option reads the line until <str> is read from the line
  1774. Xor until <timeout-int> tenths of seconds elapses.  With this option,
  1775. Xinteger variable $i0 is set to 1 if <str> is found within the
  1776. Xtimeout period or 0 if not.
  1777. X
  1778. X.DS L
  1779. XExamples:
  1780. X
  1781. X    lookfor -e quiet 20   wait for quiet line for 2 secs
  1782. X    lookfor 'word:' 50    wait for 'word:' for up to 5 secs
  1783. X.DE
  1784. X.*s 2 "mkvar"
  1785. X
  1786. X.DS L
  1787. Xusage: mkvar [$]i<name>
  1788. X       mkvar [$]s<name>(<size>)
  1789. X.DE
  1790. X
  1791. XThis command creates one or more named (temporary)
  1792. Xinteger or string variables.
  1793. XThe variable type is determines by the first character
  1794. Xof the variable, which must be 'i' or 's'.  The size of a string
  1795. Xvariable must be specified via the <size> argument.  An optional '$'
  1796. Xmay be supplies for neatness, but may be omitted if desired.
  1797. X
  1798. X.*s 3 "Variable Names"
  1799. X
  1800. XThe names for created (named, temporary) variables consist of
  1801. Xa dollar sign ('$'), an 'i' for integer or 's' for string and
  1802. Xup to fifteen characters from the set [A-Za-z0-9_].
  1803. X
  1804. XThe first character after the 'i' or 's' in <name> 
  1805. Xmust be non-numeric.  '$sxyz' and '$s_3xyz' are legal, but '$s3xyz'
  1806. Xis not (it would be interpreted as '$s3' followed by the illegal
  1807. Xcommand sequence 'xyz').
  1808. X
  1809. XThe <name> space for integer and string variables are separate.
  1810. XIt is possible to have an integer variable named '$ixyz' and a string
  1811. Xvariable named '$sxyz'.  
  1812. X
  1813. X.*s 3 "Variable Life and Scope"
  1814. X
  1815. XThe life and scope of created variables is for
  1816. Xthe duration of the execution
  1817. Xof the creating procedure.  Procedures called
  1818. Xby the creating procedure (by 'do') can reference
  1819. Xtemporary variables declared by a
  1820. Xprevious procedure.  When created, integer variables are set
  1821. Xto zero and string variables are set to zero length.
  1822. XThese features differ from numbered variables
  1823. Xwhich retain their scope and values at all times, even when
  1824. Xprocedure execution terminates and ECU returns to interactive mode.
  1825. X
  1826. XVariables may be created by the same name more than once.
  1827. XThe latest mkvar execution specifies the variable referenced.
  1828. XThus if proc1 declares '$ixx' and calls proc2 which also declares '$ixx',
  1829. Xproc2's variable is distinct from proc1's and disappears when proc2
  1830. Xterminates, thus making proc1's available to it again, containing
  1831. Xthe same value as it had at the time proc2 was called.
  1832. X
  1833. X.*s 3 "String Variable Size"
  1834. X
  1835. XThe maximum value for <size> is 16384.
  1836. XRegardless of the size specified in the creation of a string
  1837. Xvariable, ECU will usually expand it's size as necessary up to the
  1838. Xmaximum.  Check the documentation for the operation you are
  1839. Xperforming; if there is no exception noted, ECU will expand
  1840. Xthe string maximum size as necessary.  For instance, the
  1841. Xset command will grow a string as part of assignment.  However,
  1842. Xthe
  1843. X.B lgets
  1844. Xcommand will not.
  1845. X
  1846. X.DS L
  1847. XExamples:
  1848. X
  1849. X    mkvar i_count
  1850. X    mkvar $i_count
  1851. X    mkvar s_20(20),s_80(80),i_timeout,$i_colors
  1852. X.DE
  1853. X
  1854. X.*s 2 "nap"
  1855. X
  1856. Xusage: nap <int>
  1857. X       nap -m <int>
  1858. X
  1859. XThis command suspends procedure execution for <int> tenths of
  1860. Xseconds if 
  1861. X.B -m
  1862. Xis not specified.
  1863. XIf -m is used, execution is suspended for <int> milliseconds.
  1864. XNote: the actual period execution is suspended depends, as usual,
  1865. Xon the scheduling load of the system.  For small -m values, be aware
  1866. Xthat the granularity of the nap duration is set by the system,
  1867. X20 milliseconds for XENIX 286 and 386, 10 milliseconds for UNIX.
  1868. X
  1869. XIf you need to know the frequency of the system clock,
  1870. Xsomething like
  1871. X.DS L
  1872. X      $i0 = %stoi(%getenv("HZ"))
  1873. X.DE
  1874. Xwill obtain the value for you (provided HZ is in the process' environment).
  1875. X.DS L
  1876. XExamples:
  1877. X
  1878. X    nap 30
  1879. X    nap $i0*$i2
  1880. X    nap -m 50
  1881. X.DE
  1882. X
  1883. X.*s 2 "nice"
  1884. X
  1885. Xusage: nice <int>
  1886. X
  1887. XThis command sets the nice value of the process.  It behaves
  1888. Xexactly like the nice(S) or nice(2) system call. The <int> argument
  1889. Xmust be in the range 0 through 39, inclusive.  If the call
  1890. Xfails, a warning is printed and the procedure continues to
  1891. Xexecute.  The current nice value may be obtained using the
  1892. X.B %nice
  1893. Xinteger function.  See also the description of the
  1894. X.B nice
  1895. Xinteractive command. 
  1896. X
  1897. X.*s 2 "parity"
  1898. X
  1899. X.DS L
  1900. Xusage: parity [even | odd | none]
  1901. X       parity <str>
  1902. X.DE
  1903. X
  1904. XThis command sets the parity for the attached communications line.
  1905. XIf <str> is supplied, the first character must be 'e', 'o' or 'n'.
  1906. XUppercase equivalents are also accepted.
  1907. X
  1908. X.DS L
  1909. XExamples:
  1910. X
  1911. X    parity even
  1912. X    parity 'e'
  1913. X    parity 'Even now as we speak'
  1914. X.DE
  1915. X
  1916. X.*s 2 "pclose"
  1917. X
  1918. Xusage: pclose <filenum>
  1919. X
  1920. XThis command should be issued when a command started by the
  1921. Xinteractive
  1922. X.B popen
  1923. Xcommandf completes.
  1924. X
  1925. X.*s 2 "plog"
  1926. X
  1927. X.DS L
  1928. Xusage: plog
  1929. X       plog <str>
  1930. X       plog off
  1931. X.DE
  1932. X
  1933. XThis command controls logging to a file of the screen output during
  1934. Xprocedure execution.  With no argument, the command displays the status
  1935. Xof logging.  <str> specifies a log file pathname, while the 'off'
  1936. Xargument turns logging off.
  1937. X
  1938. XIf procedure execution terminates due to an error, procedure logging
  1939. Xis turned off.  However, if procedure execution terminates
  1940. Xnormally while logging is active, erratic and unpredictable portions
  1941. Xof interactive mode screen output will continue to be logged to
  1942. Xthe current log file.
  1943. X
  1944. XThe interactive mode command
  1945. X.B plog
  1946. Xmay also be used to control procedure logging.
  1947. SHAR_EOF
  1948. true || echo 'restore of doc/_p_cmd.txt failed'
  1949. fi
  1950. echo 'End of ecu320 part 37'
  1951. echo 'File doc/_p_cmd.txt is continued in part 38'
  1952. echo 38 > _shar_seq_.tmp
  1953. exit 0
  1954.  
  1955. exit 0 # Just in case...
  1956.