From 2b1036d121b4d81b4030a8d3bc977d6a2ecd6a2f Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 25 Nov 2010 09:40:20 +0000 Subject: [PATCH] 2010-11-25 10:39 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbplist + Enabled new rddbmcdx. * contrib/rddbmcdx/bmdbfcdx.c ! Fixed typo in a pointer type. * contrib/hbmagic/hbmagic.ch ! Fixed to use hb_bitOr(). ; Patch from Tamas: * contrib/hbmagic/tests/hbmagit.prg + Added two more tests. * bin/hb3rdpat.hbs ! Fixed past patch/manual editing error. --- harbour/ChangeLog | 18 ++++++++++++++++++ harbour/bin/hb3rdpat.hbs | 1 - harbour/contrib/hbmagic/hbmagic.ch | 2 +- harbour/contrib/hbmagic/tests/hbmagit.prg | 12 +++++++++++- harbour/contrib/hbplist | 1 + harbour/contrib/rddbmcdx/bmdbfcdx.c | 2 +- 6 files changed, 32 insertions(+), 4 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ad692ca22b..4e34809072 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,24 @@ The license applies to all entries newer than 2009-04-28. */ +2010-11-25 10:39 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbplist + + Enabled new rddbmcdx. + + * contrib/rddbmcdx/bmdbfcdx.c + ! Fixed typo in a pointer type. + + * contrib/hbmagic/hbmagic.ch + ! Fixed to use hb_bitOr(). + + ; Patch from Tamas: + + * contrib/hbmagic/tests/hbmagit.prg + + Added two more tests. + + * bin/hb3rdpat.hbs + ! Fixed past patch/manual editing error. + 2010-11-25 03:20 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + contrib/hbmisc/irm.c * contrib/hbmisc/hbmisc.hbp diff --git a/harbour/bin/hb3rdpat.hbs b/harbour/bin/hb3rdpat.hbs index fe808181a5..5364a14dff 100755 --- a/harbour/bin/hb3rdpat.hbs +++ b/harbour/bin/hb3rdpat.hbs @@ -119,7 +119,6 @@ * (lots of new files, removed files, radically re-organized upstream source * tree, for example), hb3rdpat's utility will decrease steeply. In such cases * considering the full manual update of the component is advised. - * By default, hb3rdpat operates in `component version updating' mode - that is, * * If hb3rdpat is called with the `-rediff' command line argument, it switches * to a `local diff refresh' mode. This mode is used to refresh the local diff diff --git a/harbour/contrib/hbmagic/hbmagic.ch b/harbour/contrib/hbmagic/hbmagic.ch index 7ee59215c5..9ab7b61912 100644 --- a/harbour/contrib/hbmagic/hbmagic.ch +++ b/harbour/contrib/hbmagic/hbmagic.ch @@ -44,7 +44,7 @@ #define MAGIC_RAW 0x000100 /* Don't translate unprintable chars */ #define MAGIC_ERROR 0x000200 /* Handle ENOENT etc as real errors */ #define MAGIC_MIME_ENCODING 0x000400 /* Return the MIME encoding */ -#define MAGIC_MIME (MAGIC_MIME_TYPE|MAGIC_MIME_ENCODING) +#define MAGIC_MIME hb_bitOr( MAGIC_MIME_TYPE, MAGIC_MIME_ENCODING ) #define MAGIC_APPLE 0x000800 /* Return the Apple creator and type */ #define MAGIC_NO_CHECK_COMPRESS 0x001000 /* Don't check for compressed files */ #define MAGIC_NO_CHECK_TAR 0x002000 /* Don't check for tar files */ diff --git a/harbour/contrib/hbmagic/tests/hbmagit.prg b/harbour/contrib/hbmagic/tests/hbmagit.prg index 4a9c30518c..c7ef80928a 100644 --- a/harbour/contrib/hbmagic/tests/hbmagit.prg +++ b/harbour/contrib/hbmagic/tests/hbmagit.prg @@ -62,7 +62,7 @@ PROCEDURE Main() - LOCAL cJpeg, cPng, cGif, cElf, cExe, cCom + LOCAL cJpeg, cPng, cGif, cElf, cExe, cCom, cText LOCAL hMagic cJpeg := hb_base64decode( ; @@ -89,6 +89,13 @@ PROCEDURE Main() "TVpAAAEAAAAGAAAA//8AALgAAAAAAAAAYAAAAAAAAAA=" ) cCom := hb_base64decode( ; "6fEAUE1PREUvVyBWZXJzaW9uIENoZWNrIFV0aWxpdHk=" ) + cText := hb_base64decode( ; + "H4sICONj7UwCA3Rlc3QAjVFba8IwGH3vr/ioDFosE4YM5qUQayaKtfWyh22M0qZpjWsbMSnz5y+p" + ; + "MjcfhoEcksN3LiFGi1WkqFMKJuFlyat7sjWNC7lNyjhn5IoVrNwXlPGGNlpHLY2rFDYWDCzJZEFt" + ; + "11FHUSc7SqTtgg1DF/oG/KzGNhJUZkWcCwu2viYc8NFk6kWLYIGVpv9bEdRyLVM1mURCHp75oYyl" + ; + "ymviXGiD2QPZg/c78QGmc/ZP6iyjh4v74NxIF7KvA/6v5E99HG1ewxt7meWpy41V2lpOeWGpi2GE" + ; + "q8DD45cVBj9mlaUYlTMPPDQHMtvT3AESVhonLFOIiwaPVKHHy8vwKatRNzroDXVOEgv62E0p4Sm1" + ; + "/vwKgNl52nW6CC3Xn2+zVY5GaInRGo2mCI07D1+jMUJYczdtU72rb3wD2wEd8GQCAAA=" ) hMagic := magic_open() IF Empty( hMagic ) .OR. magic_load( hMagic ) != 0 @@ -105,6 +112,9 @@ PROCEDURE Main() T( "Short buffer", " " ) T( "Empty buffer", "" ) T( "Null buffer", nil ) + T( "Compressed data", cText ) + cText := hb_zuncompress( cText ) + T( "Plain text", cText ) OutStd( "hb_Magic_Simple(): t: [" + hb_Magic_Simple( hb_argv( 0 ), MAGIC_NONE ) + "] " + ; "m: [" + hb_Magic_Simple( hb_argv( 0 ), MAGIC_MIME_TYPE ) + "]" + hb_eol() ) diff --git a/harbour/contrib/hbplist b/harbour/contrib/hbplist index 62b6346ef7..2dab1bae84 100644 --- a/harbour/contrib/hbplist +++ b/harbour/contrib/hbplist @@ -47,6 +47,7 @@ hbxpp/hbxpp.hbp hbzebra/hbzebra.hbp hbziparc/hbziparc.hbp rddads/rddads.hbp +rddbmcdx/rddbmcdx.hbp rddsql/rddsql.hbp sddfb/sddfb.hbp sddmy/sddmy.hbp diff --git a/harbour/contrib/rddbmcdx/bmdbfcdx.c b/harbour/contrib/rddbmcdx/bmdbfcdx.c index ad96504d21..68fbaf9527 100644 --- a/harbour/contrib/rddbmcdx/bmdbfcdx.c +++ b/harbour/contrib/rddbmcdx/bmdbfcdx.c @@ -284,7 +284,7 @@ static AREAP hb_bmGetCurrentWorkArea( void ) return pArea; } -static AREAP hb_bmGetArrayParam( int iParam ) +static PHB_ITEM hb_bmGetArrayParam( int iParam ) { PHB_ITEM pArray = hb_param( iParam, HB_IT_ARRAY );