[H-GEN] Linux curses

Byron Ellacott bellacott at hotmail.com
Thu May 13 11:51:19 EDT 1999


(Note reply-to: being general at humbug.org.au vs "Byron Ellacott" <bellacott at hotmail.com>)

>I am in the throws of writting an application using curses and cannot
>figure out how to draw nice looking boxes using the character set defined
>in the PC, has anyone used the curses library and have sample code?
I have, I do not

the problem lies in the fact that a tty is inherently a 7bit device, and 
lacks the characters for line drawing.  many terminals can actually produce 
those characters, however, and this is accounted for in termcap/terminfo 
entries.  To get at them, use [w]addch(ACS_xxxx)
where the full list of ACS_xxxx values can be found in curs_addch(3)

You're specifically after
ACS_[HV]LINE		horizontal or vertical line
ACS_[UL][LR]CORNER	upper/lower left/right corner

so ACS_ULCORNER is the upper left corner character.

The neat thing about these defines is they're not constant values -- they 
change to something your terminal can support (usually +, - and |)

hth


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

--
This is list (humbug) general handled by majordomo at lists.humbug.org.au .
Postings only from subscribed addresses of lists general or general-post.



More information about the General mailing list