home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume32 / ecuman / part04 < prev    next >
Encoding:
Text File  |  1992-09-15  |  57.4 KB  |  2,382 lines

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