[comp.sources.d] ECU XENIX V comm program

wht@tridom.uucp (Warren Tucker) (11/12/89)

I recently posted ECU revision unet1 to alt.sources.  It is a
full-featured asynchronous communications program for SCO XENIX V
revisions 2.3.x and beyond.  I have gotten a lot of feedback from it
and have worked diligently on bugs (mostly make problems) and have
added a new set of features.  I am enclosing the release note as it
now stands for your perusal.  It is _very_ XENIX specific.  It really
groks your box, though.

The question is: is there interest in my posting the updated version, this
time to comp.sources.misc?  Respond via E-mail to ...!gatech!tridom!wht
                                        ^^^^^^
If there are enough requests, I'll post it.  Otherwise, I'll E-mail
to the few that want it.

-----------------
The release note:
-----------------

This is ECU revision unet2.  ECU is a asynchronous communications
program for SCO XENIX V 286 or 386.  It incorporates typical interactive
communications capabilities with a rich procedure language, an extended
set of immediate (interactive) commands, and several file transfer
protocols.  The operating system and development system is expected to
be revision 2.3.1 or later.

Version unet1 was posted to alt.sources.  It has been fixed and enhanced
since then.  In particular, some embarassing dependencies on my system
environment to make the software have been removed.  Many thanks to
those who helped me improve the program, especially neal@clkwrka,
mjb@mjbtn and rob@genrad.

The doc subdirectory has all of the .txt files used to produce ecu.man,
the manual of sorts for the program.  A copy of it is reluctantly
included (net.bandwidth) for those who do not have nroff.

To make the program:

1. unshar all of the shars
2. edit ./Makefile to match your local system and requirements
3. If your username is root or you have write access to your
   local bin directory (LBIN in Makefile) just type 'make tools'
   If needed, su to root, 'make tools', then exit the root shell.
4. Type 'make'.  Wait and watch a while.  This is a good time to
   be reading over doc/ecu.man.  Less does a pretty job of making
   the underlined stuff appear in standout mode.
