Curses is broken. Don't believe it? Try this...

John R. MacMillan john at chance.UUCP
Fri Apr 5 14:49:37 AEST 1991


|The following attributes are defined in /usr/include/curses.h:

The attributes in curses.h are ones that curses knows how to look for;
there's no guarantee that any given terminal can actually do them.
The capabilities for terminals are given by the terminfo(4) files.

I tend to think of terminfo files as personal, customizable part of
your environment.

|attrset (A_STANDOUT);		/* Doesn't work: displayed in REVERSE	*/

This is because the default ``standout'' mode on the s4 terminfo (in
particular the ``smso'' capability) is reverse.  Standout mode is just
supposed to be something noticeable.  It could be bold, reverse,
underline, blinking, or some combination of the above.  This is one
reason I think terminfo files are personal; you want to pick a
standout mode that you like, and doesn't look stupid when used by the
tools you normally use (some programs expect standout to be reverse,
and may look really funny if you set it for dim).

|attrset (A_REVERSE);		/* OK					*/
|mvprintw (14,30, "REVERSE");
|attrset (A_BLINK);		/* Doesn't work: displayed in REVERSE	*/

This is because the s4 console can't blink, so the A_REVERSE from
above is still in effect, I think.

|attrset (A_BOLD);		/* Doesn't work: displayed in REVERSE	*/

This again is dependent on the terminfo entry, in this case, the
``bold'' capability.

|/*
| *  These escape sequences are documented in the Communications Management
| *  manual, page A10.
| */

The whole set of screen escapes is documented in escape(7) in Volume 1
of the User's Manual.

|I could believe that it is impossible to do blinking in the unix pc, but
|is there a way to display text in STANDOUT and BOLD attributes using
|curses?

Yes, change your terminfo file for the s4 terminal.  Useful man pages
are infocmp(1M), terminfo(4), tic(1M), tput(1), and escape(7).  In my
manual set, these are all in Volume 1 of the User's Manual, the first
4 in a section at the end dealing with curses, and the last one in
with the rest of the section 7 man pages.

If you make the changes in a personal area, rather than the system
one, you will have to set the environment variable TERMINFO to point
to your area (mine is /u/john/lib/terminfo).

Just for anyone who cares, this is my personal s4 terminfo description:

#
# Personalized entry for the console on an AT&T UNIX PC, with
# most (all?) of the entries from the escape(7) man page.
#
# Uses km (has meta-key) because I use Ford's keyboard driver
# Uses acsc, smacs, rmacs (alternate character set) based on
#	having a modified /usr/lib/wfont/BLD.ft loaded into slot one
#	(also affects sgr)
# is2 (init string) clears to end of display; this isn't strictly
#	necessary
#
s4|S4|unixpc|unix_pc|3b1|3B1|7300|pc7300|PC7300|AT&T UNIX PC Model 7300,
	am, km, mir, msgr, xon,
	cols#80, it#8, lines#24,
	acsc=+h\,g.e0dis-f``aafigphrjjkkllmmnnooqqs_ttuuvvwwxx~~,
	bel=^G, bold=\E[1m, civis=\E[=1C, clear=\E[2J\E[H,
	cnorm=\E[=C, cr=\r, cub=\E[%p1%dD, cub1=\b,
	cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C,
	cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
	dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM,
	dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, home=\E[H,
	ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L,
	ind=\n, indn=\E[%p1%dS, is2=\E[J\E[;10m,
	kBEG=\ENB, kCAN=\EOW, kCMD=\EOU, kCPY=\END, kCRT=\EON,
	kDC=\ENF, kDL=\ENE, kEND=\ENN, kEOL=\EOA, kEXT=\EOK,
	kFND=\EOX, kHLP=\EOM, kHOM=\ENM, kIC=\ENJ, kLFT=\ENK,
	kMOV=\ENC, kMSG=\EOL, kNXT=\ENH, kOPT=\EOR, kPRT=\EOZ,
	kPRV=\ENG, kRDO=\EOT, kRES=\EOQ, kRIT=\ENL, kRPL=\EOY,
	kSAV=\EOO, kSPD=\EOP, kUND=\EOS, kbeg=\E9, kbs=\b,
	kcan=\EOw, kclo=\EOV, kclr=\E[J, kcmd=\EOu, kcpy=\ENd,
	kcrt=\EOn, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C,
	kcuu1=\E[A, kdch1=\ENf, kdl1=\ENe, kel=\EOa, kend=\E0,
	kext=\EOk, kf1=\EOc, kf2=\EOd, kf3=\EOe, kf4=\EOf,
	kf5=\EOg, kf6=\EOh, kf7=\EOi, kf8=\EOj, kfnd=\EOx,
	khlp=\EOm, khome=\E[H, kich1=\ENj, kind=\E[S,
	kmov=\ENc, kmrk=\ENi, kmsg=\EOl, knp=\E[U, knxt=\ENh,
	kopn=\EOv, kopt=\EOr, kpp=\E[V, kprt=\EOz, kprv=\ENg,
	krdo=\EOt, kref=\EOb, kres=\EOq, krfr=\ENa, kri=\E[T,
	krpl=\EOy, krst=\EOB, ksav=\EOo, kslt=\ENI, kspd=\EOp,
	kund=\EOs, nel=\EE, rev=\E[7m, ri=\EM, rin=\E[%p1%dT,
	rmacs=\E[10m, rmso=\E[m, rmul=\E[m,
	sgr=\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p9%t;11%e;10%;m,
	sgr0=\E[;10m, smacs=\E[11m, smso=\E[7m, smul=\E[4m,



More information about the Comp.sys.3b1 mailing list