Alternate character modes on magic_cookie_glitch terminals (long)

Jim Balter jim at segue.segue.com
Sat Mar 9 07:24:07 AEST 1991


In article <10625 at scolex.sco.COM> staceyc at sco.COM (Stacey Campbell) writes:
>Do you mean xmc?

Yes, he does.

>I've compiled the following program with the stock
>AT&T 3.2.1 curses source and with xmc#0 and xmc#1 and it does not emit the
>sequence to turn off smacs (either sgr0 or rmacs).  Is this a bug in the
>C example (probably not), terminfo file (maybe, I've never written a
>magic cookie terminfo file, though it looks okay), or in libcurses.a?
>Comments?

It's a bug in your expectations.  curses is doing fine here.  xmc#0 implies a
cookie terminal, which is field oriented.  The cookie program produces, with
TERM=qp :

sgr0			Thise is wrong but harmless in this case.  It's a
			result of the field-oriented code being incompletely
			grafted onto code for state-oriented terminals.

clear			Clear da screen.

cup(0,21)		Go to the end of the field.

rmacs			Terminate the field, by turning off acs for the rest of
			the line.

cr			Go to the beginning of the field.

smacs			Start the acs field (columns 0-20).  The field is ended
			before being started to prevent twice changing the
			state of the characters to the right of the field.

lqqqqqqqqqqqqqqqqqqqk	Place some characters into the acs field.  This assumes
			the alternate characters for the qvt101 are the same
			as for the vt100.  If not, the acsc capability must
			be set accordingly.  RTF3.2M.

cup(23,0)		Go to bottom left corner.


This should work properly on a real field-oriented terminal.  If the qvt101
normally has field-oriented attributes but acs is state-oriented, then curses
doesn't support it.  But if acs is truly field-oriented, then there is no need
for a final sgr0, because that wouldn't affect subsequent output.

-- Jim Balter, Segue Software, Inc.



More information about the Comp.unix.programmer mailing list