home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume32
/
ecuman
/
part05
< prev
next >
Wrap
Text File
|
1992-09-16
|
27KB
|
930 lines
Newsgroups: comp.sources.misc
From: wht@n4hgf.Mt-Park.GA.US (Warren Tucker)
Subject: v32i081: ecuman - Manual for ECU comm package rev 3.20, Part05/05
Message-ID: <1992Sep15.165809.7772@sparky.imd.sterling.com>
X-Md4-Signature: 5e242a8f6e492c1945edd6d89e5be414
Date: Tue, 15 Sep 1992 16:58:09 GMT
Approved: kent@sparky.imd.sterling.com
Submitted-by: wht@n4hgf.Mt-Park.GA.US (Warren Tucker)
Posting-number: Volume 32, Issue 81
Archive-name: ecuman/part05
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.05 (part 5 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" != 5; 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 return/linefeed pairs. If '-a' is omitted, the file(s) are transmitted
X without modification. If '-l' is supplied, then <label-str> specifies a
X string to display on the bottom of the file transfer screen. If '-l' is
X omitted, then <label_str> must also be omitted.
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
X
X
X Public Domain by wht@n4hgf 9/10/92
X
X
X
X
X
X
X
X ECU Procedure Language 68
X
X
X
X Examples:
X
X sx -al 'sending log file' '/tmp/log.file'
X sx -
X
X
X
X 6.77 sy
X
X
X usage: sy [-a[l]] [<label-str>] <filelist-str>
X
X This command invokes the YMODEM Batch (not to be confused with XMODEM-
X 1K) file transfer protocol to send one or more files.
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. If '-l' is supplied, then <label-str> specifies a
X string to display on the bottom of the file transfer screen. If '-l' is
X omitted, then <label_str> must also be omitted.
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.78 system
X
X
X usage: system [-ls] <cmdstr>
X
X <cmdstr> is passed to the Bourne shell.
X
X If switch '-l', is supplied, the attached communications line becomes
X the stdin and stdout for the command.
X
X If switch '-s', is supplied, all ECU file descriptors remain open. The
X -s option is important to include if you pass the ECU line file
X descriptor to another process.
X
X Integer variable $i0 is set to the spawned process' exit status if the
X process exits "normally", or 0x100 if the process is killed, dumps core
X or interrupted.
X
X Note: procedure execution is NOT terminated by a SIGINT to the spawned
X process. It is the responsibility of the procedure to process the exit
X status returned in $i0. If $i0 is set to -1, the file transfer program
X did not begin.
X
X
X
X
X Public Domain by wht@n4hgf 9/10/92
X
X
X
X
X
X
X
X ECU Procedure Language 69
X
X
X
X Examples:
X
X $s2 = '/tmp/ecu'+%itos(%pid,05)
X system ' fgrep foo bar > '+$s2
X
X system -s '/etc/NBSsetclk -i '+%itos(%conn)
X
X
X
X 6.79 sz
X
X
X usage: sz [-anf[l]r] [<label-str>] <filelist-str>
X
X This command sends files using ZMODEM/CRC-32. The remote protocol must
X have been started prior to the execution of this command unless the
X remote has automatic ZMODEM frame detection.
X
X Switch '-a' specifies an ASCII transfer; the default is binary.
X
X Switch '-f' causes the full pathname of each file to be sent;
X otherwise, the simple filename is transmitted.
X
X Switch '-l' with the <label-str> argument specifies a string to display
X on the bottom of the file transfer screen. If '-l' is omitted, then
X <label_str> must also be omitted.
X
X Switch '-n' causes the receiver to accept files with do not already
X exist at the remote system or which have older times of last access
X that at the sending system. Not all remote protocol software will
X accept or obey this option.
X
X Switch '-r' causes an interrupted file transfer to be resumed. if the
X remote receiver supports the ZMODEM protocol feature.
X
X Integer variable $i0 receives the exit status from the transfer. If 0,
X transfer was normal. Other $i0 values possible:
X
X 1-126: count of files not transmitted (see ~/.ecu/log)
X 127: 127 or more files not transmitted (see ~/.ecu/log)
X
X Other ecusz error codes are shown here for refernce, but they are
X converted by ECU to printed messages and result in procedure
X termination.
X
X 128-192: process terminated with signal==code-128
X signal 0 == program logic error
X 253: could not open any files
X 254: protocol failed (bad line conditions,brain dead remote)
X 255: usage
X
X
X
X
X Public Domain by wht@n4hgf 9/10/92
X
X
X
X
X
X
X
X ECU Procedure Language 70
X
X
X
X Note: procedure execution IS terminated by a SIGINT to the spawned file
X transfer process. This is different than for versions prior to 3.10.
X If $i0 is set to -1, the file transfer program did not begin.
X
X
X 6.80 vidcolor
X
X
X usage: vidcolor <type> <fcolor> [<bcolor>]
X
X This command allows control over the internal color choices ECU makes.
X <type> must be one of the following:
X
X
X normal - normal video color
X reverse - reverse video color
X notify - color used for low key notifications such as
X "[interactive mode]" and "[procedure finished]"
X success - color used for modem CONNECT messages and other
X "success" notifications
X alert - color used to alert user for warning or caution
X purposes
X error - color used to display error status or messages
X
X
X <fcolor> and <bcolor> are color names as described in the description of
X the color command. <fcolor> choses the foreground color and must be
X supplied. <bcolor> choses the background color and is optional; if not
X supplied, the background color is black.
X
X Note: The vidcolor normal and reverse options are analogs of the color
X and color -r command.
X
X
X Examples: (showing ECU default internal color list)
X
X vidcolor normal lt_green
X vidcolor reverse red white
X vidcolor notify gray
X vidcolor success lt_green
X vidcolor alert yellow
X vidcolor error red
X
X
X
X 6.81 vidnorm
X
X
X usage: vidnorm
X
X This command causes later screen output to appear in the normal, as
X
X
X
X Public Domain by wht@n4hgf 9/10/92
X
X
X
X
X
X
X
X ECU Procedure Language 71
X
X
X
X opposed to reverse video mode. The color command forces normal video
X mode.
X
X
X 6.82 vidrev
X
X
X usage: vidrev
X
X This command causes later screen output to appear in the reverse, as
X opposed to normal video mode. The color command forces normal video
X mode.
X
X
X 6.83 whilei
X
X
X
X usage: whilei <int> <rel-op> <int> <statement>
X whilei <int> <rel-op> <int>
X <statement>
X whilei <int> <rel-op> <int>
X {
X any kind or number of statements
X (labels are not allowed inside braces)
X }
X
X
X This command executes a loop one or more statements based on a test of
X two integer quantities. The <rel-op> argument is descibed in a earlier
X subsection titled "Relational Operators." See the description of the
X break, continue, and else commmands and many other examples throughout
X the document, for examples of how the command is used.
X
X 6.84 whiles
X
X
X
X usage: whiles <str> <rel-op> <str> <statement>
X whiles <int> <rel-op> <int>
X <statement>
X whiles <int> <rel-op> <int>
X {
X any kind or number of statements
X (labels are not allowed inside braces)
X }
X
X
X This command executes a loop of one or more statements based on a test
X of two string values. The <rel-op> argument is descibed in a earlier
X subsection titled "Relational Operators." See the description of the
X
X
X
X Public Domain by wht@n4hgf 9/10/92
X
X
X
X
X
X
X
X ECU Procedure Language 72
X
X
X
X break, continue, and else commmands and many other examples throughout
X the document, for examples of how the command is used.
X
X 6.85 xon
X
X
X
X usage: xon <arg>
X where <arg> is on input and output flow control
X off no flow control
X in input flow control
X out output flow control
X
X
X This command enables or disables xon/xoff flow control.
X
X
X Examples:
X
X hangup
X dial 'mysys'
X ifi %conn != 0 parity none;xon on
X
X
X
X
X
X
X
X
X
X
X
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 73
X
X
X
X 7. Special Procedures
X
X
X ECU provides for special "hook" procedures to be executed at certain
X times. Their use is encouraged, but you must take precautions not to
X excecute any unreasoable commands in them, for the are rather "raw"
X hooks and it is easily possible to confuse ECU by performing illogical
X operations in them. Judicious use can, however, be quite productive.
X
X They are searched for in the same manner as any other procedure, so you
X can have a customised version of them in a working directory and a
X default in your ~/.ecu subdirectory. No error is reported if they are
X not found.
X
X
X 7.1 _rc.ep
X
X
X Afer ECU is initialized, but before it presents the setup screen or
X executes a -p initial procedure, procedure '_rc' is executed with no
X arguments. (It is named in the tradition of /etc/rc, .mailrc, etc..)
X This procedure can be used to customize the ecu environment prior to
X beginning the usual operation. This is not a place to do any dialing or
X long-lived operations, nor is it possible to bypass the setup screen:
X for this, use the -p initial procedure.
X
X The %getenv() function may be useful in here (Am I running on an xterm?
X Do I want to change the prompt string from the default environment
X variable $ECUPROMPT?).
X
X Procedure commands likely to be of interest here:
X
X autorz
X * baud
X color
X dcdwatch
X * duplex
X prompt
X rtscts
X * setline
X
X
X Commands marked with an asterisk affect the initial (default) values
X presented on the setup screen.
X
X If _rc.ep returns a non-zero status or fails (due to syntax or other
X error), ecu terminates immediately.
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 74
X
X
X
X 7.2 _connect.ep
X
X
X This procedure is executed after every connection success after the
X CONNECT message ("result code") is printed. It is passed one argument,
X the "result code" string generated by the dialer function (e.g.,
X "CONNECT 19200").
X
X You may use %rname and other functions and features to customize this
X function based on the particular system just reached. Note that integer
X variable $i0 and string variable $s0 set zero prior to executing the
X function. This function may modify the behavior of coorperating dialer
X functions by setting the value of numbered string or integer variables.
X In particular, the dialer function will inherit the values of $i0 and
X $s0 when this special function terminates. Be careful of what you do in
X here since MANY ecu procedure commands affect $i0 and $s0 as a side
X effect of their operation. Even if you know what you do in _connect.ep
X does not modify $i0 or $s0, use of the preservation technique shown in
X the example below may save you headaches if you add to the function in
X the future (long after you have forgotten this pedantic admonition).
X
X If this procedure fails (abnormal procedure termination or non-zero
X return code), ECU hangs up on the line and proceeds as if the connection
X failed.
X
X
X
X
X
X
X
X
X
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 75
X
X
X
X Example:
X #+------------------------------------------------------------------
X # _connect.ep - post-CONNECT special "hook" procedure
X #-------------------------------------------------------------------
X #+:EDITS:*/
X #:09-10-1992-13:58-wht@n4hgf-ECU release 3.20
X #:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA
X #:07-13-1991-14:47-wht@n4hgf-creation
X
X $iv0_save = $i0 # it is a VERY good idea to save the dialer
X $sv0_save = $s0 # function return status
X # since gobs of functions and commands modify $i0
X # and/or $s0 as a side effect of their operation
X
X $s30 = '_connect '+%rname+' ('+%argv(1)+')'
X echo $s30 # this still will also live to be visible by
X # the dialer function
X
X ifi %baud > 2400
X {
X xon off # turn XON/XOFF off first, then ...
X rtscts on # turn on RTS/CTS
X }
X else
X {
X rtscts off # turn off RTS/CTS, then ...
X xon on # turn XON/XOFF on
X }
X
X $i0 = $iv0_save # restore dialer return status
X $s0 = $sv0_save
X
X
X
X 7.3 _connfail.ep
X
X
X This procedure is executed after every connection failure after the
X failure message ("result code") is printed. It is passed two arguments,
X the logical system name (the dial directory entry name or the phone
X number) and the "result code" string generated by the dialer function
X (e.g., "BUSY"). The function is called after $i0 has been set to 1 and
X $s0 has been set to the result code. This function may modify the
X behavior of coorperating dialer functions by setting the value of
X numbered string or integer variables. In particular, the dialer
X function will inherit the values of $i0 and $s0 when this special
X function terminates. Be careful of what you do in here since MANY ecu
X procedure commands affect $i0 and/or $s0 as a side effect of their
X operation. See _connect.ep above for further screams and moans.
X
X ]If you get very involved with using this procedure, you'll sooner or
X
X
X
X Public Domain by wht@n4hgf 9/10/92
X
X
X
X
X
X
X
X ECU Procedure Language 76
X
X
X
X later run into some undocumented $so values. You'll have to take a look
X at ecuDCE.c and hdbintf.c for an authoritative reference, but perhaps
X you can get along by knowing that result codes with an exclamation point
X as their first character are generated by ECU.
X
X ECU ignores any failure (abnormal procedure termination or non-zero
X return code) resulting from the execution of this procedure.
X
X
X 7.4 _hangup.ep
X
X
X This procedure is executed after every connection termination. It is
X passed one argument, a string representation of the number of seconds
X you were connected. You may use %rname and other functions and features
X to customize this function based on the particular system just reached.
X ECU ignores any error returned by the procedure. ECU ignores any
X failure (abnormal procedure termination or non-zero return code)
X resulting from the execution of this procedure.
X
X
X
X
X
X
X
X
X
X
X
X
X
X
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
X
X
X
X CONTENTS
X
X
X 1. Introduction........................................ 2
X
X 2. Line Syntax (Labels, Commands and Comments)......... 3
X
X 3. Arguments........................................... 4
X 3.1 Switches...................................... 4
X 3.2 Alphabetic Tokens............................. 4
X 3.3 Integers...................................... 4
X 3.3.1 Constants............................. 4
X 3.3.2 Variables............................. 5
X 3.3.3 Functions............................. 5
X 3.3.4 Expressions........................... 5
X 3.3.5 Relational Operators.................. 6
X 3.4 Strings....................................... 6
X 3.4.1 Constants............................. 6
X 3.4.2 Variables............................. 7
X 3.4.3 Functions............................. 7
X 3.4.4 Expressions........................... 7
X 3.4.5 Relational Operators.................. 7
X
X 4. Integer Functions................................... 9
X 4.1 %argc......................................... 9
X 4.2 %baud......................................... 9
X 4.3 %colors....................................... 9
X 4.4 %cols......................................... 10
X 4.5 %conn......................................... 11
X 4.6 %curx......................................... 11
X 4.7 %cury......................................... 11
X 4.8 %csec......................................... 11
X 4.9 %ctoi......................................... 11
X 4.10 %esecs........................................ 11
X 4.11 %fatime....................................... 12
X 4.12 %fmode........................................ 12
X 4.13 %fmtime....................................... 12
X 4.14 %fmode........................................ 13
X 4.15 %ftell........................................ 13
X 4.16 %instr........................................ 13
X 4.17 %ischr........................................ 14
X 4.18 %isdir........................................ 14
X 4.19 %isreg........................................ 15
X 4.20 %len.......................................... 15
X 4.21 %lgetc........................................ 16
X 4.22 %lines........................................ 16
X 4.23 %nice......................................... 16
X 4.24 %pid.......................................... 16
X 4.25 %match........................................ 16
X 4.26 %mhack........................................ 17
X 4.27 %rchr......................................... 17
X
X
X
X - i -
X
X
X
X
X
X
X
X
X
X
X
X 4.28 %rchrc........................................ 17
X 4.29 %rinstr....................................... 18
X 4.30 %shmid........................................ 18
X 4.31 %stoi......................................... 18
X 4.32 %uid.......................................... 19
X 4.33 %xchr......................................... 19
X 4.34 %xchrc........................................ 19
X
X 5. String Functions.................................... 20
X 5.1 %argv......................................... 20
X 5.2 %basename..................................... 21
X 5.3 %cgetc........................................ 21
X 5.4 %cgets........................................ 21
X 5.5 %chr.......................................... 21
X 5.6 %date......................................... 22
X 5.7 %datez........................................ 22
X 5.8 %day.......................................... 22
X 5.9 %dayz......................................... 22
X 5.10 %dir.......................................... 22
X 5.11 %dirpart...................................... 23
X 5.12 %edate........................................ 23
X 5.13 %envvar....................................... 23
X 5.14 %errstr....................................... 24
X 5.15 %etime........................................ 24
X 5.16 %filepart..................................... 24
X 5.17 %fmodestr..................................... 25
X 5.18 %itos......................................... 25
X 5.19 %left......................................... 26
X 5.20 %line......................................... 26
X 5.21 %logname...................................... 27
X 5.22 %mid.......................................... 27
X 5.23 %month........................................ 27
X 5.24 %rdesc........................................ 27
X 5.25 %right........................................ 28
X 5.26 %rname........................................ 28
X 5.27 %rtelno....................................... 28
X 5.28 %time......................................... 28
X 5.29 %times........................................ 29
X 5.30 %timez........................................ 29
X 5.31 %timezs....................................... 29
X 5.32 %tty.......................................... 29
X 5.33 %uname........................................ 29
X
X 6. Commands............................................ 30
X 6.1 autorz........................................ 30
X 6.2 baud.......................................... 30
X 6.3 break......................................... 30
X 6.4 cd............................................ 31
X 6.5 clrx.......................................... 31
X 6.6 cls........................................... 32
X 6.7 color......................................... 32
X
X
X
X - ii -
X
X
X
X
X
X
X
X
X
X
X
X 6.8 continue...................................... 32
X 6.9 cursor........................................ 33
X 6.10 dcdwatch...................................... 34
X 6.11 delline....................................... 34
X 6.12 dial.......................................... 34
X 6.13 do............................................ 36
X 6.14 duplex........................................ 36
X 6.15 echo.......................................... 37
X 6.16 eeol.......................................... 37
X 6.17 else.......................................... 37
X 6.18 exec.......................................... 38
X 6.19 exit.......................................... 39
X 6.20 expresp....................................... 40
X 6.21 fchmod........................................ 42
X 6.22 fclose........................................ 43
X 6.23 fdel.......................................... 43
X 6.24 fgetc......................................... 43
X 6.25 fgets......................................... 44
X 6.26 fkey.......................................... 44
X 6.27 fkmap......................................... 44
X 6.28 flush......................................... 45
X 6.29 fopen......................................... 45
X 6.30 fputc......................................... 46
X 6.31 fputs......................................... 47
X 6.32 fseek......................................... 47
X 6.33 getf.......................................... 47
X 6.34 gosub......................................... 48
X 6.35 gosubb........................................ 49
X 6.36 goto.......................................... 49
X 6.37 gotob......................................... 50
X 6.38 hangup........................................ 50
X 6.39 hexdump....................................... 50
X 6.40 home.......................................... 51
X 6.41 icolor........................................ 51
X 6.42 ifi........................................... 52
X 6.43 ifs........................................... 52
X 6.44 insline....................................... 52
X 6.45 lbreak........................................ 53
X 6.46 lgets......................................... 53
X 6.47 logevent...................................... 53
X 6.48 lookfor....................................... 54
X 6.49 mkvar......................................... 54
X 6.49.1 Variable Names........................ 55
X 6.49.2 Variable Life and Scope............... 55
X 6.49.3 String Variable Size.................. 55
X 6.50 nap........................................... 56
X 6.51 nice.......................................... 56
X 6.52 parity........................................ 56
X 6.53 pclose........................................ 57
X 6.54 plog.......................................... 57
X 6.55 popd.......................................... 58
X
X
X
X - iii -
X
X
X
X
X
X
X
X
X
X
X
X 6.56 popen......................................... 58
X 6.57 prompt........................................ 59
X 6.58 ptrace........................................ 59
X 6.59 pushd......................................... 60
X 6.60 putf.......................................... 60
X 6.61 return........................................ 60
X 6.62 rk............................................ 61
X 6.63 rlog.......................................... 62
X 6.64 rname......................................... 62
X 6.65 rs............................................ 62
X 6.66 rtscts........................................ 63
X 6.67 rx............................................ 64
X 6.68 ry............................................ 64
X 6.69 rz............................................ 64
X 6.70 scrdump....................................... 65
X 6.71 send.......................................... 65
X 6.72 set........................................... 65
X 6.73 setline....................................... 66
X 6.74 sk............................................ 66
X 6.75 ss............................................ 67
X 6.76 sx............................................ 67
X 6.77 sy............................................ 68
X 6.78 system........................................ 68
X 6.79 sz............................................ 69
X 6.80 vidcolor...................................... 70
X 6.81 vidnorm....................................... 70
X 6.82 vidrev........................................ 71
X 6.83 whilei........................................ 71
X 6.84 whiles........................................ 71
X 6.85 xon........................................... 72
X
X 7. Special Procedures.................................. 73
X 7.1 _rc.ep........................................ 73
X 7.2 _connect.ep................................... 74
X 7.3 _connfail.ep.................................. 75
X 7.4 _hangup.ep.................................... 76
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X - iv -
X
X
X
X
SHAR_EOF
echo 'File doc/proc.man is complete' &&
chmod 0644 doc/proc.man ||
echo 'restore of doc/proc.man failed'
Wc_c="`wc -c < 'doc/proc.man'`"
test 117987 -eq "$Wc_c" ||
echo 'doc/proc.man: original size 117987, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
rm -f _shar_seq_.tmp
echo You have unpacked the last part
exit 0
exit 0 # Just in case...