Curses: Drawing Boxes -- sending control chars

Christer Lindh clindh at Stride.COM
Tue Aug 30 05:09:52 AEST 1988


>From article <384 at marob.MASA.COM>, by daveh at marob.MASA.COM (Dave Hammond):
> I was under the impression that terminfo-based curses allow characters
> from an alternate characterset to be output (like line-drawing chars)
> by or-ing them with A_ALTCHARSET.  

That is right. What the terminfo in System 5.2 *doesn't* supply is field
where you can tell curses what character should be sent for 'Top Left
Corner' etc. System 5.3 terminfo has this, and 5.3 curses uses this
map to draw boxes with a alternate character set. It works pretty well.
This mapstring in 5.3 maps from 'vt100' characters to your terminal.

I did a a kludge using 5.2 curses, I put the ACS-table in the field
'is3' which is seldom used. I then parsed it and created a map-table
just after initscr(). I rewrote box() to use ACS characters, and
supplied all the defines curses5.3 uses (ACS_PLUS etc).  Works fine.

-- 
 clindh at stride.COM (Cybernerd)   ::      Remember when we said there is
   Stride Product Group, R&D     ::                no future ?
MicroSage Computer Systems, Inc. ::             We're there now...
    Reno, NV, (702) 322-6868     ::                              -Blank Reg



More information about the Comp.unix.questions mailing list