From 879a134ee1c4fdb4fc61af846b2f33a45b6f1528 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 29 May 2000 06:28:24 +0000 Subject: [PATCH] 2000-05-29 08:29 UTC+0100 Victor Szakats --- harbour/ChangeLog | 17 +++++++++++++++++ harbour/source/compiler/harbour.l | 2 +- harbour/source/rtl/filesys.c | 7 +++---- harbour/source/rtl/memofile.c | 2 +- harbour/source/rtl/tbrowse.prg | 1 + harbour/source/rtl/tclass.prg | 21 ++++++++++++++++++++- harbour/source/rtl/xsavescr.c | 2 +- 7 files changed, 44 insertions(+), 8 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b02222479c..623cba2657 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,20 @@ +2000-05-29 08:29 UTC+0100 Victor Szakats + + * source/rtl/xsavescr.c + - Removed superfluous ";" char. + + * source/rtl/tbrowse.prg + * source/rtl/memofile.c + ! Typo + + * source/rtl/filesys.c + % Optimized hb_fsEof(). Note that this code is not multiplatform. + + * source/compiler/harbour.l + * source/rtl/tclass.prg + - :: now again translates to Self, since QSelf() is not working well + when used in a codeblock. So this change postponed after version 0.34 + 2000-05-28 23:00 GMT -3 Luiz Rafaek Culik *contrib/hbzlib/zlibapi.c contrib/hbzlib/zipfile1.c diff --git a/harbour/source/compiler/harbour.l b/harbour/source/compiler/harbour.l index 2f49d68962..2a9fa12b75 100644 --- a/harbour/source/compiler/harbour.l +++ b/harbour/source/compiler/harbour.l @@ -1500,7 +1500,7 @@ Separator {SpaceTab} ".and." hb_comp_iState =OPERATOR; return AND; ".or." hb_comp_iState =OPERATOR; return OR; "!"|".not." hb_comp_iState =OPERATOR; return NOT; -"::" unput( ':' ); unput( ')' ); unput( '(' ); unput( 'f' ); unput( 'l' ); unput( 'e' ); unput( 'S' ); unput( 'Q' ); +"::" unput( ':' ); unput( 'f' ); unput( 'l' ); unput( 'e' ); unput( 'S' ); [,\{\}\|\#\&\.\:\<\>\[\]\@] hb_comp_iState =OPERATOR; return yytext[ 0 ]; [\(] ++_iOpenBracket; hb_comp_iState =SEPARATOR; return yytext[ 0 ]; [\)] --_iOpenBracket; hb_comp_iState =SEPARATOR; return yytext[ 0 ]; diff --git a/harbour/source/rtl/filesys.c b/harbour/source/rtl/filesys.c index a18a20df7d..ae70210596 100644 --- a/harbour/source/rtl/filesys.c +++ b/harbour/source/rtl/filesys.c @@ -52,6 +52,7 @@ * * Copyright 2000 Luiz Rafael Culik * hb_fsEof() + * * See doc/license.txt for licensing terms. * */ @@ -1458,9 +1459,7 @@ BOOL hb_fsFile( BYTE * pFilename ) return bIsFile; } -BOOL hb_fsEof( FHANDLE hFileHandle ) +BOOL hb_fsEof( FHANDLE hFileHandle ) { - int iResult; - iResult = eof(hFileHandle); - return ( iResult ? FALSE : TRUE ); + return eof( hFileHandle ) != 0; } diff --git a/harbour/source/rtl/memofile.c b/harbour/source/rtl/memofile.c index 564269daf7..8fa6f1fc6a 100644 --- a/harbour/source/rtl/memofile.c +++ b/harbour/source/rtl/memofile.c @@ -38,7 +38,7 @@ #include "hbapifs.h" /* NOTE: CA-Clipper has 64K (65516 bytes exactly) limit on read, in Harbour - this limit is extended, so we are not *stricly* compatible here. + this limit is extended, so we are not *strictly* compatible here. [vszakats] */ HB_FUNC( MEMOREAD ) diff --git a/harbour/source/rtl/tbrowse.prg b/harbour/source/rtl/tbrowse.prg index d6e59abe22..7848f10866 100644 --- a/harbour/source/rtl/tbrowse.prg +++ b/harbour/source/rtl/tbrowse.prg @@ -90,6 +90,7 @@ CLASS TBrowse DATA rowPos // Current cursor row position DATA skipBlock // Code block used to reposition data source DATA stable // Indicates if the TBrowse object is stable + DATA aRedraw // Array of logical items indicating, is appropriate row need to be redraw DATA RelativePos // Indicates record position relatively position of first record on the screen DATA lHeaders // Internal variable, indicate, are there column headers to paint diff --git a/harbour/source/rtl/tclass.prg b/harbour/source/rtl/tclass.prg index 012ffc34c5..232e580613 100644 --- a/harbour/source/rtl/tclass.prg +++ b/harbour/source/rtl/tclass.prg @@ -112,6 +112,7 @@ FUNCTION TClass() STATIC FUNCTION New( cClassName, xSuper ) + LOCAL Self := QSelf() LOCAL nSuper, i IF ISARRAY( xSuper ) .AND. Len( xSuper ) >= 1 @@ -139,7 +140,7 @@ STATIC FUNCTION New( cClassName, xSuper ) NEXT IF i < nSuper nSuper := i - 1 - ASize(::acSuper, nSuper) + ASize( ::acSuper, nSuper) ENDIF RETURN QSelf() @@ -148,6 +149,7 @@ STATIC FUNCTION New( cClassName, xSuper ) STATIC PROCEDURE Create() + LOCAL Self := QSelf() LOCAL n LOCAL nLen := Len( ::acSuper ) LOCAL nLenDatas := Len( ::aDatas ) //Datas local to the class !! @@ -226,12 +228,17 @@ STATIC PROCEDURE Create() //----------------------------------------------------------------------------// STATIC FUNCTION Instance() + + LOCAL Self := QSelf() + RETURN __clsInst( ::hClass ) //----------------------------------------------------------------------------// STATIC PROCEDURE AddData( cData, xInit, cType, nScope ) /* xInit is initializer */ + LOCAL Self := QSelf() + AAdd( ::aDatas, { cData, xInit, cType, nScope } ) RETURN @@ -240,6 +247,7 @@ STATIC PROCEDURE AddData( cData, xInit, cType, nScope ) /* xInit is initializer STATIC PROCEDURE AddMultiData( cType, xInit, nScope, aData ) + LOCAL Self := QSelf() LOCAL i LOCAL nParam := Len( aData ) @@ -263,6 +271,8 @@ STATIC PROCEDURE AddMultiData( cType, xInit, nScope, aData ) STATIC PROCEDURE AddClassData( cData, xInit, cType, nScope ) + LOCAL Self := QSelf() + AAdd( ::aClsDatas, { cData, xInit, cType, nScope } ) RETURN @@ -271,6 +281,7 @@ STATIC PROCEDURE AddClassData( cData, xInit, cType, nScope ) STATIC PROCEDURE AddMultiClsData( cType, xInit, nScope, aData ) + LOCAL Self := QSelf() LOCAL i LOCAL nParam := Len( aData ) @@ -294,6 +305,8 @@ STATIC PROCEDURE AddMultiClsData( cType, xInit, nScope, aData ) STATIC PROCEDURE AddInline( cMethod, bCode, nScope ) + LOCAL Self := QSelf() + AAdd( ::aInlines, { cMethod, bCode, nScope } ) RETURN @@ -302,6 +315,8 @@ STATIC PROCEDURE AddInline( cMethod, bCode, nScope ) STATIC PROCEDURE AddMethod( cMethod, nFuncPtr, nScope ) + LOCAL Self := QSelf() + AAdd( ::aMethods, { cMethod, nFuncPtr, nScope } ) RETURN @@ -310,6 +325,8 @@ STATIC PROCEDURE AddMethod( cMethod, nFuncPtr, nScope ) STATIC PROCEDURE AddVirtual( cMethod ) + LOCAL Self := QSelf() + AAdd( ::aVirtuals, cMethod ) RETURN @@ -318,6 +335,8 @@ STATIC PROCEDURE AddVirtual( cMethod ) STATIC PROCEDURE SetOnError( nFuncPtr ) + LOCAL Self := QSelf() + ::nOnError := nFuncPtr RETURN diff --git a/harbour/source/rtl/xsavescr.c b/harbour/source/rtl/xsavescr.c index 099b8fa268..702a4d4500 100644 --- a/harbour/source/rtl/xsavescr.c +++ b/harbour/source/rtl/xsavescr.c @@ -59,7 +59,7 @@ void hb_conXSaveRestRelease( void ) { hb_xfree( s_pBuffer ); s_pBuffer = NULL; - }; + } } HB_FUNC( __XSAVESCREEN )