Curses, Graphic Characters

Stacey Campbell staceyc at sco.COM
Mon Mar 5 07:22:13 AEST 1990


In article <19818 at dartvax.Dartmouth.EDU> andyb at coat.com writes:
>In article <41104 at jplgodo.UUCP> deutsch at jplgodo.UUCP (Michael Deutsch) writes:
>> ACS_VLINE	-	Vertical (border) graphic character
>> ACS_HLINE	-	Horizontal (border) graphic character

>> These are not available, as far as I can tell, in XENIX include
>> files.

Check in /usr/include/tinfo.h.  Include <curses.h> and make sure
M_TERMINFO is defined.

>Neither of the two methods that you listed for describing graphics
>(line-drawing) characters is standard.
>The solution I'd suggest is to use the acsc (:ac) attribute.

The acsc entry is one of the low level terminfo entries necessary
to draw graphics characters.  Others are sgr, sgr0, smacs and rmacs.

The ACS macros _are_ the standard and recommended way of accessing
alternate character sets for System 5.3 based curses(3).  E.g.

#include <curses.h>

int main()

{
	initscr();
	mvwaddch(stdscr, 0, 0, ACS_ULCORNER);
	mvwaddch(stdscr, 12, 40, ACS_PLUS);
	wrefresh(stdscr);
	endwin();
	return 0;
}

SCO Unix ships with color support in curses as well.  Send e-mail if you
want source to a demo yahtzee game using color window attributes.
-- 
Stacey Campbell                                             _--_|\
{uunet,ucscc,decwrl,att,microsoft,wyse}!sco!staceyc        /      \
staceyc at sco.com                                            \_.--._/
                                                                 v



More information about the Comp.unix.xenix mailing list