Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!caen!uwm.edu!bionet!agate!ucbvax!van-bc!seac!sco!olsa99!rascal!theo From: theo@rascal.UUCP (T. Kramer) Newsgroups: comp.terminals,sco.opendesktop Subject: Re: Alternate character modes on qvt101 and freedom 100 terminals Keywords: qvt101, freedom100, curses Message-ID: <1504@rascal.UUCP> Date: 25 Feb 91 07:33:36 GMT References: <1500@rascal.UUCP> <10156@scolex.sco.COM> <1502@rascal.UUCP> <10248@scolex.sco.COM> Reply-To: theo@rascal.UUCP (T. Kramer) Followup-To: comp.terminals Organization: Rascal Systems Lines: 61 In article <10248@scolex.sco.COM> staceyc@sco.COM (Stacey Campbell) writes: > >Which encouraged me to go back and check both the program and the >terminfo file again. Note that the piece of code I included is purely to illustrate the point. > >You must define an acsc string for your terminal. Curses needs this >to correctly deal with alternate characters. If you do not define >alternate characters curses will supply its default set ('+', '-', etc). >It is not necessary to turn on A_ALTCHARSET attributes when using the >ACS_ defines. Unfortunatly ACS is not portable across UNIX V.2, XENIX V.2 etc. This is however, a strict requirement for our code. I use the (w)attron(A_ALTCHARSET) and (w)attroff(A_ALTCHARSET) commands with success on all our platforms. Apart from SCO XENIX and UNIX, these include HPUX on the HP9000 835, UNIX V.4 on the ICL DRS6000, AIX on the IBM RS6000, UNIX V.2 on the Unisys model 5000 range, MS-DOS using ASPEN curses etc. I would agree with you that if I used the ACS_ defines I would not need (w)attron and (w)attrof, but because our code must be portable including, hopefully, our terminfo source files I can not depend on ACS_ defines. > >Most importantly note that the manual strongly recommends creating sgr >and sgr0 strings. The exact wording in one 3b2 AT&T terminfo manual >entry is; > >"REMEMBER THAT sgr AND sgr0 MUST ALWAYS BE SPECIFIED". > >I have terminfo files that work fine without sgr, but curses relies on >sgr0 to turn off all attributes that can be turned on with sgr, smso, et. al.. >sgr0 is output at endwin() time. It is important not to associate curses >calls such as attroff(A_ALTCHARSET) with actual output. In the above >code the call to attroff() will probably generate no output, because the >endwin() (amongst other things) should, if the terminfo entry is correct, >perform the same function. I need the call to (w)attrof as in my actual code I need to output normal character information after for example having painted a box on the screen. I will definitly not call endwin each time I want to go out of alternate character set mode ;-). The point of my request for help, however, is why does SCO Opendesktop Development System curses not output an \E% or \E%% or \E\% but does output AA and BB and \E$ and ... for the (w)attroff call? I seriously believe that this is a serious bug in the curses package which makes it difficult if not impossible for me, and I am sure many others who have selected curses for portability, to generate production binaries using the SCO UNIX and Opendesktop development systems! >[hope you don't mind keeping this in sco.opendesktop 'cos I rarely >read comp.terminals] Not at all, and thanks for all your help up to now :-). +------------------------------+--------------------------------------------+ | theo@rascal | curses @)(!#)(@!()_)(!)_ @??#@?@ | +------------------------------+--------------------------------------------+ Brought to you by Super Global Mega Corp .com