From 7b5883f6caf29c61b0695fb2e5a1ef5c716f359e Mon Sep 17 00:00:00 2001 From: Petr Chornyj Date: Sat, 27 Jun 2009 21:11:07 +0000 Subject: [PATCH] 2009-06-27 23:50 UTC+0200 Petr Chornyj (myorg63 at mail.ru) * contrib/hbsqlit3/hbsqlit3.c * contrib/hbwin/win_prn1.c * contrib/hbwin/win_prn2.c * contrib/rddads/adsfunc.c * source/pp/pplib.c * source/rdd/dbcmd.c * source/rdd/hbsix/sxfname.c * source/rdd/hbsix/sxord.c * source/rdd/hbsix/sxtable.c * source/rdd/hbsix/sxutil.c * source/rdd/nulsys/nulsys.c * source/rtl/colorind.c * source/rtl/datec.c * source/rtl/descend.c * source/rtl/gete.c * source/rtl/hardcr.c * source/rtl/hbhex.c * source/rtl/hbinet.c * source/rtl/hbstrsh.c * source/rtl/hbtoken.c * source/rtl/hbzlib.c * source/rtl/left.c * source/rtl/memofile.c * source/rtl/mlcfunc.c * source/rtl/mouse53.c * source/rtl/mtran.c * source/rtl/natmsg.c * source/rtl/oemansi.c * source/rtl/padc.c * source/rtl/padl.c * source/rtl/padr.c * source/rtl/philes.c * source/rtl/replic.c * source/rtl/right.c * source/rtl/space.c * source/rtl/str.c * source/rtl/strtran.c * source/rtl/strzero.c * source/rtl/stuff.c * source/rtl/substr.c * source/rtl/trim.c * source/vm/cmdarg.c * source/vm/dynlibhb.c * source/vm/proc.c * Replace hb_retc( NULL ) with hb_retc_null() * include/hbgtinfo.ch + added HB_GTI_KBD_LSHIFT, HB_GTI_KBD_RSHIFT HB_GTI_KBD_LCTRL, HB_GTI_KBD_RCTRL, HB_GTI_KBD_LALT, HB_GTI_KBD_RALT * source/rtl/gtkbstat.c * Changed functions hb_gt_winapi_*KbdState() Now we can to get the state of the SHIFT, CTRL, or ALT keys with distinguishing between left and right. * source/rtl/gtwin/gtwin.c * Changed hb_gt_win_getKbdState ; QUESTION: why gtwin.c don't use a function hb_gt_winapi_getKbdState from rtl/gtkbstat.c? --- harbour/ChangeLog | 59 +++++++++++++++++++++++++++++ harbour/contrib/hbsqlit3/hbsqlit3.c | 2 +- harbour/contrib/hbwin/win_prn1.c | 4 +- harbour/contrib/hbwin/win_prn2.c | 2 +- harbour/contrib/rddads/adsfunc.c | 8 ++-- harbour/include/hbgtinfo.ch | 7 ++++ harbour/source/pp/pplib.c | 2 +- harbour/source/rdd/dbcmd.c | 12 +++--- harbour/source/rdd/hbsix/sxfname.c | 2 +- harbour/source/rdd/hbsix/sxord.c | 6 +-- harbour/source/rdd/hbsix/sxtable.c | 2 +- harbour/source/rdd/hbsix/sxutil.c | 2 +- harbour/source/rdd/nulsys/nulsys.c | 22 +++++------ harbour/source/rtl/colorind.c | 4 +- harbour/source/rtl/datec.c | 2 +- harbour/source/rtl/descend.c | 2 +- harbour/source/rtl/gete.c | 10 ++--- harbour/source/rtl/gtkbstat.c | 14 +++++++ harbour/source/rtl/gtwin/gtwin.c | 7 ++++ harbour/source/rtl/hardcr.c | 2 +- harbour/source/rtl/hbhex.c | 4 +- harbour/source/rtl/hbinet.c | 8 ++-- harbour/source/rtl/hbstrsh.c | 2 +- harbour/source/rtl/hbtoken.c | 4 +- harbour/source/rtl/hbzlib.c | 4 +- harbour/source/rtl/left.c | 2 +- harbour/source/rtl/memofile.c | 6 +-- harbour/source/rtl/mlcfunc.c | 4 +- harbour/source/rtl/mouse53.c | 2 +- harbour/source/rtl/mtran.c | 2 +- harbour/source/rtl/natmsg.c | 2 +- harbour/source/rtl/oemansi.c | 4 +- harbour/source/rtl/padc.c | 4 +- harbour/source/rtl/padl.c | 4 +- harbour/source/rtl/padr.c | 4 +- harbour/source/rtl/philes.c | 6 +-- harbour/source/rtl/replic.c | 2 +- harbour/source/rtl/right.c | 4 +- harbour/source/rtl/space.c | 2 +- harbour/source/rtl/str.c | 2 +- harbour/source/rtl/strtran.c | 2 +- harbour/source/rtl/strzero.c | 2 +- harbour/source/rtl/stuff.c | 4 +- harbour/source/rtl/substr.c | 4 +- harbour/source/rtl/trim.c | 2 +- harbour/source/vm/cmdarg.c | 2 +- harbour/source/vm/dynlibhb.c | 2 +- harbour/source/vm/proc.c | 2 +- 48 files changed, 175 insertions(+), 88 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 860aa79e15..fb97d231a7 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,65 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-06-27 23:50 UTC+0200 Petr Chornyj (myorg63 at mail.ru) + * contrib/hbsqlit3/hbsqlit3.c + * contrib/hbwin/win_prn1.c + * contrib/hbwin/win_prn2.c + * contrib/rddads/adsfunc.c + * source/pp/pplib.c + * source/rdd/dbcmd.c + * source/rdd/hbsix/sxfname.c + * source/rdd/hbsix/sxord.c + * source/rdd/hbsix/sxtable.c + * source/rdd/hbsix/sxutil.c + * source/rdd/nulsys/nulsys.c + * source/rtl/colorind.c + * source/rtl/datec.c + * source/rtl/descend.c + * source/rtl/gete.c + * source/rtl/hardcr.c + * source/rtl/hbhex.c + * source/rtl/hbinet.c + * source/rtl/hbstrsh.c + * source/rtl/hbtoken.c + * source/rtl/hbzlib.c + * source/rtl/left.c + * source/rtl/memofile.c + * source/rtl/mlcfunc.c + * source/rtl/mouse53.c + * source/rtl/mtran.c + * source/rtl/natmsg.c + * source/rtl/oemansi.c + * source/rtl/padc.c + * source/rtl/padl.c + * source/rtl/padr.c + * source/rtl/philes.c + * source/rtl/replic.c + * source/rtl/right.c + * source/rtl/space.c + * source/rtl/str.c + * source/rtl/strtran.c + * source/rtl/strzero.c + * source/rtl/stuff.c + * source/rtl/substr.c + * source/rtl/trim.c + * source/vm/cmdarg.c + * source/vm/dynlibhb.c + * source/vm/proc.c + * Replace hb_retc( NULL ) with hb_retc_null() + * include/hbgtinfo.ch + + added HB_GTI_KBD_LSHIFT, HB_GTI_KBD_RSHIFT + HB_GTI_KBD_LCTRL, HB_GTI_KBD_RCTRL, + HB_GTI_KBD_LALT, HB_GTI_KBD_RALT + * source/rtl/gtkbstat.c + * Changed functions hb_gt_winapi_*KbdState() + Now we can to get the state of the SHIFT, CTRL, or ALT keys + with distinguishing between left and right. + * source/rtl/gtwin/gtwin.c + * Changed hb_gt_win_getKbdState + ; QUESTION: why gtwin.c don't use a function hb_gt_winapi_getKbdState + from rtl/gtkbstat.c? + 2009-06-27 13:27 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/contrib/hbqt/generator/qt45.qtp diff --git a/harbour/contrib/hbsqlit3/hbsqlit3.c b/harbour/contrib/hbsqlit3/hbsqlit3.c index 494fc123b2..375c8c7b78 100644 --- a/harbour/contrib/hbsqlit3/hbsqlit3.c +++ b/harbour/contrib/hbsqlit3/hbsqlit3.c @@ -794,7 +794,7 @@ HB_FUNC( SQLITE3_SQL ) hb_errRT_BASE_SubstR( EG_ARG, 0, NULL, HB_ERR_FUNCNAME, 1, hb_paramError(1) ); } #else - hb_retc( NULL ); + hb_retc_null(); #endif } diff --git a/harbour/contrib/hbwin/win_prn1.c b/harbour/contrib/hbwin/win_prn1.c index a467b676ff..5a2aaf59fb 100644 --- a/harbour/contrib/hbwin/win_prn1.c +++ b/harbour/contrib/hbwin/win_prn1.c @@ -389,7 +389,7 @@ HB_FUNC( WIN_GETPRINTERFONTNAME ) hb_retc( ( char * ) cFont ); } else - hb_retc( NULL ); + hb_retc_null(); } HB_FUNC( WIN_BITMAPSOK ) @@ -497,7 +497,7 @@ HB_FUNC( WIN_LOADBITMAPFILE ) } else { - hb_retc( NULL ); + hb_retc_null(); if( pbmfh != NULL ) hb_xfree( pbmfh ); diff --git a/harbour/contrib/hbwin/win_prn2.c b/harbour/contrib/hbwin/win_prn2.c index 75eda54202..98221e0f04 100644 --- a/harbour/contrib/hbwin/win_prn2.c +++ b/harbour/contrib/hbwin/win_prn2.c @@ -235,7 +235,7 @@ HB_FUNC( GETDEFAULTPRINTER ) if( hb_GetDefaultPrinter( szDefaultPrinter, &pdwBufferSize ) ) hb_retclen( szDefaultPrinter, pdwBufferSize - 1 ); else - hb_retc( NULL ); + hb_retc_null(); } static DWORD IsPrinterError( HANDLE hPrinter ) diff --git a/harbour/contrib/rddads/adsfunc.c b/harbour/contrib/rddads/adsfunc.c index 8b23108fab..341b57c16d 100644 --- a/harbour/contrib/rddads/adsfunc.c +++ b/harbour/contrib/rddads/adsfunc.c @@ -761,7 +761,7 @@ HB_FUNC( ADSGETTABLEALIAS ) &pusLen ) == AE_SUCCESS ) hb_retclen( ( char * ) pucAlias, pusLen ); else - hb_retc( NULL ); + hb_retc_null(); } else hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, HB_ERR_FUNCNAME ); @@ -796,7 +796,7 @@ HB_FUNC( ADSGETAOF ) hb_adsOemAnsiFree( szRet ); } else - hb_retc( NULL ); + hb_retc_null(); if( pucFilter2 ) hb_xfree( pucFilter2 ); @@ -965,14 +965,14 @@ HB_FUNC( ADSGETFILTER ) else { HB_TRACE(HB_TR_DEBUG, ("adsGetFilter() error %lu", ( ULONG ) ulRetVal)); - hb_retc( NULL ); + hb_retc_null(); } if( pucFilter2 ) hb_xfree( pucFilter2 ); } else - hb_retc( NULL ); + hb_retc_null(); } HB_FUNC( ADSENABLEENCRYPTION ) diff --git a/harbour/include/hbgtinfo.ch b/harbour/include/hbgtinfo.ch index a8f8246a32..7462157da6 100644 --- a/harbour/include/hbgtinfo.ch +++ b/harbour/include/hbgtinfo.ch @@ -165,6 +165,13 @@ #define HB_GTI_KBD_ACCENT3 16384 #define HB_GTI_KBD_ACCENT4 32768 +#define HB_GTI_KBD_LSHIFT 65536 +#define HB_GTI_KBD_RSHIFT 131072 +#define HB_GTI_KBD_LCTRL 262144 +#define HB_GTI_KBD_RCTRL 524288 +#define HB_GTI_KBD_LALT 1048576 +#define HB_GTI_KBD_RALT 2097572 + /* Harbour GT callback events - WORK IN PROGRESS */ #define HB_GTE_ACTIVATE 1 #define HB_GTE_SETFOCUS 2 diff --git a/harbour/source/pp/pplib.c b/harbour/source/pp/pplib.c index cf376ec087..bd6cc47724 100644 --- a/harbour/source/pp/pplib.c +++ b/harbour/source/pp/pplib.c @@ -268,5 +268,5 @@ HB_FUNC( __PP_PROCESS ) } } - hb_retc( NULL ); + hb_retc_null(); } diff --git a/harbour/source/rdd/dbcmd.c b/harbour/source/rdd/dbcmd.c index e594642c05..7b10df12cf 100644 --- a/harbour/source/rdd/dbcmd.c +++ b/harbour/source/rdd/dbcmd.c @@ -187,7 +187,7 @@ HB_FUNC( ALIAS ) return; } } - hb_retc( NULL ); + hb_retc_null(); } HB_FUNC( DBEVAL ) @@ -260,7 +260,7 @@ HB_FUNC( DBF ) return; } } - hb_retc( NULL ); + hb_retc_null(); } HB_FUNC( BOF ) @@ -543,7 +543,7 @@ HB_FUNC( DBFILTER ) hb_itemReturnRelease( pFilter ); } else - hb_retc( NULL ); + hb_retc_null(); } HB_FUNC( DBGOBOTTOM ) @@ -974,7 +974,7 @@ HB_FUNC( FIELDNAME ) hb_errRT_DBCMD( EG_ARG, EDBCMD_FIELDNAME_BADPARAMETER, NULL, HB_ERR_FUNCNAME ); */ } - hb_retc( NULL ); + hb_retc_null(); } HB_FUNC( FIELDPOS ) @@ -1737,7 +1737,7 @@ HB_FUNC( DBRELATION ) /* () --> cLinkExp */ hb_itemReturnRelease( pRelExpr ); } else - hb_retc( NULL ); + hb_retc_null(); } HB_FUNC( DBRSELECT ) /* () --> nWorkArea */ @@ -2214,7 +2214,7 @@ HB_FUNC( HB_FIELDTYPE ) } } - hb_retc( NULL ); + hb_retc_null(); } HB_FUNC( HB_WAEVAL ) diff --git a/harbour/source/rdd/hbsix/sxfname.c b/harbour/source/rdd/hbsix/sxfname.c index 03fd54444e..76134af3e5 100644 --- a/harbour/source/rdd/hbsix/sxfname.c +++ b/harbour/source/rdd/hbsix/sxfname.c @@ -98,5 +98,5 @@ HB_FUNC( SX_FNAMEPARSER ) hb_xfree( pFileName ); } else - hb_retc( NULL ); + hb_retc_null(); } diff --git a/harbour/source/rdd/hbsix/sxord.c b/harbour/source/rdd/hbsix/sxord.c index cd5af19638..fba1093934 100644 --- a/harbour/source/rdd/hbsix/sxord.c +++ b/harbour/source/rdd/hbsix/sxord.c @@ -395,7 +395,7 @@ HB_FUNC( SX_I_INDEXNAME ) return; } - hb_retc( NULL ); + hb_retc_null(); } HB_FUNC( SX_I_TAGNAME ) @@ -412,7 +412,7 @@ HB_FUNC( SX_I_TAGNAME ) return; } - hb_retc( NULL ); + hb_retc_null(); } HB_FUNC( SX_INDEXCOUNT ) @@ -447,7 +447,7 @@ HB_FUNC( SX_INDEXNAME ) hb_itemReturnRelease( Info.itmResult ); } else - hb_retc( NULL ); + hb_retc_null(); } } diff --git a/harbour/source/rdd/hbsix/sxtable.c b/harbour/source/rdd/hbsix/sxtable.c index 673d917c75..922cad3626 100644 --- a/harbour/source/rdd/hbsix/sxtable.c +++ b/harbour/source/rdd/hbsix/sxtable.c @@ -177,7 +177,7 @@ HB_FUNC( SX_TABLENAME ) hb_itemReturnRelease( pList ); } else - hb_retc( NULL ); + hb_retc_null(); } static void hb_sxRollBackChild( AREAP pArea, PHB_ITEM pItem ) diff --git a/harbour/source/rdd/hbsix/sxutil.c b/harbour/source/rdd/hbsix/sxutil.c index c23c4c7d5e..b8e4ae1522 100644 --- a/harbour/source/rdd/hbsix/sxutil.c +++ b/harbour/source/rdd/hbsix/sxutil.c @@ -86,7 +86,7 @@ HB_FUNC( SX_SLIMFAST ) hb_retclen_buffer( szDst, ulDst ); } else - hb_retc( NULL ); + hb_retc_null(); } HB_FUNC( SX_WILDMATCH ) diff --git a/harbour/source/rdd/nulsys/nulsys.c b/harbour/source/rdd/nulsys/nulsys.c index 69697c250b..3a9d22aac8 100644 --- a/harbour/source/rdd/nulsys/nulsys.c +++ b/harbour/source/rdd/nulsys/nulsys.c @@ -128,18 +128,18 @@ void hb_rddShutDown( void ) {} HB_FUNC( RDDSYS ) {} -HB_FUNC( RDDNAME ) { hb_retc( NULL ); } +HB_FUNC( RDDNAME ) { hb_retc_null(); } HB_FUNC( RDDLIST ) { hb_reta( 0 ); } -HB_FUNC( FIELDGET ) { hb_retc( NULL ); } +HB_FUNC( FIELDGET ) { hb_retc_null(); } -HB_FUNC( FIELDPUT ) { hb_retc( NULL ); } +HB_FUNC( FIELDPUT ) { hb_retc_null(); } HB_FUNC( FIELDPOS ) { hb_retni( 0 ); } -HB_FUNC( FIELDNAME ) { hb_retc( NULL ); } +HB_FUNC( FIELDNAME ) { hb_retc_null(); } HB_FUNC( DBCREATE ) {} @@ -176,17 +176,17 @@ HB_FUNC( DBRLOCK ) { hb_retl( FALSE ); } HB_FUNC( DBUNLOCK ) { hb_retl( FALSE ); } -HB_FUNC( DBRELATION ) { hb_retc( NULL ); } +HB_FUNC( DBRELATION ) { hb_retc_null(); } HB_FUNC( DBRSELECT ) { hb_retni( 0 ); } -HB_FUNC( DBFILTER ) { hb_retc( NULL ); } +HB_FUNC( DBFILTER ) { hb_retc_null(); } HB_FUNC( DBEVAL ) {} HB_FUNC( SELECT ) { hb_retni( 0 ); } -HB_FUNC( ALIAS ) { hb_retc( NULL ); } +HB_FUNC( ALIAS ) { hb_retc_null(); } HB_FUNC( USED ) { hb_retl( FALSE ); } @@ -223,10 +223,10 @@ HB_FUNC( LUPDATE ) { hb_retds( NULL ); } HB_FUNC( INDEXORD ) { hb_parni( 1 ); } -HB_FUNC( INDEXKEY ) { hb_retc( NULL ); } +HB_FUNC( INDEXKEY ) { hb_retc_null(); } -HB_FUNC( ORDNAME ) { hb_retc( NULL ); } +HB_FUNC( ORDNAME ) { hb_retc_null(); } -HB_FUNC( ORDKEY ) { hb_retc( NULL ); } +HB_FUNC( ORDKEY ) { hb_retc_null(); } -HB_FUNC( ORDFOR ) { hb_retc( NULL ); } +HB_FUNC( ORDFOR ) { hb_retc_null(); } diff --git a/harbour/source/rtl/colorind.c b/harbour/source/rtl/colorind.c index 78d53a3994..8daa93e20c 100644 --- a/harbour/source/rtl/colorind.c +++ b/harbour/source/rtl/colorind.c @@ -90,8 +90,8 @@ HB_FUNC( HB_COLORINDEX ) hb_retclen( pszColor + ulColorPos, ulColorLen ); } else - hb_retc( NULL ); + hb_retc_null(); } else - hb_retc( NULL ); + hb_retc_null(); } diff --git a/harbour/source/rtl/datec.c b/harbour/source/rtl/datec.c index f95fe1ff58..e0aa8aa3fb 100644 --- a/harbour/source/rtl/datec.c +++ b/harbour/source/rtl/datec.c @@ -101,7 +101,7 @@ HB_FUNC( CDOW ) hb_retc( hb_dateCDOW( hb_dateDOW( iYear, iMonth, iDay ) ) ); } else - hb_retc( NULL ); + hb_retc_null(); } else hb_errRT_BASE_SubstR( EG_ARG, 1117, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); diff --git a/harbour/source/rtl/descend.c b/harbour/source/rtl/descend.c index 362c18331f..059c14a57f 100644 --- a/harbour/source/rtl/descend.c +++ b/harbour/source/rtl/descend.c @@ -83,7 +83,7 @@ HB_FUNC( DESCEND ) hb_retclen_buffer( szBuffer, ulLen ); } else - hb_retc( NULL ); + hb_retc_null(); } else if( HB_IS_DATE( pItem ) ) hb_retnl( 5231808 - hb_itemGetDL( pItem ) ); diff --git a/harbour/source/rtl/gete.c b/harbour/source/rtl/gete.c index 0a1d454986..9d72280969 100644 --- a/harbour/source/rtl/gete.c +++ b/harbour/source/rtl/gete.c @@ -105,16 +105,16 @@ HB_FUNC( GETENV ) if( szValue ) hb_xfree( szValue ); - hb_retc( NULL ); + hb_retc_null(); } } else - hb_retc( NULL ); + hb_retc_null(); hb_itemFreeC( pszName ); } else - hb_retc( NULL ); + hb_retc_null(); } /* NOTE: Undocumented Clipper function. [vszakats] */ @@ -178,12 +178,12 @@ HB_FUNC( HB_GETENV ) } } else - hb_retc( NULL ); + hb_retc_null(); hb_itemFreeC( pszName ); } else - hb_retc( NULL ); + hb_retc_null(); } HB_FUNC( HB_SETENV ) diff --git a/harbour/source/rtl/gtkbstat.c b/harbour/source/rtl/gtkbstat.c index 735bb2eb03..aa817fedf2 100644 --- a/harbour/source/rtl/gtkbstat.c +++ b/harbour/source/rtl/gtkbstat.c @@ -77,6 +77,13 @@ int hb_gt_winapi_getKbdState( void ) if( kbState[VK_CAPITAL ] & 0x01 ) iKbdState |= HB_GTI_KBD_CAPSLOCK; if( kbState[VK_INSERT ] & 0x01 ) iKbdState |= HB_GTI_KBD_INSERT; + if( kbState[VK_LSHIFT ] & 0x80 ) iKbdState |= HB_GTI_KBD_LSHIFT; + if( kbState[VK_RSHIFT ] & 0x80 ) iKbdState |= HB_GTI_KBD_RSHIFT; + if( kbState[VK_LCONTROL] & 0x80 ) iKbdState |= HB_GTI_KBD_LCTRL; + if( kbState[VK_RCONTROL] & 0x80 ) iKbdState |= HB_GTI_KBD_RCTRL; + if( kbState[VK_LMENU ] & 0x80 ) iKbdState |= HB_GTI_KBD_LALT; + if( kbState[VK_RMENU ] & 0x80 ) iKbdState |= HB_GTI_KBD_RALT; + return iKbdState; } @@ -97,6 +104,13 @@ void hb_gt_winapi_setKbdState( int iKbdState ) kbState[VK_CAPITAL] = ( iKbdState & HB_GTI_KBD_CAPSLOCK ) ? 0x01 : 0; kbState[VK_INSERT ] = ( iKbdState & HB_GTI_KBD_INSERT ) ? 0x01 : 0; + kbState[VK_LSHIFT ] = ( iKbdState & HB_GTI_KBD_LSHIFT ) ? 0x80 : 0; + kbState[VK_RSHIFT ] = ( iKbdState & HB_GTI_KBD_RSHIFT ) ? 0x80 : 0; + kbState[VK_LCONTROL] = ( iKbdState & HB_GTI_KBD_LCTRL ) ? 0x80 : 0; + kbState[VK_RCONTROL] = ( iKbdState & HB_GTI_KBD_RCTRL ) ? 0x80 : 0; + kbState[VK_LMENU ] = ( iKbdState & HB_GTI_KBD_LALT ) ? 0x80 : 0; + kbState[VK_RMENU ] = ( iKbdState & HB_GTI_KBD_RALT ) ? 0x80 : 0; + SetKeyboardState( kbState ); } diff --git a/harbour/source/rtl/gtwin/gtwin.c b/harbour/source/rtl/gtwin/gtwin.c index eac1a41253..dba97da4b2 100644 --- a/harbour/source/rtl/gtwin/gtwin.c +++ b/harbour/source/rtl/gtwin/gtwin.c @@ -418,6 +418,13 @@ static int hb_gt_win_getKbdState( void ) if( GetKeyState( VK_CAPITAL ) & 0x01 ) iKbdState |= HB_GTI_KBD_CAPSLOCK; if( GetKeyState( VK_INSERT ) & 0x01 ) iKbdState |= HB_GTI_KBD_INSERT; + if( GetKeyState( VK_LSHIFT ) & 0x80 ) iKbdState |= HB_GTI_KBD_LSHIFT; + if( GetKeyState( VK_RSHIFT ) & 0x80 ) iKbdState |= HB_GTI_KBD_RSHIFT; + if( GetKeyState( VK_LCONTROL ) & 0x80 ) iKbdState |= HB_GTI_KBD_LCTRL; + if( GetKeyState( VK_RCONTROL ) & 0x80 ) iKbdState |= HB_GTI_KBD_RCTRL; + if( GetKeyState( VK_LMENU ) & 0x80 ) iKbdState |= HB_GTI_KBD_LALT; + if( GetKeyState( VK_RMENU ) & 0x80 ) iKbdState |= HB_GTI_KBD_RALT; + return iKbdState; } diff --git a/harbour/source/rtl/hardcr.c b/harbour/source/rtl/hardcr.c index ef6825e632..a10b9e7bd1 100644 --- a/harbour/source/rtl/hardcr.c +++ b/harbour/source/rtl/hardcr.c @@ -83,5 +83,5 @@ HB_FUNC( HARDCR ) hb_retclen_buffer( hb_strHardCR( pszBuffer, ulStringLen ), ulStringLen ); } else - hb_retc( NULL ); + hb_retc_null(); } diff --git a/harbour/source/rtl/hbhex.c b/harbour/source/rtl/hbhex.c index a4b2898fa0..d0ae407212 100644 --- a/harbour/source/rtl/hbhex.c +++ b/harbour/source/rtl/hbhex.c @@ -168,7 +168,7 @@ HB_FUNC( HB_STRTOHEX ) hb_retclen_buffer( szDest, ulDest ); } else - hb_retc( NULL ); + hb_retc_null(); } HB_FUNC( HB_HEXTOSTR ) @@ -235,5 +235,5 @@ HB_FUNC( HB_HEXTOSTR ) } } - hb_retc( NULL ); + hb_retc_null(); } diff --git a/harbour/source/rtl/hbinet.c b/harbour/source/rtl/hbinet.c index 51b4446249..2a7356bd8a 100644 --- a/harbour/source/rtl/hbinet.c +++ b/harbour/source/rtl/hbinet.c @@ -1190,7 +1190,7 @@ static void s_inetRecvPattern( const char * szPattern ) hb_itemPutNI( pResult, -2 ); hb_xfree( ( void * ) Buffer ); - hb_retc( NULL ); + hb_retc_null(); } } } @@ -1231,7 +1231,7 @@ HB_FUNC( HB_INETRECVENDBLOCK ) { if( pResult ) hb_itemPutNI( pResult, -1 ); - hb_retc( NULL ); + hb_retc_null(); return; } @@ -1377,7 +1377,7 @@ HB_FUNC( HB_INETRECVENDBLOCK ) } hb_xfree( ( void * ) Buffer ); - hb_retc( NULL ); + hb_retc_null(); } else { @@ -1398,7 +1398,7 @@ HB_FUNC( HB_INETRECVENDBLOCK ) hb_itemPutNI( pResult, -2 ); hb_xfree( ( void * ) Buffer ); - hb_retc( NULL ); + hb_retc_null(); } } diff --git a/harbour/source/rtl/hbstrsh.c b/harbour/source/rtl/hbstrsh.c index 69b0add393..96ce91765a 100644 --- a/harbour/source/rtl/hbstrsh.c +++ b/harbour/source/rtl/hbstrsh.c @@ -74,5 +74,5 @@ HB_FUNC( HB_STRSHRINK ) hb_itemReturn( pText ); } else - hb_retc( NULL ); + hb_retc_null(); } diff --git a/harbour/source/rtl/hbtoken.c b/harbour/source/rtl/hbtoken.c index 633d0f14c5..c18957c2f1 100644 --- a/harbour/source/rtl/hbtoken.c +++ b/harbour/source/rtl/hbtoken.c @@ -259,7 +259,7 @@ HB_FUNC( HB_TOKENGET ) hb_retclen( szLine, ulLen ); } else - hb_retc( NULL ); + hb_retc_null(); } /* like HB_TOKENGET() but returns next token starting from passed position @@ -289,7 +289,7 @@ HB_FUNC( HB_TOKENPTR ) else { hb_stornl( 0, 2 ); - hb_retc( NULL ); + hb_retc_null(); } } diff --git a/harbour/source/rtl/hbzlib.c b/harbour/source/rtl/hbzlib.c index 9386a91baa..dae484f599 100644 --- a/harbour/source/rtl/hbzlib.c +++ b/harbour/source/rtl/hbzlib.c @@ -176,7 +176,7 @@ HB_FUNC( HB_ZCOMPRESS ) } else { - hb_retc( NULL ); + hb_retc_null(); hb_storni( Z_OK, 3 ); } } @@ -236,7 +236,7 @@ HB_FUNC( HB_ZUNCOMPRESS ) } else { - hb_retc( NULL ); + hb_retc_null(); hb_storni( Z_OK, 3 ); } } diff --git a/harbour/source/rtl/left.c b/harbour/source/rtl/left.c index 2dd785377a..cb5cf6567e 100644 --- a/harbour/source/rtl/left.c +++ b/harbour/source/rtl/left.c @@ -64,7 +64,7 @@ HB_FUNC( LEFT ) { long lLen = hb_parnl( 2 ); if( lLen <= 0 ) - hb_retc( NULL ); + hb_retc_null(); else { ULONG ulText = hb_itemGetCLen( pText ); diff --git a/harbour/source/rtl/memofile.c b/harbour/source/rtl/memofile.c index bcc1f76aaf..509275fcf0 100644 --- a/harbour/source/rtl/memofile.c +++ b/harbour/source/rtl/memofile.c @@ -99,15 +99,15 @@ static void hb_memoread( BOOL bHandleEOF ) hb_retclen_buffer( ( char * ) pbyBuffer, ulSize ); } else - hb_retc( NULL ); + hb_retc_null(); hb_fsClose( fhnd ); } else - hb_retc( NULL ); + hb_retc_null(); } else - hb_retc( NULL ); + hb_retc_null(); } HB_FUNC( HB_MEMOREAD ) diff --git a/harbour/source/rtl/mlcfunc.c b/harbour/source/rtl/mlcfunc.c index 17a6c6e17c..fab0ff6677 100644 --- a/harbour/source/rtl/mlcfunc.c +++ b/harbour/source/rtl/mlcfunc.c @@ -263,7 +263,7 @@ HB_FUNC( MEMOLINE ) if( !pszString ) { - hb_retc( NULL ); + hb_retc_null(); return; } @@ -305,7 +305,7 @@ HB_FUNC( MEMOLINE ) hb_retclen_buffer( szLine, ulLineLength ); } else - hb_retc( NULL ); + hb_retc_null(); hb_xfree( pEOLs ); } diff --git a/harbour/source/rtl/mouse53.c b/harbour/source/rtl/mouse53.c index 1962e0abdf..05b9791d05 100644 --- a/harbour/source/rtl/mouse53.c +++ b/harbour/source/rtl/mouse53.c @@ -147,7 +147,7 @@ HB_FUNC( MSAVESTATE ) hb_retclen_buffer( pBuffer, iLen ); } else - hb_retc( NULL ); + hb_retc_null(); } HB_FUNC( MRESTSTATE ) diff --git a/harbour/source/rtl/mtran.c b/harbour/source/rtl/mtran.c index 96cbf620c1..524a9bd8ef 100644 --- a/harbour/source/rtl/mtran.c +++ b/harbour/source/rtl/mtran.c @@ -102,6 +102,6 @@ HB_FUNC( MEMOTRAN ) hb_retclen_buffer( pszResult, ulResultLen ); } else - hb_retc( NULL ); + hb_retc_null(); } diff --git a/harbour/source/rtl/natmsg.c b/harbour/source/rtl/natmsg.c index 571e97106b..ba93c386da 100644 --- a/harbour/source/rtl/natmsg.c +++ b/harbour/source/rtl/natmsg.c @@ -113,7 +113,7 @@ HB_FUNC( __NATMSG ) else if( HB_ISNUM( 1 ) ) hb_retc( hb_nationGetMsg( hb_parni( 1 ) ) ); else - hb_retc( NULL ); + hb_retc_null(); } HB_FUNC( __NATSORTVER ) diff --git a/harbour/source/rtl/oemansi.c b/harbour/source/rtl/oemansi.c index 3649c52118..25c6f10a46 100644 --- a/harbour/source/rtl/oemansi.c +++ b/harbour/source/rtl/oemansi.c @@ -76,7 +76,7 @@ HB_FUNC( HB_ANSITOOEM ) hb_itemReturn( pString ); #endif else - hb_retc( NULL ); + hb_retc_null(); } HB_FUNC( HB_OEMTOANSI ) @@ -97,5 +97,5 @@ HB_FUNC( HB_OEMTOANSI ) hb_itemReturn( pString ); #endif else - hb_retc( NULL ); + hb_retc_null(); } diff --git a/harbour/source/rtl/padc.c b/harbour/source/rtl/padc.c index 45fca7ec8d..2bb4bfeb53 100644 --- a/harbour/source/rtl/padc.c +++ b/harbour/source/rtl/padc.c @@ -100,9 +100,9 @@ HB_FUNC( PADC ) } } else - hb_retc( NULL ); + hb_retc_null(); } } else - hb_retc( NULL ); + hb_retc_null(); } diff --git a/harbour/source/rtl/padl.c b/harbour/source/rtl/padl.c index b9d24bac28..9834e74931 100644 --- a/harbour/source/rtl/padl.c +++ b/harbour/source/rtl/padl.c @@ -97,9 +97,9 @@ HB_FUNC( PADL ) } } else - hb_retc( NULL ); + hb_retc_null(); } } else - hb_retc( NULL ); + hb_retc_null(); } diff --git a/harbour/source/rtl/padr.c b/harbour/source/rtl/padr.c index b395d08dd3..a36ed7d3e0 100644 --- a/harbour/source/rtl/padr.c +++ b/harbour/source/rtl/padr.c @@ -97,9 +97,9 @@ HB_FUNC( PADR ) } } else - hb_retc( NULL ); + hb_retc_null(); } } else - hb_retc( NULL ); + hb_retc_null(); } diff --git a/harbour/source/rtl/philes.c b/harbour/source/rtl/philes.c index 964ceae669..9917bcb043 100644 --- a/harbour/source/rtl/philes.c +++ b/harbour/source/rtl/philes.c @@ -253,10 +253,10 @@ HB_FUNC( FREADSTR ) hb_retc_buffer( buffer ); } else - hb_retc( NULL ); + hb_retc_null(); } else - hb_retc( NULL ); + hb_retc_null(); hb_fsSetFError( uiError ); } @@ -301,7 +301,7 @@ HB_FUNC( HB_PROGNAME ) hb_retc( szBaseName ); } else - hb_retc( NULL ); + hb_retc_null(); } HB_FUNC( HB_DIRBASE ) diff --git a/harbour/source/rtl/replic.c b/harbour/source/rtl/replic.c index 343b66d41a..96d4c60f19 100644 --- a/harbour/source/rtl/replic.c +++ b/harbour/source/rtl/replic.c @@ -85,7 +85,7 @@ HB_FUNC( REPLICATE ) hb_errRT_BASE_SubstR( EG_STROVERFLOW, 1234, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } else - hb_retc( NULL ); + hb_retc_null(); } else hb_errRT_BASE_SubstR( EG_ARG, 1106, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); diff --git a/harbour/source/rtl/right.c b/harbour/source/rtl/right.c index 96db9f2a46..fb27636cd8 100644 --- a/harbour/source/rtl/right.c +++ b/harbour/source/rtl/right.c @@ -64,7 +64,7 @@ HB_FUNC( RIGHT ) { long lLen = hb_parnl( 2 ); if( lLen <= 0 ) - hb_retc( NULL ); + hb_retc_null(); else { ULONG ulText = hb_itemGetCLen( pText ); @@ -75,5 +75,5 @@ HB_FUNC( RIGHT ) } } else - hb_retc( NULL ); /* Clipper doesn't error */ + hb_retc_null(); /* Clipper doesn't error */ } diff --git a/harbour/source/rtl/space.c b/harbour/source/rtl/space.c index 4cc8eae64b..76e264f8fd 100644 --- a/harbour/source/rtl/space.c +++ b/harbour/source/rtl/space.c @@ -77,7 +77,7 @@ HB_FUNC( SPACE ) hb_retclen_buffer( szResult, lLen ); } else - hb_retc( NULL ); + hb_retc_null(); } else hb_errRT_BASE_SubstR( EG_ARG, 1105, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); diff --git a/harbour/source/rtl/str.c b/harbour/source/rtl/str.c index 073041d1a8..4bd3d15ef7 100644 --- a/harbour/source/rtl/str.c +++ b/harbour/source/rtl/str.c @@ -81,7 +81,7 @@ HB_FUNC( STR ) if( szResult ) hb_retc_buffer( szResult ); else - hb_retc( NULL ); + hb_retc_null(); } else hb_errRT_BASE_SubstR( EG_ARG, 1099, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); diff --git a/harbour/source/rtl/strtran.c b/harbour/source/rtl/strtran.c index 7fe255b3b5..6c3773c23a 100644 --- a/harbour/source/rtl/strtran.c +++ b/harbour/source/rtl/strtran.c @@ -82,7 +82,7 @@ HB_FUNC( STRTRAN ) if( !ulStart ) { /* Clipper seems to work this way */ - hb_retc( NULL ); + hb_retc_null(); } else if( ulStart > 0 ) { diff --git a/harbour/source/rtl/strzero.c b/harbour/source/rtl/strzero.c index 2f321d504c..897cd5e521 100644 --- a/harbour/source/rtl/strzero.c +++ b/harbour/source/rtl/strzero.c @@ -112,7 +112,7 @@ HB_FUNC( STRZERO ) hb_retc_buffer( szResult ); } else - hb_retc( NULL ); + hb_retc_null(); } else #ifdef HB_C52_STRICT diff --git a/harbour/source/rtl/stuff.c b/harbour/source/rtl/stuff.c index 9996a4c5aa..b95939bdc9 100644 --- a/harbour/source/rtl/stuff.c +++ b/harbour/source/rtl/stuff.c @@ -86,9 +86,9 @@ HB_FUNC( STUFF ) hb_retclen_buffer( szResult, ulTotalLen ); } else - hb_retc( NULL ); + hb_retc_null(); } else - hb_retc( NULL ); + hb_retc_null(); } diff --git a/harbour/source/rtl/substr.c b/harbour/source/rtl/substr.c index 18e30ed1b7..c77e7a3b7c 100644 --- a/harbour/source/rtl/substr.c +++ b/harbour/source/rtl/substr.c @@ -107,10 +107,10 @@ HB_FUNC( SUBSTR ) hb_retclen( hb_itemGetCPtr( pText ) + lPos, lLen ); } else - hb_retc( NULL ); + hb_retc_null(); } else - hb_retc( NULL ); + hb_retc_null(); } else hb_errRT_BASE_SubstR( EG_ARG, 1110, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); diff --git a/harbour/source/rtl/trim.c b/harbour/source/rtl/trim.c index 14490fdb36..25e49575eb 100644 --- a/harbour/source/rtl/trim.c +++ b/harbour/source/rtl/trim.c @@ -174,6 +174,6 @@ HB_FUNC( ALLTRIM ) hb_errRT_BASE_SubstR( EG_ARG, 2022, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); #endif #else - hb_retc( NULL ); + hb_retc_null(); #endif } diff --git a/harbour/source/vm/cmdarg.c b/harbour/source/vm/cmdarg.c index 4c477a2544..ee1ccc09e4 100644 --- a/harbour/source/vm/cmdarg.c +++ b/harbour/source/vm/cmdarg.c @@ -407,7 +407,7 @@ HB_FUNC( HB_ARGSTRING ) } } - hb_retc( NULL ); + hb_retc_null(); } /* Returns the number of command line arguments passed to the application, this diff --git a/harbour/source/vm/dynlibhb.c b/harbour/source/vm/dynlibhb.c index 40131c5fa0..8310563bd5 100644 --- a/harbour/source/vm/dynlibhb.c +++ b/harbour/source/vm/dynlibhb.c @@ -158,7 +158,7 @@ HB_FUNC( HB_LIBERROR ) #if defined(HB_OS_LINUX) && !defined(__WATCOMC__) hb_retc( dlerror() ); #else - hb_retc( NULL ); + hb_retc_null(); #endif } diff --git a/harbour/source/vm/proc.c b/harbour/source/vm/proc.c index c8bc2560a7..946c5d6b23 100644 --- a/harbour/source/vm/proc.c +++ b/harbour/source/vm/proc.c @@ -142,7 +142,7 @@ HB_FUNC( PROCFILE ) } hb_retc( hb_vmFindModuleSymbolName( hb_vmGetRealFuncSym( pSym ) ) ); #else - hb_retc( NULL ); + hb_retc_null(); #endif }