From 85e045aee934e8590756fc0eff8d9c22d9fbdbd5 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 1 Mar 2011 13:32:16 +0000 Subject: [PATCH] 2011-03-01 14:31 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbformat/hbfmtcls.prg ! Fixed a call to deleted function. NOTE: I didn't test it and no idea if ini file reader functionality relies on empty lines being filtered on load. --- harbour/ChangeLog | 6 ++++++ harbour/contrib/hbformat/hbfmtcls.prg | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d29891fb77..c4501506ae 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2011-03-01 14:31 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbformat/hbfmtcls.prg + ! Fixed a call to deleted function. + NOTE: I didn't test it and no idea if ini file reader functionality + relies on empty lines being filtered on load. + 2011-03-01 12:55 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbformat/utils/hbformat.prg * contrib/hbformat/hbformat.hbx diff --git a/harbour/contrib/hbformat/hbfmtcls.prg b/harbour/contrib/hbformat/hbfmtcls.prg index f431ee01d8..c00eeebcaa 100644 --- a/harbour/contrib/hbformat/hbfmtcls.prg +++ b/harbour/contrib/hbformat/hbfmtcls.prg @@ -712,9 +712,9 @@ METHOD SetOption( cLine, i, aIni ) CLASS HBFORMATCODE IF __ObjHasMsg( Self, cToken1 ) IF Empty( cToken2 ) xRes := "" - ELSEIF IsDigit( cToken2 ) .OR. ( Left( cToken2, 1 ) == "-" .AND. IsDigit( Ltrim( SubStr( cToken2, 2 ) ) ) ) + ELSEIF IsDigit( cToken2 ) .OR. ( Left( cToken2, 1 ) == "-" .AND. IsDigit( LTrim( SubStr( cToken2, 2 ) ) ) ) xRes := Val( cToken2 ) - ELSEIF Isalpha( cToken2 ) + ELSEIF IsAlpha( cToken2 ) IF ( cTemp := Upper( cToken2 ) ) == "ON" .OR. cTemp == "YES" xRes := .T. ELSEIF cTemp == "OFF" .OR. cTemp == "NO" @@ -760,7 +760,7 @@ METHOD ReadIni( cIniName ) CLASS HBFORMATCODE LOCAL i, nLen, aIni, c IF hb_FileExists( cIniName ) - aIni := __hbformat_FileRead( MemoRead( cIniName ) ) + aIni := hb_ATokens( StrTran( MemoRead( cIniName ), Chr( 13 ) + Chr( 10 ), Chr( 10 ) ), Chr( 10 ) ) nLen := Len( aIni ) FOR i := 1 TO nLen IF !Empty( aIni[ i ] := AllTrim( aIni[ i ] ) ) .AND. ;