diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f7a236b7df..945693b2e9 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,8 @@ +2001-06-07 20:39 GMT+1 Patrick Mast + * contrib/tprepro/tprepro.prg + + Added TestPrePro tes test preprocessor output + + test.scr file. This is a test script + 2001-06-07 11:30 UTC-0400 David G. Holm * contrib\libct\alt\token1.prg diff --git a/harbour/contrib/tprepro/test.scr b/harbour/contrib/tprepro/test.scr new file mode 100644 index 0000000000..782ac81c08 --- /dev/null +++ b/harbour/contrib/tprepro/test.scr @@ -0,0 +1,13 @@ +/* + * $Id$ + */ + +function main() + + local a:="test" + ? a + + USE "test.dbf" ALIAS test SHARED NEW + +return nil + diff --git a/harbour/contrib/tprepro/tprepro.prg b/harbour/contrib/tprepro/tprepro.prg index af3f00641e..ede35b1f20 100644 --- a/harbour/contrib/tprepro/tprepro.prg +++ b/harbour/contrib/tprepro/tprepro.prg @@ -48,6 +48,24 @@ * */ + +//---------------------------------------------------------------------- +Function TestTPerPro() +LOCAL cScript, oPP + +oPP:=TPreProcessor():New("c:\harbour\include") +oPP:TranslateFile( "Test.scr", .t.,"ppo",.f.) +oPP:End() + +Alert("Please, see test.ppo for preprocessed result") + +RETURN NIL + + + + + + //------------------------------------------------------------------------ #include "hbclass.ch" @@ -77,7 +95,7 @@ METHOD New( cIncludePath ) CLASS TPreprocessor __PP_Init( cIncludePath ) - ::cIncludepath:=cIncludePath ) + ::cIncludepath:=cIncludePath return Self @@ -187,7 +205,7 @@ METHOD TranslateFile( cFile, lWritePPO, cPPOExt, lWasteNoSpace ) CLASS TPreproce if lWasteNoSpace if !Empty( cPP ) - cResult+= LTrim( cPP ) + cResult+= LTrim( cPP ) + Replicate(CRLF,nPuntComma) endif else cResult+=cPP + Replicate(CRLF,nPuntComma)