ChangeLog 20000520-15:25 GMT+1

This commit is contained in:
Ryszard Glab
2000-05-20 13:20:42 +00:00
parent 8e16af8da6
commit c4309a12ca
2 changed files with 8 additions and 25 deletions

View File

@@ -1,3 +1,10 @@
20000520-15:25 GMT+1 Ryszard Glab <rglab@imid.med.pl>
*source/rtl/gtcrs/gtcrs.c
* fixed hb_gt_SetAttribute() to work correctly
with ncurses library
(thanks to Marek Paliwoda)
20000520-14:45 GMT+1 Ryszard Glab <rglab@imid.med.pl>
*source/rtl/gtcrs/gtcrs.c

View File

@@ -366,30 +366,15 @@ void hb_gt_SetAttribute( USHORT uiTop,
USHORT uiRight,
BYTE byAttr )
{
#if (defined(M_UNIX) || defined(hpux)) && !defined(NCURSES_VERSION)
int newAttr = s_attribmap_table[ byAttr ];
int dx;
chtype c;
#else
attr_t newAttr = (attr_t)s_attribmap_table[ byAttr ];
int Count = uiRight - uiLeft + 1;
short newColor;
newColor = PAIR_NUMBER( (newAttr & A_COLOR) );
#endif
HB_TRACE(HB_TR_DEBUG, ("hb_gt_SetAttribute(%hu, %hu, %hu, %hu, %d)", uiTop, uiLeft, uiBottom, uiRight, (int) byAttr));
newAttr &= A_ATTRIBUTES; /* extract attributes only */
while( uiTop <= uiBottom )
/*
this is an emulation of the mvchgat() function
for those curses which are not compatible with
XSI curses (like SCO curses and HPUX curses)
*/
#if (defined(M_UNIX) || defined(hpux)) && !defined(NCURSES_VERSION)
{
for ( dx=uiLeft; dx<=uiRight; dx++ )
{
@@ -398,22 +383,13 @@ void hb_gt_SetAttribute( USHORT uiTop,
c &= (A_CHARTEXT | A_ALTCHARSET);
/* set new attribute */
c |= newAttr;
if (addch(c) == ERR)
/* QUESTION : should we indicate any error here ? */
if (addch(c) == ERR) /* Stop on error */
return;
}
uiTop++;
}
#else
/*
we are assuming here that we compile Harbour
with XSI compatible curses (like ncurses)
*/
mvchgat( uiTop++, uiLeft, Count, newAttr, newColor, NULL );
#endif
if( s_uiDispCount == 0 )
/* QUESTION : should we indicate any error here ? */
refresh();
}