[comp.lang.c] Curses for terminals w/space-taking attributes

dts@quad.sialis.mn.org (David T. Sandberg) (08/11/90)

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 <curses.h>
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       \\