home *** CD-ROM | disk | FTP | other *** search
- From: wht@n4hgf.atl.ga.us (Warren Tucker)
- Newsgroups: comp.sources.misc
- Subject: v42i108: ecu - ECU Asynchronous Communications v3.30, Part10/37
- Date: 23 May 1994 14:22:49 -0500
- Organization: Sterling Software
- Sender: kent@sparky.sterling.com
- Approved: kent@sparky.sterling.com
- Message-ID: <2rqvq9$dm0@sparky.sterling.com>
- X-Md4-Signature: 445a21b90804e7d87692032459fd6faf
-
- Submitted-by: wht@n4hgf.atl.ga.us (Warren Tucker)
- Posting-number: Volume 42, Issue 108
- Archive-name: ecu/part10
- Environment: SCO,SCOXENIX,MOTOROLA,HP-UX,LINUX,NetBSD,SUNOS,SYSVR4,SOLARIS2
- Supersedes: ecu: Volume 32, Issue 36-75
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # Contents: ecu330/doc/_features.txt ecu330/proc.c
- # Wrapped by kent@sparky on Mon May 23 13:40:50 1994
- PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 10 (of 37)."'
- if test -f 'ecu330/doc/_features.txt' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/doc/_features.txt'\"
- else
- echo shar: Extracting \"'ecu330/doc/_features.txt'\" \(41249 characters\)
- sed "s/^X//" >'ecu330/doc/_features.txt' <<'END_OF_FILE'
- X.*s 1 "Features"
- X.*s 2 "Supported Terminals"
- X
- XECU supports many terminals with geometries between 20 and 43
- Xlines, inclusive. The column width must be 80.
- XThe termcap entry for a console (user tty rather than the line)
- XMUST contain a valid entry for the database entries listed below.
- X
- XECU does not attempt to support terminal emulation in the classic
- Xsense of the word. It presents to the remote host an "ANSI-like"
- Xterminal type as described earlier in the introduction and in
- Xthe section titled "ANSI Filter."
- XHowever, it does support, with limitations, any LOCAL terminal
- X(console) for which a valid termcap description exists. You MAY
- Xbe able to use ECU with a remote terminal (calling into UNIX/XENIX
- Xover a network or modem), but you may get unfavorable results with
- Xfunction key usage if your modem is a "packetizing" type, such as
- Xa Telebit or if ethernet or other networking chops up your keystroke
- Xsequences. ECU allows approximately 100 milliseconds after receiving
- Xan ASCII ESC character for later characters of a function key sequence
- Xto arrive. If at least one character of the sequence has not been
- Xreceived in that time, ECU treats the key as an ESCape, not a function key.
- XThis typical problem of detecting ESC vs. function key is unfortunate, but
- Xwe must live with it until paradigms change (say, in about 2010?).
- X
- XThe termcap entry for a console
- XMUST contain a valid entry for the following database entries:
- X
- X.DS L
- Xcl clear screen
- Xkl cursor left
- Xkr cursor right
- Xdc delete character
- Xdl delete line
- Xcd clear to end of display
- Xce clear to end of line
- Xic insert character
- Xal insert line ("add" a "line")
- Xcm cursor motion
- Xso stand out (terminal specific attention getter)
- Xse stand end
- X.DE
- X
- XThe above sequences MUST be present, valid and reasonably
- Xefficient. ECU does not use curses during it's primary mode of
- Xoperation (keyboard send-receive). Unlike curses, ECU makes no
- Xattempt to emulate missing terminal functionality. Failure to
- Xprovide valid entries will result in strange behavior with no
- Xwarning.
- X
- XNote that the formal termcap description of "kl" and "kr"
- Xstate these are sequences generated by the terminal
- X.B keyboard ,
- Xbut ECU expects that these sequences also cause the desired
- Xeffects when
- X.B sent
- Xto the
- X.B screen .
- X
- XAdditionally, the following, optional, sequences will be used if
- Xthey are detected.
- X
- X.DS L
- Xmb bold on ("XENIX" extension)
- Xme bold off ("XENIX" extension)
- Xus underscrore on
- Xue underscrore off
- Xvb visual bell
- X.DE
- X
- XOn SCO, termcap terminal contrtol is used. Other
- Xversions use terminfo.
- XA future SCO version of ECU may use terminfo instead of termcap.
- XProblems with terminfo prevent its use at the present time.
- XIn addition, early versions of XENIX do not support terminfo.
- X
- XOn SCO multiscreens, SCO "extensions" to "ANSI" are supported
- Xas described below in "Multiscreen Local Terminals."
- X
- X.*s 2 "Host Video Control Sequences"
- X
- X.*s 3 "All Local Consoles (Terminals)"
- X
- XThe following sequences are
- Xproperly interpreted by ECU for all local terminal types
- X(multiscreen, rlogin/xterm pseudotty, serial).
- X
- X.DS L
- XSequence | Description
- X----------+-------------------------------
- XESC 7 | VT-100 save cursor position
- XESC 8 | VT-100 restore cursor position
- XESC [ @ | ICH
- XESC [ A | CUU
- XESC [ B | CUD
- XESC [ C | CUF
- XESC [ D | CUB
- XESC [ E | CNL See ANSI X3.64,
- XESC [ F | CPL screen(HW) and/or
- XESC [ H | CUP MS-DOS Technical
- XESC [ J | ED Reference Manual
- XESC [ K | EL
- XESC [ L | IL
- XESC [ M | DL
- XESC [ P | DCH
- XESC [ S | SU
- XESC [ T | SD
- XESC [ X | ECH
- XESC [ ` | HPA
- XESC [ a | HPR
- XESC [ d | VPA
- XESC [ e | VPR
- XESC [ f | HVP
- XESC [ ? m | SGR
- XESC [ n | DSR
- XESC [ s | save cursor MS-DOSism
- XESC [ u | restore cursor MS-DOSism
- X.DE
- X.DS L
- XSGR Sequences for ALL TERMINALS
- XSequence | Description | Maps to termcap
- X----------+---------------+-------------------------------
- XESC [ 0 m | normal | "se"+"me"+"ue"
- XESC [ 1 m | bold | "so"
- XESC [ 4 m | underscore | "us"
- XESC [ 5 m | blink | "mb" (XENIX extension)
- XESC [ 7 m | reverse video | "so"
- X.DE
- X
- X.DS L
- XDSR Sequences for ALL TERMINALS
- XSequence | Description | responds with
- X----------+---------------+-------------------------------
- XESC [ 0 n | ignored |
- XESC [ n | see ESC[5n | ESC [ 0 n
- XESC [ 5 n | sanity test | ESC [ 0 n
- XESC [ 6 n | report cusror | ESC [ r ; c R
- X | (CPR) | r is row 1-n
- X | | c is column 1-n
- X.DE
- XThe latter two DSR sequences are compatible with X11's xterm.
- XThe latter makes ECU compatible with the xterm companion program ``resize''.
- XFor example, if ECU "sees" ESC [ 6 n, and the screen cursor is at the
- Xhome position, ECU responds with:
- X
- XESC [ 1 ; 1 R ( hex 1B 5B 31 3B 31 52 )
- X
- X.*s 3 "Multiscreen Local Terminals"
- X
- XIn addition to the above, if you are operating from an SCO color
- Xmultiscreen, additional (SCO and MS-DOS/ANSI.SYS) sequences
- Xare supported (see screen(HW)):
- X
- X.DS L
- XAdditional Multiscreen SGR Sequences
- XSequence | Description (no termcap mapping)
- X------------+-----------------------------------------------
- XESC [ 8 m | non-display
- XESC [ 1 0 m | select primary font
- XESC [ 1 1 m | select first alternate font (0x00-0x1F)
- XESC [ 1 2 m | select second alternate font (0x80-0xFF)
- XESC [ 3 0 m | black foreground
- XESC [ 3 1 m | red foreground
- XESC [ 3 2 m | green foreground
- XESC [ 3 3 m | brown foreground
- XESC [ 3 4 m | blue foreground
- XESC [ 3 5 m | magenta foreground
- XESC [ 3 6 m | cyan foreground
- XESC [ 3 7 m | white foreground
- XESC [ 3 8 m | enables underline option
- XESC [ 3 9 m | disables underline option
- XESC [ 4 0 m | black background
- XESC [ 4 1 m | red background
- XESC [ 4 2 m | green background
- XESC [ 4 3 m | brown background
- XESC [ 4 4 m | blue background
- XESC [ 4 5 m | magenta background
- XESC [ 4 6 m | cyan background
- XESC [ 4 7 m | white background
- X.DE
- X
- X.s 3 "MS-DOS 'SGR Gaggles'"
- X
- XECU also does it's best to interpret MS-DOS "SGR gaggles" such as
- X.DS I
- XESC [ 5 ; 3 4 ; 4 7 m
- X.DE
- Xwhich means "set the terminal to white background with
- Xblue blinking foreground."
- X
- X.*s 3 "Character Mapping"
- X
- XMost versions of ECU running on an AT style machine attempt to
- Xuse the ruling characters in the video display adapter's ROM
- Xper:
- X.DS L
- XMapped Characters (see pc_scr.h):
- XHex | Description
- X-----+---------------------------
- X0xDA | top left single rule
- X0xBF | top right single rule
- X0xC0 | bottom left single rule
- X0xD9 | bottom right single rule
- X0xC3 | left hand T
- X0xB4 | right hand T
- X0xB3 | vertical rule
- X0xC4 | horizontal rule
- X.DE
- XOn non-AT machines (or in such environments as X11), the PC ROM
- Xsingle ruling characters from the following table are mapped
- Xafter the fashion of:
- X.DS L
- X .-----+--------.
- X | | |
- X | +--------+
- X | | |
- X +-----+ |
- X | | |
- X `-----+--------'
- X.DE
- X
- X(Due to laziness on the part of the author, double
- Xruling characters will appear as random druk, unless your terminal
- Xhas joined the Church of the True-Blue ROM.
- XOne day an X version of this program may appear and you can choose
- Xto no longer accomplish real work, but may spend your days editing
- X42Kb resource files which will give you TAC, Total Anal Control,
- Xover all this.)
- X
- X.*s 2 "Function Key Mapping (Recognition)"
- X
- X(This section reflects the changes in keyboard management made
- Xin version 3.20.)
- X
- XECU recognizes 23 function keys as having special significance
- Xto its operation.
- XThey are:
- X.DS I
- XName Description
- X-------- ------------
- XF1 F1
- XF2 F2
- XF3 F3
- XF4 F4
- XF5 F5
- XF6 F6
- XF7 F7
- XF8 F8
- XF9 F9
- XF10 F10
- XF11 F11
- XF12 F12
- XHome Home
- XEnd End
- XPgUp Page up
- XPgDn Page down
- XCUU Up arrow
- XCUD Down arrow
- XCUL Left arrow
- XCUR Right arrow
- XCU5 "Cursor 5"
- XIns Insert
- XBkTab Back Tab
- X.DE
- X
- XECU matches a function key sequence
- Xto an internal function key representation
- Xby testing all keystroke sequences against an internal table loaded
- Xat the beginning of execution from the file ~/.ecu/funckeymap.
- XA default funckeymap file placed in the ECU library directory
- X(normally /usr/local/lib/ecu) by the software installation process.
- XIf there is no funckeys in the user's home directory, the default
- Xfile is used.
- X
- XNOTE that supported terminals MUST employ function keys which generate
- Xsequences less than 32 characters in length.
- X
- XX11 xterms and X terminals usually require special attention
- Xwith VT100.Translations overrides. Sometimes an xmodmap must also be
- Xemployed. Experimentation is the best teacher, but the supplied
- Xfunckeymap file and various READMEs offer some hints. In particular,
- XREADME.KEYBRD contains information that is kept current.
- X
- XSeveral predefined entries are supplied with the program distribution
- Xin models/funckeymap.
- XIf you have a terminal or console with a keyboard not already
- Xin this file, you must construct one using the terminal's reference
- Xmanual or by direct discovery (typing the key and empricially noting
- Xits generated sequence).
- XThe program kbdtest3 (the source is provided in the distribution) can
- Xassist you in building funckeymap entries.
- Xcertain keys are pressed. kbdtest.c is a more primitive version of
- Xthe same program.
- X
- XNormally, the TERM environment variable is used to determine
- Xthe funckeymap entry to be used. Sometimes, the TERM variable
- Xis not adequate for identifying your keyboard arrangement. For
- Xinstance, suppose you use an xterm on the console at times and
- Xan X terminal at other times. The choice of function keys
- Xand the character sequences they emit are not likely to match.
- XRather than make herculean efforts with xmodmap and translations,
- Xyou can define two different funckeymap entries, say "xterm-sco"
- Xand "xterm-ncd".
- XThe environment variable ECUFUNCKEY, if found, overrides the
- XTERM variable for funckeymap keyboard management only.
- XTERM is always used for identifying the display.
- XThus, you can set TERM to "xterm" and ECUFUNCKEY to "xterm-sco"
- XOR "xterm-ncd".
- XAlso, the -F command line switch may be used (which overrides $ECUFUNCKEY).
- X
- XThe format of an file entry is shown below.
- XLines beginning with '#' are comments.
- X
- X.DS I
- X#+------------------------------
- X# SCO
- X#-------------------------------
- Xansi
- Xansi43
- Xsco
- X F1:F1: esc [ M
- X F2:F2: esc [ N
- X F3:F3: esc [ O
- X F4:F4: esc [ P
- X F5:F5: esc [ Q
- X F6:F6: esc [ R
- X F7:F7: esc [ S
- X F8:F8: esc [ T
- X F9:F9: esc [ U
- X F10:F10: esc [ V
- X F11:F11: esc [ W
- X F12:F12: esc [ X
- X Home:Home: esc [ H
- X End:End: esc [ F
- X PgUp:PgUp: esc [ I
- X PgDn:PgDn: esc [ G
- X CUU:CUU: esc [ A
- X CUL:CUL: esc [ D
- X CU5:CU5: esc [ E
- X CUR:CUR: esc [ C
- X CUD:CUD: esc [ B
- X Ins:Ins: esc [ L
- X BkTab:BackTab: esc [ Z
- X.DE
- X
- XThe first line(s) in a terminal keyboard description begin in
- Xcolumn 1 and contain the terminal types (a la $TERM) for which
- Xthe keyboard description are valid. The example entry contains
- Xseveral references to terminal types containing the substring
- X'ansi'. These are included only as an example of one keyboard
- Xdescription servicing multiple terminal types.
- X
- XFollowing the "first lines" are key definition entries, each
- Xpreceded by at least one tab or space. Each entry is composed of
- Xthree fields delimited by commas. The first field of an entry is
- Xthe internal ECU function key name and must be chosen from the
- Xfollowing strings (with no regard to case): "F1", "F2", "F3",
- X"F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "Home",
- X"End", "PgUp", "PgDn", "CUU" (cursor up), "CUL" (cursor left),
- X"CU5" (unshifted cursor pad 5), "CUR" (cursor right) and "CUD"
- X(cursor down). The
- Xsecond field contains the name of the key as it appears on the
- Xkeyboard (such as "F16" for End on the Wyse 60). The
- Xthird field is a description of the character sequence generated
- Xby the keyboard when the chosen key is pressed; it is a
- Xstring of one or more tokens separated by spaces or tabs.
- X
- XIn addition, function key sequences may not
- Xexceed 31 characters in length.
- X
- XPLEASE NOTE: ECU does not have a reasonable way for you to terminate it
- Xif there are no Home and End keys defined, so it refuses to proceed
- Xif no definitions are found. Even so, if you have incorrect definitions,
- Xyou may not be able to get out of ECU without a kill -1 <pid> from
- Xanother terminal or hanging up your connection with UNIX/XENIX
- Xif using ECU from remote.
- X
- X.*s 2 "Function Key Actions"
- X
- XThis section deals with how ECU behaves
- Xonce a function key has been recognized as having been entered
- Xat the keyboard.
- X
- X.*s 3 "Standard Function Keys"
- X
- XAll function keys with the exception of the
- X.B Home ,
- X.B BkTab
- X(shift TAB),
- Xand keypad unshifted 5 key can be programmed to
- Xeither
- X.DS L
- X transmit preselected character sequences or
- X execute a procedure with arguments.
- X.DE
- X
- XThe default values for these sequences is shown below.
- X
- X.DS L
- XIdentifier Description Default Sequence
- X-------- ------------ ----------------
- XF1 F1 ESC [ M
- XF2 F2 ESC [ N
- XF3 F3 ESC [ O
- XF4 F4 ESC [ P
- XF5 F5 ESC [ Q
- XF6 F6 ESC [ R
- XF7 F7 ESC [ S
- XF8 F8 ESC [ T
- XF9 F9 ESC [ U
- XF10 F10 ESC [ V
- XF11 F11 ESC [ W
- XF12 F12 ESC [ X
- XHome Home <-- intercepted (not an input key)
- XEnd End ESC [ F
- XPgUp Page up ESC [ I
- XPgDn Page down ESC [ G
- XCUU Up arrow ESC [ A
- XCUD Down arrow ESC [ B
- XCUL Left arrow ESC [ D
- XCUR Right arrow ESC [ C
- XCU5 "Cursor 5" <-- intercepted (not an input key)
- XIns Insert ESC [ L
- X.DE
- X
- XThis results in the following interactive "fkey" command display:
- X.DS L
- X F1 SCO F1 F2 SCO F2 Home ecu cmd PgUp SCO PgUp
- X F3 SCO F3 F4 SCO F4 End SCO End PgDn SCO PgDn
- X F5 SCO F5 F6 SCO F6 Ins local shell CUR5 screen dump
- X F7 SCO F7 F8 SCO F8 BkTab redisplay
- X F9 SCO F9 F10 SCO F10 CUR^ SCO CUU CUR> SCO CUR
- X F11 SCO F11 F12 SCO F12 CUR< SCO CUL CURv SCO CUD
- X.DE
- X
- XYou may override the default setting by using the interactive or
- Xprocedure command "fkey" to specify a new keyset definition
- Xfrom ~/.ecu/keys.
- X
- XFunction keyset definitions are appended one after another
- Xto ~/.ecu/keys. The keyset name appears on a line by itself
- Xand the choices making up a set appear on subsequent lines
- Xof a special format.
- X
- XA keyset is loaded explicitly using "fkey" and implicitly when
- Xconnecting to a remote system and a keyset name matches
- Xthe dialing directory entry name.
- X
- XConsider the example:
- X
- X.DS L
- Xstratus
- X F1:F1:esc O q
- X F2:F2:esc O r
- X F3:F3:esc O s
- X F4:F4:esc O t
- X F5:F5:esc O u
- X F6:F6:esc O v
- X F7:F7:esc O w
- X F8:procex:proc dowork /tmp
- X F9:no status:nl
- X F10:redisp:esc O y
- X F11:redisp:syn
- X PGDN:cancel:esc O Q
- X END:enter:esc O M
- X PGUP:dispform:esc O R
- X CUU:^:dle
- X CUD:v:so
- X CUL:<:stx
- X CUR:>:ack
- X.DE
- X
- XThe key definition lines are made up of three fields. In addition,
- Xthere must be a blank or a space in the first column of the line.
- XThe first field is the ECU key identifier from the table above.
- XThe second field is a 12-character max string to display when
- Xthe display option of the fkey command is used.
- XThe last field is a either a character sequence to be transmitted
- Xor a procedure to be invoked when the key is pressed.
- X
- XThe resulting fkey display for the stratus example looks similar to:
- X
- X.DS L
- X F1 F1 F2 F2 Home ecu cmd PgUp dispform
- X F3 F3 F4 F4 End enter PgDn cancel
- X F5 F5 F6 F6 Ins local shell CUR5 Screen dump
- X F7 status F8 procex BkTab restore receiver display
- X F9 F10 redisp CUR^ ^ CUR> >
- X F11 F12 CUR< < CURv v
- X.DE
- X
- XPressing F1, causes the three characters ESC, 'O' and 'q' to be
- Xtransmitted.
- X
- XPressing F8 causes the procedure ``procex'' to be executed with the
- Xargument ``/tmp''. The maximum length of the procedure name,
- Xarguments and whitespace must be less than 64 characters; any
- Xexcess is silently discarded.
- X
- X.*s 3 "SCO ALT-[a-z] Function Keys"
- X
- XIf you are on an SCO machine and you have installed the custom ECU mapkey file
- X(as described in the release directory
- Xin mapkeys/README), then ALT-a through ALT-z causes the "silent"
- Xexecution of procedures 'alt_a.ep' for ALT-a, 'alt_b.ep' for ALT-b, etc.
- XThe models subdirectory contains an example alt_h.ep which will home
- Xthe cursor when ALT-h is pressed. This facility allows the execution
- Xof 26 procedures without ECU itself changing the video display at all.
- XAny changes to the display (short of procedure errors) will result
- Xsolely from the action of the invoked procedure.
- XIf the procedure matching the ALT-[a-z] key pressed cannot be found,
- Xa short error message is printed and the terminal bell is rung.
- X(Using back tab may be used to refresh the display in this event.)
- X
- XNOTE: ECU 3.10 CHANGES TO THE SINGLE KEY PROCEDURE FUNCTIONALITY
- XMAKE IT NECESSARY FOR YOU TO REVIEW mapkeys/README IF YOU HAVE USED
- XTHIS FEATURE IN PREVIOUS REVISIONS.
- X
- XThe strings used to represent "non-printable" characters are identical
- Xto the formal ASCII names given them (without regard to case), viz:
- X.DS I
- X NUL may not appear in a function key definition
- X
- X0x00 nul 0x10 dle
- X0x01 soh 0x11 dc1
- X0x02 stx 0x12 dc2
- X0x03 etx 0x13 dc3
- X0x04 eot 0x14 dc4
- X0x05 enq 0x15 nak
- X0x06 ack 0x16 syn
- X0x07 bel 0x17 etb
- X0x08 bs 0x18 can
- X0x09 ht 0x19 em
- X0x0A nl 0x1A sub
- X0x0B vt 0x1B esc
- X0x0C np 0x1C fs
- X0x0D cr 0x1D gs
- X0x0E so 0x1E rs
- X0x0F si 0x1F us
- X 0x20 sp
- X 0x7F del
- X.DE
- X
- X.*s 2 "Line Editing"
- X
- XWhen you are entering a line of text for an ecu command or in
- Xa field on a screen, you may edit it in a number of ways at any
- Xtime prior to pressing Enter. Cursor Left moves the cursor left
- Xby one character position, nondestructively. Cursor Right moves
- Xto the right. Insert toggles insert mode.
- X
- XBackspace (your erase key as specified to stty in commands, the
- Xactual backspace key in screens) deletes the character to the
- Xleft of the cursor.
- X
- XYour line kill key (as specified to stty) in command mode or
- Xthe ^U character in screen mode erases the entire line. Esc
- Xin command mode cancels the command. Esc in screen mode usually
- Xcancels the screen or subfunction in a screen.
- X
- XThe DEL character erases the character beneath the cursor. In
- Xthe common, but degenerate case of using DEL as the backspace
- Xkey (stty erase '^?') or the interrupt key (stty intr '^?'),
- Xthe function ordinarily served by the DEL key is unavailable.
- X
- X.*s 3 "Screen Mode Extras"
- X
- XWhen editing a field in screen mode which already contains data,
- Xthe field is first shown in "standout" mode (usually reverse
- Xvideo).
- X
- XIf the first key you press is an editing key (e.g., backspace,
- Xcursor left), the standout display is replaced by a normal one
- Xand editing proceeds.
- X
- XIf the first key you press is not an editing key (e.g., 'a'), the
- Xstandout display is replaced by a normal one, the field is
- Xerased, and your first character becomes the first character in
- Xthe field.
- X
- XPressing Esc while editing always leaved the original field
- Xunchanged.
- X
- X.*s 3 "Command Line Mode Extras"
- X
- XTyping ^L or ^R in
- Xinteractive command mode shows the current state of Insert mode and
- Xredisplays the edited string.
- X
- X.*s 2 "Screen Dump"
- XWhen the "cursor 5" key is pressed, the screen contents are
- Xdumped to a file. By default, this file is named '~/.ecu/screen.dump'.
- XThe
- X.B sdname
- Xinteractive command either displays or changes the current screen
- Xdump file name, depending upon whether or not an argument
- Xis supplied.
- XThe
- X.B scrdump
- Xprocedure command can initiate a dump.
- X
- XNote that from an SCO multiscreen, screen dump produces a dump of the
- Xactual screen contents (it is obtained from
- Xthe video driver), including ecu-generated output. When
- Xusing a non-multiscreen terminal, screen dump dumps only the
- Xshared memory virtual screen as received from the host.
- X
- XIf, at a multiscreen, you wish a screen dump free of ecu output
- X"pollution," use Shift-Tab (BkTab) to redraw the screen, then
- Xperform the screen dump. If you are not on a multiscreen, then the
- Xscreen dump comes from the (sometimes inexact) screen memory
- Xrepresentation and this step is not necessary.
- X
- X.*s 3 "Multiscreen and Non-Multiscreen"
- XNote that from multiscreens, screen dump produces a dump of the
- Xactual screen contents, including ECU-generated output. When
- Xusing a non-multiscreen terminal, screen dump dumps only the
- Xshared memory virtual screen as received from the host.
- XIf standard input is not a serial line (xterm or /dev/null),
- Xscreen dumps will be of the non-multiscreen type.
- X
- XIf, at a multiscreen, you wish a screen dump free of ECU output
- X"pollution," use Shift-Tab (BkTab) to redraw the screen, then
- Xperform the screen dump.
- X
- X.*s 3 "Multiscreen Bug"
- XThere has been a bug in the multiscreen driver for some time
- Xwherein a MEDIA COPY (screen dump) sequence ("ESC [ 2 i") leaves
- Xthe "ESC [ 2" part "active". When a screen dump (Cursor 5)
- Xcommand is given, I do the screen dump, then send a "l" to the
- Xscreen to work around the bug ("ESC 2 [ l" unlocks the keyboard,
- Xessentially a no-op). If and when it gets fixed, you'll see an
- X"l" show up on your screen after a screen dump sequence. To fix
- Xthis, comment out the
- X.DS I
- X#define MULTISCREEN_DUMP_BUG
- X.DE
- Xat the top of ecuscrdump.c.
- X
- X.*s 2 "Interactive Command History"
- X
- XAfter pressing the Home key, pressing it again invokes the
- Xinteractive command history function. After the second
- XHome key is pressed, the last interactive command is
- Xredisplayed. Line editing may be performed on the command as described
- Xin the previous section.
- X
- XAdditionally, using the Cursor Up key accesses less recent commands.
- XThe Cursor Down key accesses more recent commands. Pressing Enter causes
- Xthe command to be executed. Pressing Esc aborts command entry.
- X
- X.*s 2 "Dialing Directory"
- X
- XECU provides an on-line editable dialing directory. Remote
- Xsystems are defined as records using alphanumeric identifiers
- Xas keys. Other record fields include telephone number, baud
- Xrate, parity and textual description.
- X
- XOther features include changing to alternate dialing directory
- Xand a multi-number redial cycle function. Refer below to the description
- Xof the interactive
- X.B dial
- Xcommand.
- X
- XWhile a long entry in a field may be truncated on the display,
- Xwhen the entry is edited, it's full contents will be dispalyed on the
- Xedit subform.
- X
- XEntering or editing a dialing directory entry is for the most part
- Xstraightforward. A note on the use of the "tty" field is useful, however.
- XWhen prompted for a tty, you may choose
- X.BL
- X.LI
- X"Any" line (deprecated, for compatibility only)
- X.LI
- Xa tty line matching a Devices type
- X.LI
- Xa specific tty line
- X.LE
- X
- XA specific line is chosen by using the base name of the tty
- X(e.g., "tty1a" or "acu0"). On SCO, since ttys are all named
- Xconsistently according to the "/dev/ttyxx" form, you may omit the "tty"
- X(e.g., "1a" or "4g"). This latter feature is for compatibility
- Xwith earlier revisions of ECU. It is good practice to fully
- Xspecify the tty name.
- X
- X"Any" matches any tty line in the /usr/lib/Devices file supporting
- Xthe specified baud rate and whose Devices type begins with the
- Xcharacters (case independent) "ACU". This choice is provided to
- Xbe compatible with earlier versions of ECU (prior to 3.10).
- XUse of this argument is discouraged. It's equivalent in current
- Xpractice is "/ACU", as you can see next.
- X
- XA more general choice for choosing a tty line based on Devices type
- Xis the "Devices type matching" choice, invoked by prefixing the tty
- Xfield with a slash or equals sign.
- X
- X.BL
- X.LI
- X/ prefix searches for a Devices type matching a regular expression (a
- Xla sed or ed)
- X.LI
- X= prefix searches for an exact match on a Devices type
- X.LE
- X
- X.DS L
- XExamples:
- X
- X =ACU matches "ACU", fails on "acu" and "ACUx"
- X /.*tbit.* matches "ACUtbit1", "tbit"
- X.DE
- X
- XA specific tty line may also be specified. This is the only means
- Xof attaching a line not mentioned in the Devices file.
- X
- XNOTE: If the bell rings and you are not allowed to leave a field,
- Xit is because you MUST enter acceptible data before you can leave
- Xa field using other than the ESCape key.
- X
- XThe "debug level" parameter allows you to specify a number between 0 and
- X9 for passing to a UUCP dialer program with the -x switch.
- X
- XThe "DCD watch" parameter allows you to modify the DCD watcher
- Xupon successful connection to a remote. The values allowed are:
- X.DS L
- X 1 enable DCD watcher
- X 0 disable DCD watcher
- X t terminate ECU on loss of DCD
- X n no change of dcdwatch state
- X.DE
- XSpecifying 'n' leaves the dcdwatch state unaffected. See the description
- Xof the
- X.B dcdwatch
- Xinteractive command for more information.
- X
- XThe following sample dialing directory screen shows an edit in
- Xprogress.
- X
- X.DS L
- X .--[ dialing directory ]-- /u1/wht/.ecu/phone --------- modified ------.
- X | entry name | telephone number | tty | baud P | description |
- X | ...... | ........ |Any | 2400 N | ............... |
- X | ...--[ entry: new ]--------------------------------------------. |
- X | ..| | |
- X | ..| telephone number 1(800)555-1212 | |
- X | ..| device =ACUtbit |.. |
- X | ..| baud rate 19200 |.. |
- X | ..| parity N | |
- X | ..| description don't call this_________________________ |.. |
- X | ..| debug level 0 (dialer -x value 0-9) | |
- X | ..| DCD watch n | |
- X | ..| | |
- X | ..| Enter description |.. |
- X | ..| ESC: abort End: finish ^U: erase ^B: back TAB: fwd | |
- X | ..`------------------------------------------------------------' |
- X | ..... | .......... |2b | 9600 N | ................... |
- X | sco19 | 1(408)426-9525p |2b | 9600 N | SCO Tech Services |
- X | sco24 | 1(408)426-9495 |2b | 2400 N | SCO Tech Services |
- X +----------------------------------------------------------------------+
- X | down up PgDn PgUp edit add remove save find change dial dir |
- X | redial: mark unMark Unmark all wait between dial ENTER:dial ESC,quit |
- X `----------------------------------------------------------------------'
- X.DE
- X
- XIn the directory editor main window,
- XYou may use the vi conventions of 'j' for down and 'k' for up.
- XYou may also use the up and down arrow keys if you are on an SCO
- Xmultiscreen or if the function keys have been properly defined
- Xwith funckeymap. Also, '/' performs the same function as 'f'ind.
- XPgUp and PgDn scrolls the directory list several items at a time.
- XThe alternative keys, ^U and ^D, may be used.
- X
- X.*s 2 "Online Interactive Command Help"
- X
- XThe ECU help command presents a display of interactive commands. The user
- Xis then prompted to enter a command name for further, Unix-style
- X"usage" information.
- X
- X.*s 2 "Multiscreen Event Alarm"
- X
- XOn an SCO machine, by using the
- X.B BN
- X(bell notify) interactive command, an audible alert is sent to all
- Xmultiscreens when an ASCII BEL (bell) is received or when a file
- Xtransfer completes. An additional option causes an alert when ANY
- Xdata is received from the line. This makes it simple to do work on
- Xother multiscreen consoles and be alerted when attention to the
- Xcommunications session is required.
- X
- XFor instance, the Berkeley 4.x Unix utility "talk" rings the bell when
- Xanother user wishes an interactive chat mode. BSD "biff" rings the bell
- Xwhen incoming mail is received. Scripts or commands at remote sites can
- Xbe configured to ring the bell as in:
- X.DS I
- Xmake foo bar; bell; make more_stuff; bell;
- X.DE
- Xto call attention to the ECU user when work is being done
- Xon other multiscreen consoles.
- X
- XThis feature is only available when you are running ECU from a multiscreen.
- X
- X.*s 2 "Built-in Modem Dialer"
- X
- XThe built-in ECU dialer supports modems which use the
- X.B
- XHayes-style AT command set or most variants
- X.R
- X.B thereof .
- XIt is used when HoneyDanBer UUCP is not installed or when there is no
- Xentry in the /usr/lib/uucp/Devices file for the selected outgoing line.
- X(For more information, see the later section titled "HoneyDanBer UUCP
- XInterface".)
- X
- XThe built-in dialer uses files in the ecu library directory which
- Xcontains modem initialization information. Modem initialization
- Xfilenames are made from concatenating the tty name with ".mi". For
- Xinstance, tty1a's initialization file is named "tty1a.mi".
- X
- XCommands for initializing the modem and for dialing may be specified in
- Xa very flexible manner. Separate init and dial strings for each legal
- Xbaud rate, a single pair of strings for all baud rates or a combination
- Xmay be specified.
- X
- XThe ok_string is provided in the event your modem does not use
- X"OK" to indicate good command status. If your modem
- Xissues a connect indication other than "CONNECT, specify it
- Xwith connect_string. The specified string should be the consistent
- Xpart of the connect result (e.g., "CONNECT", not "CONNECT 9600").
- XThe dialer will examine the string remainder for a baud rate.
- XFor example, if your brain-misdirected vendor sends "CARRIER"
- Xinstead of "CONNECT" (after borrowing the remainder of Hayes
- Xhistory), then ECU will scan the remainder of a "CARRIER 9600"
- Xresult to find the line rate. A warning is issued if the
- Xmodem reports a different rate than the line rate established
- Xby ECU.
- X
- X.DF L
- X.hl
- X.ce 1
- XSample Modem Initialization Files
- X
- X#+-----------------------------------------------------------
- X# tty1a.mi - Microcom AX/9624c
- X#------------------------------------------------------------
- Xinit_>2400:ATS11=47X4S0=0S7=30\eQ1\eX1\eN3 # baud rates > 2400
- Xinit_default:ATS11=47X4S0=0S7=30\eQ0\eX0\eN0 # other baud rates
- Xdial_default:ATDT
- Xok_string:OK
- Xconnect_string:CONNECT
- X
- X#+-----------------------------------------------------------
- X# tty2d.mi - USR Courier 2400
- X#------------------------------------------------------------
- Xinit_default:ATS11=47 X4 S0=0 S7=32
- Xdial_default:ATDT
- Xok_string:OK
- Xconnect_string:CONNECT
- X
- X.hl
- X.DE
- X
- X
- X.*s 2 "File Transfer"
- X
- XECU supports numerous file transfer protocols: as of this writing,
- XXMODEM, XMODEM/CRC, XMODEM-1K, YMODEM/CRC Batch, ZMODEM/CRC-16,
- XZMODEM/CRC-32, C-Kermit and SEAlink are supported. `
- XAlthough a seamless interface
- X(there's some yuppie marketing newspeak) is provided to the user,
- Xtransfer is facilitated by executing external programs.
- X
- XKermit support requires you to obtain C-Kermit version 5A or later.
- XYou may also patch C-Kermit 4E to work with ECU (The
- Xpatch information is available in the ckermit subdirectory of the
- XECU release). C-Kermit 5 is in beta release as of this writing
- Xand supports ECU without modification.
- X
- XXMODEM, YMODEM and ZMODEM transfers (thanks to modified public domain
- Xprograms by Chuck Forsberg) present dynamic status displays similar to
- Xthe following:
- X.DS L
- X .-[ ecusz 3.20 ]-- /tmp -------------------------------.
- X | ZMODEM/CRC32 data rate ~= 900 ch/sec (94%) T |
- X | File 1 of 1 : /t/ecu320cpio.Z |
- X | File position: 617472 length: 915263 -rw-r--r-- |
- X | Total transaction 915263 bytes (xfer time ~= 17:29) |
- X | tx: D32 ZCRCG 1024 rx: HEX ZACK 605184 |
- X | Comm I/O: rx 917 tx 650041 bytes |
- X | Baud rate: 9600 BINARY blklen: 1024 comm mode: RAW |
- X | Time: started: 13:39:34 this file: 13:39:35 window: |
- X | 13:51:34 elapsed: 00:12:00 00:11:59 +12288 |
- X | Errors: this file: 2 total: 2 files skipped: 0 |
- X | |
- X | This file 67%, transaction 67% complete |
- X | Remote: CRC32 y duplex y continuous stream y |
- X `- Connected to tridom --------------------------------'
- X.DE
- X
- XDuring file transfer, data rates are displayed from time to time.
- XWhile the figures may vary significantly during the transfer, bear in mind
- Xthe calculations are for actual data throughput, measured as total DATA
- Xcharacters transferred from the time the file is opened until it is closed.
- XSo, if the data rate appears to be low at the start of the transfer
- Xand increase over time, perhaps it took a significant amount of time for
- Xthe receiver to open it's file or to respond to protocol startup stimuli.
- XIf the data rate appears to be higher at the beginning and become
- Xlower over time, perhaps flow control is being invoked. A sudden
- Xreduction in the "last file" or "transaction" data rate over the
- Xin progress rate reflects the time required to close files, operate
- Xthe protocol or to skip files (in the case of ZMODEM). If any files
- Xare skipped in a session, you may be sure the transaction
- Xrate will be (perhaps much) lower than the per-file rate.
- X
- XOn some systems and driver options, sundry driver statistics are
- Xdisplayed during X/Y/ZMODEM transfers. For instance, in the above
- Xdisplay from a Sun session. the driver's current output and input
- Xqueue depths and input queue space available are displayed along with
- Xthe current status of RTS and CTS. While such gay banter is rightly
- Xrelegated to the "bell and whistle" category, it does provide a rare
- Xinsight into driver operation. The ECU FAS/i driver for 386 systems
- X(after Uwe Doering's FAS driver) provides other information.
- X
- X.DS L
- X | Output queue depth 0 RTS T CTS T |
- X | Input queue depth 10 Input queue avail 490 |
- X.DE
- X
- X
- X.*s 2 "Automatic ZMODEM Receive"
- XECU in the interactive mode (no procedure executing) can interpret a
- XSUB, 'B', '0', '0' receive data sequence as a ZMODEM ZRQINIT frame and
- Xautomatically begin a ZMODEM receive operation. The
- X.B autorz
- Xinteractive and procedure commands control
- Xthis feature. By default, this feature is turned on.
- X
- X.*s 2 "Procedures (Scripts)"
- XA powerful, language-style procedure language is incorporated
- Xinto ECU. The language is described in the companion "Procedure
- XLanguage" manual.
- X
- XProcedures are files of programmatic instructions written in
- Xthe ECU procedure language invoked explicitly by the
- X.B do
- Xinteractive command or automatically by ECU functions described below.
- XProcedures are invoked by
- X.I name ,
- Xand result in execution of the file
- X.I name .ep.
- X
- XThe file is searched for in the current directory. If not found there,
- XECU checks your personal .ecu subdirectory. If not there, the ECU library "ep" subdirectory is searched (e.g.,
- X.I /usr/local/lib/ecu/ep ).
- X
- X.*s 3 "Initial (Startup) Procedure"
- XAn
- X.B
- Xinitial procedure
- X.R
- Xmay be be specified to ECU either to initialize an interactive
- Xsession or to execute an entirely unattended or "batch"
- Xcommunication session. Refer to the section on command switches ("-p").
- X
- X.*s 3 "Dialing Procedure"
- XWhen a named dialing entry is selected for calling, if a procedure
- Xcan be located using the above mentioned search sequence whose name matches
- Xthe name of the directory, then all of the usual ECU built-in dialing
- Xprocedure is bypassed and the procedure is used. For details, refer to
- Xother sections related to dialing.
- X.*s 3 "Other Special Procedures"
- XOther special procedures may be invoked when
- X.BL
- X.LI
- Xecu starts up (_rc.ep)
- X.LI
- Xa connection is established (_connect.ep)
- X.LI
- Xan attempted connection fails (_connfail.ep)
- X.LI
- Xa connection is terminated with the hangup command (_hangup.ep)
- X.LE
- XSee the ECU procedure manual for details.
- X
- X.*s 2 "DCD (Carrier) Watcher"
- XECU can be instructed to monitor DCD (carrier) status on any
- Xtty line whose driver honors dynamic manipulation of the CLOCAL
- Xcontrol bit.
- XECU may be instructed to ignore DCD (the default state).
- XIn such a state, if carrier is lost after a connection has been
- Xmade, ECU is unaware the connection has been lost. An interactive
- X.B stat
- Xcommand will show the connection still active.
- X
- XWhen the DCD watcher is enabled, loss of carrier will cause
- Xthe hangup command processing to automatically be executed
- X(including execution of the special procedure
- X_hangup.ep if any can be found).
- X
- XAn additional mode is available which, in addition to the hangup
- Xprocessing, causes ecu to terminate execution.
- X
- XThe
- X.B dcdwatch
- Xinteractive and procedure commands control this feature.
- XIn addition, each dialing directory entry has a field
- Xspecifying whether or not the DCD watcher status is to be
- Xchanged upon connecting to the remote system and if so,
- Xto what state. Refer to the description of the
- X.B dcdwatch
- Xand
- X.B dial
- Xcommands for details.
- X
- X.*s 2 "Home Directory Files"
- XECU control files reside in the .ecu subdirectory of
- Xeach user's home directory. For example, in home directory /usr/wht:
- X.DS I
- X /usr/wht/.ecu/dir CD interactive command history file
- X* /usr/wht/.ecu/keys function key mapping
- X* /usr/wht/.ecu/funckeymap function key mapping
- X /usr/wht/.ecu/log connect, file transfer history
- X /usr/wht/.ecu/phone default dialing directory
- X*% /usr/wht/.ecu/colors colors used by ECU
- X.DE
- X
- X* The ecu library directory (normally /usr/local/lib/ecu) is searched for
- Xthe "keys", "colors" and "funckeymap" file if a personal version
- Xcannot be found.
- X
- X% The "colors" file does not apply to systems on which color is not yet
- Xsupported.
- X
- XThe .ecu directory is searched for an ECU procedure file
- X(having the '.ep' extension) if the procedure file cannot be found in
- Xthe current working directory.
- X
- X.*s 2 "Lock Files"
- X
- XECU maintains lock files in the standard directory in accordance with the
- XHoneyDanBer UUCP conventions (ASCII pids as 10-character strings
- Xfollowed by a newline). If porting to a machine with old-style
- Xinteger pids, grep for HONEYDANBER in the sources for hints on
- Xwhere changes are needed.
- X
- XStandard lock directories for versions supported as of this writing:
- X.DS I
- X SCO /usr/spool/uucp
- X ISC /usr/spool/locks
- X SunOS, SVR4 /var/spool/locks
- X.DE
- X
- X.ul 1
- XWorld write access to this directory must be in effect.
- X
- XSee the later section titled "HoneyDanBer UUCP Interface".
- X
- X.*s 2 "Dial-In/Dial-Out Line Support"
- X
- XOn SCO XENIX and UNIX 3.2 systems,
- XECU works with the SCO getty to support dialing out on a line
- Xenabled for login. After use of the line is complete,
- XECU signals the system to restore incoming call status to
- Xthe line.
- XSee the later section titled "HoneyDanBer UUCP Interface".
- X
- XThis facility is not supported in other environments as of this writing.
- XScan the distribution README.* files for any updates.
- X
- X.*s 2 "Tools"
- X
- XCommands are provided for conversion of hexadecimal or decimal numbers
- Xto and from ASCII equivalents. For example, 26(10) == 0x1a == ^Z == SUB.
- XFor details, refer to the description of the
- X.B XA
- Xand
- X.B AX
- Xinteractive commands.
- X
- X.*s 2 "Shared Memory 'Friend' Interface"
- X
- XECU maintains a copy of the received screen image (80 x 43
- Xmaximum) and other
- Xinformation in its shared memory segment. Normally, this
- Xinformation is used only by the transmitter and receiver
- Xprocess. However, ECU supports the concept of a
- X.B friend
- Xprocess which may access the shared memory segment, perform
- Xarbitrary auxiliary operations, read from and write to the
- Xattached communications line and communicate resulting information
- Xor status to an ECU procedure via a 1024-byte "friend"
- Xdata area in the shared memory segment.
- X
- XThe procedure language supports the friend
- Xprocess concept through commands and functions which allow
- X.BL
- X.LI
- Xpassing the ECU shared memory segment id (%shmid) to a called
- Xprogram,
- X.LI
- Xreading a single character or string of characters from
- Xscreen memory,
- X.LI
- Xreading cursor position information and
- X.LI
- Xreading and writing of characters, short or long integers and
- Xstrings in the 1024-byte "friend" shared memory data area.
- X.LE
- X
- XThe algorithm for obtaining the shared memory segment key is
- X.DS L
- X0xEC000000L + transmitter process id
- X.DE
- XThus a "friend" process may either use a %shmid
- X.B
- Xshared memory key
- X.R
- Xpassed as an argument or obtain the
- X.B
- Xshared memory key
- X.R
- Xby using:
- X.DS L
- Xkey_t shmkey = 0xEC000000L | getppid();
- X.DE
- X
- XThis facility allows batch and interactive applications
- Xto be developed with C programs which would be
- Xtedious or impractical to implement with procedure language alone.
- X
- XFor more information, refer to the shared memory header file
- X.B ecushm.h ,
- Xthe
- X.B ecufriend
- Xsubdirectory of the software release
- Xand to the description of the
- X.B %shmid ,
- X.B %cury
- Xand
- X.B %curx
- Xprocedure functions
- Xand the
- X.B getf
- Xand
- X.B putf
- Xprocedure commands.
- END_OF_FILE
- if test 41249 -ne `wc -c <'ecu330/doc/_features.txt'`; then
- echo shar: \"'ecu330/doc/_features.txt'\" unpacked with wrong size!
- fi
- # end of 'ecu330/doc/_features.txt'
- fi
- if test -f 'ecu330/proc.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ecu330/proc.c'\"
- else
- echo shar: Extracting \"'ecu330/proc.c'\" \(20592 characters\)
- sed "s/^X//" >'ecu330/proc.c' <<'END_OF_FILE'
- X/*+-------------------------------------------------------------------------
- X proc.c - procedure command and control
- X wht@n4hgf.atl.ga.us
- X
- X Defined functions:
- X _cmd_gosub_common(param,type)
- X _get_goto_label(param)
- X do_proc(argc,argv)
- X dump_proc(pcb)
- X execute_esd(tesd)
- X execute_goto(pcb,goto_type)
- X execute_labelled_esd(tesd)
- X execute_proc(pcb,use_goto_label)
- X find_labelled_lcb(label,first,last)
- X find_proc_cmd(cmd_list,cmd)
- X find_procedure(name)
- X free_lcb_chain(lcb)
- X pcmd_do(param)
- X pcmd_gosub(param)
- X pcmd_gosubb(param)
- X pcmd_goto(param)
- X pcmd_gotob(param)
- X pcmd_return(param)
- X pcmd_upon(param)
- X proc_dcdloss_handler(pcb)
- X show_error_position(pcb)
- X trace_proc_cmd(pcb)
- X
- X--------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:05-04-1994-04:39-wht@n4hgf-ECU release 3.30 */
- X/*:03-10-1994-17:46-wht@n4hgf-was not closing files on proc exit */
- X/*:09-10-1992-14:00-wht@n4hgf-ECU release 3.20 */
- X/*:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA */
- X/*:11-16-1991-15:39-wht@n4hgf2-add pcmd_upon stub */
- X/*:11-16-1991-14:53-wht@n4hgf2-add proc_dcdloss_handler */
- X/*:11-16-1991-14:01-wht@n4hgf-calloc pcb instead of malloc */
- X/*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
- X/*:07-01-1991-01:53-wht@n4hgf-fix return with value */
- X/*:05-01-1991-04:18-wht@n4hgf-new find_procedure failed on home subdir match */
- X/*:04-30-1991-03:19-root@n4hgf-add search for .ep in ecu lib ep subdir */
- X/*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
- X
- X#include "ecu.h"
- X#include "ecuerror.h"
- X#include "ecukey.h"
- X#include "esd.h"
- X#include "var.h"
- X#include "proc.h"
- X
- X#define NEED_P_CMD
- X#include "ecucmd.h"
- X
- XPCB *pcb_stack[PROC_STACK_MAX];
- X
- Xint proc_level = 0;
- Xint proc_trace = 0;
- X
- Xchar goto_label[64];
- X
- X/*+-------------------------------------------------------------------------
- X _get_goto_label(param)
- X--------------------------------------------------------------------------*/
- Xint
- X_get_goto_label(param)
- XESD *param;
- X{
- X register erc;
- X register ESD *label_esd;
- X
- X goto_label[0] = 0;
- X if (erc = get_alphanum_zstr(param, goto_label, sizeof(goto_label)))
- X {
- X if (!(label_esd = esdalloc(ESD_NOMSZ)))
- X return (eNoMemory);
- X if (!(erc = gstr(param, label_esd, 0)))
- X strcpy(goto_label, label_esd->pb);
- X esdfree(label_esd);
- X }
- X
- X return (erc);
- X
- X} /* end of _get_goto_label */
- X
- X/*+-------------------------------------------------------------------------
- X pcmd_goto(param)
- X--------------------------------------------------------------------------*/
- Xint
- Xpcmd_goto(param)
- XESD *param;
- X{
- X
- X if (!proc_level)
- X return (eNotExecutingProc);
- X if (_get_goto_label(param))
- X return (eInvalidLabel);
- X return (eProcAttn_GOTO);
- X
- X} /* end of pcmd_goto */
- X
- X/*+-------------------------------------------------------------------------
- X pcmd_gotob(param)
- X--------------------------------------------------------------------------*/
- Xint
- Xpcmd_gotob(param)
- XESD *param;
- X{
- X
- X if (!proc_level)
- X return (eNotExecutingProc);
- X if (_get_goto_label(param))
- X return (eInvalidLabel);
- X return (eProcAttn_GOTOB);
- X
- X} /* end of pcmd_gotob */
- X
- X/*+-------------------------------------------------------------------------
- X _cmd_gosub_common(param,type)
- X--------------------------------------------------------------------------*/
- Xint
- X_cmd_gosub_common(param, type)
- XESD *param;
- Xint type;
- X{
- X int erc;
- X LCB *current_save;
- X int index_save;
- X
- X if (_get_goto_label(param))
- X return (eInvalidLabel);
- X current_save = pcb_stack[proc_level - 1]->current;
- X index_save = current_save->text->index;
- X if (!(erc = execute_proc(pcb_stack[proc_level - 1], type)))
- X {
- X pcb_stack[proc_level - 1]->current = current_save;
- X current_save->text->index = index_save;
- X }
- X return (erc);
- X
- X} /* end of _cmd_gosub_common */
- X
- X/*+-------------------------------------------------------------------------
- X pcmd_gosub(param)
- X--------------------------------------------------------------------------*/
- Xint
- Xpcmd_gosub(param)
- XESD *param;
- X{
- X if (!proc_level)
- X return (eNotExecutingProc);
- X return (_cmd_gosub_common(param, eProcAttn_GOTO));
- X} /* end of pcmd_gosub */
- X
- X/*+-------------------------------------------------------------------------
- X pcmd_return(param)
- X--------------------------------------------------------------------------*/
- Xint
- Xpcmd_upon(param)
- XESD *param;
- X{
- X pprintf("'upon' not implimented\n");
- X param->index = param->cb;
- X return (0);
- X} /* end of pcmd_return */
- X
- X/*+-------------------------------------------------------------------------
- X pcmd_gosubb(param)
- X--------------------------------------------------------------------------*/
- Xint
- Xpcmd_gosubb(param)
- XESD *param;
- X{
- X if (!proc_level)
- X return (eNotExecutingProc);
- X return (_cmd_gosub_common(param, eProcAttn_GOTO));
- X} /* end of pcmd_gosubb */
- X
- X/*+-------------------------------------------------------------------------
- X pcmd_return(param)
- X--------------------------------------------------------------------------*/
- Xint
- Xpcmd_return(param)
- XESD *param;
- X{
- X long value = 0;
- X
- X if (!gint(param, &value))
- X {
- X if ((value < 0) || (value > 255))
- X value = 255;
- X if (proc_trace)
- X pprintf("return value %ld\n", value);
- X if (value)
- X value += e_USER;
- X return ((int)value);
- X }
- X return (eProcAttn_RETURN);
- X} /* end of pcmd_return */
- X
- X/*+-------------------------------------------------------------------------
- X find_labelled_lcb(label,first,last)
- Xsearch for match between label
- X--------------------------------------------------------------------------*/
- XLCB *
- Xfind_labelled_lcb(label, first, last)
- Xchar *label;
- Xregister LCB *first;
- XLCB *last;
- X{
- X register llen = strlen(label);
- X ESD *text;
- X
- X while (first)
- X {
- X text = first->text;
- X if ((text->cb >= llen) && (!strncmp(text->pb, label, llen))
- X && (!text->pb[llen] || isspace(text->pb[llen])))
- X return (first);
- X
- X if (first == last)
- X return ((LCB *) 0);
- X first = first->next;
- X }
- X pputs("find_labelled_lab logic error\n");
- X return ((LCB *) 0);
- X
- X} /* end of find_labelled_lcb */
- X
- X/*+-------------------------------------------------------------------------
- X execute_goto(pcb,goto_type)
- X--------------------------------------------------------------------------*/
- Xexecute_goto(pcb, goto_type)
- XPCB *pcb;
- Xint goto_type;
- X{
- X LCB *next = (LCB *) 0; /* next lcb to execute */
- X
- X switch (goto_type)
- X {
- X case eProcAttn_GOTO:
- X if (!(next = find_labelled_lcb(goto_label, pcb->current, pcb->last)))
- X next = find_labelled_lcb(goto_label, pcb->first, pcb->current);
- X break;
- X case eProcAttn_GOTOB:
- X if (!(next = find_labelled_lcb(goto_label, pcb->first, pcb->current)))
- X next = find_labelled_lcb(goto_label, pcb->current, pcb->last);
- X break;
- X }
- X if (next)
- X {
- X pcb->current = next;
- X return (0);
- X }
- X pprintf("goto/gosub label not found: %s\n", goto_label);
- X return (eFATAL_ALREADY);
- X
- X} /* end of execute_goto */
- X
- X/*+-------------------------------------------------------------------------
- X show_error_position(pcb)
- Xcursor MUST be at left margin when this is called
- X--------------------------------------------------------------------------*/
- Xvoid
- Xshow_error_position(pcb)
- XPCB *pcb;
- X{
- X ESD *tesd = pcb->current->text;
- X register itmp = tesd->old_index;
- X char tag[64];
- X
- X sprintf(tag, "%s %u> ", pcb->argv[0], pcb->current->lineno);
- X pputs(tag);
- X pputs(tesd->pb);
- X pputs("\n");
- X itmp = strlen(tag) + tesd->old_index;
- X while (itmp--)
- X pputc(' ');
- X pputs("^\n");
- X
- X} /* end of show_error_position */
- X
- X/*+-------------------------------------------------------------------------
- X find_proc_cmd(cmd_list,cmd)
- X--------------------------------------------------------------------------*/
- XP_CMD *
- Xfind_proc_cmd(cmd_list, cmd)
- Xregister P_CMD *cmd_list;
- Xregister char *cmd;
- X{
- X while (cmd_list->token != -1)
- X {
- X if (!strcmp(cmd_list->cmd, cmd))
- X break;
- X cmd_list++;
- X }
- X return ((cmd_list->token == -1) ? (P_CMD *) 0 : cmd_list);
- X
- X} /* end of find_proc_cmd */
- X
- X/*+-------------------------------------------------------------------------
- X execute_esd(tesd)
- X--------------------------------------------------------------------------*/
- Xint
- Xexecute_esd(tesd)
- XESD *tesd;
- X{
- X int erc;
- X P_CMD *pcmd;
- X static P_CMD *set_pcmd = (P_CMD *) 0; /* quick access to 'set' */
- X char cmd[32];
- X extern int proc_interrupt;
- X
- X /* if interrupt, exit */
- X if (sigint | proc_interrupt)
- X return (eCONINT);
- X
- X /* if blank, skip it */
- X if (skip_cmd_break(tesd))
- X return (0);
- X
- X /* if comment, skip it */
- X if (!skip_cmd_char(tesd, '#'))
- X return (0);
- X
- X if (*(tesd->pb + tesd->index) == '{')
- X {
- X pputs("invalid '{'\n");
- X return (eFATAL_ALREADY);
- X }
- X
- X while (1)
- X {
- X /* get command -- allow leading '$' to assume 'set' command */
- X if (*(tesd->pb + tesd->index) == '$')
- X {
- X /* find 'set' in the list -- save for rapid access later */
- X if (set_pcmd)
- X pcmd = set_pcmd;
- X else if ((pcmd = find_proc_cmd(icmd_cmds, "set")) == (P_CMD *) 0)
- X return (eInternalLogicError);
- X else
- X set_pcmd = pcmd;
- X }
- X else
- X {
- X if (get_alphanum_zstr(tesd, cmd, sizeof(cmd)))
- X return (eIllegalCommand);
- X /* find it in the list */
- X if ((pcmd = find_proc_cmd(icmd_cmds, cmd)) == (P_CMD *) 0)
- X return (eIllegalCommand);
- X }
- X
- X /* check to see if this command available for procedure */
- X if (!pcmd->proc)
- X return (eInteractiveCmd);
- X
- X /* execute the command */
- X if (erc = (*pcmd->proc) (tesd))
- X return (erc);
- X
- X /* look for comment */
- X if (!skip_cmd_char(tesd, '#'))
- X break;
- X
- X /* look for multiple commands on line */
- X if (skip_cmd_char(tesd, ';'))
- X break;
- X
- X /* if blank after ';', skip it */
- X if (skip_cmd_break(tesd))
- X break;
- X }
- X return (0);
- X
- X} /* end of execute_esd */
- X
- X/*+-------------------------------------------------------------------------
- X execute_labelled_esd(tesd)
- X--------------------------------------------------------------------------*/
- Xexecute_labelled_esd(tesd)
- XESD *tesd;
- X{
- X register index = 0;
- X register cb = tesd->cb;
- X register char *pb = tesd->pb;
- X
- X/* reset indices */
- X tesd->index = index;
- X tesd->old_index = index;
- X
- X/* if comment, skip it */
- X if (!skip_cmd_char(tesd, '#'))
- X return (0);
- X
- X/* skip over any label */
- X while (!isspace(*(pb + index)) && (index < cb))
- X index++;
- X tesd->index = index;
- X tesd->old_index = index;
- X
- X return (execute_esd(tesd));
- X} /* end of execute_labelled_esd */
- X
- X/*+-------------------------------------------------------------------------
- X dump_proc(pcb)
- X--------------------------------------------------------------------------*/
- X#if 0
- Xvoid
- Xdump_proc(pcb)
- XPCB *pcb;
- X{
- X int itmp;
- X LCB *lcb;
- X
- X pprintf("------ pcb @ 0x%08lx -----------------\n", pcb);
- X pprintf("argc=%d first=0x%08lx last=0x%08lx\n", pcb->argc,
- X pcb->first, pcb->last);
- X for (itmp = 0; itmp < pcb->argc; itmp++)
- X {
- X pprintf("argv(%d) @ 0x%lx: '%s'\n", itmp, pcb->argv[itmp],
- X pcb->argv[itmp]);
- X }
- X pputs("\n");
- X lcb = pcb->first;
- X while (lcb)
- X {
- X pprintf("lcb @ 0x%08lx lineno=%u\n", lcb, lcb->lineno);
- X pputs("\n");
- X lcb = lcb->next;
- X }
- X pflush();
- X} /* end of dump_proc */
- X#endif
- X
- X/*+-------------------------------------------------------------------------
- X trace_proc_cmd(pcb) - if asked, show command
- X--------------------------------------------------------------------------*/
- Xvoid
- Xtrace_proc_cmd(pcb)
- XPCB *pcb;
- X{
- X if (proc_trace)
- X {
- X pprintf("%s %u> ", pcb->argv[0], pcb->current->lineno);
- X pputs(pcb->current->text->pb);
- X pputc('\n');
- X }
- X
- X} /* end of trace_proc_cmd */
- X
- X/*+-------------------------------------------------------------------------
- X proc_dcdloss_handler(pcb) - a statement execution found DCD loss
- X--------------------------------------------------------------------------*/
- Xint
- Xproc_dcdloss_handler(pcb)
- XPCB *pcb;
- X{
- X int erc = 0;
- X int itmp;
- X ESD esdcopy;
- X ESD *tesd;
- X
- X if (pcb->upon_dcdloss.pb)
- X {
- X esdcopy = pcb->upon_dcdloss; /* a copy to preserve pcb->index */
- X tesd = &esdcopy;
- X if (proc_trace)
- X {
- X pprintf("%s DCDLOSS> ", pcb->argv[0]);
- X pputs(tesd->pb + tesd->index);
- X pputc('\n');
- X }
- X if (erc = execute_esd(tesd))
- X {
- X if (erc != eFATAL_ALREADY)
- X proc_error(erc);
- X pprintf("error in 'upon dcdloss' statement\n");
- X pputs(tesd->pb + pcb->upon_dcdloss.index);
- X pputs("\n");
- X itmp = tesd->old_index - pcb->upon_dcdloss.index;;
- X while (itmp--)
- X pputc(' ');
- X pputs("^\ninvoked while executing:\n");
- X erc = eFATAL_ALREADY;
- X }
- X }
- X else
- X /* DCD watch enabled but no 'upon dcdloss' in effect */
- X {
- X pprintf("Connection terminated during procedure execution\n");
- X pputs("while executing:\n");
- X erc = eFATAL_ALREADY;
- X }
- X return (erc);
- X} /* end of proc_dcdloss_handler */
- X
- X/*+-------------------------------------------------------------------------
- X execute_proc(pcb,use_goto_label) - execute a memory-resident procedure
- X--------------------------------------------------------------------------*/
- Xexecute_proc(pcb, use_goto_label)
- XPCB *pcb;
- Xint use_goto_label;
- X{
- X int erc = 0;
- X extern int proc_interrupt;
- X
- X if (proc_level == PROC_STACK_MAX)
- X return (eProcStackTooDeep);
- X
- X pcb_stack[proc_level++] = pcb;
- X if (use_goto_label)
- X {
- X if (erc = execute_goto(pcb, use_goto_label))
- X return (erc);
- X }
- X else
- X pcb->current = pcb->first;
- X
- X mkv_proc_starting(pcb);
- X
- X while (pcb->current)
- X {
- X /* execute the command */
- X trace_proc_cmd(pcb);
- X if (erc = execute_labelled_esd(pcb->current->text))
- X {
- X /* handle other classes of errors */
- X switch (erc & 0xF000)
- X {
- X case e_WARNING: /* warning */
- X erc = 0;
- X break;
- X
- X case e_FATAL: /* fatal */
- X goto FUNC_RETURN;
- X
- X case e_ProcAttn: /* proc attention */
- X switch (erc)
- X {
- X case eProcAttn_GOTO:
- X case eProcAttn_GOTOB:
- X if (erc = execute_goto(pcb, erc))
- X break; /* didn't find it */
- X continue; /* pcb->current is now goto target */
- X
- X case eProcAttn_RETURN:
- X erc = 0;
- X break;
- X
- X case eProcAttn_Interrupt:
- X case eProcAttn_ESCAPE:
- X pprintf(
- X "procedure %s interrupted.\n", pcb->argv[0]);
- X erc = eFATAL_ALREADY;
- X break;
- X
- X case eProcAttn_DCDloss:
- X erc = proc_dcdloss_handler(pcb);
- X break;
- X
- X default:
- X pprintf("procedure error 0x%x\n", erc);
- X erc = eFATAL_ALREADY;
- X break;
- X }
- X goto FUNC_RETURN;
- X
- X default: /* must be proc return error code */
- X goto FUNC_RETURN;
- X }
- X }
- X
- X if (sigint || proc_interrupt)
- X {
- X proc_interrupt = 0;
- X sigint = 0;
- X pprintf("procedure %s interrupted\n", pcb->argv[0]);
- X erc = eFATAL_ALREADY;
- X }
- X
- X if (erc)
- X break;
- X pcb->current = pcb->current->next;
- X }
- X
- X FUNC_RETURN:
- X mkv_proc_terminating(pcb);
- X if (erc)
- X {
- X if ((erc > 0) && (erc < e_USER))
- X {
- X pprintf(">>procedure %s returned %d\n", pcb->argv[0], erc);
- X erc |= e_USER;
- X }
- X else if ((erc > e_USER) && (erc <= 0x1FFF))
- X {
- X ; /* already said it */
- X }
- X else
- X {
- X if (erc != eFATAL_ALREADY)
- X {
- X proc_error(erc);
- X erc = eFATAL_ALREADY;
- X }
- X show_error_position(pcb);
- X }
- X }
- X pcb_stack[--proc_level] = (PCB *) 0;
- X
- X#if 0
- X if (erc && !proc_level)
- X plog_control((char *)0);
- X#endif
- X
- X if (!proc_level)
- X proc_file_reset();
- X
- X return (erc);
- X
- X} /* end of execute_proc */
- X
- X/*+-------------------------------------------------------------------------
- X free_lcb_chain(lcb)
- X--------------------------------------------------------------------------*/
- Xvoid
- Xfree_lcb_chain(lcb)
- Xregister LCB *lcb;
- X{
- X LCB *plcb;
- X
- X while (lcb)
- X {
- X if (lcb->text)
- X esdfree(lcb->text);
- X plcb = lcb;
- X lcb = lcb->next;
- X free((char *)plcb);
- X }
- X
- X} /* end of free_lcb_chain */
- X
- X/*+-------------------------------------------------------------------------
- X find_procedure(name) - find procedure if it exists
- X--------------------------------------------------------------------------*/
- Xchar *
- Xfind_procedure(name)
- Xchar *name;
- X{
- X static char procpath[256];
- X
- X/*
- X * try to find proc file in current directory
- X */
- X strcpy(procpath, name);
- X strcat(procpath, ".ep");
- X if (!access(procpath, 4))
- X return (procpath);
- X if (proc_trace && (errno != ENOENT))
- X pperror(procpath);
- X
- X/*
- X * try to find proc file in home .ecu subdirectory
- X */
- X get_home_dir(procpath);
- X strcat(procpath, "/.ecu/");
- X strcat(procpath, name);
- X strcat(procpath, ".ep");
- X if (!access(procpath, 4))
- X return (procpath);
- X if (proc_trace && (errno != ENOENT))
- X pperror(procpath);
- X
- X/*
- X * try to find proc file in library ep subdirectory
- X */
- X strcpy(procpath, ECULIBDIR);
- X strcat(procpath, "/ep/");
- X strcat(procpath, name);
- X strcat(procpath, ".ep");
- X if (!access(procpath, 4))
- X return (procpath);
- X if (proc_trace && (errno != ENOENT) && (errno != ENOTDIR))
- X pperror(procpath);
- X
- X/*
- X * no luck
- X */
- X return ((char *)0);
- X
- X} /* end of find_procedure */
- X
- X/*+-------------------------------------------------------------------------
- X do_proc(argc,argv) - read in a disk-based procedure and execute it
- X--------------------------------------------------------------------------*/
- Xdo_proc(argc, argv)
- Xint argc;
- Xchar **argv;
- X{
- X int itmp;
- X int itmp2;
- X int erc;
- X int iargv;
- X char *pargv[MAX_PARGV];
- X int ipargv = 0;
- X char cmdbuf[ESD_NOMSZ];
- X char *procpath;
- X FILE *fp;
- X PCB *pcb = (PCB *) 0;
- X LCB *lcb = (LCB *) 0;
- X LCB *plcb;
- X ushort line_count = 0;
- X extern ulong colors_current;
- X ulong colors_at_entry = colors_current;
- X extern int proc_interrupt;
- X
- X proc_interrupt = 0; /* ok to reset here because no one ... */
- X sigint = 0; /* ... would call here if interrupted */
- X
- X for (iargv = 0; iargv < argc; iargv++)
- X {
- X if (ipargv == MAX_PARGV)
- X {
- X pputs("\nMax arguments to procedure invocation exceeded\n");
- X erc = eFATAL_ALREADY;
- X goto FUNC_RETURN;
- X }
- X pargv[ipargv++] = argv[iargv];
- X }
- X
- X if (!ipargv)
- X {
- X pputs("\nno procedure name given\n");
- X erc = eFATAL_ALREADY;
- X goto FUNC_RETURN;
- X }
- X
- X if (!(procpath = find_procedure(pargv[0])))
- X {
- X pprintf("\nprocedure %s not found\n", pargv[0]);
- X erc = eFATAL_ALREADY;
- X goto FUNC_RETURN;
- X }
- X fp = fopen(procpath, "r");
- X if (!fp)
- X {
- X pperror(procpath);
- X erc = eFATAL_ALREADY;
- X goto FUNC_RETURN;
- X }
- X if (proc_trace)
- X pprintf("DO: %s\n", procpath);
- X
- X if (!(pcb = (PCB *) calloc(1, sizeof(PCB))))
- X {
- X erc = eNoMemory;
- X goto FUNC_RETURN;
- X }
- X
- X pcb->argv = pargv;
- X pcb->argc = ipargv;
- X
- X plcb = 0;
- X line_count = 0;
- X while (1)
- X {
- X
- X /*
- X * read procedure file
- X */
- X if (!(fgets(cmdbuf, sizeof(cmdbuf), fp)))
- X break;
- X line_count++;
- X
- X /*
- X * housekeeping
- X */
- X itmp = strlen(cmdbuf) - 1; /* skip blank lines */
- X if (!itmp)
- X continue;
- X cmdbuf[itmp] = 0; /* kill trailing NL */
- X if (cmdbuf[0] == '#')/* skip comments */
- X continue;
- X
- X /*
- X * convert tabs to spaces so we don't have to scan for each
- X */
- X for (itmp2 = 0; itmp2 < itmp; itmp2++)
- X {
- X if (cmdbuf[itmp2] == TAB)
- X cmdbuf[itmp2] = SPACE;
- X }
- X
- X /*
- X * get a line control block
- X */
- X if (!(lcb = (LCB *) malloc(sizeof(LCB))))
- X {
- X fclose(fp);
- X erc = eNoMemory;
- X goto FUNC_RETURN;
- X }
- X
- X /*
- X * link it into the pcb chain
- X */
- X lcb->prev = plcb;
- X lcb->next = 0;
- X lcb->lineno = line_count;
- X
- X if (plcb)
- X plcb->next = lcb;
- X else
- X pcb->first = lcb;
- X
- X /*
- X * now copy in the text
- X */
- X if (!(lcb->text = esdalloc(itmp)))
- X {
- X fclose(fp);
- X erc = eNoMemory;
- X goto FUNC_RETURN;
- X }
- X strcpy(lcb->text->pb, cmdbuf);
- X lcb->text->cb = itmp;
- X esd_null_terminate(lcb->text);
- X plcb = lcb;
- X }
- X
- X /*
- X * error or not, all done reading the proc; if no error, execute the
- X * procedure
- X */
- X fclose(fp);
- X pcb->last = lcb;
- X if (line_count)
- X erc = execute_proc(pcb, 0);
- X else
- X erc = eProcEmpty;
- X
- X FUNC_RETURN:
- X if (pcb)
- X {
- X if (pcb->first)
- X free_lcb_chain(pcb->first);
- X free((char *)pcb);
- X }
- X if ((erc > e_USER) && (erc <= 0x1FFF))
- X erc -= e_USER;
- X if (erc > e_USER)
- X setcolor(colors_at_entry);
- X return (erc);
- X
- X} /* end of do_proc */
- X
- X/*+-------------------------------------------------------------------------
- X pcmd_do(param)
- X--------------------------------------------------------------------------*/
- Xpcmd_do(param)
- XESD *param;
- X{
- X int erc;
- X register ipargv;
- X char *cmd_copy;
- X char *pargv[MAX_PARGV];
- X ESD *pargv_esd[MAX_PARGV];
- X int pargc = 0;
- X
- X if (!(cmd_copy = (char *)malloc(param->cb)))
- X return (eNoMemory);
- X strcpy(cmd_copy, param->pb + param->old_index);
- X while (pargc != MAX_PARGV)
- X {
- X if (end_of_cmd(param))
- X break;
- X if (!(pargv_esd[pargc] = esdalloc(ESD_NOMSZ)))
- X {
- X erc = eNoMemory;
- X goto FUNC_RETURN;
- X }
- X if (erc = gstr(param, pargv_esd[pargc], 1))
- X goto FUNC_RETURN;
- X pargv[pargc] = pargv_esd[pargc]->pb;
- X pargc++;
- X }
- X
- X if (pargc < MAX_PARGV)
- X erc = do_proc(pargc, pargv);
- X else
- X {
- X pprintf("too many arguments to procedure\n");
- X erc = eFATAL_ALREADY;
- X }
- X
- X FUNC_RETURN:
- X free(cmd_copy);
- X for (ipargv = 0; ipargv < pargc; ipargv++)
- X esdfree(pargv_esd[ipargv]);
- X return (erc);
- X
- X} /* end of pcmd_do */
- X
- X/* vi: set tabstop=4 shiftwidth=4: */
- X/* end of proc.c */
- END_OF_FILE
- if test 20592 -ne `wc -c <'ecu330/proc.c'`; then
- echo shar: \"'ecu330/proc.c'\" unpacked with wrong size!
- fi
- # end of 'ecu330/proc.c'
- fi
- echo shar: End of archive 10 \(of 37\).
- cp /dev/null ark10isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 37 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
- exit 0 # Just in case...
-