ANCIENTHISTORY - Revision History for ECU
-----------------------------------------

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 makes an
internal choice to change colors.  See ecu.man.

16.  UNIX, thanks to POSIX, is loathe to accept a filename of greater
than 14 characters when creating a file.  The XMODEM, YMODEM and
ZMODEM file receive protocols have been modified to truncate long
filenames.  A patch to UNIX libsys.a to put the POSIX people back in
their place has been floating around the net.

--------------------------------------------------------------------

Changes and fixes since '2.10' patch level 6:

1.  The nap procedure command has an additional feature, the -m
    switch.  -m specifies the <int> parameter is a period of
    milliseconds to suspend execution.  Without -m, <int> is
    tenths of seconds.

    nap 2 suspends execution .2 seconds
    nap -m 250 suspends execution 250 milliseconds.


--------------------------------------------------------------------

Changes and fixes since '2.10' patch level 7:

1.  added rname procedure command to allow overriding connected
    remote name.

2.  improve banner at top of session log file

3.  add popen and pclose procedure commands

4.  Added facility for restoring receiver display after the
    interactive help command, or on demand using the BkTab key
    (shift TAB).

5.  fix bug whereby partial function names could be enetered
    (e.g., '%col', '%colo', '%color' all recognized for '%colors').

6.  Add the %mhack integer function, returning the life of the
    ecu process in milliseconds.  (added mhack_test.ep to models)

7.  A better representation of the received screen is kept in
    shared memory.

8.  The X, Y and ZMODEM transfer screens show per-file elapsed
    time transfers as well as session elapsed time.

9.  A modified TBIT UUCP dialer, IMHO highly optimized, is is the
    uucp directory.

10. A bug in automatic creation of string variables was fixed.

11. Certain endless loops in procedure execution could not be
    interrupted.

--------------------------------------------------------------------

Changes and fixes since '2.72'

1.  The 'expresp' procedure command has been added:
    usage: expresp [-v[v...]] <exp-resp-str> [<timeout_msecs>]
    a.  -v turns on script debugging
    b.  multiple v's (e.g., -v -vv, -vvv) up to 3 'v's produce
        more verbose debug output
    c.  <exp-resp-str> is as defined in /usr/lib/ecu/Dialers:
        Meaning of some of the escape characters:
        \p - pause (approximately 1/4-1/2 second delay)
        \d - delay (2 seconds)
        \D - phone number/token
        \T - phone number with Dialcodes and character translation
        \N - null byte
        \K - insert a BREAK
        \E - turn on echo checking (for slow devices)
        \e - turn off echo checking
        \r - carriage return
        \c - no new-line
        \n - send new-line
        \nnn - send octal number
        Speed - Hayes-specific speed-adaptive connect handler
    d.  <timeout_msecs> specifies the optional delay for waiting
        on expect strings;  it defaults to 10 seconds; the timeout
        for 'Speed' expects is fixed at 90 seconds

2.  Added partial support for HDB Dialers scripts
    a.  \E echo checking is not actually performed, but
        essentially the same effect is achieved by pacing
        output to the modem
    b.  The Speed expect string works only for modems
        which return "CONNECT xxxx" connect result codes.
    c.  Modems which return status codes during dialing, such
        as the Trailblazer RRING, will cause Speed processing
        to fail. Fortunately, RRING can be disabled (you should use 
        the dialTBIT program anyway)
    d.  the timeout for non-Speed expects is 10 seconds
    e.  the timeout for 'Speed' expects is 90 seconds


3.  Note, the SCO HDB documentation states that a dialer
    program may be specified by either a complete pathname
    or a partial pathname in /usr/lib/uucp.  Ecu requires a
    complete pathname.

4.  The string functions %dayz, %monthz, %datez, %timez and %timesz
    have been added to retreive UTC (Z) date and time values.

5.  If no dialing action results from a visit to the dialing directory,
    the previous receiver screen contents is redisplayed.

6.  The 'P' option to the 'fi' (file insert) interactive command
    has been added.  In this mode, the file is sent character-by-
    character to the line with 20 milliseconds pacing between each
    character.

7.  Previously, if you started ecu on an HDB machine and no line was
    available at the specified (or default) baudrate, ecu would exit
    with an error message.  The workaround was to explicitly state the
    desired device with a -l argument.  The error (now as a warning) is
    still printed, but the setup screen or initial procedure is allowed
    to execute with tty1a forced to be the line (though this will likely
    fail if tty1a is in Devices since ecu has already determined tty1a
    is busy).

