home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-09-14 | 57.0 KB | 2,140 lines |
- Newsgroups: comp.sources.misc
- From: wht@n4hgf.Mt-Park.GA.US (Warren Tucker)
- Subject: v32i073: ecu - ECU Asynchronous Communications v3.20, Part38/40
- Message-ID: <1992Sep15.153810.20991@sparky.imd.sterling.com>
- X-Md4-Signature: 68abcd8f565b28dbb1bc0e110bcd24b8
- Date: Tue, 15 Sep 1992 15:38:10 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: wht@n4hgf.Mt-Park.GA.US (Warren Tucker)
- Posting-number: Volume 32, Issue 73
- Archive-name: ecu/part38
- Environment: SCO,XENIX,ISC,SUNOS,SYSVR4,HDB,Curses
- Supersedes: ecu: Volume 21, Issue 53-89
-
- ---- Cut Here and feed the following to sh ----
- #!/bin/sh
- # this is ecu320.38 (part 38 of ecu320)
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file doc/_p_cmd.txt continued
- #
- if test ! -r _shar_seq_.tmp; then
- echo 'Please unpack part 1 first!'
- exit 1
- fi
- (read Scheck
- if test "$Scheck" != 38; 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/_p_cmd.txt'
- else
- echo 'x - continuing file doc/_p_cmd.txt'
- sed 's/^X//' << 'SHAR_EOF' >> 'doc/_p_cmd.txt' &&
- X.DS L
- XExample:
- 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.DE
- X
- X.*s 2 "popd"
- X
- X.DS L
- Xusage: popd [ | <#> | all]
- X.DE
- X
- XThis command returns to a previous directory after a
- X.B pushd
- Xcommand has been previously executed.
- X
- XIf no argument is supplied, the directory at the immediately previous
- Xlevel is restored.
- X
- XIf a numeric argument is supplied, the directory
- Xat the specified level is restored; the level numbers may be obtained by
- Xissuing a
- X.B pushd
- Xcommand with no arguments.
- X
- XIf the 'all' argument is supplied, it is treated as a numeric argument of 0;
- Xthat is the directory stack is cleared and the directory at level 0 is
- Xrestored.
- X
- XThe directory stack is shared between interactive and procedure
- Xcommands. Neither beginning nor ending a procedure affects the
- Xdirectory stack level.
- X
- X.DS L
- XExamples:
- X popd
- X popd 3
- X popd all
- X.DE
- X
- X.*s 2 "popen"
- X
- Xusage: popen [-switches] <filenum> <command>
- X
- XThis command executes a shell command defined by the string argument <command>
- Xand associates it with the user-chosen file number <filenum> (which
- Xmust be an integer value between 0 and 4, inclusive).
- X
- XThe argument switches govern whether the command is
- Xto receive input from ECU or output to ECU and must be chosen
- Xfrom this list:
- X.VL 15 4
- X.LI -r
- XThe command will output to ECU.
- X.LI -w
- XThe command will receive input from ECU.
- X.LE
- X
- XThe switches argument may be omitted; in such cases,
- Xthe file is opened as though '-r' had been supplied. However,
- Xif procedure tracing is enabled (see the description of the
- Xinteractive and procedure command
- X.B ptrace ),
- Xa warning message will be issued.
- X
- XThe command sets $i0 = 0 if successful, else to the
- X.B errno
- Xfrom the associated system call (refer to the
- X.B %errstr
- Xstring function and/or /usr/include/sys/errno.h).
- X.DS L
- XExample:
- X
- X popen 0 -r 'ls -l *.log'
- X popen 1 -w 'cat | sort > /tmp/sorted'
- X.DE
- X
- X
- X.*s 2 "prompt"
- X
- Xusage: prompt <str>
- X
- XThis command allows selection of an alternate prompt to the interactive
- Xmode HOME command trigger.
- XRefer to the section titled "ECUPROMPT"
- Xfor more information on the interactive mode prompt.
- X
- XNote: the interactive and procedure
- X.B hangup
- Xcommands both cause the default prompt to be reestablished.
- X
- X.DS L
- XExample:
- X
- X prompt %rname+' >' use remote name in prompt
- X.DE
- X
- X.*s 2 "ptrace"
- X
- X.DS L
- Xusage: ptrace [ <str> | off ]
- X.DE
- X
- XThis command controls procedure execution tracing. Trace
- Xoutput is written to the screen and varys in its nature depending upon
- Xthe command being traced. Specifically, any change to a string or
- Xinteger variable is noted. If tracing is enabled, the output will also
- Xbe written to any active procedure log file (see the
- X.B plog
- Xinteractive and procedure commands).
- X
- XThe majority of procedure tracing features use the current trace
- Xstate as a binary condition. That is, either tracing is done
- Xor not. However, the procedure command
- X.B expresp
- Xemits varying levels of debugging output in a manner similar to
- Xthe uucico -x flag.
- X
- X.*s 2 "pushd"
- X
- X.DS L
- Xusage: pushd [ | <dir>]
- X.DE
- X
- XThis command either 1) saves the current directory pathname on
- Xa stack and establishes a new current directory or
- X2) displays the current stack and current directory.
- XThe stack size is 10.
- X
- XIf no argument is supplied, the directory stack is displayed.
- X
- XThe directory stack is shared between interactive and procedure
- Xcommands. Neither beginning nor ending a procedure affects the
- Xdirectory stack level.
- X
- X.DS L
- XExamples:
- X pushd
- X pushd '/tmp'
- X.DE
- X
- X.*s 2 "putf"
- X
- XNot yet implemented.
- X
- X.*s 2 "return"
- X
- Xusage: return [<int>]
- X
- XThis command serves two functions: to return from a gosub to or
- Xreturn from a procedure execution. If <int> is supplied, it must be in the
- Xrange 0 to 255. Other values result in a return value of 255.
- X
- XIf no gosub is active,
- X.B return
- Xcauses the currently executing procedure to terminate,
- Xreturning either to a calling procedure or to the interactive mode.
- XIf <int> is supplied and it's value is nonzero, then all procedure execution is
- Xterminated and the integer status is printed
- Xon the screen along with the name of the executing procedure.
- X
- XIf a gosub is active,
- X.B return
- Xor
- X.B return
- X0 causes control to return to the statement immediately following the
- X.B gosub
- Xwhich invoked the subroutine.
- XIf <int> is supplied and it's value is nonzero, then all procedure execution is
- Xterminated and the integer status is printed
- Xon the screen along with the name of the executing procedure.
- X
- XIt is not possible to terminate a procedure with normal status from
- Xwithin a subroutine.
- X
- X.DS L
- XExample:
- X
- X#---------------------
- X# gosub.ep
- X#---------------------
- X echo 'main'; gosub SUB; echo 'back to main'
- X return
- X
- XSUB
- X echo 'sub'
- X gosub SUB2
- X echo 'back to sub'
- X return
- X
- X
- XSUB2
- X echo 'sub2'
- X return
- X
- X.DE
- X
- X.*s 2 "rk"
- X
- Xusage: rk [-a]
- X
- XThis command invokes C-Kermit to
- Xreceive
- Xfiles. ECU searches the PATH list for 'kermit' or 'ckermit',
- Xexpecting to find Columbia University C-Kermit version 5A(173)
- Xor later. The file ~/.kermrc must be set up to have any desired
- Xinitialization parameters you desire (refer to C-Kermit
- Xdocumentation for more information).
- XThe remote protocol must have been started prior to the
- Xexecution of this command.
- X
- XWARNING: until further notice, avoid suspending Kermit
- Xwith ^\Z. ECU is totally unprepared to act as a job control
- Xprocess group leader.
- X
- XIf switch '-a'
- Xis omitted, the received files are stored as received; otherwise
- Xcarriage return/linefeed pairs are converted to newlines.
- X
- X.*s 2 "rlog"
- X
- X.DS L
- Xusage: rlog [-srf] <str>
- X rlog 'off'
- X.DE
- X
- XThis command controls receiver logging. It's function is the same as
- Xthe interactive
- X.B log
- Xcommand.
- X
- XThe first form of the command enables logging. The
- X.B -s switch causes the file to be
- X.B s cratched
- Xwhen it is opened (otherwise the file is opened for append). The
- X.B -r
- Xswitch causes raw logging, else filter logging is performed. The
- X.B -f
- Xswitch causes the log file to be flushed each time it is written to
- X(unbuffered I/O); this switch is useful if you are logging to
- Xa terminal or hard copy device and wish to see output as soon as it
- Xis produced.
- X
- X.*s 2 "rname"
- X
- Xusage: rname <str>
- X
- XNormally, the %rname string function returns the same string
- Xas the logical dialing directory entry. This command allows
- Xthe default value to be overridden with a user-selected
- Xvalue (63-character maximum).
- X
- XThis feature is useful in situations where one system is initially
- Xdialed, but a connection is made to yet another system from the dialed
- Xsystem via networking.
- X
- X.*s 2 "rs"
- X
- Xusage: rs
- X
- XThis command invokes the SEAlink file receive protocol.
- XThere
- Xis no provision in the SEAlink protocol to convert
- Xcarriage return/linefeed pairs to newlines,
- Xso the received files are stored as received.
- XThe remote sender must have been started prior to the
- Xexecution of this command.
- X
- X.*s 2 "rtscts"
- X.DS L
- Xusage: rtscts [ off | on | no | yes | 0..7 ]
- X.DE
- X
- XThis command controls the RTS/CTS flow control feature of
- Xthe line driver (which may or may not work).
- XThis is a very confusing area though it should not be.
- X
- XIf no argument is supplied, the current setting is
- Xdisplayed. Specifying 0 or n disables the facility;
- X1 or y causes RTS/CTS flow control to be enabled.
- X
- XWhat the command does is to manipulate the RTSFLOW and CTSFLOW
- Xbits of the termio c_cflag word (see
- X.B termio(S) ).
- X
- XSCO's sio driver before UNIX 3.2v4/ODT 2.0
- Xdoes half duplex flow control.
- XFAS does hardware flow control based on the device magic
- Xnumber, but if you use a device number specifying no hardware flow
- Xcontrol, RTSFLOW and CTSFLOW can be used to specify SCO-style flow
- Xcontrol.
- XCRTSFL offers full duplex line control
- Xon 3.2v4 and later ONLY for SCO's sio driver.
- X
- X.DS I
- 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.DE
- XChoice 4 only works on SCO 3.2v4 and ODT 2.0.
- XAs you can see, numeric values are masks.
- XIf the 4 bit is present in the numeric value, it
- Xoverrides the lower-order bits: Specifying 7 as an argument
- Xspecifies CRTSFL is to be used if it is supported, otherwise
- XRTSFLOW and CTSFLOW.
- X
- XUnder System V Release 4, an TCGETX/TCSETX manipulation
- Xis performed, modifying the x_hflag bits as follows:
- X.DS I
- Xargument | 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.DE
- XUnder SunOS 4.1, only CTS support is provided. You should read
- Xthe termio and zs man pages. Arguments result in the stated
- Xmanipulations of the termio element c_cflag:
- X.DS I
- Xargument | CRTSCTS argument | CRTSCTS
- X---------+--------- ----------+---------
- X off | 0 0 | 0
- X on | 1 1 | 1
- X no | 0
- X yes | 1
- X.DE
- X
- X.DS L
- XExamples:
- X
- X ifi %baud >= 9600
- X rtscts 7 | use CRTSFL if available, otherwise whatever
- X.DE
- X
- X.*s 2 "rx"
- X
- Xusage: rx [-a] <str>
- X
- XThis command invokes the XMODEM file receive protocol
- Xto receive file <str>. If switch '-a'
- Xis omitted, the received file is stored as received; otherwise
- Xcarriage return/linefeed pairs are converted to newlines.
- XThe remote sender must have been started prior to the
- Xexecution of this command.
- X
- X.*s 2 "ry"
- X
- Xusage: ry
- X
- XThis command invokes the YMODEM Batch (not to be confused with
- XXMODEM-1K) protocol to receive files from a remote system. The remote
- Xsender must have been started prior to the execution of this command.
- X
- X.*s 2 "rz"
- X
- Xusage: rz
- X
- XThis command receives files with ZMODEM/CRC-32.
- XThe remote sender must have been started prior to the
- Xexecution of this command.
- XAutomatic ZMODEM frame detection is NOT supported during
- Xprocedure execution.
- X
- X.*s 2 "scrdump"
- X
- Xusage: scrdump [<str>]
- X
- XThis command causes the current screen contents to be
- Xstored in a file. If <str> is supplied, it is used as a pathname.
- XIf <str> is not supplied, "~/.ecu/screen.dump".
- XThe actions of the interactive
- X.B sdname
- Xcommand have no effect on the execution of this command.
- X
- XSee the section titled "Screen Dump" for more information.
- XThe subsection titled "Multiscreen and Non-Multiscreen" will be
- Xof particular interest when using screen dumps in an
- Xautomated environment.
- X
- X.*s 2 "send"
- X
- Xusage: send [-n] <str>
- X
- XThis command sends <str> to the communications line. If the '-n'
- Xswitch is omitted, a carriage return (0x0D) is transmitted after <str>.
- XIf '-n' is supplied, no carriage return is transmitted.
- X
- X.DS L
- XExamples:
- X
- X send 'ps -au'
- X send -n %chr(0x02)+'START'+%chr(0x03)
- X.DE
- X
- X.*s 2 "set"
- X
- X.DS L
- Xusage: set [$]i<name>=<int-expression>[, ...]
- X set [$]s<name>=<str-expression>[, ...]
- X.DE
- X
- XThis command sets an integer or string variable
- Xto an expression. The 'set' verb may be omitted provided the
- Xotherwise optional '$' is supplied. There are many examples of
- Xhow the set statement is performed throughout this document.
- XThe examples here are to further clarify the statement's syntax.
- X
- XIf the '=<expression>' is omitted, the value of the variable is
- Xdisplayed (useful when debugging). If procedure tracing is
- Xenabled with the
- X.B ptrace
- Xcommand, all variables referenced by the
- X.B
- Xset
- Xcommand, whether a value is assigned or not, are displayed.
- X
- X.DS L
- XExamples:
- 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.DE
- X.*s 2 "setline"
- X
- X.DS L
- Xusage: setline <filename>
- X.DE
- XThis command is an exact analog of the -l command line switch.
- X<filename> is used on the setup screen (if it is presented)
- Xas the default filename. If you do not edit this name, ECU will
- Xattempt to open the line when you press End or ^D.
- X<filename> has the format of a complete pathanme in /dev or simple
- Xtty name.
- X
- X.B setline
- Xmay only be used in _rc.ep. Using the
- X.B setline
- Xcommand with the
- X.B baud
- Xcommand gives you programatic control over the actual
- Xchoice of the line and rate or the defaults for the setup screen,
- Xdepending upon other options.
- X
- XNOTE: using the setline command will override any command line -l
- Xspecification.
- X
- XNOTE: For important considerations on line choice, see the
- XECU manual sections titled "Choosing a Dialout Line" and "DCDwatch".
- X
- X.DS L
- XExample:
- X setline '/dev/tty1a'
- X setline 'tty1a'
- X setline 'cua0'
- X.DE
- X.*s 2 "sk"
- X
- Xusage: sk [-a] <str>
- X
- XThis command invokes C-Kermit to
- Xsend
- Xfiles. ECU searches the PATH list for 'kermit' or 'ckermit',
- Xexpecting to find Columbia University C-Kermit version 5A(173)
- Xor later. The file ~/.kermrc must be set up to have any desired
- Xinitialization parameters you desire (refer to C-Kermit
- Xdocumentation for more information).
- XThe remote protocol must have been started prior to the
- Xexecution of this command.
- X
- XWARNING: until further notice, avoid suspending Kermit
- Xwith ^\Z. ECU is totally unprepared to act as a job control
- Xprocess group leader.
- X
- XIf switch '-a' is supplied,
- Xnewlines are converted to carriage return/linefeed pairs.
- XIf '-a' is omitted, the file(s) are transmitted without modification.
- X
- XInteger variable $i0 receives the exit status from the transfer. If 0,
- Xtransfer was normal.
- XNote:
- Xprocedure execution IS terminated by a SIGINT to the spawned file
- Xtransfer process. This is different than for versions prior to 3.10.
- XIf $i0 is set to -1, the file transfer program did not begin.
- X
- X.*s 2 "ss"
- X
- Xusage: ss <str>
- X
- XThis command invokes the SEAlink file transfer protocol to send
- Xone or more files.
- XThere is no provision in the SEAlink protocol to convert
- Xnewlines to carriage return/linefeed pairs.
- Xso the received files are stored as received.
- X
- XInteger variable $i0 receives the exit status from the transfer. If 0,
- Xtransfer was normal.
- XNote:
- Xprocedure execution IS terminated by a SIGINT to the spawned file
- Xtransfer process. This is different than for versions prior to 3.10.
- XIf $i0 is set to -1, the file transfer program did not begin.
- X
- X.*s 2 "sx"
- X
- Xusage: sx [-ak[l]] [<label-str>] <filename-str>
- X
- XThis command invokes the XMODEM or XMODEM-1K file transfer protocol
- Xto send a file. If '-k' is supplied, XMODEM-1K is used, else XMODEM.
- XIf switch '-a' is supplied,
- Xnewlines are converted to carriage return/linefeed pairs.
- XIf '-a' is omitted, the file(s) are transmitted without modification.
- XIf '-l' is supplied, then <label-str> specifies a string to
- Xdisplay on the bottom of the file transfer screen. If '-l' is
- Xomitted, then <label_str> must also be omitted.
- X
- XInteger variable $i0 receives the exit status from the transfer. If 0,
- Xtransfer was normal.
- XNote:
- Xprocedure execution IS terminated by a SIGINT to the spawned file
- Xtransfer process. This is different than for versions prior to 3.10.
- XIf $i0 is set to -1, the file transfer program did not begin.
- X
- X.DS L
- XExamples:
- X
- X sx -al 'sending log file' '/tmp/log.file'
- X sx -
- X.DE
- X
- X.*s 2 "sy"
- X
- Xusage: sy [-a[l]] [<label-str>] <filelist-str>
- X
- XThis command invokes the YMODEM Batch (not
- Xto be confused with XMODEM-1K) file transfer protocol
- Xto send one or more files.
- X
- XIf switch '-a' is supplied,
- Xnewlines are converted to carriage return/linefeed pairs.
- XIf '-a' is omitted, the file(s) are transmitted without modification.
- XIf '-l' is supplied, then <label-str> specifies a string to
- Xdisplay on the bottom of the file transfer screen. If '-l' is
- Xomitted, then <label_str> must also be omitted.
- X
- XInteger variable $i0 receives the exit status from the transfer. If 0,
- Xtransfer was normal.
- XNote:
- Xprocedure execution IS terminated by a SIGINT to the spawned file
- Xtransfer process. This is different than for versions prior to 3.10.
- XIf $i0 is set to -1, the file transfer program did not begin.
- X
- X.*s 2 "system"
- X
- Xusage: system [-ls] <cmdstr>
- X
- X<cmdstr> is passed to the Bourne shell.
- X
- XIf switch '-l', is supplied, the attached communications line
- Xbecomes the stdin and stdout for the command.
- X
- XIf switch '-s', is supplied, all ECU file descriptors remain
- Xopen. The -s option is important to include if you pass the
- XECU line file descriptor to another process.
- X
- XInteger variable $i0 is set to
- Xthe spawned process' exit status if the process exits "normally",
- Xor 0x100 if the process is killed, dumps core or interrupted.
- X
- XNote: procedure execution is NOT terminated by a SIGINT to
- Xthe spawned process. It is the responsibility of the procedure
- Xto process the exit status returned in $i0.
- XIf $i0 is set to -1, the file transfer program did not begin.
- X
- X.DS L
- XExamples:
- X
- X $s2 = '/tmp/ecu'+%itos(%pid,05)
- X system ' fgrep foo bar > '+$s2
- X
- X system -s '/etc/NBSsetclk -i '+%itos(%conn)
- X.DE
- X
- X.*s 2 "sz"
- X
- Xusage: sz [-anf[l]r] [<label-str>] <filelist-str>
- X
- XThis command sends files using ZMODEM/CRC-32.
- XThe remote protocol must have been started prior to the
- Xexecution of this command unless the remote has automatic
- XZMODEM frame detection.
- X
- XSwitch '-a' specifies an ASCII transfer; the default is binary.
- X
- XSwitch '-f' causes the full pathname of each file to be sent;
- Xotherwise, the simple filename is transmitted.
- X
- XSwitch '-l' with the <label-str> argument specifies a string to
- Xdisplay on the bottom of the file transfer screen. If '-l' is
- Xomitted, then <label_str> must also be omitted.
- X
- XSwitch '-n' causes the receiver to accept files with do not
- Xalready exist at the remote system or which have older
- Xtimes of last access that at the sending system.
- XNot all remote protocol software will accept or obey this option.
- X
- XSwitch '-r' causes an interrupted file transfer to be resumed.
- Xif the remote receiver supports the ZMODEM protocol feature.
- X
- XInteger variable $i0 receives the exit status from the transfer.
- XIf 0, transfer was normal. Other $i0 values possible:
- X.DS L
- X 1-126: count of files not transmitted (see ~/.ecu/log)
- X 127: 127 or more files not transmitted (see ~/.ecu/log)
- X.DE
- XOther ecusz error codes are shown here for refernce, but
- Xthey are converted by ECU to printed messages and result in procedure
- Xtermination.
- X.DS L
- 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.DE
- X
- XNote:
- Xprocedure execution IS terminated by a SIGINT to the spawned file
- Xtransfer process. This is different than for versions prior to 3.10.
- XIf $i0 is set to -1, the file transfer program did not begin.
- X
- X.*s 2 "vidcolor"
- X
- Xusage: vidcolor <type> <fcolor> [<bcolor>]
- X
- XThis command allows control over the internal color choices
- XECU makes. <type> must be one of the following:
- X
- X.DS I
- Xnormal - normal video color
- Xreverse - reverse video color
- Xnotify - color used for low key notifications such as
- X "[interactive mode]" and "[procedure finished]"
- Xsuccess - color used for modem CONNECT messages and other
- X "success" notifications
- Xalert - color used to alert user for warning or caution
- X purposes
- Xerror - color used to display error status or messages
- X.DE
- X
- X<fcolor> and <bcolor> are color names as described in the description of the
- X.B color
- Xcommand. <fcolor> choses the foreground color and must be supplied.
- X<bcolor> choses the background color and is optional; if not supplied,
- Xthe background color is black.
- X
- XNote: The vidcolor normal and reverse options are analogs of the
- X.B color
- Xand
- X.B
- Xcolor -r
- X.R
- Xcommand.
- X
- X.DS L
- XExamples: (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.DE
- X
- X.*s 2 "vidnorm"
- X
- Xusage: vidnorm
- X
- XThis command causes later screen output to appear in the
- Xnormal, as opposed to reverse video mode.
- XThe
- X.B color
- Xcommand forces normal video mode.
- X
- X.*s 2 "vidrev"
- X
- Xusage: vidrev
- X
- XThis command causes later screen output to appear in the
- Xreverse, as opposed to normal video mode.
- XThe
- X.B color
- Xcommand forces normal video mode.
- X
- X.*s 2 "whilei"
- X
- X.DS L
- Xusage: 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.DE
- X
- XThis command executes a loop one or more statements
- Xbased on a test of two integer quantities.
- XThe <rel-op> argument is descibed in a earlier subsection
- Xtitled "Relational Operators."
- XSee the
- Xdescription of the
- X.B break ,
- X.B continue ,
- Xand
- X.B else
- Xcommmands
- Xand many other examples throughout the document,
- Xfor examples of how the command is used.
- X.*s 2 "whiles"
- X
- X.DS L
- Xusage: 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.DE
- X
- XThis command executes a loop of one or more statements
- Xbased on a test of two string values.
- XThe <rel-op> argument is descibed in a earlier subsection
- Xtitled "Relational Operators."
- XSee the
- Xdescription of the
- X.B break ,
- X.B continue ,
- Xand
- X.B else
- Xcommmands
- Xand many other examples throughout the document,
- Xfor examples of how the command is used.
- X.*s 2 "xon"
- X
- X.DS L
- Xusage: xon <arg>
- Xwhere <arg> is on input and output flow control
- X off no flow control
- X in input flow control
- X out output flow control
- X.DE
- X
- XThis command enables or disables xon/xoff flow control.
- X
- X.DS L
- XExamples:
- X
- X hangup
- X dial 'mysys'
- X ifi %conn != 0 parity none;xon on
- X.DE
- SHAR_EOF
- echo 'File doc/_p_cmd.txt is complete' &&
- chmod 0644 doc/_p_cmd.txt ||
- echo 'restore of doc/_p_cmd.txt failed'
- Wc_c="`wc -c < 'doc/_p_cmd.txt'`"
- test 60249 -eq "$Wc_c" ||
- echo 'doc/_p_cmd.txt: original size 60249, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= doc/_p_ifunc.txt ==============
- if test -f 'doc/_p_ifunc.txt' -a X"$1" != X"-c"; then
- echo 'x - skipping doc/_p_ifunc.txt (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting doc/_p_ifunc.txt (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'doc/_p_ifunc.txt' &&
- X.*s 1 "Integer Functions"
- X
- X.*s 2 "%argc"
- X
- XThis function returns the number of arguments passes to the current
- Xprocedure.
- X
- X.*s 2 "%baud"
- X
- XThis function returns the baud rate of the communications line.
- XIf no line is currently attached, the baud rate returned
- Xis the value of the last line attached. If no line has been attached
- Xduring the current session, the default baud rate is returned.
- X
- X.*s 2 "%colors"
- X
- XThis function returns the state of the normal and reverse video
- Xforeground and background colors in the 32-bit value:
- X.DS I
- X00000000001111111111222222222233
- X01234567890123456789012345678901
- X0000|--|0000|--|0000|--|0000|--|
- X fg bk fg bk
- X reverse normal
- X.DE
- X
- XThe color values are obtained from the following lists:
- X.DS L
- X.B
- X Alphabetic Order
- X.R
- X black 0
- X blue 1
- X brown 6
- X cyan 3
- X gray 8
- X green 2
- X hi_white 15
- X lt_blue 9
- X lt_cyan 11
- X lt_green 10
- X lt_magenta 13
- X lt_red 12
- X magenta 5
- X red 4
- X white 7
- X yellow 14
- X.DE
- X
- X.DS L
- X.B
- X Numeric Order
- X.R
- X black 0
- X blue 1
- X green 2
- X cyan 3
- X red 4
- X magenta 5
- X brown 6
- X white 7
- X gray 8
- X lt_blue 9
- X lt_green 10
- X lt_cyan 11
- X lt_red 12
- X lt_magenta 13
- X yellow 14
- X hi_white 15
- X.DE
- X
- X.*s 2 "%cols"
- X
- XThis function returns the screen width in columns.
- XIf running non-interactively, the value will always be 80.
- X
- X.*s 2 "%conn"
- X
- XThis function returns the (positive) communications
- Xline file descriptor if a connection is in effect.
- XIf there is no connection, but there is a line opened,
- X0 is returned. If no line is open (as may be the case in
- Xan _rc.ep procedure), -1 is returned.
- XNOTE: if carrier is lost abnormally, %conn will return a
- Xpositive number
- Xincorrectly if the DCD watcher is disabled or if a procedure
- Xwas being executed at the time of carrier loss. (See the sections
- Xon the
- X.B dcdwatch
- Xinteractive and procedure commands).
- X
- X.*s 2 "%curx"
- X
- XThis function returns the display cursor column position last set by the
- Xremote system. This value does not reflect the actual hardware cursor.
- X
- X.*s 2 "%cury"
- X
- XThis function returns the display cursor row position last set by the
- Xremote system. This value does not reflect the actual hardware cursor.
- X
- X.*s 2 "%csec"
- X
- XThis function returns the number of seconds ECU has been
- Xconnected to a remote system. If ECU is not connected,
- Xzero is returned.
- X
- X.*s 2 "%ctoi"
- X
- Xusage: %ctoi(str0)
- X
- XThis function returns the integer value of the first
- Xcharacter in string str0. If str0 is non-empty, the return value
- Xwill be between 0 and 255, inclusive. if str0 is empty,
- Xthen -1 is returned.
- X
- X.*s 2 "%esecs"
- X
- Xusage: %esecs
- X
- XThis function, "Epoch SECondS,"
- Xreturns the number of seconds since January 1, 1970 00:00 UTC
- X(GMT).
- X
- X.*s 2 "%fatime"
- X.DS L
- Xusage: %fatime(int0)
- X %fatime(str0)
- X.DE
- X
- XThis function returns the time of last access of the file referenced
- Xby the argument.
- XIf the argument is an integer, the file referenced is the file
- Xopened by that number with the
- X.B fopen
- Xcommand.
- XIf the argument is a string, it is the literal filename.
- X
- XIf int0 does not refer to an open file, the procedure
- Xterminates with an error.
- XIf the file specified by str0 does not exist, -1 is returned.
- X
- XThe return value is the number of seconds since January 1, 1970
- Xat 0000 UTC.
- XThe
- X.B %edate
- Xstring function may be used to convert the integer
- Xvalue to a string representation of the date and time
- Xexpressed relative to the current time zone.
- X
- X.*s 2 "%fmode"
- X.DS L
- Xusage: %fmode(int0)
- X %fmode(str0)
- X.DE
- X
- XThis function returns the file mode value ("rwxrwx---" == 077)
- Xof the file referenced
- Xby the argument.
- XIf the argument is an integer, the file referenced is the file
- Xopened by that number with the
- X.B fopen
- Xcommand.
- XIf the argument is a string, it is the literal filename.
- X
- XIf int0 does not refer to an open file, the procedure
- Xterminates with an error.
- XIf the file specified by str0 does not exist, -1 is returned.
- X
- X.*s 2 "%fmtime"
- X.DS L
- Xusage: %fmtime(int0)
- X %fmtime(str0)
- X.DE
- X
- XThis function returns the time of last modified of the file referenced
- Xby the argument.
- XIf the argument is an integer, the file referenced is the file
- Xopened by that number with the
- X.B fopen
- Xcommand.
- XIf the argument is a string, it is the literal filename.
- X
- XIf int0 does not refer to an open file, the procedure
- Xterminates with an error.
- XIf the file specified by str0 does not exist, -1 is returned.
- X
- XThe return value is the number of seconds since January 1, 1970
- Xat 0000 UTC.
- XThe
- X.B %edate
- Xstring function may be used to convert the integer
- Xvalue to a string representation of the date and time
- Xexpressed relative to the current time zone.
- X
- X.*s 2 "%fmode"
- X.DS L
- Xusage: %fmode(int0)
- X %fmode(str0)
- X.DE
- X
- XThis function returns the size
- Xof the file referenced
- Xby the argument.
- XIf the argument is an integer, the file referenced is the file
- Xopened by that number with the
- X.B fopen
- Xcommand.
- XIf the argument is a string, it is the literal filename.
- X
- XIf int0 does not refer to an open file, the procedure
- Xterminates with an error.
- XIf the file specified by str0 does not exist, -1 is returned.
- X
- X.*s 2 "%ftell"
- X
- Xusage: ftell(int0)
- X
- XThis function returns the current file position
- Xof the the file
- Xopened by int0 with the
- X.B fopen
- Xcommand.
- X
- XIf int0 does not refer to an open file, the procedure
- Xterminates with an error.
- X
- X.*s 2 "%instr"
- X
- Xusage: %instr(str0,str1)
- X
- XThis function returns the leftmost column position withing str0
- Xthat str1 is found (zero relative). If str1 cannot be found in
- Xstring str0, -1 is returned. However, if str1 is null and str0 is not,
- Xzero will be returned (i.e., the null string matches at the left).
- X
- XThe comparison is made without regard to case. See also
- X.B %instr .
- X
- X.DS I
- XExamples:
- X
- X 00000000001111111
- X 01234567890123456
- XAssume $s0='abcdefghijklmnabc'
- X $s1='abc'
- X $s2='gHi'
- X $s3='cat'
- X
- X %instr($s0,$s1) returns 0
- X %instr($s0,$s2) returns 6
- X %instr($s0,$s3) returns -1
- X %instr($s0,'bcd') returns 2
- X %instr($s0,'bad') returns -1
- X.DE
- X
- X.*s 2 "%ischr"
- X.DS L
- Xusage: %ischr(int0)
- X %ischr(str0)
- X.DE
- X
- XThis function returns 1 if the file referenced by the argument is a
- Xcharacter special file,
- Xelse 0.
- XIf the argument is an integer, the file referenced is the file
- Xopened by that number with the
- X.B fopen
- Xcommand.
- XIf the argument is a string, it is the literal filename.
- X
- XIf int0 does not refer to an open file, the procedure
- Xterminates with an error.
- XIf the file specified by str0 does not exist, -1 is returned.
- X
- XExamples:
- X
- X.DS I
- X%ischr('/dev/tty') returns 1
- X%ischr('/usr/bin') returns 0
- X%ischr('/xenix') returns 0
- X.DE
- X
- X.*s 2 "%isdir"
- X.DS L
- Xusage: %isdir(int0)
- X %isdir(str0)
- X.DE
- X
- XThis function returns 1 if the file referenced by the argument is a
- Xdirectory file,
- Xelse 0.
- XIf the argument is an integer, the file referenced is the file
- Xopened by that number with the
- X.B fopen
- Xcommand.
- XIf the argument is a string, it is the literal filename.
- X
- XIf int0 does not refer to an open file, the procedure
- Xterminates with an error.
- XIf the file specified by str0 does not exist, -1 is returned.
- X
- XExamples:
- X
- X.DS I
- X%isdir('/dev/tty') returns 0
- X%isdir('/usr/bin') returns 1
- X%isdir('/xenix') returns 0
- X.DE
- X
- X.*s 2 "%isreg"
- X.DS L
- Xusage: %isreg(int0)
- X %isreg(str0)
- X.DE
- X
- XThis function returns 1 if the file referenced by the argument is a
- Xregular file,
- Xelse 0.
- XIf the argument is an integer, the file referenced is the file
- Xopened by that number with the
- X.B fopen
- Xcommand.
- XIf the argument is a string, it is the literal filename.
- X
- XIf int0 does not refer to an open file, the procedure
- Xterminates with an error.
- XIf the file specified by str0 does not exist, -1 is returned.
- X
- XExamples:
- X
- X.DS I
- X%isreg('/dev/tty') returns 0
- X%isreg('/usr/bin') returns 0
- X%isreg('/xenix') returns 1
- X.DE
- X
- X.*s 2 "%len"
- X
- Xusage: %len(str0)
- X
- XThis function returns the length of str0.
- X.DS I
- XExample:
- X
- Xset str0='abcdef',i0=%len(str0),i1=%len('1234')
- Xstr00 = 'abcdef'
- Xint00 = 6
- Xint01 = 4
- X.DE
- X
- X.*s 2 "%lgetc"
- X
- Xusage: %lgetc(int0)
- X
- XReads a character from the line and returns it.
- XArgument int0 is the number of milliseconds to wait
- Xfor a character. Use a large positive number if you want
- Xto wait "forever." The function returns the character
- Xvalue between 0 and 255 or -1 if the timeout period is exceeded.
- X
- X.*s 2 "%lines"
- X
- XThis function returns the screen height in lines.
- XIf running non-interactively, the value will always be 25.
- X
- X.*s 2 "%nice"
- X
- Xusage: %nice
- X
- XThis function returns the nice value of the ECU process.
- X
- X.*s 2 "%pid"
- X
- XThis function returns the process id (pid) of ECU.
- X
- X.*s 2 "%match"
- X
- Xusage: %match(str0,str1)
- X
- XThis function searches string str0 for a match with the regular
- Xexpression in str1 (for information on regular expressions,
- Xrefer to the ed(C) manual pages).
- XThe function returns the index into str0 where the
- Xmatch is found or -1 if no match can be found.
- XThe matching process is case sensitive.
- X
- XThe variable $i0 receives the length of the matching
- Xstring in str0 if a match is found. For this reason,
- Xit is not advisable that $i0 otherwise be involved
- Xin the operation. Specifically to be avoided is:
- X.DS I
- Xset $i0=%instr(...)
- X.DE
- X.DS L
- XExamples:
- X
- X 00000000001111111
- X 01234567890123456
- XAssume $s0='abcdefghijklmnabc'
- X $s1='abc'
- X $s2='n.*'
- X
- X %match($s0,$s1) returns 0 $i0=3
- X %match($s0,$s2) returns 16 $i0=4
- X %match($s0,$s3) returns -1 $i0 unchanged
- X %match($s0,'de..h') returns 3 $i0=5
- X %match($s0,'de..H') returns -1 $i0 unchanged
- X.DE
- X
- X.*s 2 "%mhack"
- X
- Xusage: %mhack
- X
- XThis function ("Millisecond time HACK") returns the number of
- Xmilliseconds since ecu was started. It isn't a very useful
- Xvalue by itself, but differences between the values
- Xreturned by two calls to the function may be used to determine
- Xthe time between two events with the maximum accuracy the
- Xoperating system can deliver (1/HZ resolution with a bit of
- Xlatency).
- X
- X.DS L
- XExamples:
- X $i10 = %mhack
- X send 'test'
- X lookfor -e %chr(0x0A) 100
- X ifi $i0 == 0 echo 'no response in 10 seconds'
- X else echo 'response time '+%itos(%mhack - $i10)+' msec'
- X.DE
- X
- X.*s 2 "%rchr"
- X
- XThis function returns the number of characters
- Xreceived by ECU since the program starrted.
- X
- X.*s 2 "%rchrc"
- X
- XThis function returns the number of characters
- Xreceived by ECU during the current connection.
- X
- X.*s 2 "%rinstr"
- X
- Xusage: %rinstr(str0,str1)
- X
- XThis function returns the rightmost column position withing str0
- Xthat str1 is found (zero relative). If str1 cannot be found in
- Xstring str0, -1 is returned. However, if str1 is null and str0 is not,
- Xzero will be returned (i.e., the null string matches at the left).
- X
- XThe comparison is made without regard to case. See also
- X.B %instr .
- X
- X.DS I
- XExamples:
- X
- X 00000000001111111
- X 01234567890123456
- XAssume $s0='abcdefghijklmnabc'
- X $s1='abc'
- X $s2='gHi'
- X $s3='cat'
- X
- X %instr($s0,$s1) returns 14
- X %instr($s0,$s2) returns 6
- X %instr($s0,$s3) returns -1
- X.DE
- X
- X.*s 2 "%shmid"
- X
- XThis function returns the integer shared memory segment id
- Xfor the current ECU process. It may be used to pass the id
- Xto a "friend" process so that it may access the shared memory
- Xsegment (described in header file ecushm.h).
- XFor more details,
- Xrefer to an earlier section entitled "Shared Memory 'Friend' Interface."
- X
- X.DS L
- XExample:
- X
- X system 'ecufriend '+%itos(%shmid)
- X.DE
- X
- X.*s 2 "%stoi"
- X
- Xusage: %stoi(str0)
- X
- XThis function converts the contents of str0 to an
- Xinteger and returns the value.
- X
- X.*s 2 "%uid"
- X
- Xusage: %uid
- X
- XThis function returns the uid of the user.
- X
- X.*s 2 "%xchr"
- X
- XThis function returns the number of characters
- Xtransmitted by ECU since the program starrted.
- X
- X.*s 2 "%xchrc"
- X
- XThis function returns the number of characters
- Xtransmitted by ECU during the current connection.
- X
- X
- SHAR_EOF
- chmod 0644 doc/_p_ifunc.txt ||
- echo 'restore of doc/_p_ifunc.txt failed'
- Wc_c="`wc -c < 'doc/_p_ifunc.txt'`"
- test 12064 -eq "$Wc_c" ||
- echo 'doc/_p_ifunc.txt: original size 12064, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= doc/_p_param.txt ==============
- if test -f 'doc/_p_param.txt' -a X"$1" != X"-c"; then
- echo 'x - skipping doc/_p_param.txt (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting doc/_p_param.txt (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'doc/_p_param.txt' &&
- X.*s 1 "Arguments"
- X
- XThere are five types of arguments to procedure commands:
- X.DS I
- XSwitch
- XAlphabetic Token
- XInteger
- XString
- XRelational Operators
- X.DE
- XThis section describes the syntax and construction of each type in turn.
- XThere are separate groups of valid of relational operators for integers
- Xand strings; thus, they are described under the appropriate sections.
- X
- X.*s 2 "Switches"
- X
- XSwitch arguments begin with a hyphen (minus, '-'). The switch
- Xargument must be the first argument after the command. Only
- Xone switch argument is allowed on the command line. If
- Xswitches '-a', '-b' and '-c', are available and '-a' and '-b'
- Xare desired, '-ab' or '-ba' is entered.
- X
- X.*s 2 "Alphabetic Tokens"
- X
- XAlphabetic tokens, for lack of a better term, are non-integer,
- Xnon-quoted terms used as arguments for certain commands, such as:
- X.DS I
- Xplog off
- X.DE
- XSuch argument types are fairly simple to understand and use; they are
- Xdescribed here for completeness.
- X
- X.*s 2 "Integers"
- X
- XInteger values are 32-bit quantities ranging between -2147483647
- Xand 2147483647.
- X
- XIn one case, an integer is used to store a 32-bit color mask as
- Xdescribed by the
- X.B color
- Xcommand and the
- X.B %colors
- Xinteger function.
- X
- X.*s 3 "Constants"
- X
- XInteger constants are numeric strings, optionally with an initial
- Xminus sign, the absolute value of which must be less than
- X2147483648. If the constant begins with the string "0x", it is
- Xinterpreted as hexadecimal. Octal, like FORTRAN and COBOL will
- Xbe dead soon (heh heh); until then, however, octal constants may
- Xbe denoted by a leading "0o". This differs from the usual
- Xconvention so as to allow decimal strings with leading zeroes to
- Xbe correctly interpreted.
- X
- X.DS L
- XExamples:
- X 123 --> 123(10)
- X 0123 --> 123(10)
- X 0x123 --> 291(10)
- X 0o123 --> 83(10)
- X.DE
- X
- X.*s 3 "Variables"
- X
- XThere are 50 numbered, permanent integer variables referenced by
- Xthe terms '$i0' through '$i49'. When ECU is started, the value of each
- Xvariable is zero. Variables retain their
- Xvalue until changed, even between procedure executions.
- XThe integer variable number may be expressed
- Xas an expression by enclosing an integer expression in brackets.
- XFor instance:
- X.DS L
- X $i[4+5] refers to $i9
- X
- X $i2=5
- X $i[20+$i2] refers to $i25
- X.DE
- X
- XInteger variables may be created for use as "local" variables or
- Xto promote code readability. Refer to the
- X.B mkvar
- Xcommand.
- X
- X.*s 3 "Functions"
- X
- XECU has many built-in functions which return the value of ecu- or
- Xsystem-related information. A list of the functions appears in a
- Xlater section.
- X
- X.*s 3 "Expressions"
- X
- XIn almost any place an integer argument is allowed, an expression
- Xmay be supplied. Expressions are composed of two or more integer
- Xconstants or variables separated by operators from the group:
- X.DS L
- X + addition
- X - subtraction
- X * multiplication
- X / division
- X | OR
- X @ MOD
- X ^ XOR
- X & AND
- X.DE
- XEvaluation of expressions is left-to-right. Parentheses are
- Xnot allowed.
- X
- X.*s 3 "Relational Operators"
- X
- XInteger relational operators are chosen from the following group:
- X.DS L
- X = "is equal to"
- X == "is equal to"
- X != "is not equal to"
- X <> "is not equal to"
- X > "is greater than"
- X < "is greater than"
- X >= "is greater than or equal to"
- X <= "is less than or equal to"
- X.DE
- X
- X.*s 2 "Strings"
- X
- XStrings are classic concatenations of zero or more eight-bit
- Xcharacters. In general, the maximum size of a string used by
- XECU is 256 characters. The absolute maximum size is 16384 characters.
- X
- XNull in strings are poorly handled.
- XYou may be able to get away with using them, but it is not recommended.
- X
- X.*s 3 "Constants"
- X
- XString constants are formed by placing alphanumeric characters
- Xbetween single quote characters (apostrophes). The backslash ('\e')
- Xcharacter is used to "escape" certains characters:
- X.DS L
- X \e\e one backslash
- X \en newline
- X \et tab
- X \e' apostrophe
- X.DE
- X
- XNOTE: ecu converts every tab in a procedure line to one space when the
- Xprocedure file is read in. Therefore, IF YOU WISH TO PLACE A TAB IN A STRING
- XCONSTANT, you
- X.B must
- Xplace it there with the \et escape sequence.
- X
- X.*s 3 "Variables"
- X
- XThere are 50 numbered, permanent string variables referenced by
- Xthe terms '$s0' through '$s49',
- Xeach possessing a maximum length of 256 characters
- XWhen ECU is started, the value of each
- Xvariable is null (zero length). Variables retain their
- Xvalue until changed, even between procedure executions.
- XThe string variable number may be expressed
- Xas an expression by enclosing an string expression in brackets.
- XFor instance:
- X.DS L
- X $s[4+5] refers to $s9
- X
- X $s2=5
- X $s[20+$s2] refers to $s25
- X.DE
- X
- XString variables may be created for use as "local" variables or
- Xto promote code readability. Refer to the
- X.B mkvar
- Xcommand.
- XCreated variables have a life equal to the duration
- Xof the procedure which created them.
- XRegardless of the declared size of a created string variable,
- XECU will automatically grow it to a maximum of 16384 characters
- Xas necessary. Numbered (permanent) string variables have a maximum
- Xsize of 256 bytes.
- X
- X.*s 3 "Functions"
- X
- XECU has many built-in functions which return the value of ecu- or
- Xsystem-related information. A list of the functions appears in a
- Xlater section.
- X
- X.*s 3 "Expressions"
- X
- XString expressions are formed by the concatenation of string
- Xconstants, variables and function return values using the '+'
- Xoperator:
- X.DS L
- XExample:
- X 'The quick brown fox jumped over the '+$s0'+' dog at '+%time
- X.DE
- X
- X.*s 3 "Relational Operators"
- X
- XString relational operators are chosen from the following group:
- X.DS L
- X = "is equal to"
- X == "is equal to"
- X != "is not equal to"
- X <> "is not equal to"
- X.DE
- X
- SHAR_EOF
- chmod 0644 doc/_p_param.txt ||
- echo 'restore of doc/_p_param.txt failed'
- Wc_c="`wc -c < 'doc/_p_param.txt'`"
- test 5784 -eq "$Wc_c" ||
- echo 'doc/_p_param.txt: original size 5784, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= doc/_p_sfunc.txt ==============
- if test -f 'doc/_p_sfunc.txt' -a X"$1" != X"-c"; then
- echo 'x - skipping doc/_p_sfunc.txt (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting doc/_p_sfunc.txt (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'doc/_p_sfunc.txt' &&
- X.*s 1 "String Functions"
- X
- X.*s 2 "%argv"
- X
- Xusage: %argv(int0)
- X
- XThis function returns the string value of an argument passed
- Xto the procedure by the 'do' command. Argument 0 is the
- Xname of the procedure itself.
- XThe integer function %argc may be used to determine the
- Xnumber of arguments passed to the procedure. Specifying
- Xan argument number greater than the number of arguments
- Xpassed returns a null string (if procedure tracing is enabled
- Xwith the 'ptrace' comand, a warning will be displayed
- Xin this case).
- X.DS I
- XExample:
- X invocation from shell:
- X ecu -p test Quick Brown Fox
- X
- X invocation from interactive command line:
- X do test Quick Brown Fox
- X
- X invocation from procedure:
- X do 'test' 'Quick' 'Brown' 'Fox'
- X
- X results in:
- X %argv(0) = 'test'
- X %argv(1) = 'Quick'
- X %argv(2) = 'Brown'
- X %argv(3) = 'Fox'
- X %argv(4) = ''
- X.DE
- X
- X.B NOTE:
- Xthe interactive
- X.B dial
- Xcommand, the dialing directory menu and the initial setup menu
- Xall can automatically execute a procedure which matches
- Xa dialed
- X.B
- Xlogical telephone number.
- X.R
- XThere two arguments passed to these procedures, %argv(0) being
- Xthe procedure name as always. %argv(1) is set according to the following
- Xtable:
- X.DS I
- X invoker %argv(1)
- X------------------- -------------
- Xinitial setup menu !INITIAL
- Xinteractive dial !INTERACTIVE
- Xdialing menu !MENU
- X.DE
- XThus it is possible for the invoked procedure
- Xto determine that it has been automatically executed
- Xby testing %argv(1) for an exclamation point, or possibly
- Xthe entire argument.
- X
- X.*s 2 "%basename"
- X
- XUsage: %basename(str0,str1)
- X
- XThis function is similar to the UNIX basename(1) utility in
- Xthat it returns a filename minus a supplied suffix, if it is present.
- XUnlike the UNIX basename(C) program, %basename does not remove
- Xthe directory part of the filename.
- XSee also
- X.B %dirpart
- Xand
- X.B %filepart .
- X
- X.DS L
- XExamples:
- X
- X %basename('/u1/src/ecu/ecu.c','.c') = /u1/src/ecu/ecu
- X %basename('ecu.c','.c') = ecu
- X %basename('ecu.c','.x') = ecu.c
- X.DE
- X
- X.*s 2 "%cgetc"
- X
- Xusage: %cgetc
- X
- XThis function reads one character from the console keyboard
- Xand returns it. The character is not echoed.
- X
- X.*s 2 "%cgets"
- X
- Xusage: %cgets
- X
- XThis function reads a string from the console keyboard
- Xand returns it. Each character is echoed as it is typed
- Xand the user's normal erase and kill character is available
- Xto edit the input before terminating the read with ENTER.
- X
- X.*s 2 "%chr"
- X
- Xusage: %chr(int0)
- X
- XThis function returns the character value whose ASCII value
- Xis supplied in int0.
- X
- X.DS L
- XExample:
- X
- X set $s0 = %chr(4) places a ^D (EOT) character into $s0
- X.DE
- X
- X.*s 2 "%date"
- X
- Xusage: %date
- X
- XThis function returns the current date in the form 'mm-dd-yyyy'
- Xin the local time zone (daylight time if it applies).
- X
- X.*s 2 "%datez"
- X
- Xusage: %datez
- X
- XThis function returns the current date in the form 'mm-dd-yyyy'
- Xin the UTC (Z) time zone.
- X
- X.*s 2 "%day"
- X
- Xusage: %day
- X
- XThis function returns the current day of the week as a three character
- Xabbreviation: 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'
- Xin the local time zone (daylight time if it applies).
- X
- X.*s 2 "%dayz"
- X
- Xusage: %dayz
- X
- XThis function returns the current day of the week as a three character
- Xabbreviation: 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'
- Xin the UTC (Z) time zone.
- X
- X.*s 2 "%dir"
- X
- Xusage: %dir
- X
- XThis function returns the
- Xfull pathname of the current working directory.
- X
- X.*s 2 "%dirpart"
- X
- Xusage: %dirpart(str0)
- X
- XThis function returns the
- Xdirectory portion of the pathname supplied in str0.
- XSee also
- X.B %basename
- Xand
- X.B %filepart .
- X
- X
- X.DS L
- XExamples:
- X
- X%dirpart('/u1/src/src/foo.c') = "/u1/src/src"
- X%dirpart('foo.c') = "foo.c"
- X%dirpart('/usr') = ""
- X.DE
- X
- X.*s 2 "%edate"
- X
- Xusage: %edate(int0)
- X
- XThe value in int0 is expected to be a number of seconds since January 1,
- X1970 00:00 UTC (Universal Coordinated Time) as returned by
- Xthe integer functions %fatime and %fmtime.
- XThis function converts the value into a string representing the
- Xequivalent local time in the form 'mm-dd-yyyy hh:mm:ss'.
- X.DS L
- XExample:
- X
- Xset $i0=%fmtime('/xenix')
- X$i00 = 601178971 (0x23d5435b,04365241533)
- X
- Xset $s0=%edate($i0)
- X$s00 = '01-18-1989 21:09:31'
- X.DE
- X
- X.*s 2 "%envvar"
- X
- Xusage: %envvar()
- X
- XThis function returns the string value of an environment
- Xvariable.
- X
- X.DS L
- XExample:
- X
- X set $s0=%envvar('HOME') might set $s0 '/usr/user'
- X.DE
- X.DF L
- XTypical Environment Variables:
- X
- X HOME pathname of home directory
- X EDITOR user's preferred editor
- X PATH program execution searchlist
- X TERM terminal type
- X SHELL user's preferred shell
- X MAIL user's mail box file
- X ECUPROMPT ECU interactive command prompt
- X at beginning of execution
- X.DE
- X
- X.*s 2 "%errstr"
- X
- Xusage: %errstr(int0)
- X
- XThis function returns the system error message, given int0 as an
- X.B errno
- Xas returned by a file-related command.
- X.B fopen.
- X
- X.DS L
- XExample:
- X
- X echo %errstr(1)
- X Not owner
- X.DE
- X
- X.*s 2 "%etime"
- X
- Xusage: %etime(int0)
- X
- XThis function returns a string representation of elapsed time
- Xin the format 'hh:mm:ss'
- Xfor the integer parameter int0, a number of seconds.
- X
- X.DS L
- XExample:
- X
- X echo %etime(62)
- X 00:01:02
- X.DE
- X
- X.*s 2 "%filepart"
- X
- Xusage: %filepart(str0)
- X
- XThis function returns the
- Xfilename portion of the pathname supplied in str0.
- XSee also
- X.B %basename
- Xand
- X.B %dirpart .
- X
- X.DS L
- XExamples:
- X
- X%filepart('/u1/src/src/foo.c') = "foo.c"
- X%filepart('foo.c') = "foo.c"
- X.DE
- X
- X.*s 2 "%fmodestr"
- X
- Xusage: %fmodestr(int0)
- X
- XThis function returns a string representation of the
- Xfamiliar file mode string given the file mode integer int0.
- X
- X.DS L
- XExample:
- X
- X echo %fmodestr(0100755)
- X -rwxr-xr-x
- X
- X echo %fmodestr(%fmode('/usr/lib'))
- X drwxr-xr-x
- X.DE
- X
- X.*s 2 "%itos"
- X
- Xusage: %itos(int0[,format])
- X
- XThis function converts integer int0 to a string, optionally
- Xcontrolling the format of the conversion.
- X
- XIf the format parameter is missing, the conversion is to
- Xa minimum number of decimal characters necessary to
- Xhold the result.
- X
- XIf the format parameter is present, it must of consist of
- Xa non-null string made of one or both optional parts:
- X.DS L
- X decimal number of digits to be part of result string
- X (a leading zero indicates leading zeroes are to
- X appear in the string; no leading zero pads with
- X leading spaces
- X
- X a lower case letter from the following list:
- X d - decimal conversion
- X x - hexadecimal conversion
- X o - octal conversion
- X.DE
- X.DS L
- XExample:
- X
- X %itos(33) '33'
- X %itos(33,d) '33'
- X %itos(33,x) '21'
- X %itos(33,5d) ' 33'
- X %itos(33,010d) '0000000033'
- X %itos(33,10d) ' 33'
- X %itos(33,x) '21'
- X %itos(33,04x) '0021'
- X %itos(33,4x) ' 21'
- X %itos(33,o) '41'
- X %itos(33,4o) ' 41'
- X.DE
- X
- X.*s 2 "%left"
- X
- Xusage: %left(str0,int0)
- X
- XThis function returns the leftmost int0 characters of str0.
- XIf the length of the string is less than int0,
- Xthe entire str0 is returned.
- X.DS L
- XExample:
- X
- X if $s0 == 'abcdefg'
- X %left($s0,3) returns 'abc'
- X.DE
- X
- X.*s 2 "%line"
- X
- Xusage: %line
- X
- XThis function returns the name of the attached communications
- Xline in the form "/dev/ttyxx". If no line is currently
- Xattached, the function returns null.
- X
- X.*s 2 "%logname"
- X
- Xusage: %logname
- X
- XThis function returns the login name of the user executing
- XECU. Note: the name returned is the name supplied to a login
- Xprompt, not any current su(C) username that may be in effect.
- X
- X.*s 2 "%mid"
- X
- Xusage: %mid(str0,int0[,int1])
- X
- XThis function returns the middle portion of a string str0
- Xbeginning with the character at position int0 and for a length
- Xof int1 characters.
- XIf int0 is greater than or equal to the length of
- Xstro, a null string is returned.
- XIf the optional argument int1 is not supplied, or
- Xif the length of the string is less than int1,
- Xthe entire str0 is returned.
- X.DS L
- XExample:
- X
- X if $s0 == '0123456789abc'
- X %mid($s0,3,4) returns '3456'
- X %mid($s0,3) returns '3456789abc'
- X %mid($s0,10,2) returns 'ab'
- X %mid($s0,10,5) returns 'abc'
- X.DE
- X
- X.*s 2 "%month"
- X
- Xusage: %month
- X
- XThis function returns the current month as a three character
- Xabbreviation: 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'.
- X
- X.*s 2 "%rdesc"
- X
- Xusage: %rdesc
- X
- XThis function returns the
- Xdescription
- Xportion of the
- Xdialing directory entry for the currently connected remote.
- XIf no connection exists, the function returns null.
- X
- X.*s 2 "%right"
- X
- Xusage: %right(str0,int0)
- X
- XThis function returns the rightmost int0 characters of str0.
- XIf the length of the string is less than int0,
- Xthe entire str0 is returned.
- X.DS L
- XExample:
- X
- X if $s0 == 'abcdefg'
- X %right($s0,3) returns 'efg'
- X.DE
- X
- X.*s 2 "%rname"
- X
- Xusage: %rname
- X
- XThis function returns the
- Xlogical name
- Xportion of the
- Xdialing directory entry for the currently connected remote.
- XIf the remote was dialed directly, as in dial 5551212, the
- Xreturned value is the phone number.
- XIf no connection exists, the function returns null.
- X
- XThe value returned by this command may be overridden by use of the
- X.B rname
- Xprocedure command.
- X
- X.*s 2 "%rtelno"
- Xusage: %rtelno
- X
- XThis function returns the
- Xtelephone number
- Xportion of the
- Xdialing directory entry for the currently connected remote.
- XIf no connection exists, the function returns null.
- X
- X.*s 2 "%time"
- X
- Xusage: %time
- X
- XThis function returns the current time in the form 'hh:mm'
- Xin the local time zone (daylight time if it applies).
- X
- X.*s 2 "%times"
- X
- Xusage: %times
- X
- XThis function returns the current time in the form 'hh:mm:ss'
- Xin the local time zone (daylight time if it applies).
- X
- X.*s 2 "%timez"
- X
- Xusage: %timez
- X
- XThis function returns the current time in the form 'hh:mm'
- Xin the UTC (Z) time zone.
- X
- X.*s 2 "%timezs"
- X
- Xusage: %timezs
- X
- XThis function returns the current time in the form 'hh:mm:ss'
- Xin the UTC (Z) time zone.
- X
- X.*s 2 "%tty"
- X
- Xusage: %tty
- X
- XThis function returns the console tty name in the form "/dev/ttynn".
- X
- X.*s 2 "%uname"
- X
- Xusage: %uname
- X
- XThis function returns the system name you are executing ECU on as
- Xreported by uname(2)/uname(S). On SCO systems, if /etc/systemid
- Xexists and is readable, the name in that file isused in place of
- Xthe name from uname.
- SHAR_EOF
- chmod 0644 doc/_p_sfunc.txt ||
- echo 'restore of doc/_p_sfunc.txt failed'
- Wc_c="`wc -c < 'doc/_p_sfunc.txt'`"
- test 10113 -eq "$Wc_c" ||
- echo 'doc/_p_sfunc.txt: original size 10113, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= doc/_startup.txt ==============
- if test -f 'doc/_startup.txt' -a X"$1" != X"-c"; then
- echo 'x - skipping doc/_startup.txt (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting doc/_startup.txt (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'doc/_startup.txt' &&
- X.*s 1 "Starting the Program"
- X
- X.*s 2 "Simple Startup - Initial Setup Menu"
- X
- XECU may be started in a number of ways through use of
- Xcommand line switches, but the easiest is to enter
- X.DS I
- Xecu
- X.DE
- Xby itself.
- XIn this case, the screen is cleared
- Xand the following screen, called the
- X.B setup
- X.B screen ,
- Xwill be presented.
- X.DS L
- X .--[ ecu 3.20-386u wht@n4hgf ]---------------------------------.
- X | |
- X | Destination ________________________________________ |
- X | |
- X | |
- X | |
- X | tty: /dev/tty2b |
- X | |
- X | duplex: F baud: 9600 parity:N (data bits 8) |
- X | add NL to transmitted CR: N |
- X | add NL to received CR: N |
- X | |
- X | |
- X | TAB:next ^B:prev END:proceed ^D:phone dir ESC:quit ecu |
- X `- logical phone directory entry, phone number or empty -------'
- X
- X.DE
- XSeveral choices may be made by navigating the setup screen.
- XWhen you position to a field, helpful text is displayed
- Xon the bottom line of the form.
- X
- XIt is important to note that you may not exit this screen
- Xinto ECU operation without opening a communications line.
- X
- XThe initial (default) values for some of the fields may be modified
- Xby command line switches or by the special procedure "_rc.ep".
- XAlso, entering a dialing directory entry name in the 'Destination'
- Xfield and pressing Return will override the defaults with the values
- Xin the directory entry.
- XSee the sections related to dialing
- Xand the section in the Procedure Language manual titled "_rc.ep".
- X
- X.*s 3 "Destination"
- X
- XIf a dialing directory has been configured,
- Xa literal phone number need not be entered.
- XHowever, on your first invocation, you'll very likely have
- Xno directory. Therefore, you have three options:
- X
- X.DS I
- X1. Enter a literal telephone number, (e.g. 18005551212).
- X Hyphens and open and close parentheses may also
- X be entered.
- X
- X2. Press ENTER to skip the 'Destination' field and enter
- X ^D to enter the telephone directory to enter your
- X first directory entry.
- X
- X3. Press END to enter interactive mode to communicate
- X directly with the attached DCE (modem).
- X.DE
- X
- X.*s 3 "Other Fields"
- X
- XThe 'tty' field may be used to select an outgoing line
- Xother than the default.
- XFor important considerations on line choice, see the sections
- SHAR_EOF
- true || echo 'restore of doc/_startup.txt failed'
- fi
- echo 'End of ecu320 part 38'
- echo 'File doc/_startup.txt is continued in part 39'
- echo 39 > _shar_seq_.tmp
- exit 0
-
- exit 0 # Just in case...
-