5. Su to root, if not already and type 'make install'.
6. Create a subdirectory in your home directory called '.ecu' (~/.ecu).
7. Copy models/* to ~/.ecu.

--------------------------------------------------------------------
Notes:

1.  To get the Kermit protocol working, you must obtain Columbia
University's C-Kermit version 4E or later and modify ckutio.c.  An
example modified ckutio.c is supplied in the ckermit subdirectory for
a guide.  Usage of the Columbia University code must be in keeping
with their copyright.  I claim (of course) no rights.

2.  SCO XENIX V/386 Release 2.3.1 (and evidently 2.3.2) have a
broken-dead, yet fixable, BSD-style select() feature which is needed
to support ads.  Also, select() is missing from libc.a.  The x386sel
subdirectory in this release has information (thanks to csch@netcs,
ivar@acc, and ag@elgar) on how to fix the kernel and to add select()
to libc.a.

3.  The uucp directory has an SCO uucp dialer for some various
modems.

4.  Crypt is used to make use by ecu of ecuungetty more secure.  If
your system has no untrusted users, or even some relatively lazy
untrusted users, leave CRYPT and LCRYPT commented in the Makefile.
Since somewhat unlazy users can read the source as released and still
wreak havoc with your ttys, you might want to change the non-CRYPT
"encryption" algorithm in bamboozle.c to make your installation
unique.
--------------------------------------------------------------------

Changes and fixes since 'unet1' alt.sources release:

1.  The uucp lock file code has been upgraded.  When I added uucp
dialer support a while back, I just hacked the necessities needed for
ecuLCK.c and put the new code into hdbintf.c.  Also, I don't try to
create two lock files anymore because there is no need.

2.  In esdutil.c, skip_paren could return a wrong error code.

3.  ctype.h style integer functions were added to the procedure
language: %isalnum, %isalpha, %isascii, %iscntrl, %isdigit, %isgraph,
%islower, %isprint, %ispunct, %isspace, %isupper and %isxdigit.

4. Logical operators were added to the ifi, ifs, whilei and whiles
syntax, making possible:
   ifi $i0 ==5 || %i30 == 6
       statement(s)
This still ain't perl, but things are a little better.

5.  %right() was broken.  strfunc_right() in feval.c returned a random
error code on success.

6.  A copy of the screen as received from the line is now kept in shared
memory.  Three new functions use this feature: integer functions %curx
and %cury and string function %screen().  There are limitations, so read
the appropriate manual sections.

7.  Since some program may want to use the shared memory segment to read
the screen, the shared memory segment is no longer RMID'd as soon as it
is created.  The integer function %shmid returns the shared memory
segment id for passing to a called program.  Many other interesting
things are kept in shared memory to enable efficient use of auxiliary
programs.  See echshm.h and ecufriend/ecufriend.c.

8.  Procedure tracing of string variable assignment prints "unprintable"
characters in the style of '^A' rather than clobbering your screen.

9.  kill_rcvr_process is better at terminating the receiver process.

10.  Screen dumps having extra repeated lines at the bottom won't happen
any more.  (The restarted rcvr process was getting a copy of the stdio
buffers to flush too :-/).

11.  By modifying the mapkey file to return certain codes for ALT-A
through ALT-Z, it is possible to have 26 procedures (named
'alt_[a-z].ep') to execute "silently" by pressing one key (OK, two keys:
ALT and a-z).  See mapkeys/README, /usr/lib/keybord/keys and mapkey(ADM).

12.  The receiver was not getting properly informed when the parity of
the line was changed with the interactive or procedure parity command.
So it could improperly mask or fail to mask incoming characters.

13.  The crypt library is no longer required.  Indeed, the default is
not to use crypt.  The paranoia required for "safe" big systems is not
always warranted on smaller PCs.  You can still get extra protection
against false ecuungetty action by using crypt if you want (and in the
case of non-USA user, if you CAN).

14.  A running count is displayed on the screen of the number of files
skipped during a ZMODEM transfer.

15.  You can now specify the colors used by ecu when it makles an
internal choice to change colors.  See ecu.man.
--------------------------------------------------------------------

------------------------------
Table of Contents from manual:
------------------------------

    1.  Introduction

    2.  Basic Organization
        2.1   Transmitter Process (XMTR)
              2.1.1   Keyboard Interface
              2.1.2   ECU Command Assembly
              2.1.3   Function Key Mapping
              2.1.4   Auxiliary Operation Control
        2.2   Receiver Process (RCVR)
              2.2.1   ANSI Filter
              2.2.2   Session Logging

    3.  Features
        3.1   Dialing Directory
        3.2   Online Command Dictionary
        3.3   Multiscreen Event Alarm
        3.4   Function Key Mapping
        3.5   Built-in Modem Dialer
        3.6   File Transfer
        3.7   Procedures (Scripts)
        3.8   Initial (Startup) Procedure
        3.9   Home Directory Files
        3.10  Lock Files
        3.11  Dial-In/Dial-Out Line Support
        3.12  Tools

    4.  Starting the Program
        4.1   Simple Startup - Initial Setup Menu
              4.1.1   Name/Phone Number Field
              4.1.2   Other Fields
              4.1.3   Special Characters
        4.2   Command Line Arguments and Switches
              4.2.1   -l
              4.2.2   -f
              4.2.3   -e, -o
              4.2.4   -p <procname>
              4.2.5   -d
              4.2.6   -t
        4.3   Environment Variables
              4.3.1   ECUPROMPT
              4.3.2   ECUHELP

    5.  Interactive Mode Commands (only capitalized portion need be entered)
        5.1   AX : ascii char to hex/oct/dec
        5.2   BAud : set/display line baud rate
        5.3   BN : all console event alarm
        5.4   BReak : send break to remote
        5.5   CD : change current directory
        5.6   DA : decimal to ascii char
        5.7   Dial : dial remote destination
        5.8   DO : perform procedure
        5.9   DUplex : set/display duplex
        5.10  EXit : drop carrier, exit program
        5.11  FI : send text file to line
        5.12  FKey : function key definition
        5.13  HAngup : hang up modem
        5.14  HElp : invoke help
        5.15  LLp : set session log to /dev/lp
        5.16  LOFf : turn off session logging
        5.17  LOG : session logging control
        5.18  NL : display CR/LF mapping
        5.19  NLIn : set receive CR/LF mapping
        5.20  NLOut : set transmit CR/LF mapping
        5.21  OA : octal to ascii char
        5.22  PARity : set/display line parity
        5.23  PId : display process ids
        5.24  PLog : procedure logging
        5.25  PTrace : control procedure trace
        5.26  PWd : print working directory
        5.27  REDial : redial last number
        5.28  REV : ECU revision/make date
        5.29  RK : receive via C-Kermit
        5.30  RS : receive via SEAlink
        5.31  RX : receive via XMODEM/CRC
        5.32  RY : receive via YMODEM Batch
        5.33  RZ : receive via ZMODEM/CRC32
        5.34  SDNAME : select screen dump file name
        5.35  SK : send via C-Kermit
        5.36  SS : send via SEAlink
        5.37  STat : connection status
        5.38  SX : send via XMODEM/CRC
        5.39  SY : send via YMODEM Batch
        5.40  SZ : send via ZMODEM/CRC32
        5.41  TIme : time of day
        5.42  TTy : console tty name
        5.43  XA : hex to ascii char
        5.44  ! : execute shell

    6.  Procedure Language
        6.1   Arguments
              6.1.1   Switches
              6.1.2   Alphabetic Tokens
              6.1.3   Integers
                      6.1.3.1  Constants  
                      6.1.3.2  Variables 
                      6.1.3.3  Functions
                      6.1.3.4  Expressions 
                      6.1.3.5  Relational Operators 
                      6.1.3.6  Logical Operators
              6.1.4   Strings
                      6.1.4.1  Constants 
                      6.1.4.2  Variables
                      6.1.4.3  Functions
                      6.1.4.4  Expressions 
                      6.1.4.5  Relational Operators
                      6.1.4.6  Logical Operators
        6.2   Commands (section numbers deleted for brevity)
                  baud, break, cd, clrx, cls, color,
                  continue, cursor, delline, dial, do,
                  duplex, echo, eeol, else, exit, fchmod,
                  fclose, fdel, fgetc, fgets, fkey, flush,
                  fopen, fputc, fputs, fseek, goto, gotob,
                  hangup, hexdump, home, icolor, ifi, ifs,
                  lbreak, lgets, insline, logevent,
                  lookfor, mkvar, nap, parity, plog,
                  prompt, ptrace, return, rk, rs, rx, ry,
                  rz, scrdump, send, set, sk, ss, sx, sy,
                  system, sz, vidcolor, vidnorm, vidrev,
                  whilei, whiles
        6.3   Integer Functions (section numbers deleted for brevity)
                  %argc, %baud, %colors, %conn, %csec, %ctoi,
                  %fatime, %fmode, %fmtime, %fmode, %ftell,
                  %instr, %ischr, %isdir, %isreg, %len, %lgetc,
                  %pid, %match, %rchr, %rchrc, %stoi, %xchr,
                  %xchrc
        6.4   String Functions (section numbers deleted for brevity)
                  %argv, %cgetc, %cgets, %chr, %date, %day,
                  %dir, %edate, %envvar, %errstr, %etime,
                  %fmodestr, %itos, %left, %line, %logname,
                  %mid, %month, %rdesc, %right, %rname, %rtelno,
                  %time, %times, %tty
        6.5   HoneyDanBer UUCP Interface
              6.5.1   UUCP Control Files
                      6.5.1.1  /usr/lib/uucp/Devices
                      6.5.1.2  /usr/lib/uucp/Dialers 
                      6.5.1.3  /usr/lib/uucp/Systems
              6.5.2   Choosing a Dialout Line
              6.5.3   Getty Interface
              6.5.4   UUCP Dialers
-- 
------------------------------------------------------------------
Warren Tucker, Tridom Corporation      ...!gatech!emory!tridom!wht 
Hackre Extraordinaire de asynch PADs, pods, proteins and protocols