home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sources / misc / 3972 < prev    next >
Encoding:
Text File  |  1992-09-15  |  57.6 KB  |  2,388 lines

  1. Newsgroups: comp.sources.misc
  2. Path: sparky!kent
  3. From: wht@n4hgf.Mt-Park.GA.US (Warren Tucker)
  4. Subject:  v32i080:  ecuman - Manual for ECU comm package rev 3.20, Part04/05
  5. Message-ID: <1992Sep15.165736.7647@sparky.imd.sterling.com>
  6. Followup-To: comp.sources.d
  7. X-Md4-Signature: 71a24941929272cc50367da217440932
  8. Sender: kent@sparky.imd.sterling.com (Kent Landfield)
  9. Organization: Sterling Software
  10. References: <csm-v32i077=ecuman.115248@sparky.IMD.Sterling.COM>
  11. Date: Tue, 15 Sep 1992 16:57:36 GMT
  12. Approved: kent@sparky.imd.sterling.com
  13. Lines: 2373
  14.  
  15. Submitted-by: wht@n4hgf.Mt-Park.GA.US (Warren Tucker)
  16. Posting-number: Volume 32, Issue 80
  17. Archive-name: ecuman/part04
  18. Environment: SCO,XENIX,ISC,SUNOS,SYSVR4,HDB,Curses
  19. Supersedes: ecuman: Volume 21, Issue 90-93
  20.  
  21. ---- Cut Here and feed the following to sh ----
  22. #!/bin/sh
  23. # this is ecuman320.04 (part 4 of ecuman320)
  24. # do not concatenate these parts, unpack them in order with /bin/sh
  25. # file doc/proc.man continued
  26. #
  27. if test ! -r _shar_seq_.tmp; then
  28.     echo 'Please unpack part 1 first!'
  29.     exit 1
  30. fi
  31. (read Scheck
  32.  if test "$Scheck" != 4; then
  33.     echo Please unpack part "$Scheck" next!
  34.     exit 1
  35.  else
  36.     exit 0
  37.  fi
  38. ) < _shar_seq_.tmp || exit 1
  39. if test ! -f _shar_wnt_.tmp; then
  40.     echo 'x - still skipping doc/proc.man'
  41. else
  42. echo 'x - continuing file doc/proc.man'
  43. sed 's/^X//' << 'SHAR_EOF' >> 'doc/proc.man' &&
  44. X
  45. X
  46. X    This command changes the current normal or reverse video colors in a
  47. X    manner similar to the setcolor(C) command.    It has no effect on systems
  48. X    using other    than an    SCO multiscreen    color monitor. If the second
  49. X    (background) color is omitted, it is assumed to be black.
  50. X
  51. X    The    command    also forces normal video mode.    Refer to the vidnorm and
  52. X    vidrev commands.  Refer also to the    vidcolor command.
  53. X
  54. X
  55. X    Color names
  56. X       blue     magenta      brown     black
  57. X       lt_blue     lt_magenta   yellow     gray
  58. X       cyan     white          green     red
  59. X       lt_cyan     hi_white     lt_green     lt_red
  60. X
  61. X    Example:
  62. X
  63. X    color lt_green    # normal video light green on black
  64. X    color -r red white # reverse video red on white
  65. X
  66. X
  67. X
  68. X    6.8     continue
  69. X
  70. X
  71. X    usage: continue
  72. X
  73. X    This command is used inside    a whilei or whiles compound statement to
  74. X    skip the remainder of any commands in the loop and continue    execution at
  75. X    the    first command in the loop.
  76. X
  77. X
  78. X
  79. X
  80. X
  81. X
  82. X
  83. X
  84. X    Public Domain by wht@n4hgf                 9/10/92
  85. X
  86. X
  87. X
  88. X
  89. X
  90. X
  91. X
  92. X    ECU    Procedure Language                      33
  93. X
  94. X
  95. X
  96. X    Example:
  97. X
  98. X    send ''    # send ENTER to    get prompt
  99. X    whilei 1=1 # forever unless break command executed
  100. X    {
  101. X        lookfor -e 'login: ' # look    for login prompt
  102. X        ifi    $i0 == 0     # if we dont get prompt ...
  103. X        {
  104. X        send ''         # send    ENTER again
  105. X        continue     # and look for    login prompt
  106. X        }
  107. X        send $s_name     # send    username
  108. X        lookfor -e 'Password:'
  109. X        send $s_password
  110. X        get    -e 0 50         # wait    10 seconds for response
  111. X
  112. X        # if incorrect not found in    response, ...
  113. X        if %instr($s0,'incorrect') < 0 # ... must have won
  114. X        break
  115. X
  116. X        # garbled line?: system will send another 'login: '
  117. X    }
  118. X
  119. X
  120. X
  121. X    NOTE: further examples of continue usage may be found in the example for
  122. X    the    else command.
  123. X
  124. X
  125. X    6.9     cursor
  126. X
  127. X
  128. X    usage: cursor <row>    [<col>]
  129. X
  130. X    This command places    the cursor at a    specified position on the video
  131. X    screen.  The top left of the scrren    is row 0, column 0.  If    <col> is not
  132. X    specified, it is assumed 0 (left margin).
  133. X
  134. X    Example:
  135. X
  136. X    cls
  137. X    $i0 = 5
  138. X    whilei $i5 < 12
  139. X    {
  140. X        cursor $i5
  141. X        echo 'This is line '+%itos($i5,2d)+' of the    display'
  142. X    }
  143. X
  144. X
  145. X
  146. X
  147. X
  148. X
  149. X
  150. X    Public Domain by wht@n4hgf                 9/10/92
  151. X
  152. X
  153. X
  154. X
  155. X
  156. X
  157. X
  158. X    ECU    Procedure Language                      34
  159. X
  160. X
  161. X
  162. X    6.10  dcdwatch
  163. X
  164. X
  165. X    usage: dcdwatch [<dcdwatch-param>]
  166. X
  167. X    This command controls the DCD watcher.  The    optional argument may be:
  168. X
  169. X       y or yes        enable DCD watcher
  170. X       n or no        disable    DCD watcher
  171. X       t or terminate    terminate ECU on loss of DCD
  172. X
  173. X
  174. X    The    DCD watcher when enabled causes    ECU to monitor the DCD line (within
  175. X    the    limits imposed by the OS with its CLOCAL=0 functionality).  When the
  176. X    watcher is on and DCD drops, ecu automatically performs the    action of
  177. X    the    interactive or procedure hangup    command.  If the 't'erminate option
  178. X    is chosen, then after hangup processing is complete, the ECU program
  179. X    will terminate.
  180. X
  181. X    The    state of the watcher may be changed by the use of the dial command
  182. X    which uses a directory entry which changes the DCD watcher status.
  183. X
  184. X    The    DCD watcher depends upon the tty driver    to return zero characters on
  185. X    a read when    DCD is low when    the termio flag    CLOCAL is reset.  The tty
  186. X    driver must    ignore DCD if CLOCAL is    set.  If your system offers a
  187. X    "modem" and    "direct" choice    (by choice of filename), you probably need
  188. X    to use the "modem" choice for this to work properly.  This decision    is
  189. X    made properly for you on SCO if you    are using SCO "standard" tty line
  190. X    naming conventions.     This is true even though ECU appears to force a tty
  191. X    name with trailing upper case characters (modem) to    one with a lower
  192. X    case character (direct).
  193. X
  194. X
  195. X    6.11  delline
  196. X
  197. X
  198. X    usage: delline
  199. X
  200. X    This command deletes the current line from the video display.
  201. X
  202. X
  203. X    6.12  dial
  204. X
  205. X
  206. X    usage: dial    <remote>
  207. X
  208. X    This command causes    an outgoing call to be placed.    The string argument
  209. X    <remote> can take one of two forms:    a numeric telephone number or an
  210. X    alphanumeric "logical" number or system name.
  211. X
  212. X    A numeric phone number ('1(800)555-1212' or    '2345678') must    begin with a
  213. X
  214. X
  215. X
  216. X    Public Domain by wht@n4hgf                 9/10/92
  217. X
  218. X
  219. X
  220. X
  221. X
  222. X
  223. X
  224. X    ECU    Procedure Language                      35
  225. X
  226. X
  227. X
  228. X    digit and must consist entirely of digits, parentheses or hyphens.    If a
  229. X    telephone number is    supplied, the phone number is dialed; you must first
  230. X    have set the desired baud rate and parity using the    'baud' and 'parity'
  231. X    commands.  (If the last character of a telephone number is a dollar
  232. X    sign, it is    removed    and is replaced    with the contents of the first line
  233. X    in ~/.ecu/credit.  See the description of the dialing directory.)
  234. X
  235. X    If a logical name is entered, the phone directory (managed by the
  236. X    interactive    dial command) is searched; if the entry    is found, the baud
  237. X    rate and parity is automatically set from values in    the directory entry;
  238. X    then, the number in    the directory entry is dialed.
  239. X
  240. X    Using the dial command with    a directory entry may change the DCD watcher
  241. X    (dcdwatch) status.    See the    section    on the dcdwatch    command    and the
  242. X    section titled "Choosing a Dialout Line" for more information.
  243. X
  244. X    When the dial command returns, integer variable $i0    is set to a status
  245. X    code and string variable $s0 has a text message (the modem verbal result
  246. X    code if the    ECU dialer is used, a representation of    the return status
  247. X    code if a uucp dialer is used [see below]).
  248. X
  249. X    Dial Command $i0 Status Codes
  250. X
  251. X    0  successful connect
  252. X    1  failed to connect (call progress)
  253. X    2  dial    interrupted by signal
  254. X    3  modem error (non responsive or commands rejected)
  255. X
  256. X    Dial Command $s0 Status Messages (uucp dialer)
  257. X
  258. X    CONNECT    ####           #### = baud rate
  259. X    BUSY               only some modems
  260. X    NO ANSWER           only some modems
  261. X    NO CARRIER           most generic "fail to connect"
  262. X    NO DIAL    TONE           only some modems
  263. X    !Connect bad baud rate modem reported different    rate
  264. X    !Interrupted           call interrupted    by signal
  265. X    !Invalid arguments     ECU error
  266. X    !Invalid phone number  too long    or bad characters
  267. X    !Ioctl error           should not be reported here
  268. X    !Line in use           should not be reported here
  269. X    !Line open error       should not be reported here
  270. X    !Modem Error           modem did not respond
  271. X
  272. X    Note: if the ECU dialer is used, the actual    modem result code
  273. X    is returned    in $s0 or one of the following two strings:
  274. X
  275. X    !Interrupted           call interrupted    by signal
  276. X    !Modem Error           modem did not respond
  277. X
  278. X
  279. X
  280. X
  281. X
  282. X    Public Domain by wht@n4hgf                 9/10/92
  283. X
  284. X
  285. X
  286. X
  287. X
  288. X
  289. X
  290. X    ECU    Procedure Language                      36
  291. X
  292. X
  293. X
  294. X    6.13  do
  295. X
  296. X
  297. X    usage: do <procname> [<arg>    ...]
  298. X
  299. X    This command executes a procedure whose name appears as the    command's
  300. X    first (string) argument.  One or more arguments (up    to 19) may be passed
  301. X    to the called procedure; an    argument may consist of    any valid string
  302. X    expression,    provided, that,    when expanded,    the argument does not exceed
  303. X    256    characters in length.
  304. X
  305. X    The    called procedure may read its arguments    using the %argv    string
  306. X    function.  %argv(0)    is the name of the procedure.  The quantity of
  307. X    arguments may be obtained using the    %argc integer function.
  308. X
  309. X
  310. X    Example:
  311. X
  312. X    do 'proc' %rname %date+' '+%time %argv(0)
  313. X
  314. X    Note: in this example, the called procedure    is passed the name
  315. X    of the calling procedure as    the last argument.
  316. X
  317. X
  318. X
  319. X    6.14  duplex
  320. X
  321. X
  322. X
  323. X    usage: duplex full | half
  324. X       duplex 'full' | 'half'
  325. X
  326. X
  327. X    This command specifies whether or not ECU is to locally echo characters
  328. X    typed by you at the    keyboard.  The overwhelming majority of    remote
  329. X    systems provide the    echo function, in which    case full duplex must be
  330. X    used.  For the rare    occasions when the remote system does not echo your
  331. X    keyboard input, setting half duplex    will allow you to see what you are
  332. X    typing.
  333. X
  334. X    When communicating with another terminal in    a "teletype conversation",
  335. X    setting half duplex    is generally required.    In such    cases, use of the
  336. X    interactive    nl, nlin and nlout commands may    also be    required.
  337. X
  338. X    Example:
  339. X
  340. X    duplex full
  341. X    $s0 = 'full'; duplex $s0
  342. X
  343. X
  344. X
  345. X
  346. X
  347. X
  348. X    Public Domain by wht@n4hgf                 9/10/92
  349. X
  350. X
  351. X
  352. X
  353. X
  354. X
  355. X
  356. X    ECU    Procedure Language                      37
  357. X
  358. X
  359. X
  360. X    6.15  echo
  361. X
  362. X
  363. X    usage: echo    [-n] <string>
  364. X
  365. X    This command prints    the contents of    the string argument <string> on    the
  366. X    screen.  If    the -n switch is not present, a    newline    follows    the output
  367. X    of <string>.
  368. X
  369. X    Example:
  370. X
  371. X    echo 'Procedure    '+%argv(0)+' executing at '+%time
  372. X    echo -n    'Enter your first name:    '; $s0 = %cgets
  373. X
  374. X
  375. X
  376. X    6.16  eeol
  377. X
  378. X
  379. X    usage: eeol
  380. X
  381. X    This command erases    the video display to the end of    the line.
  382. X
  383. X
  384. X    6.17  else
  385. X
  386. X
  387. X
  388. X    usage: else    <statement>
  389. X
  390. X       else
  391. X           <statement>
  392. X
  393. X       else
  394. X       {
  395. X        any kind and number of statements
  396. X       }
  397. X
  398. X       else    <if> <statement>
  399. X
  400. X       else    <if>
  401. X       {
  402. X        any kind and number of statements
  403. X       }
  404. X
  405. X
  406. X
  407. X    This statement may follow an ifi or    ifs command to specify one or more
  408. X    statements to be executed if the if-type command condition is false.
  409. X    Else commands may be chained together in the traditional structured
  410. X    language manner.
  411. X
  412. X
  413. X
  414. X    Public Domain by wht@n4hgf                 9/10/92
  415. X
  416. X
  417. X
  418. X
  419. X
  420. X
  421. X
  422. X    ECU    Procedure Language                      38
  423. X
  424. X
  425. X
  426. X    For    the purposes of    describing this    command, <statement> is    any single
  427. X    or compound    statement NOT containing a whilei or whiles command.  If you
  428. X    wish to have a while-type command executed as part of an else condition,
  429. X    the    while must occur within    braces ("{}").
  430. X
  431. X    <if> is an ifi or ifs command followed by an <if-condition>    (see the
  432. X    description    of the ifi or ifs commands below).
  433. X
  434. X    Example:
  435. X
  436. X    #+------------------------------------------------------
  437. X    # finger.ep    - procedure to send 'finger' to    remote
  438. X    # BSD Unix system; print resulting lines in    different
  439. X    # colors: uucp logins green, root red, others cyan
  440. X    #-------------------------------------------------------
  441. X
  442. X    mkvar $icolor; $icolor = %colors
  443. X    mkvar $itimeout
  444. X    $itimeout = 50       # timeout for first line 5 secs
  445. X    send 'ps -aux'       # send command, but do not echo
  446. X    lookfor    '\n' 40       # swallow command
  447. X    whilei 1==1       # forever, or until break
  448. X    {
  449. X        lgets 0 $itimeout 1    '\n' #get a line
  450. X        ifi    $i0 = 0    break #if no chaacters read
  451. X        $itimeout =    10 #wait 1 sec for later lines
  452. X
  453. X        ifi    %instr($s0,'% ') >= 0 #    if csh prompt seen
  454. X        break              #    exit while loop
  455. X        else ifi %instr($s0,'Login') >= 0
  456. X        color gray
  457. X        else ifi %instr($s0,'root')    >= 0
  458. X        color red
  459. X        else ifi %instr($s0,'uucp')    >= 0
  460. X        color green
  461. X        else color cyan
  462. X        echo $s0
  463. X    }
  464. X    icolor $icolor #restore    entry colors
  465. X    send ''           #force a    new prompt from    remote
  466. X
  467. X
  468. X
  469. X
  470. X    6.18  exec
  471. X
  472. X
  473. X    usage: exec    <string>
  474. X
  475. X    This function executes a string as a procedure statement.  Argument
  476. X    <string> must contain an ecu statement exactly as might appear on a
  477. X
  478. X
  479. X
  480. X    Public Domain by wht@n4hgf                 9/10/92
  481. X
  482. X
  483. X
  484. X
  485. X
  486. X
  487. X
  488. X    ECU    Procedure Language                      39
  489. X
  490. X
  491. X
  492. X    procedure line, with a few exceptions.
  493. X
  494. X
  495. X    1. There may be no label: the first    command    may
  496. X       start in    column one.
  497. X    2. You should not execute a    goto, gosub or return.
  498. X    3. You should not code if, while or    compound statement
  499. X       brackets.
  500. X
  501. X
  502. X    You    are on your honor with regard to items 2 and 3 above.  If you
  503. X    stretch it,    it will    break.
  504. X
  505. X
  506. X    Example:
  507. X
  508. X    $s20 = 'Home';     $s30 =    '^H'
  509. X    $s21 = 'End';     $s31 =    '^E'
  510. X    $s22 = 'F1';     $s32 =    '^A'
  511. X    $s23 = 'F2';     $s33 =    '^B'
  512. X    $i10 = 0
  513. X    whilei $i0 < 4
  514. X    {
  515. X        $s0    = 'fkmap '+$s[20+$i10]+' '+$s[30+$i10]
  516. X        exec $s0
  517. X        $i10 = $i10    + 1
  518. X    }
  519. X
  520. X
  521. X
  522. X    6.19  exit
  523. X
  524. X
  525. X    usage: exit    [<status>]
  526. X
  527. X    This command causes    an abrupt termination of the ECU program.  Any
  528. X    existing connection    with a remote system is    terminated immediately.     If
  529. X    no integer argument    <status> is found, ECU exits with a program exit
  530. X    status of 0.  If <status> is found and the value is    zero, then ECU exits
  531. X    with a program exit    status of 0.  If <status> non-zero,its value must be
  532. X    in the range of 1 to 31, and ECU exits with    a program exit status of 192
  533. X    plus <status>.  This feature allows    batch executions of ECU    by shell
  534. X    script to detect user-determined ECU execution status.  See    the section
  535. X    titled "Exit Codes".
  536. X
  537. X
  538. X
  539. X
  540. X
  541. X
  542. X
  543. X
  544. X
  545. X
  546. X    Public Domain by wht@n4hgf                 9/10/92
  547. X
  548. X
  549. X
  550. X
  551. X
  552. X
  553. X
  554. X    ECU    Procedure Language                      40
  555. X
  556. X
  557. X
  558. X    6.20  expresp
  559. X
  560. X
  561. X    usage: expresp [-v[v...]] <exp-resp-str> [<timeout_msecs>]
  562. X
  563. X    This command emulates the uuchat function as described in the SCO HDB
  564. X    UUCP documentation and in the /usr/lib/uucp/Dialers    file.
  565. X
  566. X    -v causes the expect-respond conversation between ECU and the remote
  567. X    system to be displayed on the screen.  This    switch is automatically
  568. X    enabled if procdedure tracing is enabled.
  569. X
  570. X    Multiple v's (e.g.,    -vv, -vvv) up to 3 'v's    produce    more verbose debug
  571. X    output. -vv    causes each base level expect and respond string to be
  572. X    displayed. -vvv causes a hexadecimal dump of each  interpreted expect
  573. X    string to be displayed.
  574. X
  575. X    The    majority of procedure tracing features use the current trace state
  576. X    (from the ptrace command setting) as a binary condition.  That is,
  577. X    either tracing is done or not.  However, expresp adds the tracing level
  578. X    to the number of -v    switches to determine its verbosity level.
  579. X
  580. X    Escape sequences allow you to insert special or variable information in
  581. X    your expect    and respond strings.  Escape sequences begin with either the
  582. X    backslash or the tilde.  NOTE: remember to use two backslashes inside a
  583. X    literal string constant to get one backslash in the    resulting string.
  584. X    The    procedure language's string parser has it's own    use for    a single
  585. X    backslash followed by another character.  For instance:
  586. X
  587. X
  588. X    set $s0='\\M' sets $s00    to '\M'
  589. X
  590. X
  591. X    Some of the    escape sequnces    have meaning in    both expect and    respond
  592. X    tokens while others    have a use in only of of the two types.
  593. X
  594. X
  595. X
  596. X
  597. X
  598. X
  599. X
  600. X
  601. X
  602. X
  603. X
  604. X
  605. X
  606. X
  607. X
  608. X
  609. X
  610. X
  611. X
  612. X    Public Domain by wht@n4hgf                 9/10/92
  613. X
  614. X
  615. X
  616. X
  617. X
  618. X
  619. X
  620. X    ECU    Procedure Language                      41
  621. X
  622. X
  623. X
  624. X       Meaning of the escape sequences:
  625. X       \D - current phone number
  626. X       \E - turn on echo checking when sending (for slow devices)
  627. X       \K - send a BREAK
  628. X       \M - turn on line CLOCAL
  629. X       \N - null byte (same as \000)
  630. X       \T - current phone number with Dialcodes    and
  631. X         character translation
  632. X       \c - append no new-line to send string (must be last
  633. X        "character" in a send string)
  634. X       \d - delay (2 seconds)
  635. X       \e - turn off echo checking when    sending
  636. X       \m - turn off line CLOCAL
  637. X       \n - send or expect new-line
  638. X       \p - pause (approximately 1/4-1/2 second    delay)
  639. X       \r - send or expect carriage return
  640. X       \\ - send or expect backslash (same as \134)
  641. X       \~ - send or expect tilde (same as \176)
  642. X       \### - send or expect character respresenting three
  643. X           character octal value ### (*MUST* be three digits
  644. X           with leading zeroes as necessary)
  645. X       ~m[##] -    set expect timeout to ## milliseconds (NOT
  646. X        SUPPORTED BY DIALERS; SEE BELOW)
  647. X       ~n[##] -    nap ## milliseconds (NOT SUPPORTED BY DIALERS;
  648. X           SEE BELOW)
  649. X       ~t[##] -    set expect timeout to ## seconds (NOT SUPPORTED
  650. X        BY DIALERS; SEE    BELOW)
  651. X       Speed - Hayes-style CONNECT handler (as sole contents of
  652. X           an expect string, equivalent to using CONNECT)
  653. X
  654. X
  655. X    <timeout_msecs> specifies an optional timeout in milliseconds for
  656. X    waiting on expect strings;    it defaults to 10,000 milliseconds (10
  657. X    seconds).  The resolution for timeouts is limited to the basic tick    time
  658. X    of your system (HZ,    10 msec    for UNIX/386 3.2.0, 16 (1000/60) msec for
  659. X    3.2.1 (ODT 1.0) and    3.2v2 (ODT 1.1), back to 10 msec for 3.2v4 (ODT    2.0)
  660. X    and    20 msec    for XENIX/386 and XENIX/286). Whew!  The timeout for 'Speed'
  661. X    expects is fixed at    90 seconds.
  662. X
  663. X    ~t[##] and ~m[##] may appear at the    beginning of an    expect portion of a
  664. X    script.  They set the expect timeout delay in seconds and milliseconds,
  665. X    respectively.  The ## is a decimal number; if it is    specified <= 0,
  666. X    there will be no delay.  The initial timeout set for each execution    of
  667. X    the    expresp    command    is 10 seconds.    The timeout period remains as you
  668. X    set    it for the remainder of    the script unless you change it    again.
  669. X
  670. X
  671. X
  672. X
  673. X
  674. X
  675. X
  676. X
  677. X
  678. X    Public Domain by wht@n4hgf                 9/10/92
  679. X
  680. X
  681. X
  682. X
  683. X
  684. X
  685. X
  686. X    ECU    Procedure Language                      42
  687. X
  688. X
  689. X
  690. X    Examples:
  691. X
  692. X    ~t[20]gin:    look for "gin:"    for 20 seconds
  693. X    ~m[500]    01     look for    STX for    500 milliseconds
  694. X    "" ~t[3]gin:--gin: uname ~t[10]word: secret
  695. X
  696. X
  697. X    ~n[##] may appear anywhere in a respond portion of a script. It causes
  698. X    ECU    to nap the number of milliseconds specified by the decimal ##
  699. X    argument.  This function was served    by \m prior to ECU 3.20.  Addition
  700. X    of SVR4 \M and \m necessitated the change.
  701. X
  702. X
  703. X    Example:
  704. X
  705. X    a~n[20]b~n[20]c      send "abc" with 20 msec between each
  706. X              character
  707. X
  708. X
  709. X
  710. X    Integer variable $i0 is set    to one if the expect-respond script fails,
  711. X    else it is set to 0.
  712. X
  713. X
  714. X    6.21  fchmod
  715. X
  716. X
  717. X    usage: fchmod <mode> <filenum>
  718. X
  719. X    This command sets the mode of <filenum> to <mode>.    The <mode> argument
  720. X    takes one of two forms, a nine-character mode string (e.g.,    'rwxr-xr-x')
  721. X    or an integer value    (0755).     The <filenum> argument    is either a string
  722. X    value forming a filename or    an integer file    number representing a file
  723. X    opened with    the fopen command.
  724. X
  725. X    The    command    sets $i0 = 0 if    successful, else to the    errno from the
  726. X    associated system call (refer to the %errstr string    function and/or
  727. X    /usr/include/sys/errno.h).
  728. X
  729. X
  730. X    Example:
  731. X
  732. X    fopen 1    '/tmp/123'; fchmod 'rwxrwxrwx' 1
  733. X    fchmod 'rwxrwxrwx' '/tmp/123'
  734. X    fopen 1    '/tmp/123'; fchmod 0777    1
  735. X    $i0 = 0777; fchmod $i0 '/tmp/123'
  736. X
  737. X    All    of the above example result in the same    result.
  738. X
  739. X
  740. X
  741. X
  742. X
  743. X
  744. X    Public Domain by wht@n4hgf                 9/10/92
  745. X
  746. X
  747. X
  748. X
  749. X
  750. X
  751. X
  752. X    ECU    Procedure Language                      43
  753. X
  754. X
  755. X
  756. X    6.22  fclose
  757. X
  758. X
  759. X    usage: fclose <filenum>
  760. X
  761. X    This command closes    <filenum>.  The    <filenum> argument is an integer
  762. X    file number    representing a file opened with    the fopen command.
  763. X
  764. X    The    command    is ignored if <filenum>    is not open.  No integer variable is
  765. X    modified by    fclose.
  766. X
  767. X
  768. X    Example:
  769. X
  770. X    fclose 1
  771. X
  772. X
  773. X
  774. X    6.23  fdel
  775. X
  776. X
  777. X    usage: fdel    <filenum>
  778. X
  779. X    This command removes a file.
  780. X
  781. X    The    command    sets $i0 = 0 if    successful, else to the    errno from the
  782. X    associated system call (refer to the %errstr string    function and/or
  783. X    /usr/include/sys/errno.h).
  784. X
  785. X
  786. X    Example:
  787. X
  788. X    fdel '/tmp/123'
  789. X
  790. X
  791. X
  792. X    6.24  fgetc
  793. X
  794. X
  795. X    usage: fgetc <filenum> <destination>
  796. X
  797. X    This command reads a character from    <filenum>.  The    <filenum> argument
  798. X    is an integer file number representing a file opened with the fopen
  799. X    command.
  800. X
  801. X    The    argument <destination> is either a string variable or an integer
  802. X    variable.  If the file has reached end of file: an integer variable
  803. X    receives -1; a string variable is returned null.  Otherwise, the
  804. X    character's    numeric    value (0-255) is placed    in an integer variable or a
  805. X    string variable is returned    with a length of one with the file character
  806. X    as its only    character.
  807. X
  808. X
  809. X
  810. X    Public Domain by wht@n4hgf                 9/10/92
  811. X
  812. X
  813. X
  814. X
  815. X
  816. X
  817. X
  818. X    ECU    Procedure Language                      44
  819. X
  820. X
  821. X
  822. X    Example:
  823. X
  824. X    fgetc 1    $s0
  825. X    fgetc 1    $i_input
  826. X
  827. X
  828. X
  829. X    6.25  fgets
  830. X
  831. X
  832. X    usage: fgets <filenum> <strvar>
  833. X
  834. X    This command reads a character from    <filenum>.  The    <filenum> argument
  835. X    is an integer file number representing a file opened with the fopen
  836. X    command.
  837. X
  838. X    The    argument <strvar> is a string variable.     If the    file has reached end
  839. X    of file, <strvar> is returned null and integer variable $i0    is set to 1.
  840. X    Otherwise, the <strvar> receives input from    the file minus the trailing
  841. X    newline and    $i0 is returned    zero.
  842. X
  843. X
  844. X    Example:
  845. X
  846. X    fgets 1    $s0
  847. X
  848. X
  849. X
  850. X    6.26  fkey
  851. X
  852. X
  853. X
  854. X    usage: fkey    <str>
  855. X       fkey    -r
  856. X
  857. X
  858. X    This command selects a function key    definition from    the ~/.ecu/keys
  859. X    file.  The -r version resets to the    original defaults, plust loads any
  860. X    entry in keys named    "default".
  861. X
  862. X
  863. X    6.27  fkmap
  864. X
  865. X    usage: fkmap
  866. X       fkmap <keyname>
  867. X       fkmap <keyname> <keylist>
  868. X       fkmap -r
  869. X       fkmap -s <file>
  870. X
  871. X
  872. X    This command manages the mechanism ECU uses    to recognize function keys
  873. X
  874. X
  875. X
  876. X    Public Domain by wht@n4hgf                 9/10/92
  877. X
  878. X
  879. X
  880. X
  881. X
  882. X
  883. X
  884. X    ECU    Procedure Language                      45
  885. X
  886. X
  887. X
  888. X    when they are entered at the console.  Entering the    command    with no
  889. X    arguments displays the current mapping in funckeymap format.
  890. X
  891. X    If supplied, the first argument to the command must    be the recognized
  892. X    name of a function key from    the list:
  893. X
  894. X     F1    F2 F3 F4 F5 F6 F7 F8 F9    F10 F11    F12
  895. X     Home End PgUp PgDn    CUP CUL    CU5 CUR    CUD
  896. X
  897. X    The    case of    the entered argument is    unimportant.
  898. X
  899. X    If only one    argument is supplied, the mapping for the specified key    is
  900. X    displayed.    If more    than one argument is supplied, the keyboard mapping
  901. X    is changed.     Arguments 2-n are character code specifiers in    the format
  902. X    used to define a funckeymap    entry.    WARNING: If found to be
  903. X    syntactically correct, a mapping change is installed immediately.  If
  904. X    incorrect mapping of the HOME key is requested, you    may lose control of
  905. X    ECU.
  906. X
  907. X    The    -r form    rereads    the original funckeymap    definition (as at program
  908. X    invocation), reseting the mapping.    The -s switch saves the    current
  909. X    mapping to <file>.
  910. X
  911. X    Note: the fkmap command line must contain literal text.  No    variable or
  912. X    expression expansions are not done.
  913. X
  914. X
  915. X    Examples:
  916. X
  917. X    fkmap f10    display    F10 mapping
  918. X    fkmap Home ^Z    map Home to ^Z
  919. X            after this command, type ^Z for    Home
  920. X
  921. X
  922. X
  923. X    6.28  flush
  924. X
  925. X
  926. X    usage: flush
  927. X
  928. X    This command causes    any characters received    by the system from the line,
  929. X    but    not yet    read by    the procedure to be "forgotten"    or flushed.
  930. X
  931. X
  932. X    6.29  fopen
  933. X
  934. X
  935. X    usage: fopen [-<mode>] <filenum> <filename>
  936. X
  937. X    This command opens a file named by the string argument <filename> and
  938. X    associates it with the user-chosen file number <filenum> (which must be
  939. X
  940. X
  941. X
  942. X    Public Domain by wht@n4hgf                 9/10/92
  943. X
  944. X
  945. X
  946. X
  947. X
  948. X
  949. X
  950. X    ECU    Procedure Language                      46
  951. X
  952. X
  953. X
  954. X    an integer value between 0 and 4, inclusive).
  955. X
  956. X    The    argument switches govern how a file is opened and must be chosen
  957. X    from this list:
  958. X
  959. X    -r       The file is opened read-only; if it does not    exist, an
  960. X           error occurs.
  961. X
  962. X    -r+       The file is opened for reading and writing; if it does
  963. X           not exist, an error occurs.
  964. X
  965. X    -w       The file is opened for writing (any previous    contents of
  966. X           the file are    lost); if it does not exist, it    is created.
  967. X
  968. X    -w+       The file is opened for reading and writing (any previous
  969. X           contents of the file    are lost); if it does not exist, it
  970. X           is created.
  971. X
  972. X    -a       The file is opened for appending (writes to the file    are
  973. X           added to the    previous file contents); if it does not
  974. X           exist, it is    created.  All writes are appended to the
  975. X           file    (the fseek command has no effect).
  976. X
  977. X    The    switches argument may be omitted; in such cases, the file is opened
  978. X    as though '-r' had been supplied.  However,    if procedure tracing is
  979. X    enabled (see the description of the    interactive and    procedure command
  980. X    ptrace), a warning message will be issued.
  981. X
  982. X    The    command    sets $i0 = 0 if    successful, else to the    errno from the
  983. X    associated system call (refer to the %errstr string    function and/or
  984. X    /usr/include/sys/errno.h).
  985. X
  986. X    Example:
  987. X
  988. X    fopen 0    -r '/etc/passwd'
  989. X    fopen 1    -w+ '/tmp/123'
  990. X    fopen 2    -a 'tranact.log'
  991. X
  992. X
  993. X
  994. X    6.30  fputc
  995. X
  996. X
  997. X    usage: fputc <filenum> <char>
  998. X
  999. X    This command writes    character <char> into <filenum>.  The <filenum>
  1000. X    argument is    an integer file    number representing a file opened with the
  1001. X    fopen command.  Argument <char> is a integer value of which    the lower
  1002. X    eight bits are used    or a string value of which the first character is
  1003. X    used.
  1004. X
  1005. X
  1006. X
  1007. X
  1008. X    Public Domain by wht@n4hgf                 9/10/92
  1009. X
  1010. X
  1011. X
  1012. X
  1013. X
  1014. X
  1015. X
  1016. X    ECU    Procedure Language                      47
  1017. X
  1018. X
  1019. X
  1020. X    If a write error occurs, procedure execution is terminated.
  1021. X
  1022. X    Example:
  1023. X
  1024. X    $s0='abc'; fputc 1 $s0          writes 'a'
  1025. X    $i0=0x30 ; fputc 1 $i0          writes '0'
  1026. X
  1027. X
  1028. X
  1029. X    6.31  fputs
  1030. X
  1031. X
  1032. X    usage: fputs [-n] <filenum>    <str>
  1033. X
  1034. X    This command writes    the string <str> into <filenum>.  The <filenum>
  1035. X    argument is    an integer file    number representing a file opened with the
  1036. X    fopen command.
  1037. X
  1038. X    If the switch '-n' is omitted, a newline is    appended after <str> in    the
  1039. X    file; if present, no newline is written.
  1040. X
  1041. X    If a write error occurs, procedure execution is terminated.
  1042. X
  1043. X    Example:
  1044. X
  1045. X    $s0='abc'; fputc 1 $s0          writes 'a'
  1046. X
  1047. X
  1048. X
  1049. X    6.32  fseek
  1050. X
  1051. X
  1052. X    usage: fseek <filenum> <position>
  1053. X
  1054. X    This command sets the file position    of <filenum> to    <position>, an
  1055. X    integer value.  The    corresponding integer function %ftell may be used to
  1056. X    determine the current file position.
  1057. X
  1058. X    Note: if <filenum> is open for append ('-a'), then the fseek command
  1059. X    will have no effect.
  1060. X
  1061. X
  1062. X    6.33  getf
  1063. X
  1064. X
  1065. X
  1066. X
  1067. X
  1068. X
  1069. X
  1070. X
  1071. X
  1072. X
  1073. X
  1074. X    Public Domain by wht@n4hgf                 9/10/92
  1075. X
  1076. X
  1077. X
  1078. X
  1079. X
  1080. X
  1081. X
  1082. X    ECU    Procedure Language                      48
  1083. X
  1084. X
  1085. X
  1086. X    usage: getf    -x <int-var-spec> <offset>
  1087. X
  1088. X    where: -x ==
  1089. X       -b byte
  1090. X       -w word (little-endian)
  1091. X       -W word (big-endian)
  1092. X       -l 32-bits (little-endian)
  1093. X       -L 32-bits (big-endian)
  1094. X
  1095. X
  1096. X
  1097. X    6.34  gosub
  1098. X
  1099. X
  1100. X    usage: gosub <label>
  1101. X
  1102. X    This command transfers control of procedure    to a statement other than
  1103. X    the    one immediately    following.  The    <label>    argument may be    literal    text
  1104. X    or may be a    string,    allowing a "computed gosub" feature.
  1105. X
  1106. X    When the next return statement is executed,    control    is returned to the
  1107. X    next statement after the gosub.
  1108. X
  1109. X
  1110. X    Example:
  1111. X
  1112. X    gosub GET_NEXT
  1113. X    gosub 'GET_NEXT'
  1114. X    gosub 'GET'+'_NEXT'
  1115. X    $s0 = 'GET_NEXT'; gosub    $s0
  1116. X    $s0 = 'NEXT'; gosub 'GET_'+$s0
  1117. X
  1118. X    Note: all the above    examples cause transfer    to the label GET_NEXT.
  1119. X
  1120. X
  1121. X
  1122. X
  1123. X
  1124. X
  1125. X
  1126. X
  1127. X
  1128. X
  1129. X
  1130. X
  1131. X
  1132. X
  1133. X
  1134. X
  1135. X
  1136. X
  1137. X
  1138. X
  1139. X
  1140. X    Public Domain by wht@n4hgf                 9/10/92
  1141. X
  1142. X
  1143. X
  1144. X
  1145. X
  1146. X
  1147. X
  1148. X    ECU    Procedure Language                      49
  1149. X
  1150. X
  1151. X
  1152. X    A switch or    case function of sorts may be implemented by something like:
  1153. X
  1154. X    #$i0 has been set to the "switch" value
  1155. X    ifi $i0    < 0 || $i0 > 2    # avoid    gosub label not    found
  1156. X    {
  1157. X        echo 'bad my_case state value'+%itos($i0)
  1158. X        DO SOMETHING LIKE DIE OR DUMP VARS AND DIE
  1159. X    }
  1160. X    $s0 = 'my_case_'+%itos($i0,03)
  1161. X    gosub $s0
  1162. X
  1163. X    my_case_000
  1164. X    echo 'handle case 0'
  1165. X    return
  1166. X
  1167. X    my_case_001
  1168. X    echo 'handle case 1'
  1169. X    return
  1170. X
  1171. X    my_case_002
  1172. X    ifi $i_already_did_002
  1173. X    {
  1174. X        echo 'whoops'
  1175. X        return
  1176. X    }
  1177. X    echo 'handle case 2'
  1178. X    $i_already_did_002 = 1
  1179. X    return
  1180. X
  1181. X
  1182. X
  1183. X    6.35  gosubb
  1184. X
  1185. X
  1186. X    usage: gosubb <label>
  1187. X
  1188. X    This command serves    the same function as the gosub command except the
  1189. X    programmer is signifying that the label is behind the current statement,
  1190. X    resulting in slightly faster execution.  (The label    is not REQUIRED    to
  1191. X    be at any specific location    in the procedure relative to the gosubb
  1192. X    statement.)
  1193. X
  1194. X
  1195. X    6.36  goto
  1196. X
  1197. X
  1198. X    usage: goto    <label>
  1199. X
  1200. X    This command transfers control of procedure    to a statement other than
  1201. X    the    one immediately    following.  The    <label>    argument may be    literal    text
  1202. X    or may be a    string,    allowing a "computed goto" feature.
  1203. X
  1204. X
  1205. X
  1206. X    Public Domain by wht@n4hgf                 9/10/92
  1207. X
  1208. X
  1209. X
  1210. X
  1211. X
  1212. X
  1213. X
  1214. X    ECU    Procedure Language                      50
  1215. X
  1216. X
  1217. X
  1218. X    Example:
  1219. X
  1220. X    goto GET_NEXT
  1221. X    goto 'GET_NEXT'
  1222. X    goto 'GET'+'_NEXT'
  1223. X    $s0 = 'GET_NEXT'; goto $s0
  1224. X    $s0 = 'NEXT'; goto 'GET_'+$s0
  1225. X
  1226. X    Note: all the above    examples cause transfer    to the label GET_NEXT.
  1227. X
  1228. X
  1229. X    6.37  gotob
  1230. X
  1231. X
  1232. X    usage: gotob <label>
  1233. X
  1234. X    This command serves    the same function as the goto command except the
  1235. X    programmer is signifying that the label is behind the current statement,
  1236. X    resulting in slightly faster execution.  (The label    is not REQUIRED    to
  1237. X    be at any specific location    in the procedure relative to the gotob
  1238. X    statement.)
  1239. X
  1240. X
  1241. X    6.38  hangup
  1242. X
  1243. X
  1244. X    usage: hangup
  1245. X
  1246. X    This command causes    Data Terminal Ready (DTR) to be    dropped    momentarily,
  1247. X    causing (hopefully)    the termination    of any current connection to a
  1248. X    remote system. This    command    is only    effective if the attached Data
  1249. X    Communications Equipment is    configured to terminate    its connection on
  1250. X    loss of DTR.
  1251. X
  1252. X    If no line is attached, the    command    is ignored (a warning is generated
  1253. X    if procedure tracing is enabled).
  1254. X
  1255. X
  1256. X    6.39  hexdump
  1257. X
  1258. X
  1259. X
  1260. X    usage: hexdump [-s]    <str>
  1261. X       hexdump -t[s] <str1>    <str>
  1262. X
  1263. X    <str> buf to dump
  1264. X    <str1> title (if -t)
  1265. X    -s short (terse) dump
  1266. X
  1267. X
  1268. X    This command prints    a hexadecimal dump of <str> on the screen (and to
  1269. X
  1270. X
  1271. X
  1272. X    Public Domain by wht@n4hgf                 9/10/92
  1273. X
  1274. X
  1275. X
  1276. X
  1277. X
  1278. X
  1279. X
  1280. X    ECU    Procedure Language                      51
  1281. X
  1282. X
  1283. X
  1284. X    the    procedure log file, if logging enabled with the    ptrace command).
  1285. X
  1286. X    The    switch '-t' signifies that <str1> is a title to    be printed
  1287. X
  1288. X    Example:
  1289. X
  1290. X    $s0='The quick brown fox jumped    over the lazy dog\'s back'
  1291. X    hexdump    -t 'Example hex    dump' $s0
  1292. X    ---------------------------- Example hex dump ----------------------------
  1293. X    0000  54 68    65 20 71 75 69 63 6B 20    62 72 6F 77 6E 20 | The    quick brown  |
  1294. X    0010  66 6F    78 20 6A 75 6D 70 65 64    20 6F 76 65 72 20 | fox    jumped over  |
  1295. X    0020  74 68    65 20 6C 61 7A 79 20 64    6F 67 27 73 20 62 | the    lazy dog's b |
  1296. X    0030  61 63    6B                      | ack             |
  1297. X
  1298. X    hexdump    %left($s0,9)
  1299. X    0000  54 68    65 20 71 75 69 63 6B              | The    quick         |
  1300. X
  1301. X    hexdump    -ts 'Example hex dump' %left($s0,9)
  1302. X    Example hex    dump
  1303. X    0000  54 68    65 20 71 75 69 63 6B | The quick |
  1304. X
  1305. X    hexdump    -s %left($s0,9)
  1306. X    0000  54 68    65 20 71 75 69 63 6B | The quick |
  1307. X
  1308. X
  1309. X
  1310. X    6.40  home
  1311. X
  1312. X
  1313. X    usage: home
  1314. X
  1315. X    This command homes the video cursor.
  1316. X
  1317. X
  1318. X    6.41  icolor
  1319. X
  1320. X
  1321. X    usage: icolor <int-colors>
  1322. X
  1323. X    This command sets the normal and reverse foreground    and background
  1324. X    colors according to    <int-colors>, an integer value in the format as    that
  1325. X    returned by    the %colors integer function.
  1326. X
  1327. X    This command is provided primarily to be able to save the color state,
  1328. X    modify it temporarily and then restore it.
  1329. X
  1330. X
  1331. X
  1332. X
  1333. X
  1334. X
  1335. X
  1336. X
  1337. X
  1338. X    Public Domain by wht@n4hgf                 9/10/92
  1339. X
  1340. X
  1341. X
  1342. X
  1343. X
  1344. X
  1345. X
  1346. X    ECU    Procedure Language                      52
  1347. X
  1348. X
  1349. X
  1350. X    Example:
  1351. X
  1352. X    mkvar $icolor_save; $icolor_save = %colors
  1353. X    color red; echo    'Connection seems to be    dead'
  1354. X    icolor $icolor_save # restore previous colors
  1355. X
  1356. X
  1357. X
  1358. X    6.42  ifi
  1359. X
  1360. X
  1361. X
  1362. X    usage: ifi <int> <rel-op> <int> <statement>
  1363. X       ifi <int> <rel-op> <int>
  1364. X           <statement>
  1365. X       ifi <int> <rel-op> <int>
  1366. X       {
  1367. X           any kind    or number of statements
  1368. X       }
  1369. X
  1370. X
  1371. X    This command selectively executes one or more statements based on a    test
  1372. X    of two integer quantities.    See the    description of the break, continue,
  1373. X    and    else commmands for examples of how the command is used.
  1374. X
  1375. X
  1376. X    6.43  ifs
  1377. X
  1378. X
  1379. X
  1380. X    usage: ifs <str> <rel-op> <str> <statement>
  1381. X       ifs <int> <rel-op> <int>
  1382. X           <statement>
  1383. X       ifs <int> <rel-op> <int>
  1384. X       {
  1385. X           any kind    or number of statements
  1386. X       }
  1387. X
  1388. X
  1389. X    This command selectively executes one or more statements based on a    test
  1390. X    of two string values.  See the description of the break, continue, and
  1391. X    else commmands and many other examples throughout the document, for
  1392. X    examples of    how the    command    is used.
  1393. X
  1394. X
  1395. X    6.44  insline
  1396. X
  1397. X
  1398. X    usage: insline
  1399. X
  1400. X    This command inserts a line    onto the video screen at the current line.
  1401. X
  1402. X
  1403. X
  1404. X    Public Domain by wht@n4hgf                 9/10/92
  1405. X
  1406. X
  1407. X
  1408. X
  1409. X
  1410. X
  1411. X
  1412. X    ECU    Procedure Language                      53
  1413. X
  1414. X
  1415. X
  1416. X    6.45  lbreak
  1417. X
  1418. X
  1419. X    usage: lbreak
  1420. X
  1421. X    This command transmits a break to the remote system.  It is    the
  1422. X    procedure command analogous    to the break interactive command.
  1423. X
  1424. X
  1425. X    6.46  lgets
  1426. X
  1427. X
  1428. X
  1429. X    usage: lgets [-er] <strvar>    <t1-int> <t2-int> [<stop-str>]
  1430. X
  1431. X    -e echo received characters    to screen
  1432. X    -r raw read    (retain    carriage returns)
  1433. X
  1434. X
  1435. X    This command reads a string    from the attached communications line.
  1436. X    <t1-int> is    the number of tenths of    seconds    before timing out waiting
  1437. X    for    the first character to be received.  <t2-int> is the number of
  1438. X    tenths of seconds before timing out    on later characters.  <stop-str> is
  1439. X    an optional    argument, which    if received, immediately terminates the
  1440. X    read.  Integer variable $i0    is set to the count of characters received.
  1441. X
  1442. X    If the specified string variable is    filled with characters before the
  1443. X    <stop-str> has been    encountered or before a    timeout    occurs,    then the
  1444. X    command returns with $i0 set to the    maximum    size of    the variable.
  1445. X
  1446. X    Most procedure commands will increase the size of an unumbered string
  1447. X    variable as    needed until the maximum string    size is    reached.  The lgets
  1448. X    command does not.  You must    start with the command with a string
  1449. X    variable whose maximum size    is already the desired value.  Refer to    the
  1450. X    section on string variables    above and the section describing the mkvar
  1451. X    command below for information on the size of string    variables.
  1452. X
  1453. X
  1454. X    6.47  logevent
  1455. X
  1456. X
  1457. X
  1458. X    usage: logevent <str>
  1459. X
  1460. X
  1461. X    This command writes    a log item to ~/.ecu/log.
  1462. X
  1463. X
  1464. X
  1465. X
  1466. X
  1467. X
  1468. X
  1469. X
  1470. X    Public Domain by wht@n4hgf                 9/10/92
  1471. X
  1472. X
  1473. X
  1474. X
  1475. X
  1476. X
  1477. X
  1478. X    ECU    Procedure Language                      54
  1479. X
  1480. X
  1481. X
  1482. X    Example:
  1483. X
  1484. X    $s0='/tmp/alm.log'
  1485. X    log 'appending alarm info to '+$s0
  1486. X
  1487. X    writes:
  1488. X    10-02-1989-17:39-01261-PROC    appending alarm    info to    /tmp/alm.log
  1489. X
  1490. X    assuming the transmitter process pid is 1261 and you are living in 1989.
  1491. X
  1492. X    6.48  lookfor
  1493. X
  1494. X
  1495. X
  1496. X    lookfor [-e] [quiet    | <str>] [<timeout-int>]
  1497. X
  1498. X    -e echo to screen while "looking"
  1499. X
  1500. X    This command is used to read from the attached commuications line until
  1501. X    one    of two user-specified conditions occurs.
  1502. X
  1503. X    The    'quiet'    option waits for the line to become quiet for the number of
  1504. X    tenths of seconds specified     by <timeout-int>.
  1505. X
  1506. X    The    other option reads the line until <str>    is read    from the line or
  1507. X    until <timeout-int>    tenths of seconds elapses.  With this option,
  1508. X    integer variable $i0 is set    to 1 if    <str> is found within the timeout
  1509. X    period or 0    if not.
  1510. X
  1511. X
  1512. X    Examples:
  1513. X
  1514. X    lookfor    -e quiet 20   wait for quiet line for 2    secs
  1515. X    lookfor    'word:'    50    wait for 'word:' for up to 5 secs
  1516. X
  1517. X    6.49  mkvar
  1518. X
  1519. X
  1520. X
  1521. X    usage: mkvar [$]i<name>
  1522. X       mkvar [$]s<name>(<size>)
  1523. X
  1524. X
  1525. X    This command creates one or    more named (temporary) integer or string
  1526. X    variables.    The variable type is determines    by the first character of
  1527. X    the    variable, which    must be    'i' or 's'.  The size of a string variable
  1528. X    must be specified via the <size> argument.    An optional '$'    may be
  1529. X    supplies for neatness, but may be omitted if desired.
  1530. X
  1531. X
  1532. X
  1533. X
  1534. X
  1535. X
  1536. X    Public Domain by wht@n4hgf                 9/10/92
  1537. X
  1538. X
  1539. X
  1540. X
  1541. X
  1542. X
  1543. X
  1544. X    ECU    Procedure Language                      55
  1545. X
  1546. X
  1547. X
  1548. X    6.49.1  Variable Names
  1549. X
  1550. X    The    names for created (named, temporary) variables consist of a dollar
  1551. X    sign ('$'),    an 'i' for integer or 's' for string and up to fifteen
  1552. X    characters from the    set [A-Za-z0-9_].
  1553. X
  1554. X    The    first character    after the 'i' or 's' in    <name> must be non-numeric.
  1555. X    '$sxyz' and    '$s_3xyz' are legal, but '$s3xyz' is not (it would be
  1556. X    interpreted    as '$s3' followed by the illegal command sequence 'xyz').
  1557. X
  1558. X    The    <name> space for integer and string variables are separate.  It    is
  1559. X    possible to    have an    integer    variable named '$ixyz' and a string variable
  1560. X    named '$sxyz'.
  1561. X
  1562. X
  1563. X    6.49.2  Variable Life and Scope
  1564. X
  1565. X    The    life and scope of created variables is for the duration    of the
  1566. X    execution of the creating procedure.  Procedures called by the creating
  1567. X    procedure (by 'do')    can reference temporary    variables declared by a
  1568. X    previous procedure.     When created, integer variables are set to zero and
  1569. X    string variables are set to    zero length.  These features differ from
  1570. X    numbered variables which retain their scope    and values at all times,
  1571. X    even when procedure    execution terminates and ECU returns to    interactive
  1572. X    mode.
  1573. X
  1574. X    Variables may be created by    the same name more than    once.  The latest
  1575. X    mkvar execution specifies the variable referenced.    Thus if    proc1
  1576. X    declares '$ixx' and    calls proc2 which also declares    '$ixx',    proc2's
  1577. X    variable is    distinct from proc1's and disappears when proc2    terminates,
  1578. X    thus making    proc1's    available to it    again, containing the same value as
  1579. X    it had at the time proc2 was called.
  1580. X
  1581. X
  1582. X    6.49.3  String Variable Size
  1583. X
  1584. X    The    maximum    value for <size> is 16384.  Regardless of the size specified
  1585. X    in the creation of a string    variable, ECU will usually expand it's size
  1586. X    as necessary up to the maximum.  Check the documentation for the
  1587. X    operation you are performing; if there is no exception noted, ECU will
  1588. X    expand the string maximum size as necessary.  For instance,    the set
  1589. X    command will grow a    string as part of assignment.  However,    the lgets
  1590. X    command will not.
  1591. X
  1592. X
  1593. X    Examples:
  1594. X
  1595. X    mkvar i_count
  1596. X    mkvar $i_count
  1597. X    mkvar s_20(20),s_80(80),i_timeout,$i_colors
  1598. X
  1599. X
  1600. X
  1601. X
  1602. X    Public Domain by wht@n4hgf                 9/10/92
  1603. X
  1604. X
  1605. X
  1606. X
  1607. X
  1608. X
  1609. X
  1610. X    ECU    Procedure Language                      56
  1611. X
  1612. X
  1613. X
  1614. X    6.50  nap
  1615. X
  1616. X
  1617. X    usage: nap <int>
  1618. X       nap -m <int>
  1619. X
  1620. X    This command suspends procedure execution for <int>    tenths of seconds if
  1621. X    -m is not specified.  If -m    is used, execution is suspended    for <int>
  1622. X    milliseconds.  Note: the actual period execution is    suspended depends,
  1623. X    as usual, on the scheduling    load of    the system.  For small -m values, be
  1624. X    aware that the granularity of the nap duration is set by the system, 20
  1625. X    milliseconds for XENIX 286 and 386,    10 milliseconds    for UNIX.
  1626. X
  1627. X    If you need    to know    the frequency of the system clock, something like
  1628. X
  1629. X      $i0 =    %stoi(%getenv("HZ"))
  1630. X
  1631. X    will obtain    the value for you (provided HZ is in the process'
  1632. X    environment).
  1633. X
  1634. X    Examples:
  1635. X
  1636. X    nap 30
  1637. X    nap $i0*$i2
  1638. X        nap    -m 50
  1639. X
  1640. X
  1641. X
  1642. X    6.51  nice
  1643. X
  1644. X
  1645. X    usage: nice    <int>
  1646. X
  1647. X    This command sets the nice value of    the process.  It behaves exactly
  1648. X    like the nice(S) or    nice(2)    system call. The <int> argument    must be    in
  1649. X    the    range 0    through    39, inclusive.    If the call fails, a warning is
  1650. X    printed and    the procedure continues    to execute.  The current nice value
  1651. X    may    be obtained using the %nice integer function.  See also    the
  1652. X    description    of the nice interactive    command.
  1653. X
  1654. X
  1655. X    6.52  parity
  1656. X
  1657. X
  1658. X
  1659. X    usage: parity [even    | odd |    none]
  1660. X       parity <str>
  1661. X
  1662. X
  1663. X    This command sets the parity for the attached communications line.    If
  1664. X    <str> is supplied, the first character must    be 'e',    'o' or 'n'.
  1665. X
  1666. X
  1667. X
  1668. X    Public Domain by wht@n4hgf                 9/10/92
  1669. X
  1670. X
  1671. X
  1672. X
  1673. X
  1674. X
  1675. X
  1676. X    ECU    Procedure Language                      57
  1677. X
  1678. X
  1679. X
  1680. X    Uppercase equivalents are also accepted.
  1681. X
  1682. X
  1683. X    Examples:
  1684. X
  1685. X    parity even
  1686. X    parity 'e'
  1687. X    parity 'Even now as we speak'
  1688. X
  1689. X
  1690. X
  1691. X    6.53  pclose
  1692. X
  1693. X
  1694. X    usage: pclose <filenum>
  1695. X
  1696. X    This command should    be issued when a command started by the    interactive
  1697. X    popen commandf completes.
  1698. X
  1699. X
  1700. X    6.54  plog
  1701. X
  1702. X
  1703. X
  1704. X    usage: plog
  1705. X       plog    <str>
  1706. X       plog    off
  1707. X
  1708. X
  1709. X    This command controls logging to a file of the screen output during
  1710. X    procedure execution.  With no argument, the    command    displays the status
  1711. X    of logging.     <str> specifies a log file pathname, while the    'off'
  1712. X    argument turns logging off.
  1713. X
  1714. X    If procedure execution terminates due to an    error, procedure logging is
  1715. X    turned off.     However, if procedure execution terminates normally while
  1716. X    logging is active, erratic and unpredictable portions of interactive
  1717. X    mode screen    output will continue to    be logged to the current log file.
  1718. X
  1719. X    The    interactive mode command plog may also be used to control procedure
  1720. X    logging.
  1721. X
  1722. X    Example:
  1723. X
  1724. X    mkvar s_logname(128)
  1725. X    $s_logname = %dir+'logname'
  1726. X    plog $s_logname
  1727. X    echo 'Test'
  1728. X    plog off;cd 'somewhere_else';plog $s_logname
  1729. X    echo 'Test'
  1730. X
  1731. X
  1732. X
  1733. X
  1734. X    Public Domain by wht@n4hgf                 9/10/92
  1735. X
  1736. X
  1737. X
  1738. X
  1739. X
  1740. X
  1741. X
  1742. X    ECU    Procedure Language                      58
  1743. X
  1744. X
  1745. X
  1746. X    6.55  popd
  1747. X
  1748. X
  1749. X
  1750. X    usage: popd    [ | <#>    | all]
  1751. X
  1752. X
  1753. X    This command returns to a previous directory after a pushd command has
  1754. X    been previously executed.
  1755. X
  1756. X    If no argument is supplied,    the directory at the immediately previous
  1757. X    level is restored.
  1758. X
  1759. X    If a numeric argument is supplied, the directory at    the specified level
  1760. X    is restored; the level numbers may be obtained by issuing a    pushd
  1761. X    command with no arguments.
  1762. X
  1763. X    If the 'all' argument is supplied, it is treated as    a numeric argument
  1764. X    of 0; that is the directory    stack is cleared and the directory at level
  1765. X    0 is restored.
  1766. X
  1767. X    The    directory stack    is shared between interactive and procedure
  1768. X    commands.  Neither beginning nor ending a procedure    affects    the
  1769. X    directory stack level.
  1770. X
  1771. X
  1772. X    Examples:
  1773. X       popd
  1774. X       popd 3
  1775. X       popd all
  1776. X
  1777. X
  1778. X
  1779. X    6.56  popen
  1780. X
  1781. X
  1782. X    usage: popen [-switches] <filenum> <command>
  1783. X
  1784. X    This command executes a shell command defined by the string    argument
  1785. X    <command> and associates it    with the user-chosen file number <filenum>
  1786. X    (which must    be an integer value between 0 and 4, inclusive).
  1787. X
  1788. X    The    argument switches govern whether the command is    to receive input
  1789. X    from ECU or    output to ECU and must be chosen from this list:
  1790. X
  1791. X    -r       The command will output to ECU.
  1792. X
  1793. X    -w       The command will receive input from ECU.
  1794. X
  1795. X    The    switches argument may be omitted; in such cases, the file is opened
  1796. X    as though '-r' had been supplied.  However,    if procedure tracing is
  1797. X
  1798. X
  1799. X
  1800. X    Public Domain by wht@n4hgf                 9/10/92
  1801. X
  1802. X
  1803. X
  1804. X
  1805. X
  1806. X
  1807. X
  1808. X    ECU    Procedure Language                      59
  1809. X
  1810. X
  1811. X
  1812. X    enabled (see the description of the    interactive and    procedure command
  1813. X    ptrace), a warning message will be issued.
  1814. X
  1815. X    The    command    sets $i0 = 0 if    successful, else to the    errno from the
  1816. X    associated system call (refer to the %errstr string    function and/or
  1817. X    /usr/include/sys/errno.h).
  1818. X
  1819. X    Example:
  1820. X
  1821. X    popen 0    -r 'ls -l *.log'
  1822. X    popen 1    -w 'cat    | sort > /tmp/sorted'
  1823. X
  1824. X
  1825. X
  1826. X
  1827. X    6.57  prompt
  1828. X
  1829. X
  1830. X    usage: prompt <str>
  1831. X
  1832. X    This command allows    selection of an    alternate prompt to the    interactive
  1833. X    mode HOME command trigger.    Refer to the section titled "ECUPROMPT"    for
  1834. X    more information on    the interactive    mode prompt.
  1835. X
  1836. X    Note: the interactive and procedure    hangup commands    both cause the
  1837. X    default prompt to be reestablished.
  1838. X
  1839. X
  1840. X    Example:
  1841. X
  1842. X     prompt    %rname+' >'    use remote name in prompt
  1843. X
  1844. X
  1845. X
  1846. X    6.58  ptrace
  1847. X
  1848. X
  1849. X
  1850. X    usage: ptrace [ <str> | off    ]
  1851. X
  1852. X
  1853. X    This command controls procedure execution tracing.    Trace output is
  1854. X    written to the screen and varys in its nature depending upon the command
  1855. X    being traced.  Specifically, any change to a string    or integer variable
  1856. X    is noted.  If tracing is enabled, the output will also be written to any
  1857. X    active procedure log file (see the plog interactive    and procedure
  1858. X    commands).
  1859. X
  1860. X    The    majority of procedure tracing features use the current trace state
  1861. X    as a binary    condition.  That is, either tracing is done or not.
  1862. X    However, the procedure command expresp emits varying levels    of debugging
  1863. X
  1864. X
  1865. X
  1866. X    Public Domain by wht@n4hgf                 9/10/92
  1867. X
  1868. X
  1869. X
  1870. X
  1871. X
  1872. X
  1873. X
  1874. X    ECU    Procedure Language                      60
  1875. X
  1876. X
  1877. X
  1878. X    output in a    manner similar to the uucico -x    flag.
  1879. X
  1880. X
  1881. X    6.59  pushd
  1882. X
  1883. X
  1884. X
  1885. X    usage: pushd [ | <dir>]
  1886. X
  1887. X
  1888. X    This command either    1) saves the current directory pathname    on a stack
  1889. X    and    establishes a new current directory or 2) displays the current stack
  1890. X    and    current    directory.  The    stack size is 10.
  1891. X
  1892. X    If no argument is supplied,    the directory stack is displayed.
  1893. X
  1894. X    The    directory stack    is shared between interactive and procedure
  1895. X    commands.  Neither beginning nor ending a procedure    affects    the
  1896. X    directory stack level.
  1897. X
  1898. X
  1899. X    Examples:
  1900. X       pushd
  1901. X       pushd '/tmp'
  1902. X
  1903. X
  1904. X
  1905. X    6.60  putf
  1906. X
  1907. X
  1908. X    Not    yet implemented.
  1909. X
  1910. X
  1911. X    6.61  return
  1912. X
  1913. X
  1914. X    usage: return [<int>]
  1915. X
  1916. X    This command serves    two functions: to return from a    gosub to or return
  1917. X    from a procedure execution.     If <int> is supplied, it must be in the
  1918. X    range 0 to 255.  Other values result in a return value of 255.
  1919. X
  1920. X    If no gosub    is active, return causes the currently executing procedure
  1921. X    to terminate, returning either to a    calling    procedure or to    the
  1922. X    interactive    mode.  If <int>    is supplied and    it's value is nonzero, then
  1923. X    all    procedure execution is terminated and the integer status is printed
  1924. X    on the screen along    with the name of the executing procedure.
  1925. X
  1926. X    If a gosub is active, return or return 0 causes control to return to the
  1927. X    statement immediately following the    gosub which invoked the    subroutine.
  1928. X    If <int> is    supplied and it's value    is nonzero, then all procedure
  1929. X
  1930. X
  1931. X
  1932. X    Public Domain by wht@n4hgf                 9/10/92
  1933. X
  1934. X
  1935. X
  1936. X
  1937. X
  1938. X
  1939. X
  1940. X    ECU    Procedure Language                      61
  1941. X
  1942. X
  1943. X
  1944. X    execution is terminated and    the integer status is printed on the screen
  1945. X    along with the name    of the executing procedure.
  1946. X
  1947. X    It is not possible to terminate a procedure    with normal status from
  1948. X    within a subroutine.
  1949. X
  1950. X
  1951. X    Example:
  1952. X
  1953. X    #---------------------
  1954. X    # gosub.ep
  1955. X    #---------------------
  1956. X    echo 'main'; gosub SUB;    echo 'back to main'
  1957. X    return
  1958. X
  1959. X    SUB
  1960. X    echo 'sub'
  1961. X    gosub SUB2
  1962. X    echo 'back to sub'
  1963. X    return
  1964. X
  1965. X
  1966. X    SUB2
  1967. X    echo 'sub2'
  1968. X    return
  1969. X
  1970. X
  1971. X
  1972. X
  1973. X    6.62  rk
  1974. X
  1975. X
  1976. X    usage: rk [-a]
  1977. X
  1978. X    This command invokes C-Kermit to receive files. ECU    searches the PATH
  1979. X    list for 'kermit' or 'ckermit', expecting to find Columbia University
  1980. X    C-Kermit version 5A(173) or    later.    The file ~/.kermrc must    be set up to
  1981. X    have any desired initialization parameters you desire (refer to C-Kermit
  1982. X    documentation for more information).  The remote protocol must have    been
  1983. X    started prior to the execution of this command.
  1984. X
  1985. X    WARNING: until further notice, avoid suspending Kermit with    ^Z.  ECU is
  1986. X    totally unprepared to act as a job control process group leader.
  1987. X
  1988. X    If switch '-a' is omitted, the received files are stored as    received;
  1989. X    otherwise carriage return/linefeed pairs are converted to newlines.
  1990. X
  1991. X
  1992. X
  1993. X
  1994. X
  1995. X
  1996. X
  1997. X
  1998. X    Public Domain by wht@n4hgf                 9/10/92
  1999. X
  2000. X
  2001. X
  2002. X
  2003. X
  2004. X
  2005. X
  2006. X    ECU    Procedure Language                      62
  2007. X
  2008. X
  2009. X
  2010. X    6.63  rlog
  2011. X
  2012. X
  2013. X
  2014. X    usage: rlog    [-srf] <str>
  2015. X       rlog    'off'
  2016. X
  2017. X
  2018. X    This command controls receiver logging.  It's function is the same as
  2019. X    the    interactive log    command.
  2020. X
  2021. X    The    first form of the command enables logging. The -
  2022. X    sswitchcausesthefiletobe scratched when it is opened (otherwise the    file
  2023. X    is opened for append).  The    -r switch causes raw logging, else filter
  2024. X    logging is performed.  The -f switch causes    the log    file to    be flushed
  2025. X    each time it is written to (unbuffered I/O); this switch is    useful if
  2026. X    you    are logging to a terminal or hard copy device and wish to see output
  2027. X    as soon as it is produced.
  2028. X
  2029. X
  2030. X    6.64  rname
  2031. X
  2032. X
  2033. X    usage: rname <str>
  2034. X
  2035. X    Normally, the %rname string    function returns the same string as the
  2036. X    logical dialing directory entry.  This command allows the default value
  2037. X    to be overridden with a user-selected value    (63-character maximum).
  2038. X
  2039. X    This feature is useful in situations where one system is initially
  2040. X    dialed, but    a connection is    made to    yet another system from    the dialed
  2041. X    system via networking.
  2042. X
  2043. X
  2044. X    6.65  rs
  2045. X
  2046. X
  2047. X    usage: rs
  2048. X
  2049. X    This command invokes the SEAlink file receive protocol.  There is no
  2050. X    provision in the SEAlink protocol to convert carriage return/linefeed
  2051. X    pairs to newlines, so the received files are stored    as received.  The
  2052. X    remote sender must have been started prior to the execution    of this
  2053. X    command.
  2054. X
  2055. X
  2056. X
  2057. X
  2058. X
  2059. X
  2060. X
  2061. X
  2062. X
  2063. X
  2064. X    Public Domain by wht@n4hgf                 9/10/92
  2065. X
  2066. X
  2067. X
  2068. X
  2069. X
  2070. X
  2071. X
  2072. X    ECU    Procedure Language                      63
  2073. X
  2074. X
  2075. X
  2076. X    6.66  rtscts
  2077. X
  2078. X    usage: rtscts [ off    | on | no | yes    | 0..7 ]
  2079. X
  2080. X
  2081. X    This command controls the RTS/CTS flow control feature of the line
  2082. X    driver (which may or may not work).     This is a very    confusing area
  2083. X    though it should not be.
  2084. X
  2085. X    If no argument is supplied,    the current setting is displayed.
  2086. X    Specifying 0 or n disables the facility; 1 or y causes RTS/CTS flow
  2087. X    control to be enabled.
  2088. X
  2089. X    What the command does is to    manipulate the RTSFLOW and CTSFLOW bits    of
  2090. X    the    termio c_cflag word (see termio(S)).
  2091. X
  2092. X    SCO's sio driver before UNIX 3.2v4/ODT 2.0 does half duplex    flow
  2093. X    control.  FAS does hardware    flow control based on the device magic
  2094. X    number, but    if you use a device number specifying no hardware flow
  2095. X    control, RTSFLOW and CTSFLOW can be    used to    specify    SCO-style flow
  2096. X    control.  CRTSFL offers full duplex    line control on    3.2v4 and later    ONLY
  2097. X    for    SCO's sio driver.
  2098. X
  2099. X
  2100. X      arg |    RTSFLOW    | CTSFLOW    arg | RTSFLOW | CTSFLOW | CRTSFL
  2101. X     -----+---------+---------  -----+---------+---------+--------
  2102. X      off |      0    |   0          0     |   0       |   0     |
  2103. X      on  |      0    |   1          1     |   0       |   1     |
  2104. X      no  |      0    |   0          2     |   1       |   0     |
  2105. X      yes |      0    |   1          3     |   1       |   1     |
  2106. X                      4     |   0       |   0     |     1
  2107. X
  2108. X    Choice 4 only works    on SCO 3.2v4 and ODT 2.0.  As you can see, numeric
  2109. X    values are masks.  If the 4    bit is present in the numeric value, it
  2110. X    overrides the lower-order bits:  Specifying    7 as an    argument specifies
  2111. X    CRTSFL is to be used if it is supported, otherwise RTSFLOW and CTSFLOW.
  2112. X
  2113. X    Under System V Release 4, an TCGETX/TCSETX manipulation is performed,
  2114. X    modifying the x_hflag bits as follows:
  2115. X
  2116. X     argument | RTSXOFF | CTSXON    argument | RTSXOFF | CTSXON
  2117. X     ---------+---------+---------    ---------+---------+---------
  2118. X       off      |   0        |    0      0     |   0       |   0
  2119. X       on      |   0        |    1      1     |   0       |   1
  2120. X       no      |   0        |    0      2     |   1       |   0
  2121. X       yes      |   0        |    1      3     |   1       |   1
  2122. X
  2123. X    Under SunOS    4.1, only CTS support is provided.  You    should read the
  2124. X    termio and zs man pages.  Arguments    result in the stated manipulations
  2125. X    of the termio element c_cflag:
  2126. X
  2127. X
  2128. X
  2129. X
  2130. X    Public Domain by wht@n4hgf                 9/10/92
  2131. X
  2132. X
  2133. X
  2134. X
  2135. X
  2136. X
  2137. X
  2138. X    ECU    Procedure Language                      64
  2139. X
  2140. X
  2141. X
  2142. X     argument | CRTSCTS    argument    | CRTSCTS
  2143. X     ---------+---------  ----------+---------
  2144. X       off      |   0          0    |   0
  2145. X       on      |   1          1    |   1
  2146. X       no      |   0
  2147. X       yes      |   1
  2148. X
  2149. X
  2150. X
  2151. X    Examples:
  2152. X
  2153. X        ifi    %baud >= 9600
  2154. X        rtscts 7 | use CRTSFL if available,    otherwise whatever
  2155. X
  2156. X
  2157. X
  2158. X    6.67  rx
  2159. X
  2160. X
  2161. X    usage: rx [-a] <str>
  2162. X
  2163. X    This command invokes the XMODEM file receive protocol to receive file
  2164. X    <str>.  If switch '-a' is omitted, the received file is stored as
  2165. X    received; otherwise    carriage return/linefeed pairs are converted to
  2166. X    newlines.  The remote sender must have been    started    prior to the
  2167. X    execution of this command.
  2168. X
  2169. X
  2170. X    6.68  ry
  2171. X
  2172. X
  2173. X    usage: ry
  2174. X
  2175. X    This command invokes the YMODEM Batch (not to be confused with XMODEM-
  2176. X    1K)    protocol to receive files from a remote    system.     The remote sender
  2177. X    must have been started prior to the    execution of this command.
  2178. X
  2179. X
  2180. X    6.69  rz
  2181. X
  2182. X
  2183. X    usage: rz
  2184. X
  2185. X    This command receives files    with ZMODEM/CRC-32.  The remote    sender must
  2186. X    have been started prior to the execution of    this command. Automatic
  2187. X    ZMODEM frame detection is NOT supported during procedure execution.
  2188. X
  2189. X
  2190. X
  2191. X
  2192. X
  2193. X
  2194. X
  2195. X
  2196. X    Public Domain by wht@n4hgf                 9/10/92
  2197. X
  2198. X
  2199. X
  2200. X
  2201. X
  2202. X
  2203. X
  2204. X    ECU    Procedure Language                      65
  2205. X
  2206. X
  2207. X
  2208. X    6.70  scrdump
  2209. X
  2210. X
  2211. X    usage: scrdump [<str>]
  2212. X
  2213. X    This command causes    the current screen contents to be stored in a file.
  2214. X    If <str> is    supplied, it is    used as    a pathname.  If    <str> is not
  2215. X    supplied, "~/.ecu/screen.dump".  The actions of the    interactive sdname
  2216. X    command have no effect on the execution of this command.
  2217. X
  2218. X    See    the section titled "Screen Dump" for more information.    The
  2219. X    subsection titled "Multiscreen and Non-Multiscreen"    will be    of
  2220. X    particular interest    when using screen dumps    in an automated    environment.
  2221. X
  2222. X
  2223. X    6.71  send
  2224. X
  2225. X
  2226. X    usage: send    [-n] <str>
  2227. X
  2228. X    This command sends <str> to    the communications line.  If the '-n' switch
  2229. X    is omitted,    a carriage return (0x0D) is transmitted    after <str>.  If '-
  2230. X    n' is supplied, no carriage    return is transmitted.
  2231. X
  2232. X
  2233. X    Examples:
  2234. X
  2235. X    send 'ps -au'
  2236. X    send -n    %chr(0x02)+'START'+%chr(0x03)
  2237. X
  2238. X
  2239. X
  2240. X    6.72  set
  2241. X
  2242. X
  2243. X
  2244. X    usage: set [$]i<name>=<int-expression>[, ...]
  2245. X       set [$]s<name>=<str-expression>[, ...]
  2246. X
  2247. X
  2248. X    This command sets an integer or string variable to an expression.  The
  2249. X    'set' verb may be omitted provided the otherwise optional '$' is
  2250. X    supplied.  There are many examples of how the set statement    is performed
  2251. X    throughout this document.  The examples here are to    further    clarify    the
  2252. X    statement's    syntax.
  2253. X
  2254. X    If the '=<expression>' is omitted, the value of the    variable is
  2255. X    displayed (useful when debugging).     If procedure tracing is enabled
  2256. X    with the ptrace command, all variables referenced by the set command,
  2257. X    whether a value is assigned    or not,    are displayed.
  2258. X
  2259. X
  2260. X
  2261. X
  2262. X    Public Domain by wht@n4hgf                 9/10/92
  2263. X
  2264. X
  2265. X
  2266. X
  2267. X
  2268. X
  2269. X
  2270. X    ECU    Procedure Language                      66
  2271. X
  2272. X
  2273. X
  2274. X    Examples:
  2275. X
  2276. X    set i0=0
  2277. X    set $s0='brown',s1='The    quick '+$s0+' fox'
  2278. X    set $S0             with no '=', displays contents
  2279. X    set i0,$i1,s0='abc',s1
  2280. X    $s0 = 'abc'         legal
  2281. X    set s0='abc'         legal
  2282. X    s0 = 'abc'         illegal
  2283. X
  2284. X    6.73  setline
  2285. X
  2286. X
  2287. X
  2288. X    usage: setline <filename>
  2289. X
  2290. X    This command is an exact analog of the -l command line switch.
  2291. X    <filename> is used on the setup screen (if it is presented)    as the
  2292. X    default filename. If you do    not edit this name, ECU    will attempt to    open
  2293. X    the    line when you press End    or ^D. <filename> has the format of a
  2294. X    complete pathanme in /dev or simple    tty name.
  2295. X
  2296. X    setline may    only be    used in    _rc.ep.     Using the setline command with    the
  2297. X    baud command gives you programatic control over the    actual choice of the
  2298. X    line and rate or the defaults for the setup    screen,    depending upon other
  2299. X    options.
  2300. X
  2301. X    NOTE: using    the setline command will override any command line -l
  2302. X    specification.
  2303. X
  2304. X    NOTE: For important    considerations on line choice, see the ECU manual
  2305. X    sections titled "Choosing a    Dialout    Line" and "DCDwatch".
  2306. X
  2307. X
  2308. X    Example:
  2309. X      setline '/dev/tty1a'
  2310. X      setline 'tty1a'
  2311. X      setline 'cua0'
  2312. X
  2313. X    6.74  sk
  2314. X
  2315. X
  2316. X    usage: sk [-a] <str>
  2317. X
  2318. X    This command invokes C-Kermit to send files. ECU searches the PATH list
  2319. X    for    'kermit' or 'ckermit', expecting to find Columbia University C-
  2320. X    Kermit version 5A(173) or later.  The file ~/.kermrc must be set up    to
  2321. X    have any desired initialization parameters you desire (refer to C-Kermit
  2322. X    documentation for more information).  The remote protocol must have    been
  2323. X    started prior to the execution of this command.
  2324. X
  2325. X
  2326. X
  2327. X
  2328. X    Public Domain by wht@n4hgf                 9/10/92
  2329. X
  2330. X
  2331. X
  2332. X
  2333. X
  2334. X
  2335. X
  2336. X    ECU    Procedure Language                      67
  2337. X
  2338. X
  2339. X
  2340. X    WARNING: until further notice, avoid suspending Kermit with    ^Z.  ECU is
  2341. X    totally unprepared to act as a job control process group leader.
  2342. X
  2343. X    If switch '-a' is supplied,    newlines are converted to carriage
  2344. X    return/linefeed pairs.  If '-a' is omitted,    the file(s) are    transmitted
  2345. X    without modification.
  2346. X
  2347. X    Integer variable $i0 receives the exit status from the transfer.  If 0,
  2348. X    transfer was normal.  Note:    procedure execution IS terminated by a
  2349. X    SIGINT to the spawned file transfer    process.  This is different than for
  2350. X    versions prior to 3.10.  If    $i0 is set to -1, the file transfer program
  2351. X    did    not begin.
  2352. X
  2353. X
  2354. X    6.75  ss
  2355. X
  2356. X
  2357. X    usage: ss <str>
  2358. X
  2359. X    This command invokes the SEAlink file transfer protocol to send one    or
  2360. X    more files.     There is no provision in the SEAlink protocol to convert
  2361. X    newlines to    carriage return/linefeed pairs.     so the    received files are
  2362. X    stored as received.
  2363. X
  2364. X    Integer variable $i0 receives the exit status from the transfer. If    0,
  2365. X    transfer was normal.  Note:    procedure execution IS terminated by a
  2366. X    SIGINT to the spawned file transfer    process.  This is different than for
  2367. X    versions prior to 3.10.  If    $i0 is set to -1, the file transfer program
  2368. X    did    not begin.
  2369. X
  2370. X
  2371. X    6.76  sx
  2372. X
  2373. X
  2374. X    usage: sx [-ak[l]] [<label-str>] <filename-str>
  2375. X
  2376. X    This command invokes the XMODEM or XMODEM-1K file transfer protocol    to
  2377. X    send a file.  If '-k' is supplied, XMODEM-1K is used, else XMODEM.    If
  2378. X    switch '-a'    is supplied, newlines are converted to carriage
  2379. SHAR_EOF
  2380. true || echo 'restore of doc/proc.man failed'
  2381. fi
  2382. echo 'End of ecuman320 part 4'
  2383. echo 'File doc/proc.man is continued in part 5'
  2384. echo 5 > _shar_seq_.tmp
  2385. exit 0
  2386.  
  2387. exit 0 # Just in case...
  2388.