Files
harbour-core/tests/hbdocext.hb
Viktor Szakats 58faf91453 2016-01-14 19:17 UTC+0100 Viktor Szakats (vszakats users.noreply.github.com)
* *
    % remove brandings and homepage [1] from copyright header. Pass 1 - using script.
      [1] nobody has access to it anymore AFAIK - and it's also just
          a redirect since long
    ! update url in copyright header
    ; this should make the diff between 3.4 and 3.2 easier to manage
2016-01-14 19:18:17 +01:00

35 lines
648 B
Plaintext

/*
* HBDOC extractor from source
*
* Copyright 2010 Viktor Szakats (vszakats.net/harbour)
*
*/
#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