* contrib/tprepro/tprepro.prg

* Bug fix in TranslateFile() method
This commit is contained in:
Patrick Mast
2001-06-25 12:53:52 +00:00
parent b27bd3fd0b
commit 18099d6364
2 changed files with 16 additions and 17 deletions

View File

@@ -1,3 +1,7 @@
2001-06-25 14:51 GMT+1 Patrick Mast <harbour@PatrickMast.com>
* contrib/tprepro/tprepro.prg
* Bug fix in TranslateFile() method
2001-06-24 23:43 GMT -3 Luiz Rafael Culik <culik@sl.conex.net>
*utils/hbmake/hbmake.prg
* Reverted last change to hbmake, and put the file existence test on the correct place

View File

@@ -74,13 +74,12 @@ RETURN NIL
CLASS TPreProcessor
DATA cIncludePath,cPreProcesses
DATA cIncludePath,cPreProcessed
METHOD New( cIncludePath )
METHOD End()
METHOD AddRule( cRule )
METHOD AddIncludepath( cIncludePath )
METHOD SetIncludepath( cIncludePath )
METHOD TranslateLine( cCode )
METHOD TranslateFile( cFile, lWritePPO )
@@ -96,7 +95,8 @@ METHOD New( cIncludePath ) CLASS TPreprocessor
__PP_Init( cIncludePath )
::cIncludepath:=cIncludePath
::cIncludepath := cIncludePath
::cPreProcessed := ""
return Self
@@ -113,7 +113,7 @@ return Self
METHOD SetIncludepath( cIncludePath ) CLASS TPreprocessor
__PP_PATH( cIncludePath, .t. )
__PP_Init( cIncludePath )
::cIncludepath:=cIncludePath
@@ -122,17 +122,6 @@ return Self
METHOD AddIncludepath( cIncludePath ) CLASS TPreprocessor
__PP_PATH( cIncludePath, .f. )
::cIncludepath:=::cIncludePath+";"+cIncludePath
return Self
METHOD AddRule( cRule ) CLASS TPreprocessor
@@ -217,10 +206,14 @@ METHOD TranslateFile( cFile, lWritePPO, cPPOExt, lWasteNoSpace ) CLASS TPreproce
if lWasteNoSpace
if !Empty( cPP )
cResult+= LTrim( cPP ) + Replicate(CRLF,nPuntComma)
cResult+= LTrim( cPP )
endif
else
cResult+=cPP + Replicate(CRLF,nPuntComma)
if Empty( cPP )
cResult+= Replicate(CRLF,nPuntComma)
else
cResult+=cPP + Replicate(CRLF,nPuntComma)
endif
endif
enddo
@@ -246,4 +239,6 @@ METHOD TranslateFile( cFile, lWritePPO, cPPOExt, lWasteNoSpace ) CLASS TPreproce
endif
::cPreProcessed := cResult
return cResult