Levee, or

Description

Levee is my attempt to write a vi clone. It was originally
written for USCD Pascal I.5 on the Terak 8510a, ported to USCD
Pascal 4.0 on the Sage and Pinnacle 68000-based microcomputers,
ported back to I.5, but rewritten in P2 (a Pascal derivative language
I wrote in 1983 or thereabouts), rewritten in Pascal for an MP/M
box, then my friend John Tainter and I re-re-rewrote it
in C so we could run it on our newly-purchased Atari 520STs
in 1985, and then I re-re-re-rewrote it for FlexOS when I was working
at CPT in (yuck!) Eden Prairie, MN.

When Atari began to roll belly-up, we both abandoned that platform for
PCs and re-re-re-re-etc-wrote it for MS-DOS, and when I started
using Linux in 1992 I rewrote it AGAIN,
then used it off and on until I discovered nvi (and, after a few
more years, Caldera freed the real vi, so I abandoned nvi for that).

But, be that as it may, levee is still pretty tiny (37k executable
when linked against termcap on Mastodon), so it’s hard to beat its
disk size.

Source Code

3.5b adds compatability with the creeping
bloatware that is C on OSX 10.10 – apparently getline() and
getcontext() have suddenly become part of the thrice-damned
standard library, so mygetline() and getcontext(), which
have been compiling without complaint for over 20 years now,
suddenly conflict with the clown car of chaos that is the standard
of the week.

This wasn’t something I discovered; Peter Aronoff tried to compile
levee on a 10.10 machine and had the C compile throw a tantrum on
him (the copy of levee I use was compiled on a 10.5 machine and has
been working without complaint since then), so he patched the bug,
added a new feature (g maps to 1G for symmetry with G taking
you to the end of the file), and did some editing on the documentation.
And then I went in and updated my email address (I am never going to
move back to Chicago, so staying in the chi.il.us pseudo-top-level domain
is kind of silly) and it’s now version 3.5b.

Enjoy the minimal changes and wait for OSX 10.11 to make more
of my functional space magically reserved.

3.5a had to be released because I was
bitten by the double curse of Xcode becoming more gnu out
from under me and modern commercial Linuxes becoming, if
possible, even more gnu than they were before.

On top of these configuration changes, I’ve also added
another new feature in the form of “0” as a movement
command like you’ll find in the other, higher priced,
versions of vi.

3.5 has, after a gap of about 15 years,
a new feature in the form of the “!”
command in visual mode. Other than that, there are no
changes from 3.4p.

3.4p has been reworked so that it can be
configured with configure.sh,
and has the additional minor feature that it better supports
consoles and gui windows that come in different sizes. This
is the first new-feature-release in quite some time (I believe
the last feature went into levee sometime prior to 1998).

This release is thanks to Felipe Augusto van de Wiel,
from the Debian Linux project, who sent me mail on
15-Jun-2007 asking if I’d be willing to accept some patches
and roll levee up to a new release so that Debian wouldn’t be
carrying around a decade’s worth of differences from the
baseline. I’ve not gotten his patches yet (version 3.4q will
no doubt follow 3.4p in quick succession,) but after he sent
me the mail I got the whim to build levee on a freeBSD box.
That didn’t work (and it didn’t work in a fairly spectacular
fashion,) so I spent 5 hours replacing the
old “here are a dozen or so settings you have to set by
hand” arrangement with one that doesn’t involve getting a Masters
degree in Levee coding.
It’s uncertain whether configure.sh will get along
with dos, the atari.st, rmx, or flexos (signs say “no”), but you
should be able to run configure.sh on a Unix machine, then export the
configured code to your dos/atari/rmx/flexos box and build it there.

3.4o has no features that haven’t been in
levee since the late 1980s, but it compiles cleanly with
cc -Wall (for values of cc which translate to gcc 2.7.2
– I don’t officially support any newer versions of that
thrice-damned compiler – or, maybe, pcc,) which is
important, I guess.

And, just in case you’re wondering, no, I never watched the
Captain Video TV show when I was young – I don’t even think I
was even aware of the name except as a silly name until just
recently – I just liked the funny juxtiposition of names.