use :__enumIsLast()

This commit is contained in:
Viktor Szakats
2013-03-28 15:54:21 +01:00
parent e77ba4f9eb
commit 3b35de952a
5 changed files with 14 additions and 7 deletions

View File

@@ -10,6 +10,13 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2013-03-28 15:53 UTC+0100 Viktor Szakats (harbour syenar.net)
* contrib/hbnetio/utils/hbnetio/netiomgm.hb
* src/rtl/hbdoc.prg
* src/rtl/hbfilehi.prg
* tests/stripeol.hb
% use :__enumIsLast()
2013-03-28 14:51 UTC+0100 Viktor Szakats (harbour syenar.net)
* utils/hbmk2/hbmk2.es_PE.po
* utils/hbmk2/hbmk2.hu_HU.po

View File

@@ -307,7 +307,7 @@ STATIC FUNCTION XToStrX( xValue )
FOR EACH tmp IN xValue
cRetVal += XToStrX( tmp )
IF tmp:__enumIndex() < Len( tmp:__enumBase() )
IF ! tmp:__enumIsLast()
cRetVal += ", "
ENDIF
NEXT
@@ -320,7 +320,7 @@ STATIC FUNCTION XToStrX( xValue )
FOR EACH tmp IN xValue
cRetVal += tmp:__enumKey() + " => " + XToStrX( tmp )
IF tmp:__enumIndex() < Len( tmp:__enumBase() )
IF ! tmp:__enumIsLast()
cRetVal += ", "
ENDIF
NEXT

View File

@@ -321,7 +321,7 @@ FUNCTION __hbdoc_FilterOut( cFile )
ENDIF
IF nEmpty < 2
cOK += cLine
IF cLine:__enumIndex() < Len( cLine:__enumBase() )
IF ! cLine:__enumIsLast()
cOK += hb_eol()
ENDIF
ENDIF

View File

@@ -66,7 +66,7 @@ FUNCTION hb_PathNormalize( cPath )
IF cDir == "." .OR. ;
( Empty( cDir ) .AND. ;
cDir:__enumIndex() < Len( cDir:__enumBase() ) .AND. ;
! cDir:__enumIsLast() .AND. ;
( cDir:__enumIndex() > 2 .OR. ;
( cDir:__enumIndex() == 2 .AND. ! Empty( aDir[ 1 ] ) ) ) )
@@ -76,7 +76,7 @@ FUNCTION hb_PathNormalize( cPath )
! Empty( cDir ) .AND. ;
! _ISDRIVESPEC( cDir )
IF cDir:__enumIndex() < Len( cDir:__enumBase() ) .AND. ;
IF ! cDir:__enumIsLast() .AND. ;
aDir[ cDir:__enumIndex() + 1 ] == ".."
hb_ADel( aDir, cDir:__enumIndex() + 1, .T. )
hb_ADel( aDir, cDir:__enumIndex(), .T. )
@@ -87,7 +87,7 @@ FUNCTION hb_PathNormalize( cPath )
cPath := ""
FOR EACH cDir IN aDir
cPath += cDir
IF cDir:__enumIndex() < Len( cDir:__enumBase() )
IF ! cDir:__enumIsLast()
cPath += hb_ps()
ENDIF
NEXT

View File

@@ -31,7 +31,7 @@ FUNCTION __stripeol( cFile )
FOR EACH cLine IN hb_ATokens( StrTran( StrTran( cFile, Chr( 13 ) ), Chr( 9 ), " " ), Chr( 10 ) )
cOK += RTrim( cLine )
IF cLine:__enumIndex() < Len( cLine:__enumBase )
IF ! cLine:__enumIsLast()
cOK += hb_eol()
ENDIF
NEXT