Xref: utzoo comp.terminals:2668 comp.unix.programmer:1263 Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!randvax!segue!jim From: jim@segue.segue.com (Jim Balter) Newsgroups: comp.terminals,comp.unix.programmer Subject: Re: Alternate character modes on magic_cookie_glitch terminals (long) Keywords: qvt101, freedom100, curses Message-ID: <6671@segue.segue.com> Date: 8 Mar 91 21:24:07 GMT References: <1504@rascal.UUCP> <10513@scolex.sco.COM> <14405@ulysses.att.com> <10625@scolex.sco.COM> Reply-To: jim@segue.segue.com (Jim Balter) Organization: Segue Software, Inc. - Santa Monica, CA. +1-213-453-2161 Lines: 47 In article <10625@scolex.sco.COM> staceyc@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.