home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-05-11 | 43.4 KB | 1,853 lines |
- Newsgroups: comp.sources.misc
- subject: v12i085: ECU 2.80 manual part 03/03
- from: wht%n4hgf@gatech.edu (Warren Tucker)
- Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
-
- Posting-number: Volume 12, Issue 85
- Submitted-by: wht%n4hgf@gatech.edu (Warren Tucker)
- Archive-name: ecuman2.80/part03
-
- ---- Cut Here and unpack ----
- #!/bin/sh
- # this is ecuman280.03 (part 3 of ecuman280)
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file doc/ecu.man continued
- #
- if touch 2>&1 | fgrep '[-amc]' > /dev/null
- then TOUCH=touch
- else TOUCH=true
- fi
- if test ! -r @shar_seq_.tmp; then
- echo "Please unpack part 1 first!"
- exit 1
- fi
- (read Scheck
- if test "$Scheck" != 3; then
- echo "Please unpack part $Scheck next!"
- exit 1
- else
- exit 0
- fi
- ) < @shar_seq_.tmp || exit 1
- echo "x - Continuing file doc/ecu.man"
- sed 's/^X//' << 'SHAR_EOF' >> doc/ecu.man &&
- X opposed to reverse video mode. The color command forces normal video
- X mode.
- X
- X
- X 6.2.70 vidrev
- 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.2.71 whilei
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 63
- 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 }
- X
- X
- X This command executes a loop one or more statements based on a test of
- X two integer quantities. See the description of the break, else, whilei,
- X and whiles commmands for examples of how the command is used.
- X
- X
- X 6.2.72 whiles
- 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 }
- X
- X
- X This command executes a loop of 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
- X 6.3 Integer Functions
- X
- X
- X
- X 6.3.1 %argc
- X
- X This function returns the number of arguments passes to the current
- X procedure.
- X
- X
- X
- X
- X 6.3.2 %baud
- X
- X This function returns the baud rate of the communications line. If no
- X line is currently attached, the baud rate returned is the value of the
- X last line attached. If no line has been attached during the current
- X session, the default baud rate is returned.
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 64
- X
- X
- X
- X 6.3.3 %colors
- X
- X This function returns the state of the normal and reverse video
- X foreground and background colors in the 32-bit value:
- X
- X 00000000001111111111222222222233
- X 01234567890123456789012345678901
- X 0000|--|0000|--|0000|--|0000|--|
- X fg bk fg bk
- X reverse normal
- X
- X
- X The color values are obtained from the following lists:
- X
- X Alphabetic Order
- 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
- 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 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 65
- X
- X
- X
- X Numeric Order
- 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
- X
- X
- X 6.3.4 %conn
- X
- X This function returns the communications line file descriptor if a
- X connection is in progress, else 0. NOTE: if carrier is lost
- X abnormally, %conn will return non-zero incorrectly.
- X
- X
- X 6.3.5 %curx
- X
- X This function returns the display cursor column position last set by the
- X remote system. This value does not reflect the actual hardware cursor.
- X
- X
- X 6.3.6 %cury
- X
- X This function returns the display cursor row position last set by the
- X remote system. This value does not reflect the actual hardware cursor.
- X
- X
- X 6.3.7 %csec
- X
- X This function returns the number of seconds ECU has been connected to a
- X remote system. If ECU is not connected, zero is returned.
- X
- X
- X 6.3.8 %ctoi
- X
- X usage: %ctoi(str0)
- X
- X This function returns the integer value of the first character in string
- X str0. If str0 is non-empty, the return value will be between 0 and 255,
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 66
- X
- X
- X
- X inclusive. if str0 is empty, then -1 is returned.
- X
- X
- X 6.3.9 %fatime
- X
- X usage: %fatime(int0)
- X %fatime(str0)
- X
- X
- X This function returns the time of last access of the file referenced by
- X the argument. If the argument is an integer, the file referenced is the
- X file opened by that number with the fopen command. If the argument is a
- X string, it is the literal filename.
- X
- X If int0 does not refer to an open file, the procedure terminates with an
- X error. If the file specified by str0 does not exist, -1 is returned.
- X
- X The return value is the number of seconds since January 1, 1970 at 0000
- X UTC. The %edate string function may be used to convert the integer
- X value to a string representation of the date and time expressed relative
- X to the current time zone.
- X
- X
- X 6.3.10 %fmode
- X
- X usage: %fmode(int0)
- X %fmode(str0)
- X
- X
- X This function returns the file mode value ("rwxrwx---" == 077) of the
- X file referenced by the argument. If the argument is an integer, the
- X file referenced is the file opened by that number with the fopen
- X command. If the argument is a string, it is the literal filename.
- X
- X If int0 does not refer to an open file, the procedure terminates with an
- X error. If the file specified by str0 does not exist, -1 is returned.
- X
- X
- X 6.3.11 %fmtime
- X
- X usage: %fmtime(int0)
- X %fmtime(str0)
- X
- X
- X This function returns the time of last modified of the file referenced
- X by the argument. If the argument is an integer, the file referenced is
- X the file opened by that number with the fopen command. If the argument
- X is a string, it is the literal filename.
- X
- X If int0 does not refer to an open file, the procedure terminates with an
- X error. If the file specified by str0 does not exist, -1 is returned.
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 67
- X
- X
- X
- X The return value is the number of seconds since January 1, 1970 at 0000
- X UTC. The %edate string function may be used to convert the integer
- X value to a string representation of the date and time expressed relative
- X to the current time zone.
- X
- X
- X 6.3.12 %fmode
- X
- X usage: %fmode(int0)
- X %fmode(str0)
- X
- X
- X This function returns the size of the file referenced by the argument.
- X If the argument is an integer, the file referenced is the file opened by
- X that number with the fopen command. If the argument is a string, it is
- X the literal filename.
- X
- X If int0 does not refer to an open file, the procedure terminates with an
- X error. If the file specified by str0 does not exist, -1 is returned.
- X
- X
- X 6.3.13 %ftell
- X
- X usage: ftell(int0)
- X
- X This function returns the current file position of the the file opened
- X by int0 with the fopen command.
- X
- X If int0 does not refer to an open file, the procedure terminates with an
- X error.
- X
- X
- X 6.3.14 %instr
- X
- X usage: %instr(str0,str1)
- X
- X This function returns the leftmost column position withing str0 that
- X str1 is found (zero relative). If str1 cannot be found in string str0,
- X -1 is returned. However, if str1 is null and str0 is not, zero will be
- X returned (i.e., the null string matches at the left).
- X
- X The comparison is made without regard to case.
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 68
- X
- X
- X
- X Examples:
- X
- X 00000000001111111
- X 01234567890123456
- X Assume $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
- X
- X
- X 6.3.15 %ischr
- X
- X usage: %ischr(int0)
- X %ischr(str0)
- X
- X
- X This function returns 1 if the file referenced by the argument is a
- X character special file, else 0. If the argument is an integer, the file
- X referenced is the file opened by that number with the fopen command. If
- X the argument is a string, it is the literal filename.
- X
- X If int0 does not refer to an open file, the procedure terminates with an
- X error. If the file specified by str0 does not exist, -1 is returned.
- X
- X Examples:
- X
- X
- X %ischr('/dev/tty') returns 1
- X %ischr('/usr/bin') returns 0
- X %ischr('/xenix') returns 0
- X
- X
- X
- X 6.3.16 %isdir
- X
- X usage: %isdir(int0)
- X %isdir(str0)
- X
- X
- X This function returns 1 if the file referenced by the argument is a
- X directory file, else 0. If the argument is an integer, the file
- X referenced is the file opened by that number with the fopen command. If
- X the argument is a string, it is the literal filename.
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 69
- X
- X
- X
- X If int0 does not refer to an open file, the procedure terminates with an
- X error. If the file specified by str0 does not exist, -1 is returned.
- X
- X Examples:
- X
- X
- X %isdir('/dev/tty') returns 0
- X %isdir('/usr/bin') returns 1
- X %isdir('/xenix') returns 0
- X
- X
- X
- X 6.3.17 %isreg
- X
- X usage: %isreg(int0)
- X %isreg(str0)
- X
- X
- X This function returns 1 if the file referenced by the argument is a
- X regular file, else 0. If the argument is an integer, the file
- X referenced is the file opened by that number with the fopen command. If
- X the argument is a string, it is the literal filename.
- X
- X If int0 does not refer to an open file, the procedure terminates with an
- X error. If the file specified by str0 does not exist, -1 is returned.
- X
- X Examples:
- X
- X
- X %isreg('/dev/tty') returns 0
- X %isreg('/usr/bin') returns 0
- X %isreg('/xenix') returns 1
- X
- X
- X
- X 6.3.18 %len
- X
- X usage: %len(str0)
- X
- X This function returns the length of str0.
- X
- X Example:
- X
- X set str0='abcdef',i0=%len(str0),i1=%len('1234')
- X str00 = 'abcdef'
- X int00 = 6
- X int01 = 4
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 70
- X
- X
- X
- X 6.3.19 %lgetc
- X
- X Returns a character read from the line.
- X
- X
- X 6.3.20 %pid
- X
- X This function returns the process id (pid) of ECU.
- X
- X
- X 6.3.21 %match
- X
- X usage: %match(str0,str1)
- X
- X This function searches string str0 for a match with the regular
- X expression in str1 (for information on regular expressions, refer to the
- X ed(C) manual pages). The function returns the index into str0 where the
- X match is found or -1 if no match can be found. The matching process is
- X case sensitive.
- X
- X The variable $i0 receives the length of the matching string in str0 if a
- X match is found. For this reason, it is not advisable that $i0 otherwise
- X be involved in the operation. Specifically to be avoided is:
- X
- X set $i0=%instr(...)
- X
- X Examples:
- X
- X 00000000001111111
- X 01234567890123456
- X Assume $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
- X
- X
- X 6.3.22 %mhack
- X
- X usage: %mhack
- X
- X This function ("Millisecond time HACK") returns the number of
- X milliseconds since ecu was started. It isn't a very useful value by
- X itself, but differences between the values returned by two calls to the
- X function may be used to determine the time between two events to the
- X maximum accuracy the operating system can deliver.
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 71
- X
- X
- X
- X Examples:
- X $i10 = %mhack
- X send 'test'
- X lookfor -e 0x0A 100
- X ifi $i0 == 0 echo 'no response in 10 seconds'
- X else echo 'response time '+%itos(%mhack - $i10)+' msec'
- X
- X
- X
- X 6.3.23 %rchr
- X
- X This function returns the number of characters received by ECU since the
- X program starrted.
- X
- X
- X 6.3.24 %rchrc
- X
- X This function returns the number of characters received by ECU during
- X the current connection.
- X
- X
- X 6.3.25 %shmid
- X
- X This function returns the integer shared memory segment id for the
- X current ECU process. It may be used to pass the id to a "friend"
- X process so that it may access the shared memory segment (described in
- X header file ecushm.h). For more details, refer to an earlier section
- X entitled "Shared Memory 'Friend' Interface."
- X
- X
- X Example:
- X
- X system 'ecufriend '+%itos(%shmid)
- X
- X
- X
- X 6.3.26 %stoi
- X
- X usage: %stoi(str0)
- X
- X This function converts the contents of str0 to an integer and returns
- X the value.
- X
- X
- X 6.3.27 %xchr
- X
- X This function returns the number of characters transmitted by ECU since
- X the program starrted.
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 72
- X
- X
- X
- X 6.3.28 %xchrc
- X
- X This function returns the number of characters transmitted by ECU during
- X the current connection.
- X
- X
- X
- X
- X 6.4 String Functions
- X
- X
- X
- X 6.4.1 %argv
- X
- X usage: %argv(int0)
- X
- X This function returns the string value of an argument passed to the
- X procedure by the 'do' command. Argument 0 is the name of the procedure
- X itself. The integer function %argc may be used to determine the number
- X of arguments passed to the procedure. Specifying an argument number
- X greater than the number of arguments passed returns a null string (if
- X procedure tracing is enabled with the 'ptrace' comand, a warning will be
- X displayed in this case).
- X
- X Example:
- 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
- X
- X NOTE: the interactive dial command, the dialing directory menu and the
- X initial setup menu all can automatically execute a procedure which
- X matches a dialed logical telephone number. There two arguments passed
- X to these procedures, %argv(0) being the procedure name as always.
- X %argv(1) is set according to the following table:
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 73
- X
- X
- X
- X invoker %argv(1)
- X ------------------- -------------
- X initial setup menu !INITIAL
- X interactive dial !INTERACTIVE
- X dialing menu !MENU
- X
- X Thus it is possible for the invoked procedure to determine that it has
- X been automatically executed by testing %argv(1) for an exclamation
- X point, or possibly the entire argument.
- X
- X
- X 6.4.2 %cgetc
- X
- X usage: %cgetc
- X
- X This function reads one character from the console keyboard and returns
- X it. The character is not echoed.
- X
- X
- X 6.4.3 %cgets
- X
- X usage: %cgets
- X
- X This function reads a string from the console keyboard and returns it.
- X Each character is echoed as it is typed and the user's normal erase and
- X kill character is available to edit the input before terminating the
- X read with ENTER.
- X
- X
- X 6.4.4 %chr
- X
- X usage: %chr(int0)
- X
- X This function returns the character value whose ASCII value is supplied
- X in int0.
- X
- X
- X Example:
- X
- X set $s0 = %chr(4) places a ^D (EOT) character into $s0
- X
- X
- X
- X 6.4.5 %date
- X
- X usage: %date
- X
- X This function returns the current date in the form 'mm-dd-yyyy' in the
- X local time zone (daylight time if it applies).
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 74
- X
- X
- X
- X 6.4.6 %datez
- X
- X usage: %datez
- X
- X This function returns the current date in the form 'mm-dd-yyyy' in the
- X UTC (Z) time zone.
- X
- X
- X 6.4.7 %day
- X
- X usage: %day
- X
- X This function returns the current day of the week as a three character
- X abbreviation: 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' in the
- X local time zone (daylight time if it applies).
- X
- X
- X 6.4.8 %dayz
- X
- X usage: %dayz
- X
- X This function returns the current day of the week as a three character
- X abbreviation: 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' in the UTC
- X (Z) time zone.
- X
- X
- X 6.4.9 %dir
- X
- X usage: %dir
- X
- X This function returns the full pathname of the current working
- X directory.
- X
- X
- X 6.4.10 %edate
- X
- X usage: %edate(int0)
- X
- X The value in int0 is expected to be a number of seconds since January 1,
- X 1970 00:00 UTC (Universal Coordinated Time) as returned by the integer
- X functions %fatime and %fmtime. This function converts the value into a
- X string representing the equivalent local time in the form 'mm-dd-yyyy
- X hh:mm:ss'.
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 75
- X
- X
- X
- X Example:
- X
- X set $i0=%fmtime('/xenix')
- X $i00 = 601178971 (0x23d5435b,04365241533)
- X
- X set $s0=%edate($i0)
- X $s00 = '01-18-1989 21:09:31'
- X
- X
- X
- X 6.4.11 %envvar
- X
- X usage: %envvar()
- X
- X This function returns the string value of an environment variable.
- X
- X
- X Example:
- X
- X set $s0=%envvar('HOME') might set $s0 '/usr/user'
- X
- X Typical 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
- X
- X
- X 6.4.12 %errstr
- X
- X usage: %errstr(int0)
- X
- X This function returns the system error message, given int0 as an errno
- X as returned by a file-related command. fopen.
- X
- X
- X Example:
- X
- X echo %errstr(1)
- X Not owner
- X
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 76
- X
- X
- X
- X 6.4.13 %etime
- X
- X usage: %etime(int0)
- X
- X This function returns a string representation of elapsed time in the
- X format 'hh:mm:ss' for the integer parameter int0, a number of seconds.
- X
- X
- X Example:
- X
- X echo %etime(62)
- X 00:01:02
- X
- X
- X
- X 6.4.14 %fmodestr
- X
- X usage: %fmodestr(int0)
- X
- X This function returns a string representation of the familiar file mode
- X string given the file mode integer int0.
- X
- X
- X Example:
- X
- X echo %fmodestr(0100755)
- X -rwxr-xr-x
- X
- X echo %fmodestr(%fmode('/usr/lib'))
- X drwxr-xr-x
- X
- X
- X
- X 6.4.15 %itos
- X
- X usage: %itos(int0[,format])
- X
- X This function converts integer int0 to a string, optionally controlling
- X the format of the conversion.
- X
- X If the format parameter is missing, the conversion is to a minimum
- X number of decimal characters necessary to hold the result.
- X
- X If the format parameter is present, it must of consist of a non-null
- X string made of one or both optional parts:
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 77
- X
- X
- X
- 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
- X Example:
- 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
- X
- X
- X 6.4.16 %left
- X
- X usage: %left(str0,int0)
- X
- X This function returns the leftmost int0 characters of str0. If the
- X length of the string is less than int0, the entire str0 is returned.
- X
- X Example:
- X
- X if $s0 == 'abcdefg'
- X %left($s0,3) returns 'abc'
- X
- X
- X
- X 6.4.17 %line
- X
- X usage: %line
- X
- X This function returns the name of the attached communications line in
- X the form "/dev/ttyxx". If no line is currently attached, the function
- X returns null.
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 78
- X
- X
- X
- X 6.4.18 %logname
- X
- X usage: %logname
- X
- X This function returns the login name of the user executing ECU. Note:
- X the name returned is the name supplied to a login prompt, not any
- X current su(C) username that may be in effect.
- X
- X
- X 6.4.19 %mid
- X
- X usage: %mid(str0,int0[,int1])
- X
- X This function returns the middle portion of a string str0 beginning with
- X the character at position int0 and for a length of int1 characters. If
- X int0 is greater than or equal to the length of stro, a null string is
- X returned. If the optional argument int1 is not supplied, or if the
- X length of the string is less than int1, the entire str0 is returned.
- X
- X Example:
- 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
- X
- X
- X 6.4.20 %month
- X
- X usage: %month
- X
- X This function returns the current month as a three character
- X abbreviation: 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug',
- X 'Sep', 'Oct', 'Nov', 'Dec'.
- X
- X
- X 6.4.21 %rdesc
- X
- X usage: %rdesc
- X
- X This function returns the description portion of the dialing directory
- X entry for the currently connected remote. If no connection exists, the
- X function returns null.
- X
- X
- X 6.4.22 %right
- X
- X usage: %right(str0,int0)
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 79
- X
- X
- X
- X This function returns the rightmost int0 characters of str0. If the
- X length of the string is less than int0, the entire str0 is returned.
- X
- X Example:
- X
- X if $s0 == 'abcdefg'
- X %right($s0,3) returns 'efg'
- X
- X
- X
- X 6.4.23 %rname
- X
- X usage: %rname
- X
- X This function returns the logical name portion of the dialing directory
- X entry for the currently connected remote. If the remote was dialed
- X directly, as in dial 5551212, the returned value is the phone number.
- X If no connection exists, the function returns null.
- X
- X The value returned by this command may be overridden by use of the rname
- X procedure command.
- X
- X
- X 6.4.24 %rtelno
- X usage: %rtelno
- X
- X This function returns the telephone number portion of the dialing
- X directory entry for the currently connected remote. If no connection
- X exists, the function returns null.
- X
- X
- X 6.4.25 %time
- X
- X usage: %time
- X
- X This function returns the current time in the form 'hh:mm' in the local
- X time zone (daylight time if it applies).
- X
- X
- X 6.4.26 %times
- X
- X usage: %times
- X
- X This function returns the current time in the form 'hh:mm:ss' in the
- X local time zone (daylight time if it applies).
- X
- X
- X 6.4.27 %timez
- X
- X usage: %timez
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 80
- X
- X
- X
- X This function returns the current time in the form 'hh:mm' in the UTC
- X (Z) time zone.
- X
- X
- X 6.4.28 %timezs
- X
- X usage: %timezs
- X
- X This function returns the current time in the form 'hh:mm:ss' in the UTC
- X (Z) time zone.
- X
- X
- X 6.4.29 %tty
- X
- X usage: %tty
- X
- X This function returns the console tty name in the form "/dev/ttynn".
- X
- X
- X
- X
- X 6.5 HoneyDanBer UUCP Interface
- X
- X
- X
- X 6.5.1 UUCP Control Files
- X
- X
- X 6.5.1.1 /usr/lib/uucp/Devices
- X
- X ECU reads this file to determine what tty devices are available for
- X outgoing calls. The fifth field of each entry must contain either the
- X full pathname of a modem dialer program (with leading slash) or the name
- X of an entry in the /usr/lib/uucp/Dialers file. Sysfiles support is not
- X yet provided. The Devices file must be named /usr/lib/uucp/Devices.
- X For more information, see "UUCP Dialers" and "Choosing a Dialout Line"
- X below.
- X
- X
- X 6.5.1.2 /usr/lib/uucp/Dialers
- X
- X Dialers entries may be specified in the Devices entry. Sysfiles support
- X is not yet provided. The Dialers file must be named
- X /usr/lib/uucp/Dialers.
- X
- X
- X 6.5.1.3 /usr/lib/uucp/Sysfiles
- X
- X Sysfiles support is not yet provided. The Devices and Dialers files
- X must have their default names.
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 81
- X
- X
- X
- X 6.5.1.4 /usr/lib/uucp/Systems
- X
- X No use is made of the Systems file at this time. ECU provides the
- X equivalent function with its dialing directory.
- X
- X
- X 6.5.2 Choosing a Dialout Line
- X
- X When using the interactive dial command, or when dialing from the
- X initial menu, if a logical or system name is specified, the directory
- X entry is fetched and examined. If the tty field specifies a value other
- X than "Any", the specific line requested is opened, if available, and
- X dialing commences. If the specified line is not available, the dial
- X attemptfails.
- X
- X If "Any" is found in the dialing directory entry, then ECU finds an
- X avaialable line which matches the baud rate specified in the entry. It
- X does so by reading the Dialers file.
- X
- X If a line matching the necessary baud rate is found (by searching
- X /etc/utmp) to be a line enabled for login, but which is currently idle,
- X the getty interface, described below, is used to acquire the line for
- X outgoing use.
- X
- X
- X 6.5.3 Getty Interface
- X
- X When an idle dialin (enabled) line is chosen for dialout, ECU makes use
- X of /usr/lib/ecu/ecuungetty to signal the line's getty to release the
- X line (via SIGUSR1). Ecuungetty is again employed to signal the getty to
- X reacquire the line when outgoing communication is complete (via
- X SIGUSR2).
- X
- X Ecuungetty is a privileged program, which must be owned by root and have
- X the setuid-on-execute bit set. A encrypted id is passed by ecu to
- X ecuungetty to validate requests and to prevent abuse of ecuungetty by
- X hackers, malcontents and other twentieth-century phenomena.
- X
- X
- X 6.5.4 UUCP Dialer Programs
- X
- X If the Devices file can be found in /usr/lib/uucp, and a valid entry for
- X the attached line can be found, ECU will use the Dialers script or
- X dialer program specified in the Devices entry.
- X
- X Sample enhanced modem dialer program sources may be found in the uucp
- X subdirectory of the distribution.
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 82
- X
- X
- X
- X 7. Technical Notes
- X
- X
- X ECU is written in Microsoft/SCO XENIX System V C. Full use is made of
- X function prototyping for ECU functions and external library functions.
- X The source consists of 32,000 lines of source files (731000 bytes) and
- X 2500 lines of header files (73000 bytes). The output of "size" for a
- X -M3 version (actaul information may be obsolete):
- X
- X
- X text data bss dec hex
- X 140940 + 34068 + 61852 = 236860 = 0x39d3c
- 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
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X ECU Technical Description 83
- X
- X
- X
- X 8. Revision Numbers
- X
- X ECU revision numbers are defined as follows:
- X
- X pppp#.##-#86x
- X ^ ^ ^ ^ ^
- X | | | | `----- 's' if XENIX select(S) in use, 'n' if not
- X | | | `-------- '2' for 286, '3' for 386
- X | | `----------- patch level
- X | `------------- major revision
- X `---------------- package ('unet' for this release)
- 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
- X
- X
- X
- X
- X
- X
- X
- X Public Domain by wht@n4hgf 5/7/90
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X CONTENTS
- X
- X
- X 1. Introduction........................................ 2
- X
- X 2. Basic Organization.................................. 3
- X 2.1 Transmitter Process (XMTR).................... 3
- X 2.1.1 Keyboard Interface.................... 3
- X 2.1.2 ECU Command Assembly.................. 3
- X 2.1.3 Function Key Mapping.................. 4
- X 2.1.4 Auxiliary Operation Control........... 4
- X 2.2 Receiver Process (RCVR)....................... 5
- X 2.2.1 ANSI Filter........................... 5
- X 2.2.2 Session Logging....................... 5
- X
- X 3. Features............................................ 6
- X 3.1 Line Editing.................................. 6
- X 3.2 Interactive Command History................... 6
- X 3.3 Dialing Directory............................. 6
- X 3.4 Online Command Dictionary..................... 6
- X 3.5 Multiscreen Event Alarm....................... 7
- X 3.6 Function Key Mapping.......................... 7
- X 3.7 Built-in Modem Dialer......................... 8
- X 3.8 File Transfer................................. 9
- X 3.9 Procedures (Scripts).......................... 10
- X 3.10 Initial (Startup) Procedure................... 10
- X 3.11 Home Directory Files.......................... 10
- X 3.12 Lock Files.................................... 10
- X 3.13 Dial-In/Dial-Out Line Support................. 10
- X 3.14 Tools......................................... 11
- X 3.15 Shared Memory 'Friend' Interface.............. 11
- X
- X 4. Starting the Program................................ 12
- X 4.1 Simple Startup - Initial Setup Menu........... 12
- X 4.1.1 Name/Phone Number Field............... 12
- X 4.1.2 Other Fields.......................... 13
- X 4.1.3 Special Characters.................... 13
- X 4.2 Command Line Arguments and Switches........... 14
- X 4.2.1 -l.................................... 14
- X 4.2.2 -f.................................... 14
- X 4.2.3 -e, -o................................ 14
- X 4.2.4 -p <procname>......................... 15
- X 4.2.5 -d.................................... 15
- X 4.2.6 -t.................................... 15
- X 4.3 Environment Variables......................... 15
- X 4.3.1 ECUPROMPT............................. 15
- X 4.3.2 ECUHELP............................... 16
- X
- X 5. Interactive Mode Commands........................... 17
- X 5.1 AX : ascii char to hex/oct/dec................ 17
- X 5.2 BAud : set/display line baud rate............. 17
- X
- X
- X
- X - i -
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X 5.3 BN : all console event alarm.................. 17
- X 5.4 BReak : send break to remote.................. 18
- X 5.5 CD : change current directory................. 18
- X 5.6 DA : decimal to ascii char.................... 18
- X 5.7 Dial : dial remote destination................ 19
- X 5.8 DO : perform procedure........................ 19
- X 5.9 DUplex : set/display duplex................... 20
- X 5.10 EXit : drop carrier, exit program............. 20
- X 5.11 FI : send text file to line................... 20
- X 5.12 FKey : function key definition................ 21
- X 5.13 HAngup : hang up modem........................ 22
- X 5.14 HElp : invoke help............................ 22
- X 5.15 LLp : set session log to /dev/lp.............. 22
- X 5.16 LOFf : turn off session logging............... 23
- X 5.17 LOG : session logging control................. 23
- X 5.18 NL : display CR/LF mapping.................... 23
- X 5.19 NLIn : set receive CR/LF mapping.............. 23
- X 5.20 NLOut : set transmit CR/LF mapping............ 24
- X 5.21 OA : octal to ascii char...................... 24
- X 5.22 PARity : set/display line parity.............. 24
- X 5.23 PId : display process ids..................... 25
- X 5.24 PLog : procedure logging...................... 25
- X 5.25 PTrace : control procedure trace.............. 25
- X 5.26 PWd : print working directory................. 25
- X 5.27 REDial : redial last number................... 25
- X 5.28 REV : ECU revision/make date.................. 26
- X 5.29 RK : receive via C-Kermit..................... 26
- X 5.30 RS : receive via SEAlink...................... 26
- X 5.31 RTScts : control RTS/CTS flow control......... 26
- X 5.32 RX : receive via XMODEM/CRC................... 27
- X 5.33 RY : receive via YMODEM Batch................. 27
- X 5.34 RZ : receive via ZMODEM/CRC32................. 27
- X 5.35 SDNAME : select screen dump file name......... 27
- X 5.36 SK : send via C-Kermit........................ 28
- X 5.37 SS : send via SEAlink......................... 28
- X 5.38 STat : connection status...................... 29
- X 5.39 SX : send via XMODEM/CRC...................... 29
- X 5.40 SY : send via YMODEM Batch.................... 30
- X 5.41 SZ : send via ZMODEM/CRC32.................... 30
- X 5.42 TIme : time of day............................ 31
- X 5.43 TTy : console tty name........................ 31
- X 5.44 XA : hex to ascii char........................ 31
- X 5.45 ! : execute shell............................. 32
- X
- X 6. Procedure Language.................................. 33
- X 6.1 Arguments..................................... 33
- X 6.1.1 Switches.............................. 33
- X 6.1.2 Alphabetic Tokens..................... 33
- X 6.1.3 Integers.............................. 33
- X 6.1.3.1 Constants 34
- X 6.1.3.2 Variables 34
- X
- X
- X
- X - ii -
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X 6.1.3.3 Functions 34
- X 6.1.3.4 Expressions 34
- X 6.1.3.5 Relational Operators 35
- X 6.1.4 Strings............................... 35
- X 6.1.4.1 Constants 35
- X 6.1.4.2 Variables 35
- X 6.1.4.3 Functions 36
- X 6.1.4.4 Expressions 36
- X 6.1.4.5 Relational Operators 36
- X 6.2 Commands...................................... 36
- X 6.2.1 baud.................................. 36
- X 6.2.2 break................................. 36
- X 6.2.3 cd.................................... 37
- X 6.2.4 clrx.................................. 37
- X 6.2.5 cls................................... 37
- X 6.2.6 color................................. 38
- X 6.2.7 continue.............................. 38
- X 6.2.8 cursor................................ 39
- X 6.2.9 delline............................... 40
- X 6.2.10 dial.................................. 40
- X 6.2.11 do.................................... 41
- X 6.2.12 duplex................................ 41
- X 6.2.13 echo.................................. 42
- X 6.2.14 eeol.................................. 42
- X 6.2.15 else.................................. 42
- X 6.2.16 exit.................................. 44
- X 6.2.17 expresp............................... 45
- X 6.2.18 fchmod................................ 45
- X 6.2.19 fclose................................ 46
- X 6.2.20 fdel.................................. 46
- X 6.2.21 fgetc................................. 47
- X 6.2.22 fgets................................. 47
- X 6.2.23 fkey.................................. 47
- X 6.2.24 flush................................. 48
- X 6.2.25 fopen................................. 48
- X 6.2.26 fputc................................. 49
- X 6.2.27 fputs................................. 49
- X 6.2.28 fseek................................. 49
- X 6.2.29 getf.................................. 50
- X 6.2.30 goto.................................. 50
- X 6.2.31 gotob................................. 50
- X 6.2.32 hangup................................ 50
- X 6.2.33 hexdump............................... 51
- X 6.2.34 home.................................. 51
- X 6.2.35 icolor................................ 52
- X 6.2.36 ifi................................... 52
- X 6.2.37 ifs................................... 52
- X 6.2.38 lbreak................................ 53
- X 6.2.39 lgets................................. 53
- X 6.2.40 insline............................... 53
- X 6.2.41 logevent.............................. 53
- X
- X
- X
- X - iii -
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X 6.2.42 lookfor............................... 54
- X 6.2.43 mkvar................................. 54
- X 6.2.44 nap................................... 55
- X 6.2.45 parity................................ 55
- X 6.2.46 pclose................................ 56
- X 6.2.47 plog.................................. 56
- X 6.2.48 popen................................. 56
- X 6.2.49 prompt................................ 57
- X 6.2.50 ptrace................................ 57
- X 6.2.51 putf.................................. 58
- X 6.2.52 return................................ 58
- X 6.2.53 rk.................................... 58
- X 6.2.54 rname................................. 58
- X 6.2.55 rs.................................... 58
- X 6.2.56 rx.................................... 59
- X 6.2.57 ry.................................... 59
- X 6.2.58 rz.................................... 59
- X 6.2.59 scrdump............................... 59
- X 6.2.60 send.................................. 59
- X 6.2.61 set................................... 60
- X 6.2.62 sk.................................... 60
- X 6.2.63 ss.................................... 60
- X 6.2.64 sx.................................... 61
- X 6.2.65 sy.................................... 61
- X 6.2.66 system................................ 62
- X 6.2.67 sz.................................... 62
- X 6.2.68 vidcolor.............................. 62
- X 6.2.69 vidnorm............................... 63
- X 6.2.70 vidrev................................ 63
- X 6.2.71 whilei................................ 63
- X 6.2.72 whiles................................ 64
- X 6.3 Integer Functions............................. 64
- X 6.3.1 %argc................................. 64
- X 6.3.2 %baud................................. 64
- X 6.3.3 %colors............................... 65
- X 6.3.4 %conn................................. 66
- X 6.3.5 %curx................................. 66
- X 6.3.6 %cury................................. 66
- X 6.3.7 %csec................................. 66
- X 6.3.8 %ctoi................................. 66
- X 6.3.9 %fatime............................... 67
- X 6.3.10 %fmode................................ 67
- X 6.3.11 %fmtime............................... 67
- X 6.3.12 %fmode................................ 68
- X 6.3.13 %ftell................................ 68
- X 6.3.14 %instr................................ 68
- X 6.3.15 %ischr................................ 69
- X 6.3.16 %isdir................................ 69
- X 6.3.17 %isreg................................ 70
- X 6.3.18 %len.................................. 70
- X 6.3.19 %lgetc................................ 71
- X
- X
- X
- X - iv -
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X 6.3.20 %pid.................................. 71
- X 6.3.21 %match................................ 71
- X 6.3.22 %mhack................................ 71
- X 6.3.23 %rchr................................. 72
- X 6.3.24 %rchrc................................ 72
- X 6.3.25 %shmid................................ 72
- X 6.3.26 %stoi................................. 72
- X 6.3.27 %xchr................................. 72
- X 6.3.28 %xchrc................................ 73
- X 6.4 String Functions.............................. 73
- X 6.4.1 %argv................................. 73
- X 6.4.2 %cgetc................................ 74
- X 6.4.3 %cgets................................ 74
- X 6.4.4 %chr.................................. 74
- X 6.4.5 %date................................. 74
- X 6.4.6 %datez................................ 75
- X 6.4.7 %day.................................. 75
- X 6.4.8 %dayz................................. 75
- X 6.4.9 %dir.................................. 75
- X 6.4.10 %edate................................ 75
- X 6.4.11 %envvar............................... 76
- X 6.4.12 %errstr............................... 76
- X 6.4.13 %etime................................ 77
- X 6.4.14 %fmodestr............................. 77
- X 6.4.15 %itos................................. 77
- X 6.4.16 %left................................. 78
- X 6.4.17 %line................................. 78
- X 6.4.18 %logname.............................. 79
- X 6.4.19 %mid.................................. 79
- X 6.4.20 %month................................ 79
- X 6.4.21 %rdesc................................ 79
- X 6.4.22 %right................................ 79
- X 6.4.23 %rname................................ 80
- X 6.4.24 %rtelno............................... 80
- X 6.4.25 %time................................. 80
- X 6.4.26 %times................................ 80
- X 6.4.27 %timez................................ 80
- X 6.4.28 %timezs............................... 81
- X 6.4.29 %tty.................................. 81
- X 6.5 HoneyDanBer UUCP Interface.................... 81
- X 6.5.1 UUCP Control Files.................... 81
- X 6.5.1.1 /usr/lib/uucp/Devices 81
- X 6.5.1.2 /usr/lib/uucp/Dialers 81
- X 6.5.1.3 /usr/lib/uucp/Sysfiles 81
- X 6.5.1.4 /usr/lib/uucp/Systems 82
- X 6.5.2 Choosing a Dialout Line............... 82
- X 6.5.3 Getty Interface....................... 82
- X 6.5.4 UUCP Dialer Programs.................. 82
- X
- X 7. Technical Notes..................................... 83
- X
- X
- X
- X
- X - v -
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X 8. Revision Numbers.................................... 84
- 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
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X
- X - vi -
- X
- X
- X
- X
- SHAR_EOF
- echo "File doc/ecu.man is complete" &&
- $TOUCH -am 0508000190 doc/ecu.man &&
- chmod 0644 doc/ecu.man ||
- echo "restore of doc/ecu.man failed"
- set `wc -c doc/ecu.man`;Wc_c=$1
- if test "$Wc_c" != "143012"; then
- echo original size 143012, current size $Wc_c
- fi
- rm -f @shar_seq_.tmp
- echo "You have unpacked the last part"
- exit 0
-
-