From 3fe91afe1528dd1ffd2375a3b1e93c5c9f15e7fd Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Tue, 10 Apr 2007 12:35:47 +0000 Subject: [PATCH] 2007-04-10 14:35 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/Makefile + added hbregex.h * harbour/include/hbclass.ch + added support for ENDCLASS LOCK[ED] + := { } * harbour/source/debug/tbrwtext.prg * harbour/source/rtl/memoedit.prg * harbour/utils/hbdoc/ffile1.prg * harbour/utils/hbmake/ffile1.prg * changed code with: super: to ::super: I will want to remove lines with: [ ; #translate Super( ): => ::: ] ; [ ; #translate Super( ): => ::: ] ; [ ; #translate Super(): => ::: ] ; [ ; #translate Super: => ::: ] ; [ ; #translate ::Super : => ::: ] from our hbclass.ch (at least the last three ones) because they beaks code which uses SUPER identifier * harbour/source/rtl/philes.c * changed FSEEK() to use hb_fsSeekLarge() for OSes which supports large (64bit) files * harbour/source/vm/classes.c ! updated some comments about function syntax --- harbour/ChangeLog | 32 +++++++++++++++++++++++++++++++ harbour/include/Makefile | 1 + harbour/include/hbclass.ch | 7 ++++--- harbour/source/debug/tbrwtext.prg | 12 ++++++------ harbour/source/rtl/memoedit.prg | 12 ++++++------ harbour/source/rtl/philes.c | 8 ++++---- harbour/source/vm/classes.c | 18 ++++++++--------- harbour/utils/hbdoc/ffile1.prg | 2 +- harbour/utils/hbmake/ffile1.prg | 2 +- 9 files changed, 64 insertions(+), 30 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index be5e42fc09..1d0ceb1ded 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,38 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-04-10 14:35 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/include/Makefile + + added hbregex.h + + * harbour/include/hbclass.ch + + added support for ENDCLASS LOCK[ED] + + := { } + + * harbour/source/debug/tbrwtext.prg + * harbour/source/rtl/memoedit.prg + * harbour/utils/hbdoc/ffile1.prg + * harbour/utils/hbmake/ffile1.prg + * changed code with: + super: + to + ::super: + I will want to remove lines with: + [ ; #translate Super( ): => ::: ] ; + [ ; #translate Super( ): => ::: ] ; + [ ; #translate Super(): => ::: ] ; + [ ; #translate Super: => ::: ] ; + [ ; #translate ::Super : => ::: ] + from our hbclass.ch (at least the last three ones) because they beaks + code which uses SUPER identifier + + * harbour/source/rtl/philes.c + * changed FSEEK() to use hb_fsSeekLarge() for OSes which supports + large (64bit) files + + * harbour/source/vm/classes.c + ! updated some comments about function syntax + 2007-04-10 13:31 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * harbour/common.mak * harbour/source/codepage/Makefile diff --git a/harbour/include/Makefile b/harbour/include/Makefile index 31b7096f86..f2935236bc 100644 --- a/harbour/include/Makefile +++ b/harbour/include/Makefile @@ -42,6 +42,7 @@ C_HEADERS=\ hbrddntx.h \ hbrddsdf.h \ hbrddwrk.h \ + hbregex.h \ hbset.h \ hbsetup.h \ hbstack.h \ diff --git a/harbour/include/hbclass.ch b/harbour/include/hbclass.ch index 43b38848bd..28079835ec 100644 --- a/harbour/include/hbclass.ch +++ b/harbour/include/hbclass.ch @@ -258,8 +258,8 @@ DECLARE HBClass ; [ ; #translate Super: => ::: ] ; [ ; #translate ::Super : => ::: ] -#xcommand ENDCLASS => ; - s_oClass:Create() ;; +#xcommand ENDCLASS [] => ; + s_oClass:Create() ; [<-lck-> __clsLock( s_oClass:hClass ) ] ;; end ;; return s_oClass:Instance() AS CLASS _CLASS_NAME_ ;; #undef _CLASS_MODE_ ; #define _CLASS_MODE_ _CLASS_IMPLEMENTATION_ @@ -417,7 +417,7 @@ DECLARE HBClass ; #ifdef HB_CLS_CSY #xcommand CREATE CLASS [<*more*>] => CLASS [] - #xcommand END CLASS => ENDCLASS + #xcommand END CLASS [<*more*>] => ENDCLASS #xcommand CLASS VAR <*more*> => CLASSVAR #xcommand CLASS METHOD <*more*> => CLASSMETHOD @@ -503,6 +503,7 @@ DECLARE HBClass ; #xtranslate ( { [] } => ( ():New(

) #xtranslate = { [] } => = ():New(

) #xtranslate , { [] } => , ():New(

) +#xtranslate := { [] } => := ():New(

) #xcommand EXPORT [, ] [ ] [ ] [] [] => ; _HB_MEMBER {[ AS ] [, ] } ;; diff --git a/harbour/source/debug/tbrwtext.prg b/harbour/source/debug/tbrwtext.prg index 928a791dcc..57e3570c45 100644 --- a/harbour/source/debug/tbrwtext.prg +++ b/harbour/source/debug/tbrwtext.prg @@ -116,17 +116,17 @@ METHOD New(nTop, nLeft, nBottom, nRight, cFileName, cColor, lLineNumbers) CLASS ::lLineNumbers := lLineNumbers - Super:New("", nTop, nLeft, nBottom, nRight, .T.) - Super:SetColor(cColor) + ::Super:New("", nTop, nLeft, nBottom, nRight, .T.) + ::Super:SetColor(cColor) - Super:LoadFile(cFileName) + ::Super:LoadFile(cFileName) return Self METHOD LoadFile(cFileName) CLASS TBrwText - Super:LoadFile(cFileName) + ::Super:LoadFile(cFileName) return Self @@ -189,14 +189,14 @@ return Self METHOD GotoLine(n) CLASS TBrwText - Super:GotoLine(n) + ::Super:GotoLine(n) return Self METHOD GetLine(nRow) CLASS TBrwText -return iif(::lLineNumbers, AllTrim(Str(nRow)) + ": ", "") + Super:GetLine(nRow) +return iif(::lLineNumbers, AllTrim(Str(nRow)) + ": ", "") + ::Super:GetLine(nRow) METHOD LineColor(nRow) CLASS TBrwText diff --git a/harbour/source/rtl/memoedit.prg b/harbour/source/rtl/memoedit.prg index 9bdf3aace0..fea5a95d87 100644 --- a/harbour/source/rtl/memoedit.prg +++ b/harbour/source/rtl/memoedit.prg @@ -134,7 +134,7 @@ METHOD Edit() CLASS TMemoEditor ::HandleUserKey(nKey, nUserKey) else - super:Edit(nKey) + ::super:Edit(nKey) endif @@ -143,7 +143,7 @@ METHOD Edit() CLASS TMemoEditor else // If I can't edit text buffer or there is not a user function enter standard HBEditor // ::Edit() method which is able to handle everything - super:Edit() + ::super:Edit() endif @@ -203,18 +203,18 @@ METHOD HandleUserKey(nKey, nUserKey) CLASS TMemoEditor // HBEditor is not able to handle keys with a value higher than 256, but I have to tell him // that user wants to save text if (nKey <= 256 .OR. nKey == K_ALT_W) .AND. AScan(aUnHandledKeys, nKey) == 0 - super:Edit(nKey) + ::super:Edit(nKey) endif // TOFIX: Not clipper compatible, see teditor.prg case (nUserKey >= 1 .AND. nUserKey <= 31) .OR. nUserKey == K_ALT_W if AScan(aUnHandledKeys, nUserKey) == 0 - super:Edit(nUserKey) + ::super:Edit(nUserKey) endif case nUserKey == ME_DATA if nKey <= 256 .AND. AScan(aUnHandledKeys, nKey) == 0 - super:Edit(nKey) + ::super:Edit(nKey) endif case nUserKey == ME_TOGGLEWRAP @@ -257,7 +257,7 @@ METHOD MoveCursor(nKey) CLASS TMemoEditor ::lSaved = .t. ::lExitEdit := .T. else - return Super:MoveCursor( nKey ) + return ::Super:MoveCursor( nKey ) endif return .f. diff --git a/harbour/source/rtl/philes.c b/harbour/source/rtl/philes.c index b9cb19da26..6a220dc5c3 100644 --- a/harbour/source/rtl/philes.c +++ b/harbour/source/rtl/philes.c @@ -169,11 +169,11 @@ HB_FUNC( FRENAME ) HB_FUNC( FSEEK ) { if( ISNUM( 1 ) && ISNUM( 2 ) ) - hb_retnl( hb_fsSeek( hb_parni( 1 ), - hb_parnl( 2 ), - ISNUM( 3 ) ? hb_parni( 3 ) : FS_SET ) ); + hb_retnint( hb_fsSeekLarge( hb_parni( 1 ), + hb_parnint( 2 ), + ISNUM( 3 ) ? hb_parni( 3 ) : FS_SET ) ); else - hb_retnl( 0 ); + hb_retni( 0 ); } HB_FUNC( FREADSTR ) diff --git a/harbour/source/vm/classes.c b/harbour/source/vm/classes.c index 615ab292b4..4f43bf73e1 100644 --- a/harbour/source/vm/classes.c +++ b/harbour/source/vm/classes.c @@ -295,9 +295,6 @@ static HB_SYMB s_opSymbols[ HB_OO_MAX_OPERATOR + 1 ] = { static HB_SYMB s___msgDestructor = { "__msgDestructor", {HB_FS_MESSAGE}, {NULL}, NULL }; static HB_SYMB s___msgOnError = { "__msgOnError", {HB_FS_MESSAGE}, {NULL}, NULL }; -static HB_SYMB s___msgNew = { "NEW", {HB_FS_MESSAGE}, {NULL}, NULL }; -static HB_SYMB s___msgSymbol = { "SYMBOL", {HB_FS_MESSAGE}, {NULL}, NULL }; - static HB_SYMB s___msgSetData = { "__msgSetData", {HB_FS_MESSAGE}, {hb___msgSetData}, NULL }; static HB_SYMB s___msgGetData = { "__msgGetData", {HB_FS_MESSAGE}, {hb___msgGetData}, NULL }; static HB_SYMB s___msgSetClsData = { "__msgSetClsData", {HB_FS_MESSAGE}, {hb___msgSetClsData}, NULL }; @@ -314,6 +311,9 @@ static HB_SYMB s___msgNoMethod = { "__msgNoMethod", {HB_FS_MESSAGE}, {hb___m static HB_SYMB s___msgScopeErr = { "__msgScopeErr", {HB_FS_MESSAGE}, {hb___msgScopeErr}, NULL }; static HB_SYMB s___msgTypeErr = { "__msgTypeErr", {HB_FS_MESSAGE}, {hb___msgTypeErr}, NULL }; +static HB_SYMB s___msgNew = { "NEW", {HB_FS_MESSAGE}, {NULL}, NULL }; +static HB_SYMB s___msgSymbol = { "SYMBOL", {HB_FS_MESSAGE}, {NULL}, NULL }; + static HB_SYMB s___msgClassName = { "CLASSNAME", {HB_FS_MESSAGE}, {hb___msgClassName}, NULL }; static HB_SYMB s___msgClassH = { "CLASSH", {HB_FS_MESSAGE}, {hb___msgClassH}, NULL }; static HB_SYMB s___msgClassSel = { "CLASSSEL", {HB_FS_MESSAGE}, {hb___msgClassSel}, NULL }; @@ -2776,12 +2776,12 @@ HB_FUNC( __CLSADDFRIEND ) } /* - * __clsDelMsg( , ) + * __clsDelMsg( , ) * * Delete message (only for INLINE and METHOD) * - * Object - * Message + * class handle + * message */ HB_FUNC( __CLSDELMSG ) { @@ -2879,7 +2879,7 @@ HB_FUNC( __CLSLOCK ) } /* - * __clsModMsg( , , ) + * __clsModMsg( , , ) * * Modify message (only for INLINE and METHOD) */ @@ -2932,9 +2932,9 @@ HB_FUNC( __CLSMODMSG ) /* - * := ClassName( ) + * := __objGetClsName( | ) * - * Returns class name of + * Returns class name of or */ HB_FUNC( __OBJGETCLSNAME ) { diff --git a/harbour/utils/hbdoc/ffile1.prg b/harbour/utils/hbdoc/ffile1.prg index 7cc82545a2..1b70f8785b 100644 --- a/harbour/utils/hbdoc/ffile1.prg +++ b/harbour/utils/hbdoc/ffile1.prg @@ -104,7 +104,7 @@ ENDCLASS */ METHOD new( cName ) CLASS FileBase - super:new() + ::super:new() // first thing to do is check to see if there is a valid file ::nSkipLength := 1 diff --git a/harbour/utils/hbmake/ffile1.prg b/harbour/utils/hbmake/ffile1.prg index 7dbbf7b588..5ba465334d 100644 --- a/harbour/utils/hbmake/ffile1.prg +++ b/harbour/utils/hbmake/ffile1.prg @@ -102,7 +102,7 @@ ENDCLASS */ METHOD new( cName ) CLASS HBMake_FileBase - super:new() + ::super:new() // first thing to do is check to see if there is a valid file ::nSkipLength := 1