2001-06-07 20:39 GMT+1 Patrick Mast <harbour@PatrickMast.com>

* contrib/tprepro/tprepro.prg
     + Added TestPrePro tes test preprocessor output
   + test.scr file. This is a test script
This commit is contained in:
Patrick Mast
2001-06-07 18:44:00 +00:00
parent 6bf7517715
commit e03f21354b
3 changed files with 38 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
2001-06-07 20:39 GMT+1 Patrick Mast <harbour@PatrickMast.com>
* 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 <dholm@jsd-llc.com>
* contrib\libct\alt\token1.prg

View File

@@ -0,0 +1,13 @@
/*
* $Id$
*/
function main()
local a:="test"
? a
USE "test.dbf" ALIAS test SHARED NEW
return nil

View File

@@ -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)