From 02b98ce15f5db68504183689de10bbfd9065c3fd Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 10 Apr 2013 01:13:54 +0200 Subject: [PATCH 1/4] 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: https://github.com/libharu/libharu/commit/f1817baea49ab09de4635e383dc86b04a0fc3d8f * 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) --- ChangeLog.txt | 19 ++++++++++++++ bin/check.hb | 9 ++++--- bin/commit.hb | 4 +++ contrib/hbhpdf/3rd/libhpdf/hpdfimap.c | 1 + contrib/hbhpdf/3rd/libhpdf/libhpdf.dif | 32 +++++++++++++++++++----- contrib/hbhpdf/tests/files/maskimag.png | Bin 114 -> 149 bytes 6 files changed, 56 insertions(+), 9 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 5fdfaae7f9..3bfccf9043 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,25 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +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: + https://github.com/libharu/libharu/commit/f1817baea49ab09de4635e383dc86b04a0fc3d8f + + * 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) + 2013-04-09 03:27 UTC+0200 Viktor Szakats (harbour syenar.net) * bin/check.hb * deleted one more contrib exception diff --git a/bin/check.hb b/bin/check.hb index 4216345b80..095f280479 100644 --- a/bin/check.hb +++ b/bin/check.hb @@ -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", ; diff --git a/bin/commit.hb b/bin/commit.hb index c9090d2be3..f48f1093c0 100644 --- a/bin/commit.hb +++ b/bin/commit.hb @@ -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() diff --git a/contrib/hbhpdf/3rd/libhpdf/hpdfimap.c b/contrib/hbhpdf/3rd/libhpdf/hpdfimap.c index fc215ef0e5..230d36f5a4 100644 --- a/contrib/hbhpdf/3rd/libhpdf/hpdfimap.c +++ b/contrib/hbhpdf/3rd/libhpdf/hpdfimap.c @@ -21,6 +21,7 @@ #ifndef LIBHPDF_HAVE_NOPNGLIB #include +#include static void PngErrorFunc (png_structp png_ptr, diff --git a/contrib/hbhpdf/3rd/libhpdf/libhpdf.dif b/contrib/hbhpdf/3rd/libhpdf/libhpdf.dif index db27b2e62d..fe8ebfb978 100644 --- a/contrib/hbhpdf/3rd/libhpdf/libhpdf.dif +++ b/contrib/hbhpdf/3rd/libhpdf/libhpdf.dif @@ -1,6 +1,6 @@ -diff -urN libhpdf-rc2.orig\hpdf.h libhpdf-rc2\hpdf.h ---- libhpdf-rc2.orig\hpdf.h Wed Apr 04 21:40:06 2012 -+++ libhpdf-rc2\hpdf.h Wed Apr 04 21:40:06 2012 +diff -urN libhpdf.orig\hpdf.h libhpdf\hpdf.h +--- libhpdf.orig\hpdf.h Wed Apr 10 01:02:31 2013 ++++ libhpdf\hpdf.h Wed Apr 10 01:02:31 2013 @@ -17,7 +17,7 @@ #ifndef _HPDF_H #define _HPDF_H @@ -19,9 +19,20 @@ diff -urN libhpdf-rc2.orig\hpdf.h libhpdf-rc2\hpdf.h HPDF_Page_CreateTextMarkupAnnot (HPDF_Page page, HPDF_Rect rect, const char *text, -diff -urN libhpdf-rc2.orig\hpdfutil.h libhpdf-rc2\hpdfutil.h ---- libhpdf-rc2.orig\hpdfutil.h Wed Apr 04 21:40:06 2012 -+++ libhpdf-rc2\hpdfutil.h Wed Apr 04 21:40:06 2012 +diff -urN libhpdf.orig\hpdfimap.c libhpdf\hpdfimap.c +--- libhpdf.orig\hpdfimap.c Wed Apr 10 01:02:31 2013 ++++ libhpdf\hpdfimap.c Wed Apr 10 01:02:31 2013 +@@ -21,6 +21,7 @@ + + #ifndef LIBHPDF_HAVE_NOPNGLIB + #include ++#include + + static void + PngErrorFunc (png_structp png_ptr, +diff -urN libhpdf.orig\hpdfutil.h libhpdf\hpdfutil.h +--- libhpdf.orig\hpdfutil.h Wed Apr 10 01:02:31 2013 ++++ libhpdf\hpdfutil.h Wed Apr 10 01:02:31 2013 @@ -18,7 +18,7 @@ #ifndef _HPDF_UTILS_H #define _HPDF_UTILS_H @@ -31,3 +42,12 @@ diff -urN libhpdf-rc2.orig\hpdfutil.h libhpdf-rc2\hpdfutil.h #include "hpdftype.h" #ifdef __cplusplus +diff -urN libhpdf.orig\t4.h libhpdf\t4.h +--- libhpdf.orig\t4.h Wed Apr 10 01:02:31 2013 ++++ libhpdf\t4.h Wed Apr 10 01:02:31 2013 +@@ -1,4 +1,4 @@ +-/* $Id: t4.h,v 1.20 2007/11/10 18:40:44 drolon Exp $ */ ++/* $Id$ */ + + /* + * Copyright (c) 1988-1997 Sam Leffler diff --git a/contrib/hbhpdf/tests/files/maskimag.png b/contrib/hbhpdf/tests/files/maskimag.png index af1bd0858493c62268cf4e126094b439f42517e1..d896abadb7a97faf9ad69826505657fe64a1ebbc 100644 GIT binary patch delta 131 zcmV-}0DS*)l>v|#eFy>o008_L?V|ty09;8#K~#90?Nvbv05AyB{r}JHw9#d-U@Zc@ z6@s9V1PluX!VMd43oynXNJf7FdheqC-thZdl%Ih;y7v>mzeOK1@KZt_{Vn?Ni_{0z l0_uZ$0rf$>fcl_bU;>t3G%wm6wBP^$002ovPDHLkV1l?4X`xOH&x%W-KO|ftjvAb}!_2VPv%c}1<0?s@Vg^rFKbLh*2~7ZU;~%g9 From d2ac6baed38787ae45996a86b9550dc3f6230a68 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 10 Apr 2013 03:20:42 +0200 Subject: [PATCH 2/4] obfuscated $id --- ChangeLog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 3bfccf9043..08b5859dbc 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1610,7 +1610,7 @@ + guard some stuff that's not present in BB10 (via Francesco Perillo) * contrib/hbtinymt/3rd/tinymt/tinymt.hbc - ! deleted $Id$ + ! deleted $Id 2013-03-27 03:54 UTC+0100 Viktor Szakats (harbour syenar.net) * utils/hbmk2/hbmk2.prg From b60a262514f5d2b98a8a6eaad1f6d18eb6021e62 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 10 Apr 2013 03:26:43 +0200 Subject: [PATCH 3/4] ending whitespace (autocheck), $id obfusc --- ChangeLog.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 44af24fdfd..dd390b0995 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,5 @@ /* - * $Id: 5fdfaae7f9dac85f561fab9f1cd8c5f26f3908a0 $ + * $Id$ */ /* Read doc/howtorep.txt and use this format for entry headers: @@ -17,7 +17,7 @@ 2013-04-09 17:11 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/gtwvg/pushbut.prg ! Fixed: regression of copy/paste - WVT_IMAGE_ICON => WVG_IMAGE_BITMAP. - + 2013-04-09 03:27 UTC+0200 Viktor Szakats (harbour syenar.net) * bin/check.hb * deleted one more contrib exception @@ -1599,7 +1599,7 @@ + guard some stuff that's not present in BB10 (via Francesco Perillo) * contrib/hbtinymt/3rd/tinymt/tinymt.hbc - ! deleted $Id: 5fdfaae7f9dac85f561fab9f1cd8c5f26f3908a0 $ + ! deleted $Id$ 2013-03-27 03:54 UTC+0100 Viktor Szakats (harbour syenar.net) * utils/hbmk2/hbmk2.prg From 8402cf82b1e736146207097ddee8806ab9597fff Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 10 Apr 2013 03:28:26 +0200 Subject: [PATCH 4/4] 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: https://github.com/libharu/libharu/commit/f1817baea49ab09de4635e383dc86b04a0fc3d8f * 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) --- ChangeLog.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index aa5746f264..f0a8a2f2a9 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,14 +10,6 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ -2013-04-09 17:47 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) - * contrib/gtwvg/wvgwin.c - ! Fixed: Loading of resource of type icon if pulled from a resource file. - -2013-04-09 17:11 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) - * contrib/gtwvg/pushbut.prg - ! Fixed: regression of copy/paste - WVT_IMAGE_ICON => WVG_IMAGE_BITMAP. - 2013-04-10 01:10 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/hbhpdf/3rd/libhpdf/hpdfimap.c * contrib/hbhpdf/3rd/libhpdf/libhpdf.dif @@ -37,6 +29,14 @@ ! restored original version, as any optimized version will cause libharu to GPF (visible when running the demo) +2013-04-09 17:47 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/gtwvg/wvgwin.c + ! Fixed: Loading of resource of type icon if pulled from a resource file. + +2013-04-09 17:11 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/gtwvg/pushbut.prg + ! Fixed: regression of copy/paste - WVT_IMAGE_ICON => WVG_IMAGE_BITMAP. + 2013-04-09 03:27 UTC+0200 Viktor Szakats (harbour syenar.net) * bin/check.hb * deleted one more contrib exception