Files
harbour-core/tests/hbdocext.hb
vszakats 9687850865 2013-03-16 02:10 UTC+0100 Viktor Szakats (harbour syenar.net)
* (all files)
    * stripped svn header
    * minor cleanups
    ; use following command to find out the history of files:
       git log
       git log --follow
       git blame
       git annotate
2013-03-16 02:11:42 +01:00

36 lines
682 B
Plaintext

/*
* HBDOC extractor from source
*
* Copyright 2010 Viktor Szakats (harbour syenar.net)
* www - http://harbour-project.org
*
*/
#pragma -w3
#pragma -km+
#pragma -ko+
#include "directry.ch"
#include "simpleio.ch"
PROCEDURE Main()
LOCAL aFile
LOCAL cFile
LOCAL cDst
LOCAL cHdr := ""
FOR EACH aFile IN Directory( hb_osFileMask() )
cFile := __hbdoc_ToSource( __hbdoc_FromSource( MemoRead( aFile[ F_NAME ] ) ) )
IF ! Empty( cFile )
cDst := hb_FNameExtSet( aFile[ F_NAME ], ".txt" )
IF ! hb_FileExists( cDst )
? "Saving", cDst
hb_MemoWrit( cDst, cHdr + cFile )
ENDIF
ENDIF
NEXT
RETURN