diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9745b1edeb..f0638cb699 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,28 @@ The license applies to all entries newer than 2009-04-28. */ +2012-06-16 16:48 UTC+0200 Viktor Szakats (harbour syenar.net) + * contrib/hbamf/hbamfobj.prg + * made it more friendly with grep when finding undocumented functions + by removing #translate. + + * src/vm/hvm.c + ! added HB_STACK_TLS_PRELOAD + + * include/harbour.hbx + ! added __ITEMSETREF(), __VMITEMID() + + * src/rtl/valtoexp.prg + * hb_setItemRef() -> __itemSetRef(). Please tell if it's meant to + be a user-accessible, public core API + + * utils/hbmk2/hbmk2.prg + ! fixed to ignore HB_INSTALL_PREFIX variable in runner mode. + This points to invalid places while running as part of GNU + Make and prevents autodetection. + TODO: Recheck if it now works without embedded headers. + TODO: Obsolete HB_INSTALL_PREFIX also in hbmk2 mode. + 2012-06-16 12:42 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * harbour/include/hbexprb.c ! fixed hb_arrayToParams() used in array index context diff --git a/harbour/contrib/hbamf/hbamfobj.prg b/harbour/contrib/hbamf/hbamfobj.prg index 20bd164b55..7f0a1fc68d 100644 --- a/harbour/contrib/hbamf/hbamfobj.prg +++ b/harbour/contrib/hbamf/hbamfobj.prg @@ -12,9 +12,6 @@ * ********/ -/* internal Harbour functions used in this file */ -#xtranslate MethodName() => __GetMessage() - #include "hbclass.ch" CREATE CLASS AMF_Obj @@ -47,7 +44,7 @@ METHOD New( hCachedData ) CLASS AMF_Obj METHOD noMessage( ... ) CLASS AMF_Obj - RETURN ::msgNotFound( MethodName(), ... ) + RETURN ::msgNotFound( __GetMessage(), ... ) METHOD msgNotFound( cMessage, ... ) CLASS AMF_Obj diff --git a/harbour/include/harbour.hbx b/harbour/include/harbour.hbx index f82b82ca4e..356d3c9e50 100644 --- a/harbour/include/harbour.hbx +++ b/harbour/include/harbour.hbx @@ -1396,6 +1396,7 @@ DYNAMIC __i18n_potArraySave DYNAMIC __i18n_potArrayToHash DYNAMIC __i18n_potArrayTrans DYNAMIC __Input +DYNAMIC __itemSetRef DYNAMIC __Keyboard DYNAMIC __KillRead DYNAMIC __LabelForm @@ -1472,6 +1473,7 @@ DYNAMIC __TextRestore DYNAMIC __TextSave DYNAMIC __TracePrgCalls DYNAMIC __TypeFile +DYNAMIC __vmItemID DYNAMIC __Wait DYNAMIC __wapi_GetACP DYNAMIC __wapi_GetOEMCP diff --git a/harbour/src/rtl/valtoexp.prg b/harbour/src/rtl/valtoexp.prg index bb1c7f7243..01dc0d6674 100644 --- a/harbour/src/rtl/valtoexp.prg +++ b/harbour/src/rtl/valtoexp.prg @@ -134,7 +134,7 @@ STATIC FUNCTION s_valToExp( xVal, cInd, hRefs, cRefs ) ENDIF IF !Empty( cRefs ) .AND. cInd == "" - cVal := "hb_setItemRef( " + cVal + ", {" + cRefs + "} )" + cVal := "__itemSetRef( " + cVal + ", {" + cRefs + "} )" ENDIF IF v == "O" cVal := "__objSetClass( " + cVal + ", '" + xVal:className() + "' )" @@ -152,7 +152,7 @@ STATIC FUNCTION s_valToExp( xVal, cInd, hRefs, cRefs ) RETURN cVal -FUNCTION hb_setItemRef( xVal, aRefs ) +FUNCTION __itemSetRef( xVal, aRefs ) LOCAL aRef FOR EACH aRef in aRefs diff --git a/harbour/src/vm/hvm.c b/harbour/src/vm/hvm.c index 3ca4d4059a..c02c343ed2 100644 --- a/harbour/src/vm/hvm.c +++ b/harbour/src/vm/hvm.c @@ -12086,6 +12086,8 @@ HB_FUNC( __QUITCANCEL ) HB_FUNC( __VMITEMID ) { + HB_STACK_TLS_PRELOAD + PHB_ITEM pItem = hb_param( 1, HB_IT_ANY ); if( pItem ) diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index dbc99bb9df..1fa5367091 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -933,7 +933,7 @@ STATIC PROCEDURE hbmk_init_stage2( hbmk ) RETURN -STATIC FUNCTION hbmk_harbour_dirlayout_detect( hbmk, /* @ */ l_cHB_INSTALL_PREFIX ) +STATIC FUNCTION hbmk_harbour_dirlayout_detect( hbmk, /* @ */ l_cHB_INSTALL_PREFIX, lIgnoreEnvVar ) LOCAL tmp hbmk[ _HBMK_cHB_INSTALL_LI3 ] := "" @@ -942,7 +942,11 @@ STATIC FUNCTION hbmk_harbour_dirlayout_detect( hbmk, /* @ */ l_cHB_INSTALL_PREFI hbmk[ _HBMK_cHB_INSTALL_LIB ] := PathSepToSelf( GetEnv( "HB_INSTALL_LIB" ) ) hbmk[ _HBMK_cHB_INSTALL_INC ] := PathSepToSelf( GetEnv( "HB_INSTALL_INC" ) ) - l_cHB_INSTALL_PREFIX := MacroProc( hbmk, PathSepToSelf( GetEnv( "HB_INSTALL_PREFIX" ) ), NIL, _MACRO_NO_PREFIX ) + IF lIgnoreEnvVar + l_cHB_INSTALL_PREFIX := "" + ELSE + l_cHB_INSTALL_PREFIX := MacroProc( hbmk, PathSepToSelf( GetEnv( "HB_INSTALL_PREFIX" ) ), NIL, _MACRO_NO_PREFIX ) + ENDIF IF Empty( l_cHB_INSTALL_PREFIX ) l_cHB_INSTALL_PREFIX := hb_DirSepAdd( hb_DirBase() ) + ".." ENDIF @@ -1739,7 +1743,7 @@ FUNCTION hbmk( aArgs, nArgTarget, /* @ */ lPause, nLevel ) IF hbmk[ _HBMK_nHBMODE ] != _HBMODE_RAW_C - IF ! hbmk_harbour_dirlayout_detect( hbmk, @l_cHB_INSTALL_PREFIX ) + IF ! hbmk_harbour_dirlayout_detect( hbmk, @l_cHB_INSTALL_PREFIX, .F. ) hbmk_OutErr( hbmk, I_( "Error: HB_INSTALL_PREFIX not set, failed to autodetect.\nRun this tool from its original location inside the Harbour installation or set HB_INSTALL_PREFIX environment variable to Harbour's root directory." ) ) RETURN _ERRLEV_FAILHBDETECT ENDIF @@ -12209,7 +12213,7 @@ STATIC PROCEDURE __hbshell( cFile, ... ) hbmk := hbmk_new() hbmk_init_stage2( hbmk ) - IF ! hbmk_harbour_dirlayout_detect( hbmk, @l_cHB_INSTALL_PREFIX ) + IF ! hbmk_harbour_dirlayout_detect( hbmk, @l_cHB_INSTALL_PREFIX, .T. ) OutErr( StrTran( I_( "Warning: HB_INSTALL_PREFIX not set, failed to autodetect.\nRun this tool from its original location inside the Harbour installation or set HB_INSTALL_PREFIX environment variable to Harbour's root directory." ), "\n", hb_eol() ) + _OUT_EOL ) ENDIF hbmk[ _HBMK_cCOMP ] := hb_Version( HB_VERSION_BUILD_COMP )