2011-05-16 09:33 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* include/harbour.hbx
  * src/vm/runner.c
    + HB_HRBGETFUNLIST() -> <aArray>: 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()
This commit is contained in:
Viktor Szakats
2011-05-16 07:34:46 +00:00
parent 03eb8b7fd9
commit 66fdcc3bbb
4 changed files with 39 additions and 5 deletions

View File

@@ -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() -> <aArray>: 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

View File

@@ -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

View File

@@ -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 ) );

View File

@@ -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 )