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:
@@ -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
|
||||
|
||||
13
harbour/contrib/tprepro/test.scr
Normal file
13
harbour/contrib/tprepro/test.scr
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
function main()
|
||||
|
||||
local a:="test"
|
||||
? a
|
||||
|
||||
USE "test.dbf" ALIAS test SHARED NEW
|
||||
|
||||
return nil
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user