home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-09-15 | 57.4 KB | 2,382 lines |
- Newsgroups: comp.sources.misc
- From: wht@n4hgf.Mt-Park.GA.US (Warren Tucker)
- Subject: v32i080: ecuman - Manual for ECU comm package rev 3.20, Part04/05
- Message-ID: <1992Sep15.165736.7647@sparky.imd.sterling.com>
- X-Md4-Signature: 71a24941929272cc50367da217440932
- Date: Tue, 15 Sep 1992 16:57:36 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: wht@n4hgf.Mt-Park.GA.US (Warren Tucker)
- Posting-number: Volume 32, Issue 80
- Archive-name: ecuman/part04
- Environment: SCO,XENIX,ISC,SUNOS,SYSVR4,HDB,Curses
- Supersedes: ecuman: Volume 21, Issue 90-93
-
- ---- Cut Here and feed the following to sh ----
- #!/bin/sh
- # this is ecuman320.04 (part 4 of ecuman320)
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file doc/proc.man continued
- #
- if test ! -r _shar_seq_.tmp; then
- echo 'Please unpack part 1 first!'
- exit 1
- fi
- (read Scheck
- if test "$Scheck" != 4; then
- echo Please unpack part "$Scheck" next!
- exit 1
- else
- exit 0
- fi
- ) < _shar_seq_.tmp || exit 1
- if test ! -f _shar_wnt_.tmp; then
- echo 'x - still skipping doc/proc.man'
- else
- echo 'x - continuing file doc/proc.man'
- sed 's/^X//' << 'SHAR_EOF' >> 'doc/proc.man' &&
- X
- X
- X This command changes the current normal or reverse video colors in a
- X manner similar to the setcolor(C) command. It has no effect on systems
- X using other than an SCO multiscreen color monitor. If the second
- X (background) color is omitted, it is assumed to be black.
- X
- X The command also forces normal video mode. Refer to the vidnorm and
- X vidrev commands. Refer also to the vidcolor command.
- X
- X
- X Color names
- X blue magenta brown black
- X lt_blue lt_magenta yellow gray
- X cyan white green red
- X lt_cyan hi_white lt_green lt_red
- X
- X Example:
- X
- X color lt_green # normal video light green on black
- X color -r red white # reverse video red on white
- X
- X
- X
- X 6.8 continue
- X
- X
- X usage: continue
- X
- X This command is used inside a whilei or whiles compound statement to
- X skip the remainder of any commands in the loop and continue execution at
- X the first command in the loop.
- X
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 33
- X
- X
- X
- X Example:
- X
- X send '' # send ENTER to get prompt
- X whilei 1=1 # forever unless break command executed
- X {
- X lookfor -e 'login: ' # look for login prompt
- X ifi $i0 == 0 # if we dont get prompt ...
- X {
- X send '' # send ENTER again
- X continue # and look for login prompt
- X }
- X send $s_name # send username
- X lookfor -e 'Password:'
- X send $s_password
- X get -e 0 50 # wait 10 seconds for response
- X
- X # if incorrect not found in response, ...
- X if %instr($s0,'incorrect') < 0 # ... must have won
- X break
- X
- X # garbled line?: system will send another 'login: '
- X }
- X
- X
- X
- X NOTE: further examples of continue usage may be found in the example for
- X the else command.
- X
- X
- X 6.9 cursor
- X
- X
- X usage: cursor <row> [<col>]
- X
- X This command places the cursor at a specified position on the video
- X screen. The top left of the scrren is row 0, column 0. If <col> is not
- X specified, it is assumed 0 (left margin).
- X
- X Example:
- X
- X cls
- X $i0 = 5
- X whilei $i5 < 12
- X {
- X cursor $i5
- X echo 'This is line '+%itos($i5,2d)+' of the display'
- X }
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 34
- X
- X
- X
- X 6.10 dcdwatch
- X
- X
- X usage: dcdwatch [<dcdwatch-param>]
- X
- X This command controls the DCD watcher. The optional argument may be:
- X
- X y or yes enable DCD watcher
- X n or no disable DCD watcher
- X t or terminate terminate ECU on loss of DCD
- X
- X
- X The DCD watcher when enabled causes ECU to monitor the DCD line (within
- X the limits imposed by the OS with its CLOCAL=0 functionality). When the
- X watcher is on and DCD drops, ecu automatically performs the action of
- X the interactive or procedure hangup command. If the 't'erminate option
- X is chosen, then after hangup processing is complete, the ECU program
- X will terminate.
- X
- X The state of the watcher may be changed by the use of the dial command
- X which uses a directory entry which changes the DCD watcher status.
- X
- X The DCD watcher depends upon the tty driver to return zero characters on
- X a read when DCD is low when the termio flag CLOCAL is reset. The tty
- X driver must ignore DCD if CLOCAL is set. If your system offers a
- X "modem" and "direct" choice (by choice of filename), you probably need
- X to use the "modem" choice for this to work properly. This decision is
- X made properly for you on SCO if you are using SCO "standard" tty line
- X naming conventions. This is true even though ECU appears to force a tty
- X name with trailing upper case characters (modem) to one with a lower
- X case character (direct).
- X
- X
- X 6.11 delline
- X
- X
- X usage: delline
- X
- X This command deletes the current line from the video display.
- X
- X
- X 6.12 dial
- X
- X
- X usage: dial <remote>
- X
- X This command causes an outgoing call to be placed. The string argument
- X <remote> can take one of two forms: a numeric telephone number or an
- X alphanumeric "logical" number or system name.
- X
- X A numeric phone number ('1(800)555-1212' or '2345678') must begin with a
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 35
- X
- X
- X
- X digit and must consist entirely of digits, parentheses or hyphens. If a
- X telephone number is supplied, the phone number is dialed; you must first
- X have set the desired baud rate and parity using the 'baud' and 'parity'
- X commands. (If the last character of a telephone number is a dollar
- X sign, it is removed and is replaced with the contents of the first line
- X in ~/.ecu/credit. See the description of the dialing directory.)
- X
- X If a logical name is entered, the phone directory (managed by the
- X interactive dial command) is searched; if the entry is found, the baud
- X rate and parity is automatically set from values in the directory entry;
- X then, the number in the directory entry is dialed.
- X
- X Using the dial command with a directory entry may change the DCD watcher
- X (dcdwatch) status. See the section on the dcdwatch command and the
- X section titled "Choosing a Dialout Line" for more information.
- X
- X When the dial command returns, integer variable $i0 is set to a status
- X code and string variable $s0 has a text message (the modem verbal result
- X code if the ECU dialer is used, a representation of the return status
- X code if a uucp dialer is used [see below]).
- X
- X Dial Command $i0 Status Codes
- X
- X 0 successful connect
- X 1 failed to connect (call progress)
- X 2 dial interrupted by signal
- X 3 modem error (non responsive or commands rejected)
- X
- X Dial Command $s0 Status Messages (uucp dialer)
- X
- X CONNECT #### #### = baud rate
- X BUSY only some modems
- X NO ANSWER only some modems
- X NO CARRIER most generic "fail to connect"
- X NO DIAL TONE only some modems
- X !Connect bad baud rate modem reported different rate
- X !Interrupted call interrupted by signal
- X !Invalid arguments ECU error
- X !Invalid phone number too long or bad characters
- X !Ioctl error should not be reported here
- X !Line in use should not be reported here
- X !Line open error should not be reported here
- X !Modem Error modem did not respond
- X
- X Note: if the ECU dialer is used, the actual modem result code
- X is returned in $s0 or one of the following two strings:
- X
- X !Interrupted call interrupted by signal
- X !Modem Error modem did not respond
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 36
- X
- X
- X
- X 6.13 do
- X
- X
- X usage: do <procname> [<arg> ...]
- X
- X This command executes a procedure whose name appears as the command's
- X first (string) argument. One or more arguments (up to 19) may be passed
- X to the called procedure; an argument may consist of any valid string
- X expression, provided, that, when expanded, the argument does not exceed
- X 256 characters in length.
- X
- X The called procedure may read its arguments using the %argv string
- X function. %argv(0) is the name of the procedure. The quantity of
- X arguments may be obtained using the %argc integer function.
- X
- X
- X Example:
- X
- X do 'proc' %rname %date+' '+%time %argv(0)
- X
- X Note: in this example, the called procedure is passed the name
- X of the calling procedure as the last argument.
- X
- X
- X
- X 6.14 duplex
- X
- X
- X
- X usage: duplex full | half
- X duplex 'full' | 'half'
- X
- X
- X This command specifies whether or not ECU is to locally echo characters
- X typed by you at the keyboard. The overwhelming majority of remote
- X systems provide the echo function, in which case full duplex must be
- X used. For the rare occasions when the remote system does not echo your
- X keyboard input, setting half duplex will allow you to see what you are
- X typing.
- X
- X When communicating with another terminal in a "teletype conversation",
- X setting half duplex is generally required. In such cases, use of the
- X interactive nl, nlin and nlout commands may also be required.
- X
- X Example:
- X
- X duplex full
- X $s0 = 'full'; duplex $s0
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 37
- X
- X
- X
- X 6.15 echo
- X
- X
- X usage: echo [-n] <string>
- X
- X This command prints the contents of the string argument <string> on the
- X screen. If the -n switch is not present, a newline follows the output
- X of <string>.
- X
- X Example:
- X
- X echo 'Procedure '+%argv(0)+' executing at '+%time
- X echo -n 'Enter your first name: '; $s0 = %cgets
- X
- X
- X
- X 6.16 eeol
- X
- X
- X usage: eeol
- X
- X This command erases the video display to the end of the line.
- X
- X
- X 6.17 else
- X
- X
- X
- X usage: else <statement>
- X
- X else
- X <statement>
- X
- X else
- X {
- X any kind and number of statements
- X }
- X
- X else <if> <statement>
- X
- X else <if>
- X {
- X any kind and number of statements
- X }
- X
- X
- X
- X This statement may follow an ifi or ifs command to specify one or more
- X statements to be executed if the if-type command condition is false.
- X Else commands may be chained together in the traditional structured
- X language manner.
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 38
- X
- X
- X
- X For the purposes of describing this command, <statement> is any single
- X or compound statement NOT containing a whilei or whiles command. If you
- X wish to have a while-type command executed as part of an else condition,
- X the while must occur within braces ("{}").
- X
- X <if> is an ifi or ifs command followed by an <if-condition> (see the
- X description of the ifi or ifs commands below).
- X
- X Example:
- X
- X #+------------------------------------------------------
- X # finger.ep - procedure to send 'finger' to remote
- X # BSD Unix system; print resulting lines in different
- X # colors: uucp logins green, root red, others cyan
- X #-------------------------------------------------------
- X
- X mkvar $icolor; $icolor = %colors
- X mkvar $itimeout
- X $itimeout = 50 # timeout for first line 5 secs
- X send 'ps -aux' # send command, but do not echo
- X lookfor '\n' 40 # swallow command
- X whilei 1==1 # forever, or until break
- X {
- X lgets 0 $itimeout 1 '\n' #get a line
- X ifi $i0 = 0 break #if no chaacters read
- X $itimeout = 10 #wait 1 sec for later lines
- X
- X ifi %instr($s0,'% ') >= 0 # if csh prompt seen
- X break # exit while loop
- X else ifi %instr($s0,'Login') >= 0
- X color gray
- X else ifi %instr($s0,'root') >= 0
- X color red
- X else ifi %instr($s0,'uucp') >= 0
- X color green
- X else color cyan
- X echo $s0
- X }
- X icolor $icolor #restore entry colors
- X send '' #force a new prompt from remote
- X
- X
- X
- X
- X 6.18 exec
- X
- X
- X usage: exec <string>
- X
- X This function executes a string as a procedure statement. Argument
- X <string> must contain an ecu statement exactly as might appear on a
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 39
- X
- X
- X
- X procedure line, with a few exceptions.
- X
- X
- X 1. There may be no label: the first command may
- X start in column one.
- X 2. You should not execute a goto, gosub or return.
- X 3. You should not code if, while or compound statement
- X brackets.
- X
- X
- X You are on your honor with regard to items 2 and 3 above. If you
- X stretch it, it will break.
- X
- X
- X Example:
- X
- X $s20 = 'Home'; $s30 = '^H'
- X $s21 = 'End'; $s31 = '^E'
- X $s22 = 'F1'; $s32 = '^A'
- X $s23 = 'F2'; $s33 = '^B'
- X $i10 = 0
- X whilei $i0 < 4
- X {
- X $s0 = 'fkmap '+$s[20+$i10]+' '+$s[30+$i10]
- X exec $s0
- X $i10 = $i10 + 1
- X }
- X
- X
- X
- X 6.19 exit
- X
- X
- X usage: exit [<status>]
- X
- X This command causes an abrupt termination of the ECU program. Any
- X existing connection with a remote system is terminated immediately. If
- X no integer argument <status> is found, ECU exits with a program exit
- X status of 0. If <status> is found and the value is zero, then ECU exits
- X with a program exit status of 0. If <status> non-zero,its value must be
- X in the range of 1 to 31, and ECU exits with a program exit status of 192
- X plus <status>. This feature allows batch executions of ECU by shell
- X script to detect user-determined ECU execution status. See the section
- X titled "Exit Codes".
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 40
- X
- X
- X
- X 6.20 expresp
- X
- X
- X usage: expresp [-v[v...]] <exp-resp-str> [<timeout_msecs>]
- X
- X This command emulates the uuchat function as described in the SCO HDB
- X UUCP documentation and in the /usr/lib/uucp/Dialers file.
- X
- X -v causes the expect-respond conversation between ECU and the remote
- X system to be displayed on the screen. This switch is automatically
- X enabled if procdedure tracing is enabled.
- X
- X Multiple v's (e.g., -vv, -vvv) up to 3 'v's produce more verbose debug
- X output. -vv causes each base level expect and respond string to be
- X displayed. -vvv causes a hexadecimal dump of each interpreted expect
- X string to be displayed.
- X
- X The majority of procedure tracing features use the current trace state
- X (from the ptrace command setting) as a binary condition. That is,
- X either tracing is done or not. However, expresp adds the tracing level
- X to the number of -v switches to determine its verbosity level.
- X
- X Escape sequences allow you to insert special or variable information in
- X your expect and respond strings. Escape sequences begin with either the
- X backslash or the tilde. NOTE: remember to use two backslashes inside a
- X literal string constant to get one backslash in the resulting string.
- X The procedure language's string parser has it's own use for a single
- X backslash followed by another character. For instance:
- X
- X
- X set $s0='\\M' sets $s00 to '\M'
- X
- X
- X Some of the escape sequnces have meaning in both expect and respond
- X tokens while others have a use in only of of the two types.
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 41
- X
- X
- X
- X Meaning of the escape sequences:
- X \D - current phone number
- X \E - turn on echo checking when sending (for slow devices)
- X \K - send a BREAK
- X \M - turn on line CLOCAL
- X \N - null byte (same as \000)
- X \T - current phone number with Dialcodes and
- X character translation
- X \c - append no new-line to send string (must be last
- X "character" in a send string)
- X \d - delay (2 seconds)
- X \e - turn off echo checking when sending
- X \m - turn off line CLOCAL
- X \n - send or expect new-line
- X \p - pause (approximately 1/4-1/2 second delay)
- X \r - send or expect carriage return
- X \\ - send or expect backslash (same as \134)
- X \~ - send or expect tilde (same as \176)
- X \### - send or expect character respresenting three
- X character octal value ### (*MUST* be three digits
- X with leading zeroes as necessary)
- X ~m[##] - set expect timeout to ## milliseconds (NOT
- X SUPPORTED BY DIALERS; SEE BELOW)
- X ~n[##] - nap ## milliseconds (NOT SUPPORTED BY DIALERS;
- X SEE BELOW)
- X ~t[##] - set expect timeout to ## seconds (NOT SUPPORTED
- X BY DIALERS; SEE BELOW)
- X Speed - Hayes-style CONNECT handler (as sole contents of
- X an expect string, equivalent to using CONNECT)
- X
- X
- X <timeout_msecs> specifies an optional timeout in milliseconds for
- X waiting on expect strings; it defaults to 10,000 milliseconds (10
- X seconds). The resolution for timeouts is limited to the basic tick time
- X of your system (HZ, 10 msec for UNIX/386 3.2.0, 16 (1000/60) msec for
- X 3.2.1 (ODT 1.0) and 3.2v2 (ODT 1.1), back to 10 msec for 3.2v4 (ODT 2.0)
- X and 20 msec for XENIX/386 and XENIX/286). Whew! The timeout for 'Speed'
- X expects is fixed at 90 seconds.
- X
- X ~t[##] and ~m[##] may appear at the beginning of an expect portion of a
- X script. They set the expect timeout delay in seconds and milliseconds,
- X respectively. The ## is a decimal number; if it is specified <= 0,
- X there will be no delay. The initial timeout set for each execution of
- X the expresp command is 10 seconds. The timeout period remains as you
- X set it for the remainder of the script unless you change it again.
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 42
- X
- X
- X
- X Examples:
- X
- X ~t[20]gin: look for "gin:" for 20 seconds
- X ~m[500] 01 look for STX for 500 milliseconds
- X "" ~t[3]gin:--gin: uname ~t[10]word: secret
- X
- X
- X ~n[##] may appear anywhere in a respond portion of a script. It causes
- X ECU to nap the number of milliseconds specified by the decimal ##
- X argument. This function was served by \m prior to ECU 3.20. Addition
- X of SVR4 \M and \m necessitated the change.
- X
- X
- X Example:
- X
- X a~n[20]b~n[20]c send "abc" with 20 msec between each
- X character
- X
- X
- X
- X Integer variable $i0 is set to one if the expect-respond script fails,
- X else it is set to 0.
- X
- X
- X 6.21 fchmod
- X
- X
- X usage: fchmod <mode> <filenum>
- X
- X This command sets the mode of <filenum> to <mode>. The <mode> argument
- X takes one of two forms, a nine-character mode string (e.g., 'rwxr-xr-x')
- X or an integer value (0755). The <filenum> argument is either a string
- X value forming a filename or an integer file number representing a file
- X opened with the fopen command.
- X
- X The command sets $i0 = 0 if successful, else to the errno from the
- X associated system call (refer to the %errstr string function and/or
- X /usr/include/sys/errno.h).
- X
- X
- X Example:
- X
- X fopen 1 '/tmp/123'; fchmod 'rwxrwxrwx' 1
- X fchmod 'rwxrwxrwx' '/tmp/123'
- X fopen 1 '/tmp/123'; fchmod 0777 1
- X $i0 = 0777; fchmod $i0 '/tmp/123'
- X
- X All of the above example result in the same result.
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 43
- X
- X
- X
- X 6.22 fclose
- X
- X
- X usage: fclose <filenum>
- X
- X This command closes <filenum>. The <filenum> argument is an integer
- X file number representing a file opened with the fopen command.
- X
- X The command is ignored if <filenum> is not open. No integer variable is
- X modified by fclose.
- X
- X
- X Example:
- X
- X fclose 1
- X
- X
- X
- X 6.23 fdel
- X
- X
- X usage: fdel <filenum>
- X
- X This command removes a file.
- X
- X The command sets $i0 = 0 if successful, else to the errno from the
- X associated system call (refer to the %errstr string function and/or
- X /usr/include/sys/errno.h).
- X
- X
- X Example:
- X
- X fdel '/tmp/123'
- X
- X
- X
- X 6.24 fgetc
- X
- X
- X usage: fgetc <filenum> <destination>
- X
- X This command reads a character from <filenum>. The <filenum> argument
- X is an integer file number representing a file opened with the fopen
- X command.
- X
- X The argument <destination> is either a string variable or an integer
- X variable. If the file has reached end of file: an integer variable
- X receives -1; a string variable is returned null. Otherwise, the
- X character's numeric value (0-255) is placed in an integer variable or a
- X string variable is returned with a length of one with the file character
- X as its only character.
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 44
- X
- X
- X
- X Example:
- X
- X fgetc 1 $s0
- X fgetc 1 $i_input
- X
- X
- X
- X 6.25 fgets
- X
- X
- X usage: fgets <filenum> <strvar>
- X
- X This command reads a character from <filenum>. The <filenum> argument
- X is an integer file number representing a file opened with the fopen
- X command.
- X
- X The argument <strvar> is a string variable. If the file has reached end
- X of file, <strvar> is returned null and integer variable $i0 is set to 1.
- X Otherwise, the <strvar> receives input from the file minus the trailing
- X newline and $i0 is returned zero.
- X
- X
- X Example:
- X
- X fgets 1 $s0
- X
- X
- X
- X 6.26 fkey
- X
- X
- X
- X usage: fkey <str>
- X fkey -r
- X
- X
- X This command selects a function key definition from the ~/.ecu/keys
- X file. The -r version resets to the original defaults, plust loads any
- X entry in keys named "default".
- X
- X
- X 6.27 fkmap
- X
- X usage: fkmap
- X fkmap <keyname>
- X fkmap <keyname> <keylist>
- X fkmap -r
- X fkmap -s <file>
- X
- X
- X This command manages the mechanism ECU uses to recognize function keys
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 45
- X
- X
- X
- X when they are entered at the console. Entering the command with no
- X arguments displays the current mapping in funckeymap format.
- X
- X If supplied, the first argument to the command must be the recognized
- X name of a function key from the list:
- X
- X F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12
- X Home End PgUp PgDn CUP CUL CU5 CUR CUD
- X
- X The case of the entered argument is unimportant.
- X
- X If only one argument is supplied, the mapping for the specified key is
- X displayed. If more than one argument is supplied, the keyboard mapping
- X is changed. Arguments 2-n are character code specifiers in the format
- X used to define a funckeymap entry. WARNING: If found to be
- X syntactically correct, a mapping change is installed immediately. If
- X incorrect mapping of the HOME key is requested, you may lose control of
- X ECU.
- X
- X The -r form rereads the original funckeymap definition (as at program
- X invocation), reseting the mapping. The -s switch saves the current
- X mapping to <file>.
- X
- X Note: the fkmap command line must contain literal text. No variable or
- X expression expansions are not done.
- X
- X
- X Examples:
- X
- X fkmap f10 display F10 mapping
- X fkmap Home ^Z map Home to ^Z
- X after this command, type ^Z for Home
- X
- X
- X
- X 6.28 flush
- X
- X
- X usage: flush
- X
- X This command causes any characters received by the system from the line,
- X but not yet read by the procedure to be "forgotten" or flushed.
- X
- X
- X 6.29 fopen
- X
- X
- X usage: fopen [-<mode>] <filenum> <filename>
- X
- X This command opens a file named by the string argument <filename> and
- X associates it with the user-chosen file number <filenum> (which must be
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 46
- X
- X
- X
- X an integer value between 0 and 4, inclusive).
- X
- X The argument switches govern how a file is opened and must be chosen
- X from this list:
- X
- X -r The file is opened read-only; if it does not exist, an
- X error occurs.
- X
- X -r+ The file is opened for reading and writing; if it does
- X not exist, an error occurs.
- X
- X -w The file is opened for writing (any previous contents of
- X the file are lost); if it does not exist, it is created.
- X
- X -w+ The file is opened for reading and writing (any previous
- X contents of the file are lost); if it does not exist, it
- X is created.
- X
- X -a The file is opened for appending (writes to the file are
- X added to the previous file contents); if it does not
- X exist, it is created. All writes are appended to the
- X file (the fseek command has no effect).
- X
- X The switches argument may be omitted; in such cases, the file is opened
- X as though '-r' had been supplied. However, if procedure tracing is
- X enabled (see the description of the interactive and procedure command
- X ptrace), a warning message will be issued.
- X
- X The command sets $i0 = 0 if successful, else to the errno from the
- X associated system call (refer to the %errstr string function and/or
- X /usr/include/sys/errno.h).
- X
- X Example:
- X
- X fopen 0 -r '/etc/passwd'
- X fopen 1 -w+ '/tmp/123'
- X fopen 2 -a 'tranact.log'
- X
- X
- X
- X 6.30 fputc
- X
- X
- X usage: fputc <filenum> <char>
- X
- X This command writes character <char> into <filenum>. The <filenum>
- X argument is an integer file number representing a file opened with the
- X fopen command. Argument <char> is a integer value of which the lower
- X eight bits are used or a string value of which the first character is
- X used.
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 47
- X
- X
- X
- X If a write error occurs, procedure execution is terminated.
- X
- X Example:
- X
- X $s0='abc'; fputc 1 $s0 writes 'a'
- X $i0=0x30 ; fputc 1 $i0 writes '0'
- X
- X
- X
- X 6.31 fputs
- X
- X
- X usage: fputs [-n] <filenum> <str>
- X
- X This command writes the string <str> into <filenum>. The <filenum>
- X argument is an integer file number representing a file opened with the
- X fopen command.
- X
- X If the switch '-n' is omitted, a newline is appended after <str> in the
- X file; if present, no newline is written.
- X
- X If a write error occurs, procedure execution is terminated.
- X
- X Example:
- X
- X $s0='abc'; fputc 1 $s0 writes 'a'
- X
- X
- X
- X 6.32 fseek
- X
- X
- X usage: fseek <filenum> <position>
- X
- X This command sets the file position of <filenum> to <position>, an
- X integer value. The corresponding integer function %ftell may be used to
- X determine the current file position.
- X
- X Note: if <filenum> is open for append ('-a'), then the fseek command
- X will have no effect.
- X
- X
- X 6.33 getf
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 48
- X
- X
- X
- X usage: getf -x <int-var-spec> <offset>
- X
- X where: -x ==
- X -b byte
- X -w word (little-endian)
- X -W word (big-endian)
- X -l 32-bits (little-endian)
- X -L 32-bits (big-endian)
- X
- X
- X
- X 6.34 gosub
- X
- X
- X usage: gosub <label>
- X
- X This command transfers control of procedure to a statement other than
- X the one immediately following. The <label> argument may be literal text
- X or may be a string, allowing a "computed gosub" feature.
- X
- X When the next return statement is executed, control is returned to the
- X next statement after the gosub.
- X
- X
- X Example:
- X
- X gosub GET_NEXT
- X gosub 'GET_NEXT'
- X gosub 'GET'+'_NEXT'
- X $s0 = 'GET_NEXT'; gosub $s0
- X $s0 = 'NEXT'; gosub 'GET_'+$s0
- X
- X Note: all the above examples cause transfer to the label GET_NEXT.
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 49
- X
- X
- X
- X A switch or case function of sorts may be implemented by something like:
- X
- X #$i0 has been set to the "switch" value
- X ifi $i0 < 0 || $i0 > 2 # avoid gosub label not found
- X {
- X echo 'bad my_case state value'+%itos($i0)
- X DO SOMETHING LIKE DIE OR DUMP VARS AND DIE
- X }
- X $s0 = 'my_case_'+%itos($i0,03)
- X gosub $s0
- X
- X my_case_000
- X echo 'handle case 0'
- X return
- X
- X my_case_001
- X echo 'handle case 1'
- X return
- X
- X my_case_002
- X ifi $i_already_did_002
- X {
- X echo 'whoops'
- X return
- X }
- X echo 'handle case 2'
- X $i_already_did_002 = 1
- X return
- X
- X
- X
- X 6.35 gosubb
- X
- X
- X usage: gosubb <label>
- X
- X This command serves the same function as the gosub command except the
- X programmer is signifying that the label is behind the current statement,
- X resulting in slightly faster execution. (The label is not REQUIRED to
- X be at any specific location in the procedure relative to the gosubb
- X statement.)
- X
- X
- X 6.36 goto
- X
- X
- X usage: goto <label>
- X
- X This command transfers control of procedure to a statement other than
- X the one immediately following. The <label> argument may be literal text
- X or may be a string, allowing a "computed goto" feature.
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 50
- X
- X
- X
- X Example:
- X
- X goto GET_NEXT
- X goto 'GET_NEXT'
- X goto 'GET'+'_NEXT'
- X $s0 = 'GET_NEXT'; goto $s0
- X $s0 = 'NEXT'; goto 'GET_'+$s0
- X
- X Note: all the above examples cause transfer to the label GET_NEXT.
- X
- X
- X 6.37 gotob
- X
- X
- X usage: gotob <label>
- X
- X This command serves the same function as the goto command except the
- X programmer is signifying that the label is behind the current statement,
- X resulting in slightly faster execution. (The label is not REQUIRED to
- X be at any specific location in the procedure relative to the gotob
- X statement.)
- X
- X
- X 6.38 hangup
- X
- X
- X usage: hangup
- X
- X This command causes Data Terminal Ready (DTR) to be dropped momentarily,
- X causing (hopefully) the termination of any current connection to a
- X remote system. This command is only effective if the attached Data
- X Communications Equipment is configured to terminate its connection on
- X loss of DTR.
- X
- X If no line is attached, the command is ignored (a warning is generated
- X if procedure tracing is enabled).
- X
- X
- X 6.39 hexdump
- X
- X
- X
- X usage: hexdump [-s] <str>
- X hexdump -t[s] <str1> <str>
- X
- X <str> buf to dump
- X <str1> title (if -t)
- X -s short (terse) dump
- X
- X
- X This command prints a hexadecimal dump of <str> on the screen (and to
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 51
- X
- X
- X
- X the procedure log file, if logging enabled with the ptrace command).
- X
- X The switch '-t' signifies that <str1> is a title to be printed
- X
- X Example:
- X
- X $s0='The quick brown fox jumped over the lazy dog\'s back'
- X hexdump -t 'Example hex dump' $s0
- X ---------------------------- Example hex dump ----------------------------
- X 0000 54 68 65 20 71 75 69 63 6B 20 62 72 6F 77 6E 20 | The quick brown |
- X 0010 66 6F 78 20 6A 75 6D 70 65 64 20 6F 76 65 72 20 | fox jumped over |
- X 0020 74 68 65 20 6C 61 7A 79 20 64 6F 67 27 73 20 62 | the lazy dog's b |
- X 0030 61 63 6B | ack |
- X
- X hexdump %left($s0,9)
- X 0000 54 68 65 20 71 75 69 63 6B | The quick |
- X
- X hexdump -ts 'Example hex dump' %left($s0,9)
- X Example hex dump
- X 0000 54 68 65 20 71 75 69 63 6B | The quick |
- X
- X hexdump -s %left($s0,9)
- X 0000 54 68 65 20 71 75 69 63 6B | The quick |
- X
- X
- X
- X 6.40 home
- X
- X
- X usage: home
- X
- X This command homes the video cursor.
- X
- X
- X 6.41 icolor
- X
- X
- X usage: icolor <int-colors>
- X
- X This command sets the normal and reverse foreground and background
- X colors according to <int-colors>, an integer value in the format as that
- X returned by the %colors integer function.
- X
- X This command is provided primarily to be able to save the color state,
- X modify it temporarily and then restore it.
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 52
- X
- X
- X
- X Example:
- X
- X mkvar $icolor_save; $icolor_save = %colors
- X color red; echo 'Connection seems to be dead'
- X icolor $icolor_save # restore previous colors
- X
- X
- X
- X 6.42 ifi
- X
- X
- X
- X usage: ifi <int> <rel-op> <int> <statement>
- X ifi <int> <rel-op> <int>
- X <statement>
- X ifi <int> <rel-op> <int>
- X {
- X any kind or number of statements
- X }
- X
- X
- X This command selectively executes one or more statements based on a test
- X of two integer quantities. See the description of the break, continue,
- X and else commmands for examples of how the command is used.
- X
- X
- X 6.43 ifs
- X
- X
- X
- X usage: ifs <str> <rel-op> <str> <statement>
- X ifs <int> <rel-op> <int>
- X <statement>
- X ifs <int> <rel-op> <int>
- X {
- X any kind or number of statements
- X }
- X
- X
- X This command selectively executes one or more statements based on a test
- X of two string values. See the description of the break, continue, and
- X else commmands and many other examples throughout the document, for
- X examples of how the command is used.
- X
- X
- X 6.44 insline
- X
- X
- X usage: insline
- X
- X This command inserts a line onto the video screen at the current line.
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 53
- X
- X
- X
- X 6.45 lbreak
- X
- X
- X usage: lbreak
- X
- X This command transmits a break to the remote system. It is the
- X procedure command analogous to the break interactive command.
- X
- X
- X 6.46 lgets
- X
- X
- X
- X usage: lgets [-er] <strvar> <t1-int> <t2-int> [<stop-str>]
- X
- X -e echo received characters to screen
- X -r raw read (retain carriage returns)
- X
- X
- X This command reads a string from the attached communications line.
- X <t1-int> is the number of tenths of seconds before timing out waiting
- X for the first character to be received. <t2-int> is the number of
- X tenths of seconds before timing out on later characters. <stop-str> is
- X an optional argument, which if received, immediately terminates the
- X read. Integer variable $i0 is set to the count of characters received.
- X
- X If the specified string variable is filled with characters before the
- X <stop-str> has been encountered or before a timeout occurs, then the
- X command returns with $i0 set to the maximum size of the variable.
- X
- X Most procedure commands will increase the size of an unumbered string
- X variable as needed until the maximum string size is reached. The lgets
- X command does not. You must start with the command with a string
- X variable whose maximum size is already the desired value. Refer to the
- X section on string variables above and the section describing the mkvar
- X command below for information on the size of string variables.
- X
- X
- X 6.47 logevent
- X
- X
- X
- X usage: logevent <str>
- X
- X
- X This command writes a log item to ~/.ecu/log.
- X
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 54
- X
- X
- X
- X Example:
- X
- X $s0='/tmp/alm.log'
- X log 'appending alarm info to '+$s0
- X
- X writes:
- X 10-02-1989-17:39-01261-PROC appending alarm info to /tmp/alm.log
- X
- X assuming the transmitter process pid is 1261 and you are living in 1989.
- X
- X 6.48 lookfor
- X
- X
- X
- X lookfor [-e] [quiet | <str>] [<timeout-int>]
- X
- X -e echo to screen while "looking"
- X
- X This command is used to read from the attached commuications line until
- X one of two user-specified conditions occurs.
- X
- X The 'quiet' option waits for the line to become quiet for the number of
- X tenths of seconds specified by <timeout-int>.
- X
- X The other option reads the line until <str> is read from the line or
- X until <timeout-int> tenths of seconds elapses. With this option,
- X integer variable $i0 is set to 1 if <str> is found within the timeout
- X period or 0 if not.
- X
- X
- X Examples:
- X
- X lookfor -e quiet 20 wait for quiet line for 2 secs
- X lookfor 'word:' 50 wait for 'word:' for up to 5 secs
- X
- X 6.49 mkvar
- X
- X
- X
- X usage: mkvar [$]i<name>
- X mkvar [$]s<name>(<size>)
- X
- X
- X This command creates one or more named (temporary) integer or string
- X variables. The variable type is determines by the first character of
- X the variable, which must be 'i' or 's'. The size of a string variable
- X must be specified via the <size> argument. An optional '$' may be
- X supplies for neatness, but may be omitted if desired.
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 55
- X
- X
- X
- X 6.49.1 Variable Names
- X
- X The names for created (named, temporary) variables consist of a dollar
- X sign ('$'), an 'i' for integer or 's' for string and up to fifteen
- X characters from the set [A-Za-z0-9_].
- X
- X The first character after the 'i' or 's' in <name> must be non-numeric.
- X '$sxyz' and '$s_3xyz' are legal, but '$s3xyz' is not (it would be
- X interpreted as '$s3' followed by the illegal command sequence 'xyz').
- X
- X The <name> space for integer and string variables are separate. It is
- X possible to have an integer variable named '$ixyz' and a string variable
- X named '$sxyz'.
- X
- X
- X 6.49.2 Variable Life and Scope
- X
- X The life and scope of created variables is for the duration of the
- X execution of the creating procedure. Procedures called by the creating
- X procedure (by 'do') can reference temporary variables declared by a
- X previous procedure. When created, integer variables are set to zero and
- X string variables are set to zero length. These features differ from
- X numbered variables which retain their scope and values at all times,
- X even when procedure execution terminates and ECU returns to interactive
- X mode.
- X
- X Variables may be created by the same name more than once. The latest
- X mkvar execution specifies the variable referenced. Thus if proc1
- X declares '$ixx' and calls proc2 which also declares '$ixx', proc2's
- X variable is distinct from proc1's and disappears when proc2 terminates,
- X thus making proc1's available to it again, containing the same value as
- X it had at the time proc2 was called.
- X
- X
- X 6.49.3 String Variable Size
- X
- X The maximum value for <size> is 16384. Regardless of the size specified
- X in the creation of a string variable, ECU will usually expand it's size
- X as necessary up to the maximum. Check the documentation for the
- X operation you are performing; if there is no exception noted, ECU will
- X expand the string maximum size as necessary. For instance, the set
- X command will grow a string as part of assignment. However, the lgets
- X command will not.
- X
- X
- X Examples:
- X
- X mkvar i_count
- X mkvar $i_count
- X mkvar s_20(20),s_80(80),i_timeout,$i_colors
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 56
- X
- X
- X
- X 6.50 nap
- X
- X
- X usage: nap <int>
- X nap -m <int>
- X
- X This command suspends procedure execution for <int> tenths of seconds if
- X -m is not specified. If -m is used, execution is suspended for <int>
- X milliseconds. Note: the actual period execution is suspended depends,
- X as usual, on the scheduling load of the system. For small -m values, be
- X aware that the granularity of the nap duration is set by the system, 20
- X milliseconds for XENIX 286 and 386, 10 milliseconds for UNIX.
- X
- X If you need to know the frequency of the system clock, something like
- X
- X $i0 = %stoi(%getenv("HZ"))
- X
- X will obtain the value for you (provided HZ is in the process'
- X environment).
- X
- X Examples:
- X
- X nap 30
- X nap $i0*$i2
- X nap -m 50
- X
- X
- X
- X 6.51 nice
- X
- X
- X usage: nice <int>
- X
- X This command sets the nice value of the process. It behaves exactly
- X like the nice(S) or nice(2) system call. The <int> argument must be in
- X the range 0 through 39, inclusive. If the call fails, a warning is
- X printed and the procedure continues to execute. The current nice value
- X may be obtained using the %nice integer function. See also the
- X description of the nice interactive command.
- X
- X
- X 6.52 parity
- X
- X
- X
- X usage: parity [even | odd | none]
- X parity <str>
- X
- X
- X This command sets the parity for the attached communications line. If
- X <str> is supplied, the first character must be 'e', 'o' or 'n'.
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 57
- X
- X
- X
- X Uppercase equivalents are also accepted.
- X
- X
- X Examples:
- X
- X parity even
- X parity 'e'
- X parity 'Even now as we speak'
- X
- X
- X
- X 6.53 pclose
- X
- X
- X usage: pclose <filenum>
- X
- X This command should be issued when a command started by the interactive
- X popen commandf completes.
- X
- X
- X 6.54 plog
- X
- X
- X
- X usage: plog
- X plog <str>
- X plog off
- X
- X
- X This command controls logging to a file of the screen output during
- X procedure execution. With no argument, the command displays the status
- X of logging. <str> specifies a log file pathname, while the 'off'
- X argument turns logging off.
- X
- X If procedure execution terminates due to an error, procedure logging is
- X turned off. However, if procedure execution terminates normally while
- X logging is active, erratic and unpredictable portions of interactive
- X mode screen output will continue to be logged to the current log file.
- X
- X The interactive mode command plog may also be used to control procedure
- X logging.
- X
- X Example:
- X
- X mkvar s_logname(128)
- X $s_logname = %dir+'logname'
- X plog $s_logname
- X echo 'Test'
- X plog off;cd 'somewhere_else';plog $s_logname
- X echo 'Test'
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 58
- X
- X
- X
- X 6.55 popd
- X
- X
- X
- X usage: popd [ | <#> | all]
- X
- X
- X This command returns to a previous directory after a pushd command has
- X been previously executed.
- X
- X If no argument is supplied, the directory at the immediately previous
- X level is restored.
- X
- X If a numeric argument is supplied, the directory at the specified level
- X is restored; the level numbers may be obtained by issuing a pushd
- X command with no arguments.
- X
- X If the 'all' argument is supplied, it is treated as a numeric argument
- X of 0; that is the directory stack is cleared and the directory at level
- X 0 is restored.
- X
- X The directory stack is shared between interactive and procedure
- X commands. Neither beginning nor ending a procedure affects the
- X directory stack level.
- X
- X
- X Examples:
- X popd
- X popd 3
- X popd all
- X
- X
- X
- X 6.56 popen
- X
- X
- X usage: popen [-switches] <filenum> <command>
- X
- X This command executes a shell command defined by the string argument
- X <command> and associates it with the user-chosen file number <filenum>
- X (which must be an integer value between 0 and 4, inclusive).
- X
- X The argument switches govern whether the command is to receive input
- X from ECU or output to ECU and must be chosen from this list:
- X
- X -r The command will output to ECU.
- X
- X -w The command will receive input from ECU.
- X
- X The switches argument may be omitted; in such cases, the file is opened
- X as though '-r' had been supplied. However, if procedure tracing is
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 59
- X
- X
- X
- X enabled (see the description of the interactive and procedure command
- X ptrace), a warning message will be issued.
- X
- X The command sets $i0 = 0 if successful, else to the errno from the
- X associated system call (refer to the %errstr string function and/or
- X /usr/include/sys/errno.h).
- X
- X Example:
- X
- X popen 0 -r 'ls -l *.log'
- X popen 1 -w 'cat | sort > /tmp/sorted'
- X
- X
- X
- X
- X 6.57 prompt
- X
- X
- X usage: prompt <str>
- X
- X This command allows selection of an alternate prompt to the interactive
- X mode HOME command trigger. Refer to the section titled "ECUPROMPT" for
- X more information on the interactive mode prompt.
- X
- X Note: the interactive and procedure hangup commands both cause the
- X default prompt to be reestablished.
- X
- X
- X Example:
- X
- X prompt %rname+' >' use remote name in prompt
- X
- X
- X
- X 6.58 ptrace
- X
- X
- X
- X usage: ptrace [ <str> | off ]
- X
- X
- X This command controls procedure execution tracing. Trace output is
- X written to the screen and varys in its nature depending upon the command
- X being traced. Specifically, any change to a string or integer variable
- X is noted. If tracing is enabled, the output will also be written to any
- X active procedure log file (see the plog interactive and procedure
- X commands).
- X
- X The majority of procedure tracing features use the current trace state
- X as a binary condition. That is, either tracing is done or not.
- X However, the procedure command expresp emits varying levels of debugging
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 60
- X
- X
- X
- X output in a manner similar to the uucico -x flag.
- X
- X
- X 6.59 pushd
- X
- X
- X
- X usage: pushd [ | <dir>]
- X
- X
- X This command either 1) saves the current directory pathname on a stack
- X and establishes a new current directory or 2) displays the current stack
- X and current directory. The stack size is 10.
- X
- X If no argument is supplied, the directory stack is displayed.
- X
- X The directory stack is shared between interactive and procedure
- X commands. Neither beginning nor ending a procedure affects the
- X directory stack level.
- X
- X
- X Examples:
- X pushd
- X pushd '/tmp'
- X
- X
- X
- X 6.60 putf
- X
- X
- X Not yet implemented.
- X
- X
- X 6.61 return
- X
- X
- X usage: return [<int>]
- X
- X This command serves two functions: to return from a gosub to or return
- X from a procedure execution. If <int> is supplied, it must be in the
- X range 0 to 255. Other values result in a return value of 255.
- X
- X If no gosub is active, return causes the currently executing procedure
- X to terminate, returning either to a calling procedure or to the
- X interactive mode. If <int> is supplied and it's value is nonzero, then
- X all procedure execution is terminated and the integer status is printed
- X on the screen along with the name of the executing procedure.
- X
- X If a gosub is active, return or return 0 causes control to return to the
- X statement immediately following the gosub which invoked the subroutine.
- X If <int> is supplied and it's value is nonzero, then all procedure
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 61
- X
- X
- X
- X execution is terminated and the integer status is printed on the screen
- X along with the name of the executing procedure.
- X
- X It is not possible to terminate a procedure with normal status from
- X within a subroutine.
- X
- X
- X Example:
- X
- X #---------------------
- X # gosub.ep
- X #---------------------
- X echo 'main'; gosub SUB; echo 'back to main'
- X return
- X
- X SUB
- X echo 'sub'
- X gosub SUB2
- X echo 'back to sub'
- X return
- X
- X
- X SUB2
- X echo 'sub2'
- X return
- X
- X
- X
- X
- X 6.62 rk
- X
- X
- X usage: rk [-a]
- X
- X This command invokes C-Kermit to receive files. ECU searches the PATH
- X list for 'kermit' or 'ckermit', expecting to find Columbia University
- X C-Kermit version 5A(173) or later. The file ~/.kermrc must be set up to
- X have any desired initialization parameters you desire (refer to C-Kermit
- X documentation for more information). The remote protocol must have been
- X started prior to the execution of this command.
- X
- X WARNING: until further notice, avoid suspending Kermit with ^Z. ECU is
- X totally unprepared to act as a job control process group leader.
- X
- X If switch '-a' is omitted, the received files are stored as received;
- X otherwise carriage return/linefeed pairs are converted to newlines.
- X
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 62
- X
- X
- X
- X 6.63 rlog
- X
- X
- X
- X usage: rlog [-srf] <str>
- X rlog 'off'
- X
- X
- X This command controls receiver logging. It's function is the same as
- X the interactive log command.
- X
- X The first form of the command enables logging. The -
- X sswitchcausesthefiletobe scratched when it is opened (otherwise the file
- X is opened for append). The -r switch causes raw logging, else filter
- X logging is performed. The -f switch causes the log file to be flushed
- X each time it is written to (unbuffered I/O); this switch is useful if
- X you are logging to a terminal or hard copy device and wish to see output
- X as soon as it is produced.
- X
- X
- X 6.64 rname
- X
- X
- X usage: rname <str>
- X
- X Normally, the %rname string function returns the same string as the
- X logical dialing directory entry. This command allows the default value
- X to be overridden with a user-selected value (63-character maximum).
- X
- X This feature is useful in situations where one system is initially
- X dialed, but a connection is made to yet another system from the dialed
- X system via networking.
- X
- X
- X 6.65 rs
- X
- X
- X usage: rs
- X
- X This command invokes the SEAlink file receive protocol. There is no
- X provision in the SEAlink protocol to convert carriage return/linefeed
- X pairs to newlines, so the received files are stored as received. The
- X remote sender must have been started prior to the execution of this
- X command.
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 63
- X
- X
- X
- X 6.66 rtscts
- X
- X usage: rtscts [ off | on | no | yes | 0..7 ]
- X
- X
- X This command controls the RTS/CTS flow control feature of the line
- X driver (which may or may not work). This is a very confusing area
- X though it should not be.
- X
- X If no argument is supplied, the current setting is displayed.
- X Specifying 0 or n disables the facility; 1 or y causes RTS/CTS flow
- X control to be enabled.
- X
- X What the command does is to manipulate the RTSFLOW and CTSFLOW bits of
- X the termio c_cflag word (see termio(S)).
- X
- X SCO's sio driver before UNIX 3.2v4/ODT 2.0 does half duplex flow
- X control. FAS does hardware flow control based on the device magic
- X number, but if you use a device number specifying no hardware flow
- X control, RTSFLOW and CTSFLOW can be used to specify SCO-style flow
- X control. CRTSFL offers full duplex line control on 3.2v4 and later ONLY
- X for SCO's sio driver.
- X
- X
- X arg | RTSFLOW | CTSFLOW arg | RTSFLOW | CTSFLOW | CRTSFL
- X -----+---------+--------- -----+---------+---------+--------
- X off | 0 | 0 0 | 0 | 0 |
- X on | 0 | 1 1 | 0 | 1 |
- X no | 0 | 0 2 | 1 | 0 |
- X yes | 0 | 1 3 | 1 | 1 |
- X 4 | 0 | 0 | 1
- X
- X Choice 4 only works on SCO 3.2v4 and ODT 2.0. As you can see, numeric
- X values are masks. If the 4 bit is present in the numeric value, it
- X overrides the lower-order bits: Specifying 7 as an argument specifies
- X CRTSFL is to be used if it is supported, otherwise RTSFLOW and CTSFLOW.
- X
- X Under System V Release 4, an TCGETX/TCSETX manipulation is performed,
- X modifying the x_hflag bits as follows:
- X
- X argument | RTSXOFF | CTSXON argument | RTSXOFF | CTSXON
- X ---------+---------+--------- ---------+---------+---------
- X off | 0 | 0 0 | 0 | 0
- X on | 0 | 1 1 | 0 | 1
- X no | 0 | 0 2 | 1 | 0
- X yes | 0 | 1 3 | 1 | 1
- X
- X Under SunOS 4.1, only CTS support is provided. You should read the
- X termio and zs man pages. Arguments result in the stated manipulations
- X of the termio element c_cflag:
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 64
- X
- X
- X
- X argument | CRTSCTS argument | CRTSCTS
- X ---------+--------- ----------+---------
- X off | 0 0 | 0
- X on | 1 1 | 1
- X no | 0
- X yes | 1
- X
- X
- X
- X Examples:
- X
- X ifi %baud >= 9600
- X rtscts 7 | use CRTSFL if available, otherwise whatever
- X
- X
- X
- X 6.67 rx
- X
- X
- X usage: rx [-a] <str>
- X
- X This command invokes the XMODEM file receive protocol to receive file
- X <str>. If switch '-a' is omitted, the received file is stored as
- X received; otherwise carriage return/linefeed pairs are converted to
- X newlines. The remote sender must have been started prior to the
- X execution of this command.
- X
- X
- X 6.68 ry
- X
- X
- X usage: ry
- X
- X This command invokes the YMODEM Batch (not to be confused with XMODEM-
- X 1K) protocol to receive files from a remote system. The remote sender
- X must have been started prior to the execution of this command.
- X
- X
- X 6.69 rz
- X
- X
- X usage: rz
- X
- X This command receives files with ZMODEM/CRC-32. The remote sender must
- X have been started prior to the execution of this command. Automatic
- X ZMODEM frame detection is NOT supported during procedure execution.
- X
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 65
- X
- X
- X
- X 6.70 scrdump
- X
- X
- X usage: scrdump [<str>]
- X
- X This command causes the current screen contents to be stored in a file.
- X If <str> is supplied, it is used as a pathname. If <str> is not
- X supplied, "~/.ecu/screen.dump". The actions of the interactive sdname
- X command have no effect on the execution of this command.
- X
- X See the section titled "Screen Dump" for more information. The
- X subsection titled "Multiscreen and Non-Multiscreen" will be of
- X particular interest when using screen dumps in an automated environment.
- X
- X
- X 6.71 send
- X
- X
- X usage: send [-n] <str>
- X
- X This command sends <str> to the communications line. If the '-n' switch
- X is omitted, a carriage return (0x0D) is transmitted after <str>. If '-
- X n' is supplied, no carriage return is transmitted.
- X
- X
- X Examples:
- X
- X send 'ps -au'
- X send -n %chr(0x02)+'START'+%chr(0x03)
- X
- X
- X
- X 6.72 set
- X
- X
- X
- X usage: set [$]i<name>=<int-expression>[, ...]
- X set [$]s<name>=<str-expression>[, ...]
- X
- X
- X This command sets an integer or string variable to an expression. The
- X 'set' verb may be omitted provided the otherwise optional '$' is
- X supplied. There are many examples of how the set statement is performed
- X throughout this document. The examples here are to further clarify the
- X statement's syntax.
- X
- X If the '=<expression>' is omitted, the value of the variable is
- X displayed (useful when debugging). If procedure tracing is enabled
- X with the ptrace command, all variables referenced by the set command,
- X whether a value is assigned or not, are displayed.
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 66
- X
- X
- X
- X Examples:
- X
- X set i0=0
- X set $s0='brown',s1='The quick '+$s0+' fox'
- X set $S0 with no '=', displays contents
- X set i0,$i1,s0='abc',s1
- X $s0 = 'abc' legal
- X set s0='abc' legal
- X s0 = 'abc' illegal
- X
- X 6.73 setline
- X
- X
- X
- X usage: setline <filename>
- X
- X This command is an exact analog of the -l command line switch.
- X <filename> is used on the setup screen (if it is presented) as the
- X default filename. If you do not edit this name, ECU will attempt to open
- X the line when you press End or ^D. <filename> has the format of a
- X complete pathanme in /dev or simple tty name.
- X
- X setline may only be used in _rc.ep. Using the setline command with the
- X baud command gives you programatic control over the actual choice of the
- X line and rate or the defaults for the setup screen, depending upon other
- X options.
- X
- X NOTE: using the setline command will override any command line -l
- X specification.
- X
- X NOTE: For important considerations on line choice, see the ECU manual
- X sections titled "Choosing a Dialout Line" and "DCDwatch".
- X
- X
- X Example:
- X setline '/dev/tty1a'
- X setline 'tty1a'
- X setline 'cua0'
- X
- X 6.74 sk
- X
- X
- X usage: sk [-a] <str>
- X
- X This command invokes C-Kermit to send files. ECU searches the PATH list
- X for 'kermit' or 'ckermit', expecting to find Columbia University C-
- X Kermit version 5A(173) or later. The file ~/.kermrc must be set up to
- X have any desired initialization parameters you desire (refer to C-Kermit
- X documentation for more information). The remote protocol must have been
- X started prior to the execution of this command.
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 9/10/92
- X
- X
- X
- X
- X
- X
- X
- X ECU Procedure Language 67
- X
- X
- X
- X WARNING: until further notice, avoid suspending Kermit with ^Z. ECU is
- X totally unprepared to act as a job control process group leader.
- X
- X If switch '-a' is supplied, newlines are converted to carriage
- X return/linefeed pairs. If '-a' is omitted, the file(s) are transmitted
- X without modification.
- X
- X Integer variable $i0 receives the exit status from the transfer. If 0,
- X transfer was normal. Note: procedure execution IS terminated by a
- X SIGINT to the spawned file transfer process. This is different than for
- X versions prior to 3.10. If $i0 is set to -1, the file transfer program
- X did not begin.
- X
- X
- X 6.75 ss
- X
- X
- X usage: ss <str>
- X
- X This command invokes the SEAlink file transfer protocol to send one or
- X more files. There is no provision in the SEAlink protocol to convert
- X newlines to carriage return/linefeed pairs. so the received files are
- X stored as received.
- X
- X Integer variable $i0 receives the exit status from the transfer. If 0,
- X transfer was normal. Note: procedure execution IS terminated by a
- X SIGINT to the spawned file transfer process. This is different than for
- X versions prior to 3.10. If $i0 is set to -1, the file transfer program
- X did not begin.
- X
- X
- X 6.76 sx
- X
- X
- X usage: sx [-ak[l]] [<label-str>] <filename-str>
- X
- X This command invokes the XMODEM or XMODEM-1K file transfer protocol to
- X send a file. If '-k' is supplied, XMODEM-1K is used, else XMODEM. If
- X switch '-a' is supplied, newlines are converted to carriage
- SHAR_EOF
- true || echo 'restore of doc/proc.man failed'
- fi
- echo 'End of ecuman320 part 4'
- echo 'File doc/proc.man is continued in part 5'
- echo 5 > _shar_seq_.tmp
- exit 0
-
- exit 0 # Just in case...
-