[Harbour] HBMK2 - Few Changes
Pritpal Bedi
bedipritpal at hotmail.com
Sat May 2 15:15:29 EDT 2009
Hi
Here is what I placed at the end of hbmk.prg to strip commented block:
STATIC FUNCTION StripCommnets( cFile )
LOCAL n, n1
DO WHILE .T.
IF ( n := at( '/*', cFile ) ) == 0
EXIT
ENDIF
IF ( n1 := at( '*/', cFile ) ) == 0
EXIT
ENDIF
cFile := SubStr( cFile, 1, n-1 ) + SubStr( cFile, n1+2 )
ENDDO
RETURN cFile
And then in:
STATIC PROCEDURE HBM_Load( aParams, cFileName, /* @ */ nEmbedLevel )
LOCAL cFile
LOCAL cLine
LOCAL cParam
IF hb_FileExists( cFileName )
cFile := MemoRead( cFileName ) /* NOTE: Intentionally using MemoRead()
which handles EOF char. */
cFile := StripCommnets( cFile )
...
Regards
Pritpal Bedi
--
View this message in context: http://www.nabble.com/HBMK2---Few-Changes-tp23348709p23349387.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.
More information about the Harbour
mailing list