Files
harbour-core/harbour/tests/stripdoc.hbs
Viktor Szakats 343f1caba4 2010-07-14 19:23 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbqt/hbqt_hbqplaintextedit.cpp
    ! Fix for paint bug typo. Report/patch by Antonio Linares.

  * src/rtl/hbdoc.prg
    ! __HBDOC_FROMSOURCE(): added parameter validation.

  * tests/stripdoc.hbs
    ! Fixed -w3 warning.

  * contrib/gtwvg/wvgwin.c
  * contrib/gtwvg/wvgsink.c
  * contrib/gtwvg/wvgwing.c
  * contrib/hbwin/hbwinole.h
  * contrib/hbwin/win_shell.c
  * contrib/hbwin/olecore.c
  * contrib/hbwin/hbolesrv.c
    + Applied patch sent by Tamas Tevesz, targeting to change
      OLE code to use MS supplied macros to access certain
      structure elements. Also contains tweaks to NONAMELESSUNION
      Windows mess.
      "the attached is take two to use ole api accessors instead of
       hard-coded member names which may or may not be present anyway."
    ; Plus some casing adjusments in macro variable names.

  * contrib/gtwvg/gtwvg.c
  * contrib/gtwvg/wvggui.c
  * contrib/gtwvg/wvgwin.c
    % Deleted ( HWND ) casts from MS Windows-defined constants.
      Still when using plain MS defined constant, msvc will
      show some warnings when compiled in C mode:
         gtwvg.c(3594) : warning C4306: 'type cast' : conversion from 'int' to 'HWND' of greater size
      Couldn't find a way to defeat it.

  * contrib/gtwvg/gtwvg.h
  * contrib/gtwvg/wvggui.h
    + Upped IE version we are building against to 0x0500.
      This avoids some plain C mode msvc warnings.

  * contrib/gtwvg/wvgwing.c
    + Added ( HB_PTRDIFF ) cast to newly activated code
      after making above change.
2010-07-14 17:25:34 +00:00

70 lines
1.4 KiB
Handlebars

/*
* $Id$
*/
/*
* Strips HBDOC docs from source files.
*
* Copyright 2010 Viktor Szakats (harbour.01 syenar.hu)
* www - http://harbour-project.org
*
*/
#define F_NAME 1
PROCEDURE Main()
LOCAL aFile
FOR EACH aFile IN Directory( hb_osFileMask() )
IF Right( aFile[ F_NAME ], 2 ) == ".c" .OR. ;
Right( aFile[ F_NAME ], 4 ) == ".prg"
hb_MemoWrit( aFile[ F_NAME ], __hbdoc_filter_out( MemoRead( aFile[ F_NAME ] ) ) )
ENDIF
NEXT
RETURN
FUNCTION __hbdoc_filter_out( cFile )
LOCAL lEntry := .F.
LOCAL cLine
LOCAL cOK := ""
LOCAL nToSkip := 0
LOCAL nEmpty := 0
cFile := StrTran( cFile, Chr( 13 ) )
cFile := StrTran( cFile, Chr( 9 ), " " )
FOR EACH cLine IN hb_ATokens( cFile, Chr( 10 ) )
SWITCH AllTrim( SubStr( cLine, 4 ) )
CASE "$DOC$"
lEntry := .T.
EXIT
CASE "$END$"
lEntry := .F.
nToSkip := 1
EXIT
OTHERWISE
IF ! lEntry
IF nToSkip > 0
nToSkip--
ELSE
IF Empty( cLine )
nEmpty++
ELSE
nEmpty := 0
ENDIF
IF nEmpty < 2
cOK += cLine
IF cLine:__enumIndex() < Len( cLine:__enumBase() )
cOK += hb_eol()
ENDIF
ENDIF
ENDIF
ENDIF
ENDSWITCH
NEXT
RETURN cOK