2008-02-22 00:20 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/cdpapi.c
! fixed unicode values for control codes in default CP437 unicode table
* harbour/source/rtl/gtchrmap.c
! added missing default translation of chr(155) - it's control code
on most of terminals and should not be shown in non UFT-8 mode
* harbour/source/rtl/gttrm/gttrm.c
! do not use alternate character set for box drawing in UTF-8 mode
New Linux consoles disable UTF-8 mode when alternate character set
is enabled
* harbour/contrib/hbct/ctwin.c
* harbour/contrib/hbct/ctwin.h
* harbour/contrib/hbct/ctwfunc.c
* overload ReadKey() method for future window moving when scroll lock
is set and for KEYREAD() implementation.
* store real last key value in CTWIN GT.
This commit is contained in:
@@ -8,6 +8,23 @@
|
||||
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2008-02-22 00:20 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/source/rtl/cdpapi.c
|
||||
! fixed unicode values for control codes in default CP437 unicode table
|
||||
* harbour/source/rtl/gtchrmap.c
|
||||
! added missing default translation of chr(155) - it's control code
|
||||
on most of terminals and should not be shown in non UFT-8 mode
|
||||
* harbour/source/rtl/gttrm/gttrm.c
|
||||
! do not use alternate character set for box drawing in UTF-8 mode
|
||||
New Linux consoles disable UTF-8 mode when alternate character set
|
||||
is enabled
|
||||
* harbour/contrib/hbct/ctwin.c
|
||||
* harbour/contrib/hbct/ctwin.h
|
||||
* harbour/contrib/hbct/ctwfunc.c
|
||||
* overload ReadKey() method for future window moving when scroll lock
|
||||
is set and for KEYREAD() implementation.
|
||||
* store real last key value in CTWIN GT.
|
||||
|
||||
2008-02-21 22:17 UTC+0100 Marek Paliwoda (mpaliwoda at interia pl)
|
||||
* harbour/make_vc.mak
|
||||
+ Added a possiblity to compile harbour in ST or MT mode by using
|
||||
|
||||
@@ -320,3 +320,8 @@ HB_FUNC( WMOVE )
|
||||
hb_retni( hb_ctwMoveWindow( hb_ctwCurrentWindow(),
|
||||
hb_parni( 1 ), hb_parni( 2 ) ) );
|
||||
}
|
||||
|
||||
HB_FUNC( CTWLASTKEY )
|
||||
{
|
||||
hb_retni( hb_ctwLastKey() );
|
||||
}
|
||||
|
||||
@@ -134,6 +134,8 @@ static int * s_pShadowMap = NULL;
|
||||
static int s_iMapWidth = 0;
|
||||
static int s_iMapHeight = 0;
|
||||
|
||||
static int s_iLastKey = 0;
|
||||
|
||||
|
||||
static int hb_ctw_CalcShadowWidth( int iRows, int iCols )
|
||||
{
|
||||
@@ -1642,6 +1644,20 @@ static int hb_ctw_gt_Alert( PHB_GT pGT, PHB_ITEM pMessage, PHB_ITEM pOptions,
|
||||
return HB_GTSUPER_ALERT( pGT, pMessage, pOptions, iClrNorm, iClrHigh, dDelay );
|
||||
}
|
||||
|
||||
static int hb_ctw_gt_ReadKey( PHB_GT pGT, int iEventMask )
|
||||
{
|
||||
int iKey;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_ctw_gt_ReadKey(%p,%d)", pGT, iEventMask));
|
||||
|
||||
iKey = HB_GTSUPER_READKEY( pGT, iEventMask );
|
||||
|
||||
if( iKey != 0 )
|
||||
s_iLastKey = iKey;
|
||||
|
||||
return iKey;
|
||||
}
|
||||
|
||||
/* PUBLIC FUNCTIONS */
|
||||
|
||||
BOOL hb_ctwInit( void )
|
||||
@@ -1824,6 +1840,21 @@ int hb_ctwAddWindowBox( int iWindow, BYTE * szBox, int iColor )
|
||||
return iResult;
|
||||
}
|
||||
|
||||
int hb_ctwLastKey( void )
|
||||
{
|
||||
/* keyread() in CT3 uses 64512 bytes length buffer
|
||||
* when it reach this limit and new key is added the
|
||||
* buffer size is decreased by 1024 to 63488 bytes
|
||||
* before adding key. TODO: check id buffer is shifted
|
||||
*/
|
||||
if( !s_fInit )
|
||||
{
|
||||
PHB_GT pGT = hb_gt_Base();
|
||||
if( pGT )
|
||||
hb_ctw_Init( pGT );
|
||||
}
|
||||
return s_iLastKey;
|
||||
}
|
||||
|
||||
static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable )
|
||||
{
|
||||
@@ -1852,6 +1883,7 @@ static BOOL hb_gt_FuncInit( PHB_GT_FUNCS pFuncTable )
|
||||
pFuncTable->Resize = hb_ctw_gt_Resize;
|
||||
pFuncTable->Info = hb_ctw_gt_Info;
|
||||
pFuncTable->Alert = hb_ctw_gt_Alert;
|
||||
pFuncTable->ReadKey = hb_ctw_gt_ReadKey;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -73,6 +73,7 @@ extern int hb_ctwGetFormatCords( int iWindow, BOOL fRelative, int * piTop, int
|
||||
extern int hb_ctwMoveWindow( int iWindow, int iRow, int iCol );
|
||||
extern int hb_ctwCenterWindow( int iWindow, BOOL fCenter );
|
||||
extern int hb_ctwAddWindowBox( int iWindow, BYTE * szBox, int iColor );
|
||||
extern int hb_ctwLastKey( void );
|
||||
|
||||
HB_EXTERN_END
|
||||
|
||||
|
||||
@@ -61,10 +61,10 @@
|
||||
# define NUMBER_OF_CHARS 256
|
||||
|
||||
static USHORT s_uniCodes[NUMBER_OF_CHARS] = {
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
|
||||
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
|
||||
0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
|
||||
0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022,
|
||||
0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C,
|
||||
0x25BA, 0x25C4, 0x2195, 0x203C, 0x00B6, 0x00A7, 0x25AC, 0x21A8,
|
||||
0x2191, 0x2193, 0x2192, 0x2190, 0x2319, 0x2194, 0x25B2, 0x25BC,
|
||||
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
|
||||
0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
|
||||
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
|
||||
|
||||
@@ -70,6 +70,8 @@ static void chrmap_init( int *piTransTbl )
|
||||
|
||||
for( i = 0; i < 256; ++i )
|
||||
piTransTbl[i] = HB_CHRMAP( i < 128 ? 1 : 0, i );
|
||||
|
||||
piTransTbl[155] = HB_CHRMAP( 1, '.' );
|
||||
}
|
||||
|
||||
static void chrmap_dotctrl( int *piTransTbl )
|
||||
|
||||
@@ -2097,7 +2097,7 @@ static void hb_gt_trm_SetDispTrans( PHB_GTTRM pTerm, char * src, char * dst, int
|
||||
for( i = 0; i < 256; i++ )
|
||||
{
|
||||
ch = pTerm->charmap[i] & 0xffff;
|
||||
mode = !pTerm->fUTF8 ? ( pTerm->charmap[i] >> 16 ) & 0xff : 0;
|
||||
mode = !pTerm->fUTF8 ? ( pTerm->charmap[i] >> 16 ) & 0xff : 1;
|
||||
|
||||
switch( mode )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user