Xref: utzoo comp.unix.questions:25727 comp.lang.c:32140 comp.terminals:2306 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!ames!haven!decuac!e2big.mko.dec.com!bacchus.pa.dec.com!decwrl!wuarchive!cs.utexas.edu!yale!umich!umeecs!msi-s0.msi.umn.edu!cs.umn.edu!sialis!quad!dts From: dts@quad.sialis.mn.org (David T. Sandberg) Newsgroups: comp.unix.questions,comp.lang.c,comp.terminals Subject: Curses for terminals w/space-taking attributes Message-ID: <577@quad.sialis.mn.org> Date: 11 Aug 90 08:48:39 GMT Reply-To: dts@quad.sialis.mn.org (David T. Sandberg) Followup-To: comp.unix.questions Organization: Quadric Systems, Richfield MN Lines: 58 I have been having problems with using curses to do screen handling on terminals with the "magic cookie glitch", i.e. space-taking attributes. (I have elected to crosspost to comp.lang.c after some consideration, since curses comes from the land of C.) The following simple fragment illustrates the problem. I've run this through on three systems (NCR Tower w/SysVr2, 386 w/SCO Xenix 2.3.2, and my faithful AT&T Unix PC w/OS version 3.51). /*-------------------*/ #include main() { initscr(); clear(); move( 5, 5 ); standout(); addstr( " This should be highlighted " ); standend(); refresh(); getch(); endwin(); } /*-------------------*/ On all three systems this code performs as expected when using a terminal without space-taking attributes (in other words, a _real_ terminal ;'). However, when using either a tvi905 or a wyse50, both of which require a space for the attribute data, this code performs properly only on the Tower (and more complex stuff of this sort doesn't even like to work there). On the other two systems the strings is displayed highlighted for the barest of moments, and then reverts back to normal before the keystroke is accepted via getch(). (Note that applications programs which use highlighting on these system/terminal combinations work perfectly... I'm reasonably certain that the termcap/terminfo files are not the culprit.) So, are two of these three curses implementations broken in this regard? Or is proper handling of XMC beyond the capability of most curses implementations? Or am I just lacking knowledge on how to handle these types of terminals via curses? (I hope it's the latter - I need to make this work as soon as possible, and I'm rather more comfortable with curses than I am with using the terminal databases directly. The 386 running SCO Xenix is the environment in which I need to actually overcome this, BTW.) Any and all comments regarding coding for terminals with those god-cursed space-taking attributes will be greatly appreciated. Please email responses to dts@quad.sialis.mn.org... but if you choose to followup for some reason, I have redirected same to comp.unix.questions, since I do not receive comp.terminals.) -- \\ \ David Sandberg, consultant \\ // "Small hats!" / Richfield MN // \\ \ dts@quad.sialis.mn.org \\