home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume21 / ecu / part34 < prev    next >
Text File  |  1991-08-05  |  55KB  |  2,024 lines

  1. Newsgroups: comp.sources.misc
  2. From: Warren Tucker <wht@n4hgf.Mt-Park.GA.US>
  3. Subject:  v21i086:  ecu - ECU async comm package rev 3.10, Part34/37
  4. Message-ID: <1991Aug5.212024.8480@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: 564556a6c250d740253db18a02b344df
  6. Date: Mon, 5 Aug 1991 21:20:24 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: Warren Tucker <wht@n4hgf.Mt-Park.GA.US>
  10. Posting-number: Volume 21, Issue 86
  11. Archive-name: ecu/part34
  12. Environment: SCO, XENIX, ISC
  13. Supersedes: ecu3: Volume 16, Issue 25-59
  14.  
  15. ---- Cut Here and feed the following to sh ----
  16. #!/bin/sh
  17. # this is ecu310.34 (part 34 of ecu310)
  18. # do not concatenate these parts, unpack them in order with /bin/sh
  19. # file doc/_p_cmd.txt continued
  20. #
  21. if touch 2>&1 | fgrep 'amc' > /dev/null
  22.  then TOUCH=touch
  23.  else TOUCH=true
  24. fi
  25. if test ! -r _shar_seq_.tmp; then
  26.     echo 'Please unpack part 1 first!'
  27.     exit 1
  28. fi
  29. (read Scheck
  30.  if test "$Scheck" != 34; then
  31.     echo Please unpack part "$Scheck" next!
  32.     exit 1
  33.  else
  34.     exit 0
  35.  fi
  36. ) < _shar_seq_.tmp || exit 1
  37. if test ! -f _shar_wnt_.tmp; then
  38.     echo 'x - still skipping doc/_p_cmd.txt'
  39. else
  40. echo 'x - continuing file doc/_p_cmd.txt'
  41. sed 's/^X//' << 'SHAR_EOF' >> 'doc/_p_cmd.txt' &&
  42. X
  43. X    !Interrupted           call interrupted by signal
  44. X    !Modem Error           modem did not respond
  45. X.DE
  46. X
  47. X.*s 3 "do"
  48. X
  49. Xusage: do <procname> [<arg> ...]
  50. X
  51. XThis command executes a procedure whose name appears as the command's
  52. Xfirst (string) argument.  One or more arguments (up to 19) may be passed
  53. Xto the called procedure; an argument may consist of any valid string
  54. Xexpression, provided, that, when expanded,  the argument does not
  55. Xexceed 256 characters in length.
  56. X
  57. XThe called procedure may read its arguments using the
  58. X.B %argv
  59. Xstring function.  %argv(0) is the name of the procedure.
  60. XThe quantity of arguments may be obtained using the
  61. X.B %argc
  62. Xinteger function.
  63. X
  64. X.DS L
  65. XExample:
  66. X
  67. X    do 'proc' %rname %date+' '+%time %argv(0)
  68. X
  69. XNote: in this example, the called procedure is passed the name
  70. Xof the calling procedure as the last argument.
  71. X.DE
  72. X
  73. X.*s 3 "duplex"
  74. X
  75. X.DS L
  76. Xusage: duplex full | half
  77. X       duplex 'full' | 'half'
  78. X.DE
  79. X
  80. XThis command specifies whether or not ECU is to locally echo
  81. Xcharacters typed by you at the keyboard.  The overwhelming
  82. Xmajority of remote systems provide the echo function, in
  83. Xwhich case full duplex must be used.  For the rare occasions
  84. Xwhen the remote system does not echo your keyboard input,
  85. Xsetting half duplex will allow you to see what you are
  86. Xtyping.
  87. X
  88. XWhen communicating with another terminal in a "teletype
  89. Xconversation", setting half duplex is generally required.
  90. XIn such cases, use of the interactive
  91. X.B nl ,
  92. X.B nlin
  93. Xand
  94. X.B nlout
  95. Xcommands may also be required.
  96. X.DS L
  97. XExample:
  98. X
  99. X    duplex full
  100. X    $s0 = 'full'; duplex $s0
  101. X.DE
  102. X
  103. X
  104. X.*s 3 "echo"
  105. X
  106. Xusage: echo [-n] <string>
  107. X
  108. XThis command prints the contents of the string argument <string>
  109. Xon the screen.  If the -n switch is not present, a newline follows
  110. Xthe output of <string>.
  111. X.DS L
  112. XExample:
  113. X
  114. X    echo 'Procedure '+%argv(0)+' executing at '+%time
  115. X    echo -n 'Enter your first name: '; $s0 = %cgets
  116. X.DE
  117. X
  118. X.*s 3 "eeol"
  119. X
  120. Xusage: eeol
  121. X
  122. XThis command erases the video display to the end of the line.
  123. X
  124. X.*s 3 "else"
  125. X
  126. X.DF L
  127. Xusage: else <statement>
  128. X
  129. X       else
  130. X           <statement>
  131. X
  132. X       else
  133. X       {
  134. X            any kind and number of statements
  135. X       }
  136. X
  137. X       else <if> <statement>
  138. X
  139. X       else <if>
  140. X       {
  141. X            any kind and number of statements
  142. X       }
  143. X
  144. X.DE
  145. X
  146. XThis statement may follow an
  147. X.B ifi
  148. Xor
  149. X.B ifs 
  150. Xcommand to specify one or more statements to be executed if
  151. Xthe if-type command condition is false.  Else commands may be
  152. Xchained together in the traditional structured language manner.
  153. X
  154. XFor the purposes of describing this command, <statement> is
  155. Xany single or compound statement
  156. X.B NOT
  157. Xcontaining a
  158. X.B whilei
  159. Xor
  160. X.B whiles
  161. Xcommand.
  162. XIf you wish to have a while-type command executed as part of an
  163. X.B else
  164. Xcondition, the while must occur within braces ("{}").
  165. X
  166. X<if> is an
  167. X.B ifi
  168. Xor
  169. X.B ifs
  170. Xcommand followed by an <if-condition> (see the description of the
  171. X.B ifi
  172. Xor
  173. X.B ifs
  174. Xcommands below).
  175. X.DS L
  176. XExample:
  177. X
  178. X#+------------------------------------------------------
  179. X# finger.ep - procedure to send 'finger' to remote
  180. X# BSD Unix system; print resulting lines in different
  181. X# colors: uucp logins green, root red, others cyan
  182. X#-------------------------------------------------------
  183. X
  184. X    mkvar $icolor; $icolor = %colors
  185. X    mkvar $itimeout
  186. X    $itimeout = 50     # timeout for first line 5 secs
  187. X    send 'ps -aux'     # send command, but do not echo
  188. X    lookfor '\n' 40    # swallow command
  189. X    whilei 1==1        # forever, or until break
  190. X    {
  191. X        lgets 0 $itimeout 1 '\n' #get a line
  192. X        ifi $i0 = 0 break #if no chaacters read
  193. X        $itimeout = 10 #wait 1 sec for later lines
  194. X
  195. X        ifi %instr($s0,'% ') >= 0 # if csh prompt seen
  196. X            break                 # exit while loop
  197. X        else ifi %instr($s0,'Login') >= 0
  198. X            color gray
  199. X        else ifi %instr($s0,'root') >= 0
  200. X            color red
  201. X        else ifi %instr($s0,'uucp') >= 0
  202. X            color green
  203. X        else color cyan
  204. X        echo $s0
  205. X    }
  206. X    icolor $icolor #restore entry colors
  207. X    send ''        #force a new prompt from remote
  208. X
  209. X.DE
  210. X
  211. X.*s 3 "exit"
  212. X
  213. Xusage: exit [<status>]
  214. X
  215. XThis command causes an abrupt termination of the ECU program.
  216. XAny existing connection with a remote system
  217. Xis terminated immediately.
  218. XIf no integer argument <status> is found, ECU exits
  219. Xwith a program exit status of 0.
  220. XIf <status> is found and the value is zero, then ECU exits
  221. Xwith a program exit status of 0.
  222. XIf <status> non-zero,its value must be in the range of 1 to 31,
  223. Xand ECU exits
  224. Xwith a program exit status of 192 plus <status>.
  225. XThis feature allows batch executions of ECU by shell script
  226. Xdetect user-determined ECU execution status.
  227. XSee the section titled "Exit Codes".
  228. X
  229. X.*s 3 "expresp"
  230. X
  231. Xusage: expresp [-v[v...]] <exp-resp-str> [<timeout_msecs>]
  232. X
  233. XThis command emulates the uuchat function as described in the
  234. XSCO HDB UUCP documentation and in the /usr/lib/uucp/Dialers
  235. Xfile.
  236. X
  237. X-v causes the expect-respond conversation between ECU and the
  238. Xremote system to be displayed on the screen.  This switch is
  239. Xautomatically enabled if procdedure tracing is enabled.
  240. X
  241. Xmultiple v's (e.g., -vv, -vvv) up to 3 'v's produce
  242. Xmore verbose debug output. -vv causes each base level
  243. Xexpect and respond string to be displayed. -vvv causes
  244. Xa hexadecimal dump of each  interpreted expect string to be
  245. Xdisplayed.
  246. X
  247. X<exp-resp-str> is as defined in /usr/lib/ecu/Dialers.
  248. X.DS L
  249. X   Meaning of some of the escape characters:
  250. X   \\\p - pause (approximately 1/4-1/2 second delay)
  251. X   \\\d - delay (2 seconds)
  252. X   \\\D - phone number/token
  253. X   \\\T - phone number with Dialcodes and character translation
  254. X   \\\N - null byte
  255. X   \\\K - insert a BREAK
  256. X   \\\E - turn on echo checking (for slow devices)
  257. X   \\\e - turn off echo checking
  258. X   \\\r - carriage return
  259. X   \\\c - no new-line
  260. X   \\\n - send new-line
  261. X   \\\nnn - send octal number
  262. X   \\\m## - delay ## milliseconds (NOT SUPPORTED BY DIALERS;
  263. X            SEE BELOW)
  264. X   ~t[##] - set timeout to ## seconds (see below)
  265. X   ~m[##] - set timeout to ## milliseconds (see below)
  266. X   Speed - Hayes-specific speed-adaptive connect handler
  267. X.DE
  268. X
  269. X<timeout_msecs> specifies an optional timeout in milliseconds
  270. Xfor waiting on expect strings;  it defaults to 10,000 milliseconds
  271. X(10 seconds).
  272. XThe resolution for timeouts is limited to the basic tick time of
  273. Xyour system (HZ, 10 msec for UNIX/386 3.2.0,
  274. X16 (1000/60) msec for 3.2.1 and later or any ODT
  275. X20 msec for XENIX/386 and XENIX/286).
  276. XThe timeout for 'Speed' expects is fixed at 90 seconds.
  277. X
  278. X\\\m### causes a ### millisecond delay.  Note this adds an ambiguity to
  279. Xthe syntax of the send string: you may not follow an \m delay with a
  280. Xliteral digit to send.  For example, suppose you wish to delay 300
  281. Xmissileconds then send "4A".  \\\m3004A will delay for 3004
  282. X(approximately) milliseconds, then send an "A". 
  283. X
  284. XInteger variable $i0 is set to one if the expect-respond script 
  285. Xfails, else it is set to 0.
  286. X
  287. X
  288. X.*s 3 "fchmod"
  289. X
  290. Xusage: fchmod <mode> <file>
  291. X
  292. XThis command sets the mode of <file> to <mode>.
  293. XThe <mode> argument takes one of two forms, a nine-character
  294. Xmode string (e.g., 'rwxr-xr-x') or an integer value (0755).
  295. XThe <file> argument is either a string value forming a
  296. Xfilename or an integer file number representing a file opened with the
  297. X.B fopen
  298. Xcommand.
  299. X
  300. XThe command sets $i0 = 0 if successful, else to the
  301. X.B errno
  302. Xfrom the associated system call (refer to the 
  303. X.B %errstr
  304. Xstring function and/or /usr/include/sys/errno.h).
  305. X
  306. X.DS L
  307. XExample:
  308. X
  309. X    fopen 1 '/tmp/123'; fchmod 'rwxrwxrwx' 1
  310. X    fchmod 'rwxrwxrwx' '/tmp/123'
  311. X    fopen 1 '/tmp/123'; fchmod 0777 1
  312. X    $i0 = 0777; fchmod $i0 '/tmp/123'
  313. X
  314. XAll of the above example result in the same result.
  315. X.DE
  316. X
  317. X.*s 3 "fclose"
  318. X
  319. Xusage: fclose <file>
  320. X
  321. XThis command closes <file>.
  322. XThe <file> argument is an
  323. Xinteger file number representing a file opened with the
  324. X.B fopen
  325. Xcommand.
  326. X
  327. XThe command is ignored if <file> is not open.
  328. XNo integer variable is modified by
  329. X.I fclose .
  330. X
  331. X.DS L
  332. XExample:
  333. X
  334. X    fclose 1
  335. X.DE
  336. X
  337. X.*s 3 "fdel"
  338. X
  339. Xusage: fdel <file>
  340. X
  341. XThis command removes a file.
  342. X
  343. XThe command sets $i0 = 0 if successful, else to the
  344. X.B errno
  345. Xfrom the associated system call (refer to the 
  346. X.B %errstr
  347. Xstring function and/or /usr/include/sys/errno.h).
  348. X
  349. X.DS L
  350. XExample:
  351. X
  352. X    fdel '/tmp/123'
  353. X.DE
  354. X
  355. X.*s 3 "fgetc"
  356. X
  357. Xusage: fgetc <file> <destination>
  358. X
  359. XThis command reads a character from <file>.
  360. XThe <file> argument is an
  361. Xinteger file number representing a file opened with the
  362. X.B fopen
  363. Xcommand.
  364. X
  365. XThe argument <destination> is either a string variable
  366. Xor an integer variable.
  367. XIf the file has reached end of file: an integer variable
  368. Xreceives -1; a string variable is returned null.
  369. XOtherwise, the character's numeric value (0-255) is placed
  370. Xin an integer variable or a string variable is returned with a
  371. Xlength of one with the file character as its only character.
  372. X
  373. X.DS L
  374. XExample:
  375. X
  376. X    fgetc 1 $s0
  377. X    fgetc 1 $i_input
  378. X.DE
  379. X
  380. X.*s 3 "fgets"
  381. X
  382. Xusage: fgets <file> <strvar>
  383. X
  384. XThis command reads a character from <file>.
  385. XThe <file> argument is an
  386. Xinteger file number representing a file opened with the
  387. X.B fopen
  388. Xcommand.
  389. X
  390. XThe argument <strvar> is a string variable.
  391. XIf the file has reached end of file, <strvar> is returned null and
  392. Xinteger variable $i0 is set to 1.
  393. XOtherwise, the <strvar> receives input from the file minus
  394. Xthe trailing newline and $i0 is returned zero.
  395. X
  396. X.DS L
  397. XExample:
  398. X
  399. X    fgets 1 $s0
  400. X.DE
  401. X
  402. X.*s 3 "fkey"
  403. X
  404. Xusage: fkey <str>
  405. X
  406. XThis command selects a function key definition from the ~/.ecu/keys
  407. Xfile.
  408. X
  409. X.*s 3 "flush"
  410. X
  411. Xusage: flush
  412. X
  413. XThis command causes any characters received by the system
  414. Xfrom the line, but not yet read by the procedure to be "forgotten"
  415. Xor flushed.
  416. X
  417. X.*s 3 "fopen"
  418. Xusage: fopen [-switches] <filenum> <filename>
  419. X
  420. XThis command opens a file named by the string argument <filename>
  421. Xand associates it with the user-chosen file number <filenum> (which
  422. Xmust be an integer value between 0 and 4, inclusive).
  423. X
  424. XThe argument switches govern how a file is opened and must be chosen
  425. Xfrom this list:
  426. X.VL 15 4
  427. X.LI -r
  428. XThe file is opened read-only; if it does not
  429. Xexist, an error occurs.
  430. X.LI -r+
  431. XThe file is opened for reading and writing; if it does not
  432. Xexist, an error occurs.
  433. X.LI -w
  434. XThe file is opened for writing (any previous contents
  435. Xof the file are lost); if it does not
  436. Xexist, it is created.
  437. X.LI -w+
  438. XThe file is opened for reading and writing (any previous contents
  439. Xof the file are lost); if it does not
  440. Xexist, it is created.
  441. X.LI -a
  442. XThe file is opened for appending (writes to the file
  443. Xare added to the previous file contents); if it does not
  444. Xexist, it is created.
  445. XAll writes are appended to the file (the
  446. X.B fseek
  447. Xcommand has no effect).
  448. X.LE
  449. X
  450. XThe switches parameter may be omitted; in such cases,
  451. Xthe file is opened as though '-r' had been supplied.  However,
  452. Xif procedure tracing is enabled (see the description of the
  453. Xinteractive and procedure command
  454. X.B ptrace ),
  455. Xa warning message will be issued.
  456. X
  457. XThe command sets $i0 = 0 if successful, else to the
  458. X.B errno
  459. Xfrom the associated system call (refer to the 
  460. X.B %errstr
  461. Xstring function and/or /usr/include/sys/errno.h).
  462. X.DS L
  463. XExample:
  464. X
  465. X    fopen 0 -r '/etc/passwd'
  466. X    fopen 1 -w+ '/tmp/123'
  467. X    fopen 2 -a 'tranact.log'
  468. X.DE
  469. X
  470. X.*s 3 "fputc"
  471. X
  472. Xusage: fputc <file> <char>
  473. X
  474. XThis command writes character <char> into <file>.
  475. XThe <file> argument is an
  476. Xinteger file number representing a file opened with the
  477. X.B fopen
  478. Xcommand.
  479. XArgument <char> is a integer value of which the lower eight
  480. Xbits are used or a string value of which the first character is used.
  481. X
  482. XIf a write error occurs, procedure execution is terminated.
  483. X.DS L
  484. XExample:
  485. X
  486. X    $s0='abc'; fputc 1 $s0        writes 'a'
  487. X    $i0=0x30 ; fputc 1 $i0        writes '0'
  488. X.DE
  489. X
  490. X.*s 3 "fputs"
  491. X
  492. Xusage: fputs [-n] <file> <str>
  493. X
  494. XThis command writes the string <str> into <file>.
  495. XThe <file> argument is an
  496. Xinteger file number representing a file opened with the
  497. X.B fopen
  498. Xcommand.
  499. X
  500. XIf the switch '-n' is omitted, a newline is appended after <str>
  501. Xin the file; if present, no newline is written.
  502. X
  503. XIf a write error occurs, procedure execution is terminated.
  504. X.DS L
  505. XExample:
  506. X
  507. X    $s0='abc'; fputc 1 $s0        writes 'a'
  508. X.DE
  509. X
  510. X.*s 3 "fseek"
  511. X
  512. Xusage: fseek <file> <position>
  513. X
  514. XThis command sets the file position of <file> to <position.
  515. XThe corresponding integer function
  516. X.B %ftell
  517. Xmay be used to determine the current file position.
  518. X
  519. X.B Note :
  520. Xif <file> is open for append ('-a'), then the
  521. X.B fseek
  522. Xcommand will have no effect.
  523. X
  524. X.*s 3 "getf"
  525. X
  526. X.DS L
  527. Xusage: getf -x <int-var-spec> <offset>
  528. X
  529. Xwhere: -x ==
  530. X   -b byte
  531. X   -w word (little-endian)
  532. X   -W word (big-endian)
  533. X   -l 32-bits (little-endian)
  534. X   -L 32-bits (big-endian)
  535. X.DE
  536. X
  537. X.*s 3 "gosub"
  538. X
  539. Xusage: gosub <label>
  540. X
  541. XThis command transfers control of procedure to a statement
  542. Xother than the one immediately following.  The <label>
  543. Xargument may be literal text or may be a string, allowing
  544. Xa "computed gosub" feature.
  545. X
  546. XWhen the next return statement is executed, control is
  547. Xreturned to the 
  548. Xnext statement after the gosub.
  549. X
  550. X.DS L
  551. XExample:
  552. X
  553. X    gosub GET_NEXT
  554. X    gosub 'GET_NEXT'
  555. X    gosub 'GET'+'_NEXT'
  556. X    $s0 = 'GET_NEXT'; gosub $s0
  557. X    $s0 = 'NEXT'; gosub 'GET_'+$s0
  558. X
  559. XNote: all the above examples cause transfer to the label GET_NEXT.
  560. X.DE
  561. X.DS L
  562. XA switch or case function of sorts may be implimented by something like:
  563. X
  564. X    #$i0 has been set to the "switch" value
  565. X    ifi $i0 < 0 || $i0 > 2  # avoid gosub label not found
  566. X    {
  567. X        echo 'bad my_case state value'+%itos($i0)
  568. X        DO SOMETHING LIKE DIE OR DUMP VARS AND DIE
  569. X    }
  570. X    $s0 = 'my_case_'+%itos($i0,03)
  571. X    gosub $s0
  572. X
  573. Xmy_case_000
  574. X    echo 'handle case 0'
  575. X    return
  576. X
  577. Xmy_case_001
  578. X    echo 'handle case 1'
  579. X    return
  580. X
  581. Xmy_case_002
  582. X    ifi $i_already_did_002
  583. X    {
  584. X        echo 'whoops'
  585. X        return
  586. X    }
  587. X    echo 'handle case 2'
  588. X    $i_already_did_002 = 1
  589. X    return
  590. X.DE
  591. X
  592. X.*s 3 "gosubb"
  593. X
  594. Xusage: gosubb <label>
  595. X
  596. XThis command serves the same function as the
  597. X.B gosub
  598. Xcommand except the programmer is signifying that the label
  599. Xis
  600. X.B b ehind
  601. Xthe current statement, resulting in slightly faster execution.
  602. X(The label is not REQUIRED to be at any specific location
  603. Xin the procedure relative to the
  604. X.B gosubb
  605. Xstatement.)
  606. X
  607. X.*s 3 "goto"
  608. X
  609. Xusage: goto <label>
  610. X
  611. XThis command transfers control of procedure to a statement
  612. Xother than the one immediately following.  The <label>
  613. Xargument may be literal text or may be a string, allowing
  614. Xa "computed goto" feature.
  615. X.DS L
  616. XExample:
  617. X
  618. X    goto GET_NEXT
  619. X    goto 'GET_NEXT'
  620. X    goto 'GET'+'_NEXT'
  621. X    $s0 = 'GET_NEXT'; goto $s0
  622. X    $s0 = 'NEXT'; goto 'GET_'+$s0
  623. X.DE
  624. XNote: all the above examples cause transfer to the label GET_NEXT.
  625. X
  626. X.*s 3 "gotob"
  627. X
  628. Xusage: gotob <label>
  629. X
  630. XThis command serves the same function as the
  631. X.B goto
  632. Xcommand except the programmer is signifying that the label
  633. Xis
  634. X.B b ehind
  635. Xthe current statement, resulting in slightly faster execution.
  636. X(The label is not REQUIRED to be at any specific location
  637. Xin the procedure relative to the
  638. X.B gotob
  639. Xstatement.)
  640. X
  641. X.*s 3 "hangup"
  642. X
  643. Xusage: hangup
  644. X
  645. XThis command causes Data Terminal Ready (DTR)
  646. Xto be dropped momentarily, causing (hopefully)
  647. Xthe termination of any current connection
  648. Xto a remote system. 
  649. XThis command is only effective if the attached Data Communications
  650. XEquipment is configured
  651. Xto terminate its connection on loss of DTR.
  652. X
  653. XIf no line is attached, the command is ignored (a warning
  654. Xis generated if procedure tracing is enabled).
  655. X
  656. X.*s 3 "hexdump"
  657. X.DS L
  658. Xusage: hexdump [-s] <str>
  659. X       hexdump -t[s] <str1> <str>
  660. X.DE
  661. X
  662. X<str> buf to dump
  663. X<str1> title (if -t)
  664. X-s short (terse) dump
  665. X
  666. XThis command prints a hexadecimal dump of <str> on the screen
  667. X(and to the procedure log file, if logging enabled with the
  668. X.B ptrace
  669. Xcommand).
  670. X
  671. XThe switch '-t' signifies that <str1> is a title to be printed
  672. X.DS L
  673. XExample:
  674. X
  675. X    $s0='The quick brown fox jumped over the lazy dog\'s back'
  676. X    hexdump -t 'Example hex dump' $s0
  677. X---------------------------- Example hex dump ----------------------------
  678. X0000  54 68 65 20 71 75 69 63 6B 20 62 72 6F 77 6E 20 | The quick brown  |
  679. X0010  66 6F 78 20 6A 75 6D 70 65 64 20 6F 76 65 72 20 | fox jumped over  |
  680. X0020  74 68 65 20 6C 61 7A 79 20 64 6F 67 27 73 20 62 | the lazy dog's b |
  681. X0030  61 63 6B                                        | ack              |
  682. X.DE
  683. X.DS L
  684. X    hexdump %left($s0,9)
  685. X0000  54 68 65 20 71 75 69 63 6B                      | The quick        |
  686. X.DE
  687. X.DS L
  688. X    hexdump -ts 'Example hex dump' %left($s0,9)
  689. XExample hex dump
  690. X0000  54 68 65 20 71 75 69 63 6B | The quick |
  691. X.DE
  692. X.DS L
  693. X    hexdump -s %left($s0,9)
  694. X0000  54 68 65 20 71 75 69 63 6B | The quick |
  695. X.DE
  696. X
  697. X.*s 3 "home"
  698. X
  699. Xusage: home
  700. X
  701. XThis command homes the video cursor.
  702. X
  703. X.*s 3 "icolor"
  704. X
  705. Xusage: icolor <int-colors>
  706. X
  707. XThis command sets the normal and reverse foreground
  708. Xand background colors according to <int-colors>, an integer
  709. Xvalue in the format as that returned by the
  710. X.B %colors
  711. Xinteger function.
  712. X
  713. XThis command is provided primarily to be able to save the color
  714. Xstate, modify it temporarily and then restore it.
  715. X.DS L
  716. XExample:
  717. X
  718. X    mkvar $icolor_save; $icolor_save = %colors
  719. X    color red; echo 'Connection seems to be dead'
  720. X    icolor $icolor_save # restore previous colors
  721. X.DE
  722. X
  723. X.*s 3 "ifi"
  724. X.DS L
  725. Xusage: ifi <int> <rel-op> <int> <statement>
  726. X       ifi <int> <rel-op> <int>
  727. X           <statement>
  728. X       ifi <int> <rel-op> <int>
  729. X       {
  730. X           any kind or number of statements
  731. X       }
  732. X.DE
  733. X
  734. XThis command selectively executes one or more statements
  735. Xbased on a test of two integer quantities.  See the
  736. Xdescription of the
  737. X.B break ,
  738. X.B continue ,
  739. Xand
  740. X.B else
  741. Xcommmands for examples of how the command is used.
  742. X
  743. X.*s 3 "ifs"
  744. X.DS L
  745. Xusage: ifs <str> <rel-op> <str> <statement>
  746. X       ifs <int> <rel-op> <int>
  747. X           <statement>
  748. X       ifs <int> <rel-op> <int>
  749. X       {
  750. X           any kind or number of statements
  751. X       }
  752. X.DE
  753. X
  754. XThis command selectively executes one or more statements
  755. Xbased on a test of two string values.  See the
  756. Xdescription of the
  757. X.B break ,
  758. X.B continue ,
  759. Xand
  760. X.B else
  761. Xcommmands
  762. Xand many other examples throughout the document,
  763. Xfor examples of how the command is used.
  764. X
  765. X.*s 3 "lbreak"
  766. X
  767. Xusage: lbreak
  768. X
  769. XThis command transmits a break to the remote system.
  770. X
  771. X.*s 3 "lgets"
  772. X
  773. X.DS L
  774. Xusage: lgets [-er] <strvar> <t1-int> <t2-int> [<stop-str>]
  775. X
  776. X-e echo received characters to screen
  777. X-r raw read (retain carriage returns)
  778. X.DE
  779. X
  780. XThis command reads a string from the attached communications
  781. Xline.
  782. X<t1-int> is the number of tenths of seconds before
  783. Xtiming out waiting for the first character to be received.
  784. X<t2-int> is the number of tenths of seconds before
  785. Xtiming out on later characters.
  786. X<stop-str> is an optional argument, which if received, immediately
  787. Xterminates the read.
  788. XInteger variable $i0 is set to the count of characters received.
  789. X
  790. XIf the specified string variable is filled with characters
  791. Xbefore the <stop-str> has been encountered or before a timeout
  792. Xoccurs, then the command returns with $i0 set to the maximum
  793. Xsize of the variable.  Refer to the section on string variables
  794. Xabove and the section describing the
  795. X.B mkvar
  796. Xcommand below for information on the size of string variables.
  797. X
  798. X.*s 3 "insline"
  799. X
  800. Xusage: insline
  801. X
  802. XThis command inserts a line onto the video screen at the current line.
  803. X
  804. X.*s 3 "logevent"
  805. X.DS L
  806. Xusage: logevent <str>
  807. X.DE
  808. X
  809. XThis command writes a log item to ~/.ecu/log.
  810. X
  811. X.DS L
  812. XExample:
  813. X
  814. X    $s0='/tmp/alm.log'
  815. X    log 'appending alarm info to '+$s0
  816. X
  817. Xwrites:
  818. X10-02-1989-17:39-01261-PROC appending alarm info to /tmp/alm.log
  819. X.DE
  820. Xassuming the transmitter process pid is 1261 and you are living in
  821. X1989.
  822. X.*s 3 "lookfor"
  823. X.DS L
  824. Xlookfor [-e] [quiet | <str>] [<timeout-int>]
  825. X
  826. X-e echo to screen while "looking"
  827. X.DE
  828. XThis command is used to read from the attached commuications line
  829. Xuntil one of two user-specified conditions occurs.
  830. X
  831. XThe 'quiet' option waits for the line to become
  832. Xquiet for the number of tenths of seconds specified  by <timeout-int>.
  833. X
  834. XThe other option reads the line until <str> is read from the line
  835. Xor until <timeout-int> tenths of seconds elapses.  With this option,
  836. Xinteger variable $i0 is set to 1 if <str> is found within the
  837. Xtimeout period or 0 if not.
  838. X
  839. X.DS L
  840. XExamples:
  841. X
  842. X    lookfor -e quiet 20   wait for quiet line for 2 secs
  843. X    lookfor 'word:' 50    wait for 'word:' for up to 5 secs
  844. X.DE
  845. X.*s 3 "mkvar"
  846. X.DS L
  847. Xusage: mkvar [$]i<name>
  848. X       mkvar [$]s<name>(<size>)
  849. X.DE
  850. X
  851. XThis command creates one or more named (temporary)
  852. Xinteger or string variables.
  853. XThe variable type is determines by the first character
  854. Xof the variable, which must be 'i' or 's'.  The size of a string
  855. Xvariable must be specified via the <size> argument.  An optional '$'
  856. Xmay be supplies for neatness, but may be omitted if desired.
  857. X
  858. X.*s 4 "Variable Names"
  859. X
  860. XThe names for created (named, temporary) variables consist of
  861. Xa dollar sign ('$'), an 'i' for integer or 's' for string and
  862. Xup to fifteen characters from the set [A-Za-z0-9_].
  863. X
  864. XThe first character after the 'i' or 's' in <name> 
  865. Xmust be non-numeric.  '$sxyz' and '$s_3xyz' are legal, but '$s3xyz'
  866. Xis not (it would be interpreted as '$s3' followed by the illegal
  867. Xcommand sequence 'xyz').
  868. X
  869. XThe <name> space for integer and string variables are separate.
  870. XIt is possible to have an integer variable named '$ixyz' and a string
  871. Xvariable named '$sxyz'.  
  872. X
  873. X.*s 4 "Variable Life and Scope"
  874. X
  875. XThe life and scope of created variables is for
  876. Xthe duration of the execution
  877. Xof the creating procedure.  Procedures called
  878. Xby the creating procedure (by 'do') can reference
  879. Xtemporary variables declared by a
  880. Xprevious procedure.  When created, integer variables are set
  881. Xto zero and string variables are set to zero length.
  882. XThese features differ from numbered variables
  883. Xwhich retain their scope and values at all times, even when
  884. Xprocedure execution terminates and ECU returns to interactive mode.
  885. X
  886. XVariables may be created by the same name more than once.
  887. XThe latest mkvar execution specifies the variable referenced.
  888. XThus if proc1 declares '$ixx' and calls proc2 which also declares '$ixx',
  889. Xproc2's variable is distinct from proc1's and disappears when proc2
  890. Xterminates, thus making proc1's available to it again, containing
  891. Xthe same value as it had at the time proc2 was called.
  892. X
  893. X.*s 4 "String Variable Size"
  894. X
  895. XThe maximum value for <size> is 5120.
  896. XRegardless of the size specified in the creation of a string
  897. Xvariable, ECU will expand it's size as necessary up to the 5120
  898. Xcharacter maximum.
  899. X
  900. X.DS L
  901. XExamples:
  902. X
  903. X    mkvar i_count
  904. X    mkvar $i_count
  905. X    mkvar s20(20),s80(80),i_timeout,$i_colors
  906. X.DE
  907. X
  908. X.*s 3 "nap"
  909. Xusage: nap <int>
  910. X       nap -m <int>
  911. X
  912. XThis command suspends procedure execution for <int> tenths of
  913. Xseconds if 
  914. X.B -m
  915. Xis not specified.
  916. XIf -m is used, execution is suspended for <int> milliseconds.
  917. XNote: the actual period execution is suspended depends, as usual,
  918. Xon the scheduling load of the system.  For small -m values, be aware
  919. Xthat the granularity of the nap duration is set by the system,
  920. X20 milliseconds for XENIX 286 and 386, 10 milliseconds for UNIX.
  921. X
  922. XIf you need to know the frequency of the system clock,
  923. Xsomething like
  924. X.DS L
  925. X      $i0 = %stoi(%getenv("HZ"))
  926. X.DE
  927. Xwill obtain the value for you (provided HZ is in the process' environment).
  928. X
  929. X
  930. X.DS L
  931. XExamples:
  932. X
  933. X    nap 30
  934. X    nap $i0*$i2
  935. X    nap -m 50
  936. X.DE
  937. X
  938. X.*s 3 "nice"
  939. Xusage: nice <int>
  940. X
  941. XThis command sets the nice value of the process.  It behaves
  942. Xexactly like the nice(S) or nice(2) system call. The <int> parameter
  943. Xmust be in the range 0 through 39, inclusive.  If the call
  944. Xfails, a warning is printed and the procedure continues to
  945. Xexecute.  The current nice value may be obtained using the
  946. X.B %nice
  947. Xinteger function.  See also the description of the
  948. X.B nice
  949. Xinteractive command. 
  950. X
  951. X.*s 3 "parity"
  952. X.DS L
  953. Xusage: parity [even | odd | none]
  954. X       parity <str>
  955. X.DE
  956. X
  957. XThis command sets the parity for the attached communications line.
  958. XIf <str> is supplied, the first character must be 'e', 'o' or 'n'.
  959. XUppercase equivalents are also accepted.
  960. X
  961. X.DS L
  962. XExamples:
  963. X
  964. X    parity even
  965. X    parity 'e'
  966. X    parity 'Even now as we speak'
  967. X.DE
  968. X
  969. X.*s 3 "pclose"
  970. Xusage: pclose <filenum>
  971. X
  972. XThis command should be issued when a command started by the
  973. Xinteractive
  974. X.B popen
  975. Xcommandf completes.
  976. X
  977. X.*s 3 "plog"
  978. X.DS L
  979. Xusage: plog
  980. X       plog <str>
  981. X       plog off
  982. X.DE
  983. X
  984. XThis command controls logging to a file of the screen output during
  985. Xprocedure execution.  With no argument, the command displays the status
  986. Xof logging.  <str> specifies a log file pathname, while the 'off'
  987. Xargument turns logging off.
  988. X
  989. XIf procedure execution terminates due to an error, procedure logging
  990. Xis turned off.  However, if procedure execution terminates
  991. Xnormally while logging is active, erratic and unpredictable portions
  992. Xof interactive mode screen output will continue to be logged to
  993. Xthe current log file.
  994. X
  995. XThe interactive mode command
  996. X.B plog
  997. Xmay also be used to control procedure logging.
  998. X.DS L
  999. XExample:
  1000. X
  1001. X    mkvar s_logname(128)
  1002. X    $s_logname = %dir+'logname'
  1003. X    plog $s_logname
  1004. X    echo 'Test'
  1005. X    plog off;cd 'somewhere_else';plog $s_logname
  1006. X    echo 'Test'
  1007. X.DE
  1008. X
  1009. X.*s 3 "popd"
  1010. X.DS L
  1011. Xusage: popd [ | <#> | all]
  1012. X.DE
  1013. X
  1014. XThis command returns to a previous directory after a
  1015. X.B pushd
  1016. Xcommand has been previously executed.
  1017. X
  1018. XIf no argument is supplied, the directory at the immediately previous
  1019. Xlevel is restored.  
  1020. X
  1021. XIf a numeric argument is supplied, the directory
  1022. Xat the specified level is restored; the level numbers may be obtained by
  1023. Xissuing a
  1024. X.B pushd
  1025. Xcommand with no arguments.
  1026. X
  1027. XIf the 'all' argument is supplied, it is treated as a numeric argument of 0;
  1028. Xthat is the directory stack is cleared and the directory at level 0 is
  1029. Xrestored.
  1030. X
  1031. XThe directory stack is shared between interactive and procedure
  1032. Xcommands.  Neither beginning nor ending a procedure affects the
  1033. Xdirectory stack level.
  1034. X
  1035. X.DS L
  1036. XExamples:
  1037. X   popd
  1038. X   popd 3
  1039. X   popd all
  1040. X.DE
  1041. X
  1042. X.*s 3 "popen"
  1043. Xusage: popen [-switches] <filenum> <command>
  1044. X
  1045. XThis command executes a shell command defined by the string argument <command>
  1046. Xand associates it with the user-chosen file number <filenum> (which
  1047. Xmust be an integer value between 0 and 4, inclusive).
  1048. X
  1049. XThe argument switches govern whether the command is
  1050. Xto receive input from ECU or output to ECU and must be chosen
  1051. Xfrom this list:
  1052. X.VL 15 4
  1053. X.LI -r
  1054. XThe command will output to ECU.
  1055. X.LI -w
  1056. XThe command will receive input from ECU.
  1057. X.LE
  1058. X
  1059. XThe switches parameter may be omitted; in such cases,
  1060. Xthe file is opened as though '-r' had been supplied.  However,
  1061. Xif procedure tracing is enabled (see the description of the
  1062. Xinteractive and procedure command
  1063. X.B ptrace ),
  1064. Xa warning message will be issued.
  1065. X
  1066. XThe command sets $i0 = 0 if successful, else to the
  1067. X.B errno
  1068. Xfrom the associated system call (refer to the 
  1069. X.B %errstr
  1070. Xstring function and/or /usr/include/sys/errno.h).
  1071. X.DS L
  1072. XExample:
  1073. X
  1074. X    popen 0 -r 'ls -l *.log'
  1075. X    popen 1 -w 'cat | sort > /tmp/sorted'
  1076. X.DE
  1077. X
  1078. X
  1079. X.*s 3 "prompt"
  1080. Xusage: prompt <str>
  1081. X
  1082. XThis command allows selection of an alternate prompt to the interactive
  1083. Xmode HOME command trigger.
  1084. XRefer to the section titled "ECUPROMPT"
  1085. Xfor more information on the interactive mode prompt.
  1086. X
  1087. XNote: the interactive and procedure
  1088. X.B hangup
  1089. Xcommands both cause the default prompt to be reestablished.
  1090. X
  1091. X.DS L
  1092. XExample:
  1093. X
  1094. X     prompt %rname+' >'    use remote name in prompt
  1095. X.DE
  1096. X
  1097. X.*s 3 "ptrace"
  1098. X.DS L
  1099. Xusage: ptrace [ <str> | off ]
  1100. X.DE
  1101. X
  1102. XThis command controls procedure execution tracing.  Trace
  1103. Xoutput is written to the screen and varys in its nature depending upon
  1104. Xthe command being traced.  Specifically, any change to a string or
  1105. Xinteger variable is noted.  If tracing is enabled, the output will also
  1106. Xbe written to any active procedure log file (see the
  1107. X.B plog
  1108. Xinteractive and procedure commands).
  1109. X
  1110. X.*s 3 "pushd"
  1111. X.DS L
  1112. Xusage: pushd [ | <dir>]
  1113. X.DE
  1114. X
  1115. XThis command either 1) saves the current directory pathname on
  1116. Xa stack and establishes a new current directory or
  1117. X2) displays the current stack and current directory.
  1118. XThe stack size is 10.
  1119. X
  1120. XIf no argument is supplied, the directory stack is displayed.
  1121. X
  1122. XThe directory stack is shared between interactive and procedure
  1123. Xcommands.  Neither beginning nor ending a procedure affects the
  1124. Xdirectory stack level.
  1125. X
  1126. X.DS L
  1127. XExamples:
  1128. X   pushd
  1129. X   pushd '/tmp'
  1130. X.DE
  1131. X
  1132. X.*s 3 "putf"
  1133. X
  1134. XNot yet implemented.
  1135. X
  1136. X.*s 3 "return"
  1137. Xusage: return [<int>]
  1138. X
  1139. XThis command serves two functions: to return from a gosub to or
  1140. Xreturn from a procedure execution.  If <int> is supplied, it must be in the
  1141. Xrange 0 to 255.  Other values result in a return value of 255.
  1142. X
  1143. XIf no gosub is active,
  1144. X.B return
  1145. Xcauses the currently executing procedure to terminate,
  1146. Xreturning either to a calling procedure or to the interactive mode.
  1147. XIf <int> is supplied and it's value is nonzero, then all procedure execution is
  1148. Xterminated and the integer status is printed
  1149. Xon the screen along with the name of the executing procedure.
  1150. X
  1151. XIf a gosub is active,
  1152. X.B return
  1153. Xor
  1154. X.B return
  1155. X0 causes control to return to the statement immediately following the
  1156. X.B gosub
  1157. Xwhich invoked the subroutine.
  1158. XIf <int> is supplied and it's value is nonzero, then all procedure execution is
  1159. Xterminated and the integer status is printed
  1160. Xon the screen along with the name of the executing procedure.
  1161. X
  1162. XIt is not possible to terminate a procedure with normal status from
  1163. Xwithin a subroutine.
  1164. X
  1165. X.DS L
  1166. XExample:
  1167. X
  1168. X#---------------------
  1169. X# gosub.ep
  1170. X#---------------------
  1171. X    echo 'main'; gosub SUB; echo 'back to main'
  1172. X    return
  1173. X
  1174. XSUB
  1175. X    echo 'sub'
  1176. X    gosub SUB2
  1177. X    echo 'back to sub'
  1178. X    return
  1179. X
  1180. X
  1181. XSUB2
  1182. X    echo 'sub2'
  1183. X    return
  1184. X
  1185. X.DE
  1186. X
  1187. X.*s 3 "rk"
  1188. Xusage: rk [-a]
  1189. X
  1190. XThis command invokes the Kermit file receive protocol.  If switch '-a'
  1191. Xis omitted, the received files are stored as received; otherwise
  1192. Xcarriage return/linefeed pairs are converted to newlines.
  1193. XThe remote sender must have been started prior the the
  1194. Xexecution of this command.
  1195. X
  1196. X.*s 3 "rlog"
  1197. X.DS L
  1198. Xusage: rlog [-srf] <str>
  1199. X       rlog 'off'
  1200. X.DE
  1201. X
  1202. XThis command controls receiver logging.  It's function is the same as
  1203. Xthe interactive
  1204. X.B log
  1205. Xcommand.
  1206. X
  1207. XThe first form of the command enables logging. The
  1208. X.B -s switch causes the file to be
  1209. X.B s cratched
  1210. Xwhen it is opened (otherwise the file is opened for append).  The
  1211. X.B -r
  1212. Xswitch causes raw logging, else filter logging is performed.  The
  1213. X.B -f
  1214. Xswitch causes the log file to be flushed  each time it is written to
  1215. X(unbuffered I/O); this switch is useful if you are logging to
  1216. Xa terminal or hard copy device and wish to see output as soon as it
  1217. Xis produced.
  1218. X
  1219. X.*s 3 "rname"
  1220. Xusage: rname <str>
  1221. X
  1222. XNormally, the %rname string function returns the same string
  1223. Xas the logical dialing directory entry.  This command allows
  1224. Xthe default value to be overridden with a user-selected
  1225. Xvalue (63-character maximum).
  1226. X
  1227. XThis feature is useful in situations where one system is initially
  1228. Xdialed, but a connection is made to yet another system from the dialed
  1229. Xsystem via networking.
  1230. X
  1231. X.*s 3 "rs"
  1232. Xusage: rs
  1233. X
  1234. XThis command invokes the SEAlink file receive protocol.
  1235. XThere
  1236. Xis no provision in the SEAlink protocol to convert
  1237. Xcarriage return/linefeed pairs to newlines,
  1238. Xso the received files are stored as received.
  1239. XThe remote sender must have been started prior the the
  1240. Xexecution of this command.
  1241. X
  1242. X.*s 3 "rtscts"
  1243. Xusage: rtscts [ off| on | no | yes | 0 | 1 | 2 | 3 ]
  1244. X
  1245. XThis SCO-only command control RTS/CTS hardware flow control,
  1246. Xwhich may or may not work with your serial driver.
  1247. XWhat the command does is to manipulate the RTSFLOW and CTSFLOW
  1248. Xbits of the termio c_cflag word (see 
  1249. X.B termio(S) ).
  1250. X
  1251. X.so __rtscts.txt
  1252. X
  1253. X.DS L
  1254. XExamples:
  1255. X
  1256. X    ifi %baud >= 9600
  1257. X        rtscts on
  1258. X    else ifi $i_do_both_flow_control_anyway != 0
  1259. X        rtscts on
  1260. X    else ifi $i_do_input_flow_control_anyway != 0
  1261. X        rtscts 2
  1262. X    else ifi $i_do_output_flow_control_anyway != 0
  1263. X        rtscts 3
  1264. X    else
  1265. X        rtscts off
  1266. X.DE
  1267. X
  1268. X.*s 3 "rx"
  1269. Xusage: rx [-a] <str>
  1270. X
  1271. XThis command invokes the XMODEM file receive protocol
  1272. Xto receive file <str>.  If switch '-a'
  1273. Xis omitted, the received file is stored as received; otherwise
  1274. Xcarriage return/linefeed pairs are converted to newlines.
  1275. XThe remote sender must have been started prior the the
  1276. Xexecution of this command.
  1277. X
  1278. X.*s 3 "ry"
  1279. Xusage: ry
  1280. X
  1281. XThis command invokes the YMODEM Batch (not to be confused with
  1282. XXMODEM-1K) protocol to receive files from a remote system.  The remote
  1283. Xsender must have been started prior the the execution of this command.
  1284. X
  1285. X.*s 3 "rz"
  1286. Xusage: rz
  1287. X
  1288. XThis command invokes the ZMODEM protocol to receive
  1289. Xfiles from a remote system.
  1290. XThe remote sender must have been started prior the the
  1291. Xexecution of this command.
  1292. X
  1293. X.*s 3 "scrdump"
  1294. Xusage: scrdump [<str>]
  1295. X
  1296. XThis command causes the current screen contents to be
  1297. Xstored in a file.  If <str> is supplied, it is used as a pathname.
  1298. XIf <str> is not supplied, "~/.ecu/screen.dump".
  1299. XThe actions of the interactive
  1300. X.B sdname
  1301. Xcommand have no effect on the execution of this command.
  1302. X
  1303. XSee the section titled "Screen Dump" for more information.
  1304. XThe subsection titled "Multiscreen and Non-Multiscreen" will be
  1305. Xof particular interest when using screen dumps in an
  1306. Xautomated environment.
  1307. X
  1308. X.*s 3 "send"
  1309. Xusage: send [-n] <str>
  1310. X
  1311. XThis command sends <str> to the communications line.  If the '-n'
  1312. Xswitch is omitted, a carriage return (0x0D) is transmitted after <str>.
  1313. XIf '-n' is supplied, no carriage return is transmitted.
  1314. X
  1315. X.DS L
  1316. XExamples:
  1317. X
  1318. X    send 'ps -au'
  1319. X    send -n %chr(0x02)+"START'+%chr(0x03)
  1320. X.DE
  1321. X
  1322. X.*s 3 "set"
  1323. X.DS L
  1324. Xusage: set [$]i<name>=<int-expression>[, ...]
  1325. X       set [$]s<name>=<str-expression>[, ...]
  1326. X.DE
  1327. X
  1328. XThis command sets an integer or string variable
  1329. Xto an expression.  The 'set' verb may be omitted provided the
  1330. Xotherwise optional '$' is supplied.  There are many examples of
  1331. Xhow the set statement is performed throughout this document.
  1332. XThe examples here are to further clarify the statement's syntax.
  1333. X
  1334. XIf the '=<expression>' is omitted, the value of the variable is
  1335. Xdisplayed (useful when debugging).   If procedure tracing is
  1336. Xenabled with the
  1337. X.B ptrace
  1338. Xcommand, all variables referenced by the
  1339. X.B
  1340. Xset
  1341. Xcommand, whether a value is assigned or not, are displayed.
  1342. X
  1343. X.DS L
  1344. XExamples:
  1345. X
  1346. X    set i0=0
  1347. X    set $s0='brown',s1='The quick '+$s0+' fox'
  1348. X    set $S0              with no '=', displays contents
  1349. X    set i0,$i1,s0='abc',s1
  1350. X    $s0 = 'abc'          legal
  1351. X    set s0='abc'         legal
  1352. X    s0 = 'abc'           illegal
  1353. X.DE
  1354. X.*s 3 "sk"
  1355. Xusage: sk [-a] <str>
  1356. X
  1357. XThis command invokes the Kermit file transfer protocol to send
  1358. Xone or more files.
  1359. XIf switch '-a' is supplied,
  1360. Xnewlines are converted to carriage return/linefeed pairs.
  1361. XIf '-a' is omitted, the file(s) are transmitted without modification.
  1362. X
  1363. XInteger variable $i0 receives the exit status from the transfer.  If 0,
  1364. Xtransfer was normal.
  1365. XNote:
  1366. Xprocedure execution IS terminated by a SIGINT to the spawned file
  1367. Xtransfer process.  This is different than for versions prior to 3.10.
  1368. XIf $i0 is set to -1, the file transfer program did not begin.
  1369. X
  1370. X.*s 3 "ss"
  1371. Xusage: ss <str>
  1372. X
  1373. XThis command invokes the SEAlink file transfer protocol to send
  1374. Xone or more files.
  1375. XThere is no provision in the SEAlink protocol to convert
  1376. Xnewlines to carriage return/linefeed pairs.
  1377. Xso the received files are stored as received.
  1378. X
  1379. XInteger variable $i0 receives the exit status from the transfer. If 0,
  1380. Xtransfer was normal.
  1381. XNote:
  1382. Xprocedure execution IS terminated by a SIGINT to the spawned file
  1383. Xtransfer process.  This is different than for versions prior to 3.10.
  1384. XIf $i0 is set to -1, the file transfer program did not begin.
  1385. X
  1386. X.*s 3 "sx"
  1387. Xusage: sx [-ak[l]] [<label-str>] <filename-str>
  1388. X
  1389. XThis command invokes the XMODEM or XMODEM-1K file transfer protocol
  1390. Xto send a file.  If '-k' is supplied, XMODEM-1K is used, else XMODEM.
  1391. XIf switch '-a' is supplied,
  1392. Xnewlines are converted to carriage return/linefeed pairs.
  1393. XIf '-a' is omitted, the file(s) are transmitted without modification.
  1394. XIf '-l' is supplied, then <label-str> specifies a string to
  1395. Xdisplay on the bottom of the file transfer screen.  If '-l' is
  1396. Xomitted, then <label_str> must also be omitted.
  1397. X
  1398. XInteger variable $i0 receives the exit status from the transfer. If 0,
  1399. Xtransfer was normal.
  1400. XNote:
  1401. Xprocedure execution IS terminated by a SIGINT to the spawned file
  1402. Xtransfer process.  This is different than for versions prior to 3.10.
  1403. XIf $i0 is set to -1, the file transfer program did not begin.
  1404. X
  1405. X.DS L
  1406. XExamples:
  1407. X
  1408. X    sx -al 'sending log file' '/tmp/log.file'
  1409. X    sx -
  1410. X.DE
  1411. X
  1412. X.*s 3 "sy"
  1413. Xusage: sy [-a[l]] [<label-str>] <filelist-str>
  1414. X
  1415. XThis command invokes the YMODEM Batch (not 
  1416. Xto be confused with XMODEM-1K) file transfer protocol
  1417. Xto send one or more files. 
  1418. X
  1419. XIf switch '-a' is supplied,
  1420. Xnewlines are converted to carriage return/linefeed pairs.
  1421. XIf '-a' is omitted, the file(s) are transmitted without modification.
  1422. XIf '-l' is supplied, then <label-str> specifies a string to
  1423. Xdisplay on the bottom of the file transfer screen.  If '-l' is
  1424. Xomitted, then <label_str> must also be omitted.
  1425. X
  1426. XInteger variable $i0 receives the exit status from the transfer. If 0,
  1427. Xtransfer was normal.
  1428. XNote:
  1429. Xprocedure execution IS terminated by a SIGINT to the spawned file
  1430. Xtransfer process.  This is different than for versions prior to 3.10.
  1431. XIf $i0 is set to -1, the file transfer program did not begin.
  1432. X
  1433. X.*s 3 "system"
  1434. Xusage: system [-l] <cmdstr>
  1435. X
  1436. XIf switch '-l', is supplied, the attached communications line 
  1437. Xbecomes the stdin and stdout for the command.
  1438. X
  1439. XInteger variable $i0 is set to
  1440. Xthe spawned process' exit status if the process exits "normally",
  1441. Xor 0x100 if the process is killed, dumps core or interrupted.
  1442. X
  1443. XNote:  procedure execution is NOT terminated by a SIGINT to
  1444. Xthe spawned process.  It is the responsibility of the procedure
  1445. Xto process the exit status returned in $i0.
  1446. XIf $i0 is set to -1, the file transfer program did not begin.
  1447. X
  1448. X.*s 3 "sz"
  1449. Xusage: sz [-anf[l]] [<label-str>] <filelist-str>
  1450. X
  1451. XThis command invokes the ZMODEM (CRC-32 capable)
  1452. Xfile transfer protocol to send one or more files. 
  1453. X
  1454. XSwitch '-n' causes the receiver to accept files with do not
  1455. Xalready exist at the remote system or which have older
  1456. Xtimes of  last access that at the sending system.
  1457. X
  1458. XSwitch '-f'  causes the full pathname of each file to be sent;
  1459. Xotherwise, the simple filename is transmitted.
  1460. X
  1461. XIf switch '-a' is supplied,
  1462. Xnewlines are converted to carriage return/linefeed pairs.
  1463. XIf '-a' is omitted, the file(s) are transmitted without modification.
  1464. X
  1465. XIf '-l' is supplied, then <label-str> specifies a string to
  1466. Xdisplay on the bottom of the file transfer screen.  If '-l' is
  1467. Xomitted, then <label_str> must also be omitted.
  1468. X
  1469. XInteger variable $i0 receives the exit status from the transfer. 
  1470. XIf 0, transfer was normal.  Other $i0 values possible:
  1471. X.DS L
  1472. X  1-126:   count of files not transmitted (see ~/.ecu/log)
  1473. X  127:     127 or more files not transmitted (see ~/.ecu/log)
  1474. X.DE
  1475. XOther ecusz error codes are shown here for refernce, but
  1476. Xthey are converted by ECU to printed messages and result in procedure
  1477. Xtermination.
  1478. X.DS L
  1479. X  128-192: process terminated with signal==code-128
  1480. X           signal 0 == program logic error
  1481. X  253:     could not open any files
  1482. X  254:     protocol failed (bad line conditions,brain dead remote)
  1483. X  255:     usage
  1484. X.DE
  1485. X
  1486. XNote:
  1487. Xprocedure execution IS terminated by a SIGINT to the spawned file
  1488. Xtransfer process.  This is different than for versions prior to 3.10.
  1489. XIf $i0 is set to -1, the file transfer program did not begin.
  1490. X
  1491. X.*s 3 "vidcolor"
  1492. Xusage: vidcolor <type> <fcolor> [<bcolor>]
  1493. X
  1494. XThis command allows control over the internal color choices
  1495. XECU makes.  <type> must be one of the following:
  1496. X
  1497. X.DS I
  1498. Xnormal   - normal video color
  1499. Xreverse  - reverse video color
  1500. Xnotify   - color used for low key notifications such as
  1501. X           "[interactive mode]" and "[procedure finished]"
  1502. Xsuccess  - color used for modem CONNECT messages and other
  1503. X           "success" notifications
  1504. Xalert    - color used to alert user for warning or caution
  1505. X           purposes
  1506. Xerror    - color used to display error status or messages
  1507. X.DE
  1508. X
  1509. X<fcolor> and <bcolor> are color names as described in the description of the
  1510. X.B color
  1511. Xcommand. <fcolor> choses the foreground color and must be supplied.
  1512. X<bcolor> choses the background color and is optional; if not supplied,
  1513. Xthe background color is black.
  1514. X
  1515. XNote: The vidcolor normal and reverse options are analogs of the
  1516. X.B color
  1517. Xand
  1518. X.B
  1519. Xcolor -r
  1520. X.R
  1521. Xcommand.
  1522. X
  1523. X.DS L
  1524. XExamples:  (showing ECU default internal color list)
  1525. X
  1526. X    vidcolor normal lt_green 
  1527. X    vidcolor reverse red white
  1528. X    vidcolor notify gray
  1529. X    vidcolor success lt_green 
  1530. X    vidcolor alert yellow 
  1531. X    vidcolor error red 
  1532. X.DE
  1533. X
  1534. X.*s 3 "vidnorm"
  1535. Xusage: vidnorm
  1536. X
  1537. XThis command causes later screen output to appear in the
  1538. Xnormal, as opposed to reverse video mode.
  1539. XThe
  1540. X.B color
  1541. Xcommand forces normal video mode.
  1542. X
  1543. X.*s 3 "vidrev"
  1544. Xusage: vidrev
  1545. X
  1546. XThis command causes later screen output to appear in the
  1547. Xreverse, as opposed to normal video mode.
  1548. XThe
  1549. X.B color
  1550. Xcommand forces normal video mode.
  1551. X
  1552. X.*s 3 "whilei"
  1553. X.DS L
  1554. Xusage: whilei <int> <rel-op> <int> <statement>
  1555. X       whilei <int> <rel-op> <int>
  1556. X           <statement>
  1557. X       whilei <int> <rel-op> <int>
  1558. X       {
  1559. X           any kind or number of statements
  1560. X       }
  1561. X.DE
  1562. X
  1563. XThis command executes a loop one or more statements
  1564. Xbased on a test of two integer quantities.  See the
  1565. Xdescription of the
  1566. X.B break ,
  1567. X.B else ,
  1568. X.B whilei ,
  1569. Xand
  1570. X.B whiles
  1571. Xcommmands for examples of how the command is used.
  1572. X
  1573. X.*s 3 "whiles"
  1574. X.DS L
  1575. Xusage: whiles <str> <rel-op> <str> <statement>
  1576. X       whiles <int> <rel-op> <int>
  1577. X           <statement>
  1578. X       whiles <int> <rel-op> <int>
  1579. X       {
  1580. X           any kind or number of statements
  1581. X       }
  1582. X.DE
  1583. X
  1584. XThis command executes a loop of one or more statements
  1585. Xbased on a test of two string values.  See the
  1586. Xdescription of the
  1587. X.B break ,
  1588. X.B continue ,
  1589. Xand
  1590. X.B else
  1591. Xcommmands
  1592. Xand many other examples throughout the document,
  1593. Xfor examples of how the command is used.
  1594. X
  1595. X.*s 3 "xon"
  1596. X.DS L
  1597. Xusage: xon <arg>
  1598. Xwhere <arg> is on    input and output flow control
  1599. X               off   no flow control
  1600. X               in    input flow control
  1601. X               out   output flow control
  1602. X.DE
  1603. X
  1604. XThis command enables or disables xon/xoff flow control.
  1605. X
  1606. X.DS L
  1607. XExamples:
  1608. X
  1609. X    hangup
  1610. X    dial 'mysys'
  1611. X    ifi %conn != 0 parity none;xon on
  1612. X.DE
  1613. SHAR_EOF
  1614. echo 'File doc/_p_cmd.txt is complete' &&
  1615. $TOUCH -am 0718163391 'doc/_p_cmd.txt' &&
  1616. chmod 0644 doc/_p_cmd.txt ||
  1617. echo 'restore of doc/_p_cmd.txt failed'
  1618. Wc_c="`wc -c < 'doc/_p_cmd.txt'`"
  1619. test 47681 -eq "$Wc_c" ||
  1620.     echo 'doc/_p_cmd.txt: original size 47681, current size' "$Wc_c"
  1621. rm -f _shar_wnt_.tmp
  1622. fi
  1623. # ============= doc/_p_ifunc.txt ==============
  1624. if test -f 'doc/_p_ifunc.txt' -a X"$1" != X"-c"; then
  1625.     echo 'x - skipping doc/_p_ifunc.txt (File already exists)'
  1626.     rm -f _shar_wnt_.tmp
  1627. else
  1628. > _shar_wnt_.tmp
  1629. echo 'x - extracting doc/_p_ifunc.txt (Text)'
  1630. sed 's/^X//' << 'SHAR_EOF' > 'doc/_p_ifunc.txt' &&
  1631. X.*s 2 "Integer Functions"
  1632. X
  1633. X.*s 3 "%argc"
  1634. X
  1635. XThis function returns the number of arguments passes to the current
  1636. Xprocedure.
  1637. X
  1638. X
  1639. X
  1640. X.*s 3 "%baud"
  1641. X
  1642. XThis function returns the baud rate of the communications line.
  1643. XIf no line is currently attached, the baud rate returned
  1644. Xis the value of the last line attached.  If no line has been attached
  1645. Xduring the current session, the default baud rate is returned.
  1646. X
  1647. X.*s 3 "%colors"
  1648. X
  1649. XThis function returns the state of the normal and reverse video
  1650. Xforeground and background colors in the 32-bit value:
  1651. X.DS I
  1652. X00000000001111111111222222222233
  1653. X01234567890123456789012345678901
  1654. X0000|--|0000|--|0000|--|0000|--|
  1655. X     fg      bk      fg      bk
  1656. X      reverse          normal
  1657. X.DE
  1658. X
  1659. XThe color values are obtained from the following lists:
  1660. X.DS L
  1661. X.B
  1662. X    Alphabetic Order
  1663. X.R
  1664. X    black        0
  1665. X    blue         1
  1666. X    brown        6
  1667. X    cyan         3
  1668. X    gray         8
  1669. X    green        2
  1670. X    hi_white    15
  1671. X    lt_blue      9
  1672. X    lt_cyan     11
  1673. X    lt_green    10
  1674. X    lt_magenta  13
  1675. X    lt_red      12
  1676. X    magenta      5
  1677. X    red          4
  1678. X    white        7
  1679. X    yellow      14
  1680. X.DE
  1681. X
  1682. X.DS L
  1683. X.B
  1684. X    Numeric Order
  1685. X.R
  1686. X    black        0
  1687. X    blue         1
  1688. X    green        2
  1689. X    cyan         3
  1690. X    red          4
  1691. X    magenta      5
  1692. X    brown        6
  1693. X    white        7
  1694. X    gray         8
  1695. X    lt_blue      9
  1696. X    lt_green    10
  1697. X    lt_cyan     11
  1698. X    lt_red      12
  1699. X    lt_magenta  13
  1700. X    yellow      14
  1701. X    hi_white    15
  1702. X.DE
  1703. X
  1704. X.*s 3 "%cols"
  1705. X
  1706. XThis function returns the screen width in columns.
  1707. XIf running non-interactively, the value will always be 80.
  1708. X
  1709. X.*s 3 "%conn"
  1710. X
  1711. XThis function returns the communications
  1712. Xline file descriptor if a connection is in progress, else 0.
  1713. XNOTE:  if carrier is lost abnormally, %conn will return non-zero
  1714. Xincorrectly.
  1715. X
  1716. X.*s 3 "%curx"
  1717. X
  1718. XThis function returns the display cursor column position last set by the
  1719. Xremote system.  This value does not reflect the actual hardware cursor.
  1720. X
  1721. X.*s 3 "%cury"
  1722. X
  1723. XThis function returns the display cursor row position last set by the
  1724. Xremote system.  This value does not reflect the actual hardware cursor.
  1725. X
  1726. X.*s 3 "%csec"
  1727. X
  1728. XThis function returns the number of seconds ECU has been
  1729. Xconnected to a remote system.  If ECU is not connected,
  1730. Xzero is returned.
  1731. X
  1732. X.*s 3 "%ctoi"
  1733. X
  1734. Xusage: %ctoi(str0)
  1735. X
  1736. XThis function returns the integer value of the first
  1737. Xcharacter in string str0.  If str0 is non-empty, the return value
  1738. Xwill be between 0 and 255, inclusive.  if str0 is empty,
  1739. Xthen -1 is returned.
  1740. X
  1741. X.*s 3 "%esecs"
  1742. X
  1743. Xusage: %esecs
  1744. X
  1745. XThis function , "Epoch SECondS,"
  1746. Xreturns the number of seconds since January 1, 1970 00:00 UTC
  1747. X(GMT).
  1748. X
  1749. X.*s 3 "%fatime"
  1750. X.DS L
  1751. Xusage: %fatime(int0)
  1752. X       %fatime(str0)
  1753. X.DE
  1754. X
  1755. XThis function returns the time of last access of the file referenced
  1756. Xby the argument.
  1757. XIf the argument is an integer, the file referenced is the file
  1758. Xopened by that number with the
  1759. X.B fopen
  1760. Xcommand.
  1761. XIf the argument is a string, it is the literal filename.
  1762. X
  1763. XIf int0 does not refer to an open file, the procedure
  1764. Xterminates with an error.
  1765. XIf the file specified by str0 does not exist, -1 is returned.
  1766. X
  1767. XThe return value is the number of seconds since January 1, 1970
  1768. Xat 0000 UTC.
  1769. XThe
  1770. X.B %edate
  1771. Xstring function may be used to convert the integer
  1772. Xvalue to a string representation of the date and time
  1773. Xexpressed relative to the current time zone.
  1774. X
  1775. X.*s 3 "%fmode"
  1776. X.DS L
  1777. Xusage: %fmode(int0)
  1778. X       %fmode(str0)
  1779. X.DE
  1780. X
  1781. XThis function returns the file mode value ("rwxrwx---" == 077)
  1782. Xof the file referenced
  1783. Xby the argument.
  1784. XIf the argument is an integer, the file referenced is the file
  1785. Xopened by that number with the
  1786. X.B fopen
  1787. Xcommand.
  1788. XIf the argument is a string, it is the literal filename.
  1789. X
  1790. XIf int0 does not refer to an open file, the procedure
  1791. Xterminates with an error.
  1792. XIf the file specified by str0 does not exist, -1 is returned.
  1793. X
  1794. X.*s 3 "%fmtime"
  1795. X.DS L
  1796. Xusage: %fmtime(int0)
  1797. X       %fmtime(str0)
  1798. X.DE
  1799. X
  1800. XThis function returns the time of last modified of the file referenced
  1801. Xby the argument.
  1802. XIf the argument is an integer, the file referenced is the file
  1803. Xopened by that number with the
  1804. X.B fopen
  1805. Xcommand.
  1806. XIf the argument is a string, it is the literal filename.
  1807. X
  1808. XIf int0 does not refer to an open file, the procedure
  1809. Xterminates with an error.
  1810. XIf the file specified by str0 does not exist, -1 is returned.
  1811. X
  1812. XThe return value is the number of seconds since January 1, 1970
  1813. Xat 0000 UTC.
  1814. XThe
  1815. X.B %edate
  1816. Xstring function may be used to convert the integer
  1817. Xvalue to a string representation of the date and time
  1818. Xexpressed relative to the current time zone.
  1819. X
  1820. X.*s 3 "%fmode"
  1821. X.DS L
  1822. Xusage: %fmode(int0)
  1823. X       %fmode(str0)
  1824. X.DE
  1825. X
  1826. XThis function returns the size
  1827. Xof the file referenced
  1828. Xby the argument.
  1829. XIf the argument is an integer, the file referenced is the file
  1830. Xopened by that number with the
  1831. X.B fopen
  1832. Xcommand.
  1833. XIf the argument is a string, it is the literal filename.
  1834. X
  1835. XIf int0 does not refer to an open file, the procedure
  1836. Xterminates with an error.
  1837. XIf the file specified by str0 does not exist, -1 is returned.
  1838. X
  1839. X.*s 3 "%ftell"
  1840. X
  1841. Xusage: ftell(int0)
  1842. X
  1843. XThis function returns the current file position
  1844. Xof the the file
  1845. Xopened by int0 with the
  1846. X.B fopen
  1847. Xcommand.
  1848. X
  1849. XIf int0 does not refer to an open file, the procedure
  1850. Xterminates with an error.
  1851. X
  1852. X.*s 3 "%instr"
  1853. X
  1854. Xusage: %instr(str0,str1)
  1855. X
  1856. XThis function returns the leftmost column position withing str0
  1857. Xthat str1 is found (zero relative).  If str1 cannot be found in
  1858. Xstring str0, -1 is returned.  However, if str1 is null and str0 is not,
  1859. Xzero will be returned (i.e., the null string matches at the left).
  1860. X
  1861. XThe comparison is made without regard to case. See also
  1862. X.B %instr .
  1863. X
  1864. X.DS I
  1865. XExamples:
  1866. X
  1867. X            00000000001111111
  1868. X            01234567890123456
  1869. XAssume $s0='abcdefghijklmnabc'
  1870. X       $s1='abc'
  1871. X       $s2='gHi'
  1872. X       $s3='cat'
  1873. X
  1874. X       %instr($s0,$s1)        returns 0
  1875. X       %instr($s0,$s2)        returns 6
  1876. X       %instr($s0,$s3)        returns -1
  1877. X       %instr($s0,'bcd')      returns 2
  1878. X       %instr($s0,'bad')      returns -1
  1879. X.DE
  1880. X
  1881. X.*s 3 "%ischr"
  1882. X.DS L
  1883. Xusage: %ischr(int0)
  1884. X       %ischr(str0)
  1885. X.DE
  1886. X
  1887. XThis function returns 1 if the file referenced by the argument is a
  1888. Xcharacter special file,
  1889. Xelse 0.
  1890. XIf the argument is an integer, the file referenced is the file
  1891. Xopened by that number with the
  1892. X.B fopen
  1893. Xcommand.
  1894. XIf the argument is a string, it is the literal filename.
  1895. X
  1896. XIf int0 does not refer to an open file, the procedure
  1897. Xterminates with an error.
  1898. XIf the file specified by str0 does not exist, -1 is returned.
  1899. X
  1900. XExamples:
  1901. X
  1902. X.DS I
  1903. X%ischr('/dev/tty')    returns 1
  1904. X%ischr('/usr/bin')    returns 0
  1905. X%ischr('/xenix')      returns 0
  1906. X.DE
  1907. X
  1908. X.*s 3 "%isdir"
  1909. X.DS L
  1910. Xusage: %isdir(int0)
  1911. X       %isdir(str0)
  1912. X.DE
  1913. X
  1914. XThis function returns 1 if the file referenced by the argument is a
  1915. Xdirectory file,
  1916. Xelse 0.
  1917. XIf the argument is an integer, the file referenced is the file
  1918. Xopened by that number with the
  1919. X.B fopen
  1920. Xcommand.
  1921. XIf the argument is a string, it is the literal filename.
  1922. X
  1923. XIf int0 does not refer to an open file, the procedure
  1924. Xterminates with an error.
  1925. XIf the file specified by str0 does not exist, -1 is returned.
  1926. X
  1927. XExamples:
  1928. X
  1929. X.DS I
  1930. X%isdir('/dev/tty')    returns 0
  1931. X%isdir('/usr/bin')    returns 1
  1932. X%isdir('/xenix')      returns 0
  1933. X.DE
  1934. X
  1935. X.*s 3 "%isreg"
  1936. X.DS L
  1937. Xusage: %isreg(int0)
  1938. X       %isreg(str0)
  1939. X.DE
  1940. X
  1941. XThis function returns 1 if the file referenced by the argument is a
  1942. Xregular file,
  1943. Xelse 0.
  1944. XIf the argument is an integer, the file referenced is the file
  1945. Xopened by that number with the
  1946. X.B fopen
  1947. Xcommand.
  1948. XIf the argument is a string, it is the literal filename.
  1949. X
  1950. XIf int0 does not refer to an open file, the procedure
  1951. Xterminates with an error.
  1952. XIf the file specified by str0 does not exist, -1 is returned.
  1953. X
  1954. XExamples:
  1955. X
  1956. X.DS I
  1957. X%isreg('/dev/tty')    returns 0
  1958. X%isreg('/usr/bin')    returns 0
  1959. X%isreg('/xenix')      returns 1
  1960. X.DE
  1961. X
  1962. X.*s 3 "%len"
  1963. X
  1964. Xusage: %len(str0)
  1965. X
  1966. XThis function returns the length of str0.
  1967. X.DS I
  1968. XExample:
  1969. X
  1970. Xset str0='abcdef',i0=%len(str0),i1=%len('1234')
  1971. Xstr00 = 'abcdef'
  1972. Xint00 = 6
  1973. Xint01 = 4
  1974. X.DE
  1975. X
  1976. X.*s 3 "%lgetc"
  1977. X
  1978. Xusage: %lgetc
  1979. X
  1980. XReads a character from the line and returns it.
  1981. X
  1982. X.*s 3 "%lines"
  1983. X
  1984. XThis function returns the screen height in lines.
  1985. XIf running non-interactively, the value will always be 25.
  1986. X
  1987. X.*s 3 "%nice"
  1988. X
  1989. Xusage: %nice
  1990. X
  1991. XThis function returns the nice value of the ECU process.
  1992. X
  1993. X.*s 3 "%pid"
  1994. X
  1995. XThis function returns the process id (pid) of ECU.
  1996. X
  1997. X.*s 3 "%match"
  1998. X
  1999. Xusage: %match(str0,str1)
  2000. X
  2001. XThis function searches string str0 for a match with the regular
  2002. Xexpression in str1 (for information on regular expressions,
  2003. Xrefer to the ed(C) manual pages).
  2004. XThe function returns the index into str0 where the
  2005. Xmatch is found or -1 if no match can be found.
  2006. XThe matching process is case sensitive.
  2007. SHAR_EOF
  2008. true || echo 'restore of doc/_p_ifunc.txt failed'
  2009. fi
  2010. echo 'End of ecu310 part 34'
  2011. echo 'File doc/_p_ifunc.txt is continued in part 35'
  2012. echo 35 > _shar_seq_.tmp
  2013. exit 0
  2014. --------------------------------------------------------------------
  2015. Warren Tucker, TuckerWare emory!n4hgf!wht or wht@n4hgf.Mt-Park.GA.US
  2016. Hacker Extraordinaire  d' async PADs,  pods,  proteins and protocols
  2017.  
  2018. exit 0 # Just in case...
  2019. -- 
  2020. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  2021. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  2022. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  2023. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  2024.