From 93fa70f0e8ff6e0f53f8dfdbdbd930a58f3076f3 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Sat, 1 Sep 2007 14:23:25 +0000 Subject: [PATCH] 2007-09-01 16:23 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbcompat.ch + added some new translation rules * harbour/source/vm/proc.c * fixed buffer size to protect against possible overflow --- harbour/ChangeLog | 6 ++++++ harbour/include/hbcompat.ch | 23 ++++++++++++++--------- harbour/source/vm/proc.c | 2 +- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f8bf385522..ac296cf3d7 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,12 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-09-01 16:23 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/include/hbcompat.ch + + added some new translation rules + * harbour/source/vm/proc.c + * fixed buffer size to protect against possible overflow + 2007-09-01 14:38 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rtl/hbhex.c * replaced TAB by spaces diff --git a/harbour/include/hbcompat.ch b/harbour/include/hbcompat.ch index 53e3116afa..0053c28307 100644 --- a/harbour/include/hbcompat.ch +++ b/harbour/include/hbcompat.ch @@ -69,6 +69,7 @@ #xtranslate hb_isregex([]) => hb_isregexstring() #xtranslate hb_pvalue([]) => pvalue() + #xtranslate hb_methodName([])=> methodName() #xtranslate hb_libLoad([]) => libLoad() #xtranslate hb_libFree([]) => libFree() #xtranslate hb_adler32([]) => hb_checksum() @@ -100,13 +101,24 @@ #xtranslate hb_isregexstring([]) => hb_isregex() #xtranslate pvalue([]) => hb_pvalue() + #xtranslate methodName([]) => hb_methodName() #xtranslate libLoad([]) => hb_libLoad() #xtranslate libFree([]) => hb_libFree() #xtranslate hb_checksum([]) => hb_adler32() #xtranslate setLastKey([]) => hb_setLastKey() #xtranslate CStr([]) => hb_CStr() + #xtranslate HEXTONUM([]) => HB_HEXTONUM() + #xtranslate NUMTOHEX([]) => HB_NUMTOHEX() + #xtranslate HEXTOSTR([]) => HB_HEXTOSTR() + #xtranslate STRTOHEX([]) => HB_STRTOHEX() + + #xtranslate RASCAN([]) => HB_RASCAN() + + #xtranslate ISPOINTER( ) => HB_ISPOINTER( ) + #xtranslate str(,[],[],)=> iif(, ltrim(str()), str()) + #xtranslate HB_CMDARGARGV([])=> HB_ARGV(0) #xtranslate HASH([]) => HB_HASH() #xtranslate HHASKEY([]) => HB_HHASKEY() @@ -134,15 +146,8 @@ #xtranslate HALLOCATE([]) => HB_HALLOCATE() #xtranslate HDEFAULT([]) => HB_HDEFAULT() - #xtranslate HEXTONUM([]) => HB_HEXTONUM() - #xtranslate NUMTOHEX([]) => HB_NUMTOHEX() - #xtranslate HEXTOSTR([]) => HB_HEXTOSTR() - #xtranslate STRTOHEX([]) => HB_STRTOHEX() - - #xtranslate RASCAN([]) => HB_RASCAN() - - #xtranslate ISPOINTER( ) => HB_ISPOINTER( ) - + /* THROW => generate error */ + #xtranslate THROW() => (Eval(ErrorBlock(), ), Break()) /* TEXT INTO */ #xcommand TEXT INTO => #pragma __text|+=%s+HB_OSNEWLINE();:="" diff --git a/harbour/source/vm/proc.c b/harbour/source/vm/proc.c index 41f46eb302..8a1f784ac2 100644 --- a/harbour/source/vm/proc.c +++ b/harbour/source/vm/proc.c @@ -77,7 +77,7 @@ HB_FUNC( HB_METHODNAME ) { - char szName[ HB_SYMBOL_NAME_LEN + HB_SYMBOL_NAME_LEN + 2 ]; + char szName[ HB_SYMBOL_NAME_LEN + HB_SYMBOL_NAME_LEN + 5 ]; hb_retc( hb_procname( hb_parni( 1 ) + 1, szName, TRUE ) ); }