2013-04-10 01:10 UTC+0200 Viktor Szakats (harbour syenar.net)

* contrib/hbhpdf/3rd/libhpdf/hpdfimap.c
  * contrib/hbhpdf/3rd/libhpdf/libhpdf.dif
    + patched to build with libpng 1.6 w/o warning
      identical to this upstream patch:
         f1817baea4

  * bin/commit.hb
    ! fixed to add shebang to newly created commit hook

  * bin/check.hb
    ! exclude maskimag.png from processing
    ! typo in png processor name
    ! minor syntax clarification

  * contrib/hbhpdf/tests/files/maskimag.png
    ! restored original version, as any optimized version will
      cause libharu to GPF (visible when running the demo)
This commit is contained in:
Viktor Szakats
2013-04-10 01:13:54 +02:00
parent 8d48020ab0
commit 02b98ce15f
6 changed files with 56 additions and 9 deletions

View File

@@ -149,6 +149,9 @@ STATIC FUNCTION CheckFile( cName, /* @ */ aErr, lApplyFixes )
LOCAL aForcedLF := { ;
"*.sh" }
LOCAL aNoProc := { ;
"maskimag.png" } /* will crash libharu demo if optimized in any way */
LOCAL aCanHaveIdent
LOCAL hAllowedExt := LoadGitattributes( @aCanHaveIdent )
LOCAL nLines
@@ -287,7 +290,7 @@ STATIC FUNCTION CheckFile( cName, /* @ */ aErr, lApplyFixes )
ENDIF
ENDIF
IF ( tmp := "$" + "Id" ) $ cFile != FNameExc( cName, aCanHaveIdent )
IF ( ( tmp := "$" + "Id" ) $ cFile ) != FNameExc( cName, aCanHaveIdent )
IF tmp
AAdd( aErr, "content: has " + "$" + "Id" )
ELSE
@@ -321,7 +324,7 @@ STATIC FUNCTION CheckFile( cName, /* @ */ aErr, lApplyFixes )
EXIT
ENDIF
NEXT
IF lProcess
IF lProcess .AND. ! FNameExc( cName, aNoProc )
OutStd( cName + ": " + "content: processing" + hb_eol() )
ProcFile( cName )
ENDIF
@@ -599,7 +602,7 @@ STATIC FUNCTION FNameExc( cName, aList )
STATIC PROCEDURE ProcFile( cFileName )
LOCAL hProc := { ;
".png" => { "avdpng -z -4 %1$s", "optipng -o7 %1$s" }, ;
".png" => { "advpng -z -4 %1$s", "optipng -o7 %1$s" }, ;
".jpg" => { "jpegoptim --strip-all %1$s" }, ;
".c" => { hb_StrFormat( "uncrustify -c %1$s %%1$s", hb_DirSepToOS( _HBROOT_ + "bin/harbour.ucf" ) ), @FixFuncCase() }, ;
".cpp" => ".c", ;

View File

@@ -147,6 +147,10 @@ STATIC FUNCTION InstallHook( cHookName, cCommand )
RETURN .T.
ENDIF
IF Empty( cFile )
cFile += "#!/bin/sh" + hb_eol()
ENDIF
RETURN hb_MemoWrit( cName, cFile + hb_eol() + cCommand + hb_eol() )
STATIC FUNCTION FindChangeLog()