diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e653af6d37..118d8360d8 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,17 @@ The license applies to all entries newer than 2009-04-28. */ +2011-05-16 09:33 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * include/harbour.hbx + * src/vm/runner.c + + HB_HRBGETFUNLIST() -> : New function posted to the + list by Francesco Saverio Giudice + (NOTE: I changed the name a little bit) + + * tests/gfx.prg + ! fixed console output. Patch by Tamas Tevesz + * changed rest of ? commands to outstd() + 2011-05-15 17:19 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/config/global.mk * harbour/utils/hbmk2/hbmk2.prg diff --git a/harbour/include/harbour.hbx b/harbour/include/harbour.hbx index 794cd0159c..c81738ed1b 100644 --- a/harbour/include/harbour.hbx +++ b/harbour/include/harbour.hbx @@ -509,6 +509,7 @@ DYNAMIC HB_HPAIRAT DYNAMIC HB_HPOS DYNAMIC HB_HRBDO DYNAMIC HB_HRBGETFUNSYM +DYNAMIC HB_HRBGETFUNLIST DYNAMIC HB_HRBLOAD DYNAMIC HB_HRBRUN DYNAMIC HB_HRBSIGNATURE diff --git a/harbour/src/vm/runner.c b/harbour/src/vm/runner.c index 86429da5e7..f527bcb302 100644 --- a/harbour/src/vm/runner.c +++ b/harbour/src/vm/runner.c @@ -870,6 +870,30 @@ HB_FUNC( HB_HRBGETFUNSYM ) hb_errRT_BASE( EG_ARG, 6106, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } +HB_FUNC( HB_HRBGETFUNLIST ) +{ + PHRB_BODY pHrbBody = hb_hrbParam( 1 ); + + if( pHrbBody ) + { + PHB_SYMB pSym; + HB_ULONG nPos; + PHB_ITEM paList = hb_itemArrayNew( 0 ); + PHB_ITEM pFuncName = hb_itemNew( NULL ); + + for( nPos = 0, pSym = pHrbBody->pSymRead; nPos < pHrbBody->ulSymbols; ++pSym, ++nPos ) + { + if( pSym->value.pFunPtr != NULL ) + hb_arrayAdd( paList, hb_itemPutC( pFuncName, pSym->szName ) ); + } + + hb_itemRelease( pFuncName ); + hb_itemReturnRelease( paList ); + } + else + hb_errRT_BASE( EG_ARG, 6107, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); +} + HB_FUNC( HB_HRBSIGNATURE ) { hb_retclen( s_szHead, sizeof( s_szHead ) ); diff --git a/harbour/tests/gfx.prg b/harbour/tests/gfx.prg index 18613f9808..2d2261b2ce 100644 --- a/harbour/tests/gfx.prg +++ b/harbour/tests/gfx.prg @@ -13,10 +13,8 @@ FUNCTION Main() LOCAL nTop, nLeft, nHeight, nWidth, nColor, nSec := Seconds() IF ! hb_gtInfo( HB_GTI_ISGRAPHIC ) - ? - ? "You are using a non graphics capable gt:" - ? hb_gtVersion() - ? + OutStd( "You are using a non graphics capable gt:" + hb_eol() ) + OutStd( hb_gtVersion() + hb_eol() ) QUIT ENDIF @@ -25,7 +23,7 @@ FUNCTION Main() hb_gtInfo( HB_GTI_FONTSIZE, 24 ) ENDIF - ? hb_gtVersion( 1 ) + OutStd( hb_gtVersion( 1 ) + hb_eol() ) nFontHeight := hb_gtInfo( HB_GTI_FONTSIZE ) nFontWidth := hb_gtInfo( HB_GTI_FONTWIDTH )