8.  When a string is requested from the keyboard, the Cursor Left,
    Cursor Right and Ins keys are functional, allowing editing of the
    string.  Pressing Ins toggles insert mode.  In non-curses modes,
    (e.g., after HOME pressed and before Enter) ^L (or ^R) displays the
    insert mode state and redisplays the string, after which editing may
    continue.

9.  Though not appearing on the help line, the cursor up and cursor down
    keys work in the dialing directory in a fashion similar to 'u' and 'd',
    respectively.

10. Warning: using vidi(C) to change the screen configuration while
    ecu is running, (e.g. Home !vidi xxx) can cause the ecu to later
    fault and dump core.  Why this occurs is not known yet.

11. After pressing Home, pressing it again gives you access to a 
    command history mechanism.  Pressing cursor up and cursor down
    while in this mode causes less and more recent commands to be displayed.
    You can use Ins, Cursor Left, Cursor Right and Backspace, ^L/^R to
    edit the old entry as desired, and then press Enter. (see #8 above).
    Users of ksh will find this a familiar feature.

--------------------------------------------------------------------

Changes and fixes since '2.80'

1.  It was not possible to interrupt the built-in modem dialer
    modem initialization sequence.  SIGINT will do it now.

2.  A Zmodem window size may now be specified when sending files.
    The file transfer status screen shows the number of unacknowleged
    bytes which have been sent.  If full streaming is allowed (window
    size of zero), then this size will match the file position until
    the transfer is complete or the receiver sends a ZRPOS.

3.  Output generated by procedures is now written to any active receiver
    log file in addition to any active procedure log file.

4.  Just a note: on 286 systems you make have to use makeL, since
    make is a small model (medium?) and makeL is a large model
    program.

5.  The dependency of eculine.c on sys/select.h has been removed.
    If you re-'make depend', you probably won't have this problem
    show up again (a side effect of make depend is that it misses
    '# include' and I have patched eculine.c to use this).

6.  A new command, xon, has been added (both interactive and procedure
    versions).  The format is:
         xon <arg>
    where <arg> is on    input and output flow control
                   off   no flow control
                   in    input flow control
                   out   output flow control
    If <arg> is omitted from the interactive command, the current
    flow control status is displayed.  This command is documented in
    the patched built-in help file and nroff txt files, but no pre-
    printed manual changes were issued with this release.

7.  If you are not using a 43-line screen, the list of commands
    displayed by the interactive 'help' command is truncated.  I
    apologize; this problem will be solved Real Soon Now.

Changes since ecu 2.80 patchlevel 1

1.  The built-in help system was reworked.  Interactive commands are
    now divided into four categories: general, communications-related,
    transfer-related and procedure-related.  The help command asks for
    a category and displays the appropriate subset.

2.  The built-in help file (ecuhelp.data) was revised.

Changes since ecu 2.80 patchlevel 2

1.  Patch 3 added a window mode selection to the sz file transfer menu;
    also, the unacknowledged data quantity (called "window") was
    added to the sz file transfer display.

Changes since ecu 2.80 patchlevel 3

1.  A problem with passing arguments to an initial procedure was
    fixed.  Getopt() is now used, which requires that all switch
    command arguments must precede the non-switch arguments.
    This was not true in previous revisions of ecu.

2.  A new (non-standard) escape sequence has been added to the
    expresp procedure command.  \m### causes a ### millisecond delay.
    Note this adds an ambiguity to the syntax of the send string:
    you may not follow an \m delay with a literal digit to send.
    For example, suppose you wish to delay 300 missileconds then
    send "4A".  \m3004A will delay for 3004 (approximately) milliseconds,
    then send an "A".  You must, instead, use \m300\034A to achieve
    the desired result.

    Also, a string of the form ~t[##] or ~m[##] may be prepended to
    any expect vstring to change the timeout to ## seconds or milliseconds,
    respectively.  '~t[8]gin:--~m[800]gin:' waits 8 seconds for
    'gin:' and if not found, sends a carriage return and waits
    an additional 800 milliseconds.

3.  The method of choosing a shared memory segment key changed.
    Previously, ftok() was used.  Now, the algorithm is 
        0xEC000000L | getpid();

4.  The -D switch has been added to cause ecu to terminate
    unconditionally upon completion of an initial procedure (-p).

Changes since ecu 2.80 patchlevel 4

1.  The malloc library is used, resulting in faster procedure
    execution.

2.  Restrictions on string operations limiting useful string length
    to 256 characters have been lifted.  New restrictions limit
    strings to 5120 characters in length :-).  This required some
    major redesign and is responsible for the reissue of the entire
    ECU program rather than merely patches.

3.  A new procedure command, 'gosub' has been added, allowing
    subroutines within a procedure file.

    #---------
    # example
    #---------
        echo 'main'; gosub SUB; echo 'back to main'
        return           | return from proc

    SUB
        echo 'sub'
        gosub SUB2
        echo 'back to sub'
        return           | return from subroutine


    SUB2
        echo 'sub2'
        return           | return from subroutine

4.  Other minor unreported bugs were fixed.

Changes since ecu 3.00

============= Patch 1:
> Posting-number: Volume 16, Issue 60
> Archive-name: ecu3/patch01
> 
> This is patch 1 to ECU 3.  It provides speed improvements
> and fixes for non-ANSI terminal support.  Also provided is an
> experimental make file for GCC 1.37.1 on UNIX systems.

============= Patch 2:
> Posting-number: Volume 16, Issue 70
> Archive-name: ecu3/patch2a
> 
> Posting-number: Volume 16, Issue 71
> Archive-name: ecu3/patch2b
> 
> ECU 3.0 PATCH # 2 - Non-ansi/ISC
> 
> 1.  Fix non-curses per-file transfer rate report
>     (it was verrrrry optimistic :-)
> 
> 2.  Add experimental support for ISC 2.2
> 
> Note: if you are purely an SCO multiscreen user, you may wish to
> save this patch and not apply it until further patches are issued.
> By doing so, you will save an unnecessary compilation.
> When another patch comes along, you must then apply this one so
> that your source will be in sync.

============= Patch 3:
> Posting-number: Volume 16, Issue 87
> Archive-name: ecu3/patch03
> 
> Under XENIX,
> 1. libmalloc.a and/or libc.a are broken such that calloc is
>    resolved twice, once from each library.
> 2. memmove() does not exist (in all or less recent versions?)
> 
> To get ecu 3 to compile under XENIX, apply this patch with:
>      patch < thismessage
> 
> NOTE there is no test to see if patch 1 & 2 have been applied :-(
> so make sure you have done so.  Also, I don't have access to XENIX
> right now, so please forgive if this doesn't fly. The object is to
> 1. supply -DDUFF to use Duff's device instead of missing memmove()
> 2. remove #define MALLOC_3X and -lmalloc to avoid bug in libmalloc.a

============= Patch 4:
> Posting-number: Volume 16, Issue 88
> Archive-name: ecu3/patch04
> 
> ECU 3 PATCH 4 - miscellaneous, 1 serious
> 
> 1. fix bug in non-ANSI key handling causing core dump fairly
>    often (but not on my sys :-<)
> 
> 2. duplicate definiton of ECULIBDIR in ecu.h fixed 3.  cosmetic
>    fix in 'fi' interactive command prompt
> 
> 4. comm line flusher lflush() was flushing console tty instead
> 
> 5. illegal color name in 'color' procedure command caused
>    hi_white on hi_white instead or error
> 
> 6. prototypes for strchr/strrchr in stdio_lint.h caused problems
>    on some systems
> 
> 7. procedure sz was not reporting proper results if files skipped
> 
> 8. miscellaneous cosmetic fixes and maintenance/experimental rearrangements

============= Patch 5:
> Posting-number: Volume 16, Issue 97
> Archive-name: ecu3/patch05a
> 
> 1. Fixed memory leak + bad free in feval_str().
> 
> 2. Some common types of procedure string operations have been made faster
> by redesign of the realloc_esd() function.
> 
> 3. Octal integer constants were implemented; they may be denoted by
> prefixing them with "0o".  Leading zero octal constants are not supported
> due to ECUs mutiple use of the same integer constant parser.  I thought 
> most people would rather %itos("0200") return 200(10) than 128(10).
> 
> 4. Many line drivers, particularly FAS, will wait a process closing
> a tty line until all characters queued for output have been sent.
> When closing a tty line that has been permanently XOFF'ed by a 
> dead remote system or a noisy XOFF, this can result in a hang.
> Now, a SIGALRM/setjmp scheme is used to recover from this condition
> and flush line output before reattempting the close.  Five
> seconds are allowed for the draining to occur.
> 
> 5. Multiscreen normal and reverse foreground and background colors
> in effect at the beginning of ecu execution are restored when the
> program terminates (thanks to staceyc@sco for illuminating the
> undocumented GIO_IOCTL ioctl; I've wanted to be able to do this for
> a long time).
> 
> 6. lamy@glsys.in-berlin.de reported a core dump immediately after
> the one-line startup message under XENIX 286.  Others have had the
> problem too.  I am puzzled -- it is happening in get_home_dir(),
> which seems rather straightforward.  A patch to avoid the problem
> is included: get the home directory from the environment variable
> HOME if possible rather than invoke libpwent.a.
> 
> 7. An embarassing nroff problem was reported by slerner@eingedi.
> Patches are included for the nroff source.  Mr. Lerner also pointed
> out an obsolete reference to samplproc.man.  The models subdirectory
> contain many sample, even useful, procedures and samplproc.man
> was discarded a long time ago.
> 
> If you do not have nroff or the spare CPU cycles to make the
> manual from nroff source, I'll email you one. Just mail me
> at wht@n4hgf.Mt-Park.GA.US or emory!n4hgf!wht and put
> "send ecu305 manual" in the subject line.  If I get enough
> requests, I'll repost it to c.s.m as ecuman305.
> 
> 8. A make bug in the trial ISC port was fixed in Make.ecu (thanks to
> jmd@p1so).
> 
> 9. During non-curses file transfer, the cumulative elapsed time
> is reported once per complete line of 'RRRTRR..' status.
> 
> 10. ache@hq.demos.su reported a bug in XENIX utmp handler
> code.  This is a fix for most XENIX systems, but define OLD_WAY
> in utmpstat.c if you have problems.
> 
> 11. Sometimes upon adding a new phone entry, it would be marked
> for redial upon creation.  This has been fixed by using calloc()
> instead malloc().
> 
> 12. We seem to be bumping some limits on 286 systems.  I added
> more code to handle more core dumps reported by lamy@glsys.in-berlin.de:
> somehow newwin() managed to return zero (probably memory alloc fail).
> The patch to ecuwinutil.c won't fix the problem, but will at least
> report it and die gracefully, rather than splatter on the pavement
> with a core dump.  Please write me with bug reports and crash info:
> see below.
> 
> .--------------------.
> | NOTES and REQUESTS |
> `--------------------'
> 
> 1. I do not have any XENIX system to test with.  It is a tribute
> to SCO orthogonality that 35,000+ line program works so well
> across 2 CPUs and two operating systems of many minor releases
> and many versions of development systems.  I continue to point
> this out when I hear SCO-bashers do their thing.  However, since
> s**t does happen, if you are reporting a problem that results in
> a core dump, please run the following for me (I would APPRECIATE it):
> 
>   % cd where ecu is
>   % ./ecu
>   ----- kaboom -----
>   % ^Jstty sane^J if needed (probably)
>   % adb ./ecu |& tee to.wht
>   * $x
>   * $c
>   * $r
>   * $q
> If you are a really industrious one and have sdb and compiled with -g,
>   % sdb ./ecu |& tee -a to.wht
>   % t
>   % q
> Then  
>   % mail -s 'ecu 3.xx core dump' wht@n4hgf.mt-park.ga.us < to.wht
> 
> 2. ache@hq.demos.su has made some excellent suggestions which
> would enhance the line handling/choosing algorithms.  They will
> require a change in the phone directory.  He suggests I interpret
> old directory formats, while writing only new ones.  The changes
> are far reaching and I haven't the time now to plug them in,
> but kudos to him and I'll try to find A Round Tuit.

============= Patch 6:
> Posting-number: Volume 17, Issue 11
> Archive-name: ecu3/patch06
> 
> This patch (#6) fixes a bug in patch 5.  Things seem stable now.
> I was going to wait for possible feedback from ISC porters, but
> several folks have had this problem (no doubt since ECU won't work
> without this patch).  This patch was also sent to comp.sources.bugs
> on 13 February, but patchlevel.h was not updated.  You may get 1 hunk
> rejected if you have already applied the patch.
> 
> You need to remake/reinstall both ecu and ecuungetty.
> 
> This man's hat sits on a quick-thinking head:
> > Organization: DEMOS, Moscow, USSR
> > Date: Wed, 13 Feb 91 02:15:23 +0300 (MSK)
> > From: emory!hq.demos.su!ache (Andrew A. Chernov, canton Uri's citizen)
> > Subject: ECU 3.05 utmpstat
> > 
> > Hi, Warren, bad news.
> > I just applied PATCH 5 for ECU, everything appears OK, but
> > 'utmpstat' not work at all, I look in...
> > IMHO it seems, like two strings are misplaced...
> > (US_LOGIN and US_DIALOUT)
> > I fix it, and ECU works correctly.
> > Good Luck.

