diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 08a051aa47..473c05d2b2 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,15 @@ The license applies to all entries newer than 2009-04-28. */ +2010-07-10 08:52 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * src/rtl/gtdos/gtdos.c + * src/rtl/gtwin/gtwin.c + * src/rtl/gtos2/gtos2.c + * src/rtl/gtsln/kbsln.c + * include/hbapigt.h + ! Fixed code to use HB_INKEY_RAW constant. + * Marked C level INKEY_RAW constant with HB_LEGACY_LEVEL3. + 2010-07-10 08:15 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * utils/hbrun/hbrun.prg * Upped history length to 500 (from 128) diff --git a/harbour/include/hbapigt.h b/harbour/include/hbapigt.h index bd40956e33..a1b3b2a586 100644 --- a/harbour/include/hbapigt.h +++ b/harbour/include/hbapigt.h @@ -64,7 +64,7 @@ * Undocumented GT API declarations * * Copyright 2005 Przemyslaw Czerpak < druzus /at/ priv.onet.pl > - * Internal GT code reimplemented in differ way + * Internal GT code reimplemented in different way * * See COPYING for licensing terms. * @@ -299,7 +299,9 @@ extern HB_EXPORT HB_ERRCODE hb_gtSetBorder( HB_GT_RGB * color ); Clipper has no key code 256, so it may as well be used for all the Harbour builds that need it */ -#define INKEY_RAW 256 /* Minimally Decoded Keyboard Events */ +#if defined( HB_LEGACY_LEVEL3 ) +# define INKEY_RAW HB_INKEY_RAW +#endif /* Harbour keyboard support functions */ extern HB_EXPORT int hb_inkey( HB_BOOL bWait, double dSeconds, int iEvenMask ); /* Wait for keyboard input */ diff --git a/harbour/src/rtl/gtdos/gtdos.c b/harbour/src/rtl/gtdos/gtdos.c index 923eb8447a..aac45f2327 100644 --- a/harbour/src/rtl/gtdos/gtdos.c +++ b/harbour/src/rtl/gtdos/gtdos.c @@ -863,7 +863,7 @@ static int hb_gt_dos_ReadKey( PHB_GT pGT, int iEventMask ) { /* A key code is available in the BIOS keyboard buffer, so read it */ #if defined( __DJGPP__ ) - if( iEventMask & INKEY_RAW ) ch = getxkey(); + if( iEventMask & HB_INKEY_RAW ) ch = getxkey(); else ch = getkey(); if( ch == 256 ) /* Ignore Ctrl+Break, because it is being handled as soon as it @@ -885,7 +885,7 @@ static int hb_gt_dos_ReadKey( PHB_GT pGT, int iEventMask ) the actual function key and then offset it by 256, unless extended keyboard events are allowed, in which case offset it by 512 */ - if( iEventMask & INKEY_RAW ) ch = getch() + 512; + if( iEventMask & HB_INKEY_RAW ) ch = getch() + 512; else ch = getch() + 256; } #endif diff --git a/harbour/src/rtl/gtos2/gtos2.c b/harbour/src/rtl/gtos2/gtos2.c index a4a96e8eff..e4a9435bb8 100644 --- a/harbour/src/rtl/gtos2/gtos2.c +++ b/harbour/src/rtl/gtos2/gtos2.c @@ -606,7 +606,7 @@ static int hb_gt_os2_ReadKey( PHB_GT pGT, int iEventMask ) { /* It was an extended function key lead-in code, so read the actual function key and then offset it by 256, unless extended keyboard events are allowed, in which case offset it by 512 */ - if( ( s_key->chChar == 0xE0 ) && ( iEventMask & INKEY_RAW ) ) + if( ( s_key->chChar == 0xE0 ) && ( iEventMask & HB_INKEY_RAW ) ) ch = ( int ) s_key->chScan + 512; else ch = ( int ) s_key->chScan + 256; diff --git a/harbour/src/rtl/gtsln/kbsln.c b/harbour/src/rtl/gtsln/kbsln.c index c3c1a1b7d8..8b3ae86f0d 100644 --- a/harbour/src/rtl/gtsln/kbsln.c +++ b/harbour/src/rtl/gtsln/kbsln.c @@ -410,7 +410,7 @@ int hb_gt_sln_ReadKey( PHB_GT pGT, int iEventMask ) return hb_gt_sln_mouse_Inkey( iEventMask, HB_FALSE ); } - if( ( iEventMask & INKEY_RAW ) != 0 ) + if( ( iEventMask & HB_INKEY_RAW ) != 0 ) return tmp; tmp = hb_sln_FindKeyTranslation( tmp ); diff --git a/harbour/src/rtl/gtwin/gtwin.c b/harbour/src/rtl/gtwin/gtwin.c index 432ed5bbd6..c001efa960 100644 --- a/harbour/src/rtl/gtwin/gtwin.c +++ b/harbour/src/rtl/gtwin/gtwin.c @@ -1604,7 +1604,7 @@ static int hb_gt_win_ReadKey( PHB_GT pGT, int iEventMask ) } else if( s_bMouseEnable && s_irInBuf[ s_cNumIndex ].EventType == MOUSE_EVENT && - iEventMask & ~( INKEY_KEYBOARD | INKEY_RAW ) ) + iEventMask & ~( INKEY_KEYBOARD | HB_INKEY_RAW ) ) { s_mouse_iCol = s_irInBuf[ s_cNumIndex ].Event.MouseEvent.dwMousePosition.X;