ITEM: I4856L

aixterm, terminfo, Exceed, boxes, colors, and accucobol !



Question:

AIX: 3.2.5      MODEL?

I am running hummingbird EXCEED on a pc which is connected/ or has a
connection to the RISC.  Anyway, I'm trying to draw boxes and use
colors.  When I create an aixterm window using the "aixterm -v .."
command then the window comes up fine (i.e. the boxes are drawn) but I
can't modify the colors by echo-ing the escape sequences.  However,
the vice versa happens when I issue the command "aixterm ..".  I have
color functionality but the boxes are not drawn correctly. 


Response:

1. Colors are not supported by 'aixterm -v'.
2. Box characters in 'aixterm' require alternate char set or FONT1.

I can duplicate the aixterm box problem with a simple c program
that does a curses call to drawbox(stdscr, 2, 2, 2, 20);

'aixterm' was changed in going from 3.1 to 3.2 to do national language
support.  This change changed to way that box characters are drawn.  In
3.2, to support NLS box characters can only be drawn in FONT1.  Early
versions of 3.2 had a problem with extended curses calls from the 'box'
routines, but this was fixed in IX27910 with PTF U411029.  A function
was added that automatically changed into the FONT1 mode before the box
characters, and changed back to FONT0 after.  This works fine if one
compiles with extended curses, but not if one simply outputs box charcters
with normal curses calls.  In this case, the program needs to specifically
put the character sequence out to put aixterm in FONT1 prior to sending
the box characters.

The following program works with extended curses

/* dobox.c extend curses test program  cc dobox.c -o dobox -lcur */
/*
\#include \
main()
{    initscr();
    refresh();
    mvaddstr(1, 1, "Here's a string");
    refresh();
    drawbox(stdscr, 2, 2, 2, 20);
    refresh();
    mvaddstr(3, 3, "I'm in the box");
    refresh();
    system("sleep 5");
    wclear(curscr);
    wrefresh(curscr);
    endwin();
}
In normal curses this can be done with something like:

addch((chtype) box_chars_1[0] | A_ALTCHARSET); refresh();
or from a shell
tput font1
tput box1
tput font0
or equivalent

The other way to solve the problem with normal curses is to use
TERM=aixterm-old


Response:

Customer tried aixterm-old which did not work, but agreed to try
my program, and shell script.

GRPH=`tput box1`

TL=`echo $GRPH | cut -c1`
VB=`echo $GRPH | cut -c2`
TR=`echo $GRPH | cut -c3`
HB=`echo $GRPH | cut -c4`
BR=`echo $GRPH | cut -c5`
BL=`echo $GRPH | cut -c6`
RT=`echo $GRPH | cut -c7`
BT=`echo $GRPH | cut -c8`
LT=`echo $GRPH | cut -c9`
CT=`echo $GRPH | cut -c10`

GPH_ON=`tput font1`
GPH_OFF=`tput font0`

echo "$GPH_ON"
echo "$TL$VB$VB$VB$VB$VB$VB$VB$VB$VB$TR"
echo "$HB         $HB"
echo "$HB         $HB"
echo "$HB         $HB"
echo "$HB         $HB"
echo "$HB         $HB"
echo "$HB         $HB"
echo "$BL$VB$VB$VB$VB$VB$VB$VB$VB$VB$BR"
echo "$GPH_OFF"


Response:



Support Line: aixterm, terminfo, Exceed, boxes, colors, and accucobol ! ITEM: I4856L
Dated: August 1994 Category: N/A
This HTML file was generated 99/06/24~13:30:45
Comments or suggestions? Contact us