[comp.os.minix] Request for help concerning termcap entry

hedrick@athos.rutgers.edu (Charles Hedrick) (09/30/88)

Here is the termcap I use for the minix console with Gnu Emacs
(running on a Sun with my PC acting as a terminal emulator --
unfortunately Gnu Emacs doesn't work on Minix directly).  I've also
tried this termcap directly on the Minix system with elle.  It works,
but as far as I can tell, elle isn't taking advantage of insert/delete
line.  This doesn't matter very much, since the console display is so
fast that re-writing the screen is practical.  Note that my color
termcap assumes you are using black text on a white screen.  So I'm
also supplying you with 2 lines to put in .profile for a color monitor
to set that up.  The monochrome termcap will work either way (black on
white or white on black).  With my color termcap and .profile, here's
what you get:

  normal text screen is black on white
  prompt is "minix>" black on cyan
  elle mode line is black on green

/etc/termcap:

Warning: this termcap assumes you have enabled line-wrap, which is a
conditional in the Minix kernel source (called something like
LINEWRAP).  If not, remove the ":am" in both termcap entries.  It also
assumes you have enabled insert/delete character, which is called
something like CHARID.  If not, remove the entire line beginning
":ic=" in both termcap's.

In|minix-co|minix console support for color monitor:\
	:do=^J:up=^K:co#80:li#25:am:cl=\E[;H\E[J:\
	:al=\E[L:dl=\E[M:AL=\E[%dL:DL=\E[%dM:\
	:ic=\E[@:dc=\E[P:IC=\E[%d@:DC=\E[%dP:\
	:le=^H:nd=^N:bs:am:cm=\E[%i%d;%dH:\
	:ce=\E[K:cd=\E[J:so=\E[42m:se=\E[47m:us=\E[4m:ue=\E[m:\
	:md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[0m\E[47m:\
	:ho=\E[H:
Im|minix|minix console support for monochrome monitor:\
	:do=^J:up=^K:co#80:li#25:am:cl=\E[;H\E[J:\
	:al=\E[L:dl=\E[M:AL=\E[%dL:DL=\E[%dM:\
	:ic=\E[@:dc=\E[P:IC=\E[%d@:DC=\E[%dP:\
	:le=^H:nd=^N:bs:am:cm=\E[%i%d;%dH:\
	:ce=\E[K:cd=\E[J:so=\E[7m:se=\E[0m:us=\E[4m:ue=\E[m:\
	:md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[0m:\
	:ho=\E[H:

.profile for color monitors:

Warning: because I was afraid that mail might mess up control chars,
in the following I've turned control char's into their ^ equivalent.
That is, what shows up as ^[ below is a ^ followed by a [.  You'll
want to put it back to an actual control [ character.  This is just
the two lines concerned with setting up the colors.  Your .profile
will probably have other things in it.

echo "^[[30m^[[47m^[[H^[[J"
PS1="^[[30m^[[46mminix>^[[47m "

brucee@runx.ips.oz (Bruce Evans) (10/07/88)

Andy Tanenbaum writes:

>ELLE is interested in the following items:
>[long list]

Elle also uses "am" (auto-wrap margin) and goes crazy without it if TTY is
doing it (#define LINEWRAP for 1.3c TTY which appears not to be the
default). I want auto-wrap for the sh but in elle it wastes column 78 as
well as 79. Since an unduly large number of diffs have involved editing
out white space, presumably to keep elle happy, something needs to be
done. I think "am" and lots of other terminal capabilities should be in
ioctl(). (Real terminals usually have some hardware to fiddle with :-)).
However, ioctl() is mis-implemented. It goes to a lot of trouble to
pack everything into a message when it should be just passing a pointer
to an open-ended structure and letting the device driver copy it.

Bruce Evans
Internet: brucee@runx.ips.oz.au    UUCP: uunet!runx.ips.oz.au!brucee