From 371c238bf648bb29f80e8128f7d2acc7f4dd057a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 5 Feb 2011 11:52:16 +0000 Subject: [PATCH] 2011-02-05 12:51 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbmxml/hbmxml.hbp - contrib/hbmxml/hbmxml.c + contrib/hbmxml/core.c - contrib/hbmxml/hbmxmlp.prg + contrib/hbmxml/format.prg - contrib/hbmxml/hbmxmlx.prg * contrib/hblzf/hblzf.hbp - contrib/hblzf/hblzf.c + contrib/hblzf/core.c - contrib/hblzf/hblzfx.prg * contrib/hbxdiff/hbxdiff.hbp - contrib/hbxdiff/hbxdiff.c + contrib/hbxdiff/core.c - contrib/hbxdiff/hbxdiffx.prg * contrib/hbexpat/hbexpat.hbp * contrib/hbexpat/hbexpat.hbx - contrib/hbexpat/hbexpat.c + contrib/hbexpat/core.c - contrib/hbexpat/hbexpatc.c + contrib/hbexpat/internal.c - contrib/hbexpat/hbexpatp.prg + contrib/hbexpat/unitable.prg - contrib/hbexpat/hbexpatx.prg * Renamed sources. % Optimized to use .hbx files directly without extra puller source. * contrib/hblzf/core.c ! Fixed dependence on which broke certain targets, f.e. msvcarm. BTW errnos are not set by lzf lib anyways, due to default configuration. ! Fixed to always set 3rd parameter in HB_LZF_DECOMPRESS(). Pls review. * contrib/hblzf/3rd/liblzf/lzf.hbp - Deleted commented line. --- harbour/ChangeLog | 39 +++++++++++++- harbour/contrib/hbexpat/{hbexpat.c => core.c} | 0 harbour/contrib/hbexpat/hbexpat.hbp | 9 ++-- harbour/contrib/hbexpat/hbexpat.hbx | 2 + harbour/contrib/hbexpat/hbexpatx.prg | 54 ------------------- .../hbexpat/{hbexpatc.c => internal.c} | 0 .../hbexpat/{hbexpatp.prg => unitable.prg} | 0 harbour/contrib/hblzf/3rd/liblzf/lzf.hbp | 6 +-- harbour/contrib/hblzf/{hblzf.c => core.c} | 17 ++++-- harbour/contrib/hblzf/hblzf.hbp | 5 +- harbour/contrib/hblzf/hblzfx.prg | 54 ------------------- harbour/contrib/hbmxml/{hbmxml.c => core.c} | 0 .../hbmxml/{hbmxmlp.prg => format.prg} | 0 harbour/contrib/hbmxml/hbmxml.hbp | 7 +-- harbour/contrib/hbmxml/hbmxmlx.prg | 54 ------------------- harbour/contrib/hbxdiff/{hbxdiff.c => core.c} | 0 harbour/contrib/hbxdiff/hbxdiff.hbp | 5 +- harbour/contrib/hbxdiff/hbxdiffx.prg | 54 ------------------- 18 files changed, 70 insertions(+), 236 deletions(-) rename harbour/contrib/hbexpat/{hbexpat.c => core.c} (100%) delete mode 100644 harbour/contrib/hbexpat/hbexpatx.prg rename harbour/contrib/hbexpat/{hbexpatc.c => internal.c} (100%) rename harbour/contrib/hbexpat/{hbexpatp.prg => unitable.prg} (100%) rename harbour/contrib/hblzf/{hblzf.c => core.c} (95%) delete mode 100644 harbour/contrib/hblzf/hblzfx.prg rename harbour/contrib/hbmxml/{hbmxml.c => core.c} (100%) rename harbour/contrib/hbmxml/{hbmxmlp.prg => format.prg} (100%) delete mode 100644 harbour/contrib/hbmxml/hbmxmlx.prg rename harbour/contrib/hbxdiff/{hbxdiff.c => core.c} (100%) delete mode 100644 harbour/contrib/hbxdiff/hbxdiffx.prg diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 0739dee13b..b56c06bf0a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,43 @@ The license applies to all entries newer than 2009-04-28. */ +2011-02-05 12:51 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbmxml/hbmxml.hbp + - contrib/hbmxml/hbmxml.c + + contrib/hbmxml/core.c + - contrib/hbmxml/hbmxmlp.prg + + contrib/hbmxml/format.prg + - contrib/hbmxml/hbmxmlx.prg + * contrib/hblzf/hblzf.hbp + - contrib/hblzf/hblzf.c + + contrib/hblzf/core.c + - contrib/hblzf/hblzfx.prg + * contrib/hbxdiff/hbxdiff.hbp + - contrib/hbxdiff/hbxdiff.c + + contrib/hbxdiff/core.c + - contrib/hbxdiff/hbxdiffx.prg + * contrib/hbexpat/hbexpat.hbp + * contrib/hbexpat/hbexpat.hbx + - contrib/hbexpat/hbexpat.c + + contrib/hbexpat/core.c + - contrib/hbexpat/hbexpatc.c + + contrib/hbexpat/internal.c + - contrib/hbexpat/hbexpatp.prg + + contrib/hbexpat/unitable.prg + - contrib/hbexpat/hbexpatx.prg + * Renamed sources. + % Optimized to use .hbx files directly without extra puller source. + + * contrib/hblzf/core.c + ! Fixed dependence on which broke certain targets, + f.e. msvcarm. BTW errnos are not set by lzf lib anyways, + due to default configuration. + ! Fixed to always set 3rd parameter in HB_LZF_DECOMPRESS(). + Pls review. + + * contrib/hblzf/3rd/liblzf/lzf.hbp + - Deleted commented line. + 2011-02-05 11:31 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbmzip/hbmzip.hbp + contrib/hbmzip/hbmzip.hbx @@ -3284,7 +3321,7 @@ ! Added HB_ prefix to locally rolled macros. + Moved locally rolled macros to separate .ch file. ! Fixed test to use hblzf.ch instead of repeating macro definitions. - ; TOFIX: errno.h. Replace with HB_LZF_* values? + ; TOFIX: errno.h. Replace with HB_LZF_* values? [DONE] * tests/wvtext.prg ! Fixed -w3 warnings. diff --git a/harbour/contrib/hbexpat/hbexpat.c b/harbour/contrib/hbexpat/core.c similarity index 100% rename from harbour/contrib/hbexpat/hbexpat.c rename to harbour/contrib/hbexpat/core.c diff --git a/harbour/contrib/hbexpat/hbexpat.hbp b/harbour/contrib/hbexpat/hbexpat.hbp index 7ca4d3f0fc..e65a41a2d5 100644 --- a/harbour/contrib/hbexpat/hbexpat.hbp +++ b/harbour/contrib/hbexpat/hbexpat.hbp @@ -21,9 +21,10 @@ -cflag=-DXML_STATIC -hbexpat.c -hbexpatc.c -hbexpatp.prg -hbexpatx.prg +hbexpat.hbx + +core.c +internal.c +unitable.prg 3rd/expat/expat.hbc{HBMK_HAS_EXPAT_LOCAL} diff --git a/harbour/contrib/hbexpat/hbexpat.hbx b/harbour/contrib/hbexpat/hbexpat.hbx index 1a14e74c24..65e30d7d2f 100644 --- a/harbour/contrib/hbexpat/hbexpat.hbx +++ b/harbour/contrib/hbexpat/hbexpat.hbx @@ -28,6 +28,7 @@ DYNAMIC HB_XML_EXPATVERSIONINFO DYNAMIC HB_XML_GET_UNICODE_TABLE +DYNAMIC HB_XML_GET_UNICODE_TABLE DYNAMIC XML_DEFAULTCURRENT DYNAMIC XML_ERRORSTRING DYNAMIC XML_EXPATVERSION @@ -78,6 +79,7 @@ DYNAMIC XML_SETXMLDECLHANDLER DYNAMIC XML_STOPPARSER DYNAMIC XML_USEFOREIGNDTD DYNAMIC __HB_XML_CDPU16MAP +DYNAMIC __HB_XML_CDPU16MAP #if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBEXPAT__REQUEST ) #uncommand DYNAMIC => EXTERNAL diff --git a/harbour/contrib/hbexpat/hbexpatx.prg b/harbour/contrib/hbexpat/hbexpatx.prg deleted file mode 100644 index 93a6434176..0000000000 --- a/harbour/contrib/hbexpat/hbexpatx.prg +++ /dev/null @@ -1,54 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * extern puller - * - * Copyright 2010 Viktor Szakats (harbour.01 syenar.hu) - * www - http://harbour-project.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * whether to permit this exception to apply to your modifications. - * If you do not wish that, delete this exception notice. - * - */ - -#define __HBEXTREQ__ -#include "hbexpat.hbx" diff --git a/harbour/contrib/hbexpat/hbexpatc.c b/harbour/contrib/hbexpat/internal.c similarity index 100% rename from harbour/contrib/hbexpat/hbexpatc.c rename to harbour/contrib/hbexpat/internal.c diff --git a/harbour/contrib/hbexpat/hbexpatp.prg b/harbour/contrib/hbexpat/unitable.prg similarity index 100% rename from harbour/contrib/hbexpat/hbexpatp.prg rename to harbour/contrib/hbexpat/unitable.prg diff --git a/harbour/contrib/hblzf/3rd/liblzf/lzf.hbp b/harbour/contrib/hblzf/3rd/liblzf/lzf.hbp index 3528a86ea6..3364376534 100644 --- a/harbour/contrib/hblzf/3rd/liblzf/lzf.hbp +++ b/harbour/contrib/hblzf/3rd/liblzf/lzf.hbp @@ -2,8 +2,6 @@ # $Id$ # -#-stop - -hblib -inc @@ -26,8 +24,8 @@ lzf_d.c # MAP LICENSE # MAP Changes # MAP README -# MAP crc32.h -# MAP lzf.h +# MAP crc32.h +# MAP lzf.h # MAP lzf_c.c # MAP lzf_d.c # MAP lzfP.h diff --git a/harbour/contrib/hblzf/hblzf.c b/harbour/contrib/hblzf/core.c similarity index 95% rename from harbour/contrib/hblzf/hblzf.c rename to harbour/contrib/hblzf/core.c index c284883190..3ba89a2fd6 100644 --- a/harbour/contrib/hblzf/hblzf.c +++ b/harbour/contrib/hblzf/core.c @@ -50,9 +50,6 @@ * */ -/* TOFIX: Some platforms don't have this. Build breaker. */ -#include - #include "hbapi.h" #include "hbapierr.h" #include "hbapiitm.h" @@ -60,6 +57,10 @@ #include "lzf.h" #include "lzfP.h" +#if ! defined( AVOID_ERRNO ) +# include +#endif + #include "hblzf.ch" static HB_SIZE hb_lzf_compressbound( HB_SIZE nLen ) @@ -200,12 +201,20 @@ HB_FUNC( HB_LZF_DECOMPRESS ) uiResult = lzf_decompress( in_data, in_len, buffer, buffer_size ); } - while( uiResult == 0 && errno == E2BIG ); + while( uiResult == 0 +#if ! defined( AVOID_ERRNO ) + && errno == E2BIG +#endif + ); if( uiResult == 0 ) { +#if ! defined( AVOID_ERRNO ) if( errno == EINVAL ) hb_storni( HB_LZF_DATA_CORRUPTED, 3 ); + else +#endif + hb_storni( HB_LZF_OK, 3 ); if( ! pBuffer ) hb_xfree( buffer ); diff --git a/harbour/contrib/hblzf/hblzf.hbp b/harbour/contrib/hblzf/hblzf.hbp index 933953f53d..c363e06db7 100644 --- a/harbour/contrib/hblzf/hblzf.hbp +++ b/harbour/contrib/hblzf/hblzf.hbp @@ -19,7 +19,8 @@ -instfile=inc:hblzf.ch -instfile=inc:hblzf.hbx -hblzf.c -hblzfx.prg +hblzf.hbx + +core.c 3rd/liblzf/lzf.hbc{HBMK_HAS_LZF_LOCAL} diff --git a/harbour/contrib/hblzf/hblzfx.prg b/harbour/contrib/hblzf/hblzfx.prg deleted file mode 100644 index 6d13f67eea..0000000000 --- a/harbour/contrib/hblzf/hblzfx.prg +++ /dev/null @@ -1,54 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * extern puller - * - * Copyright 2011 Viktor Szakats (harbour.01 syenar.hu) - * www - http://harbour-project.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * whether to permit this exception to apply to your modifications. - * If you do not wish that, delete this exception notice. - * - */ - -#define __HBEXTREQ__ -#include "hblzf.hbx" diff --git a/harbour/contrib/hbmxml/hbmxml.c b/harbour/contrib/hbmxml/core.c similarity index 100% rename from harbour/contrib/hbmxml/hbmxml.c rename to harbour/contrib/hbmxml/core.c diff --git a/harbour/contrib/hbmxml/hbmxmlp.prg b/harbour/contrib/hbmxml/format.prg similarity index 100% rename from harbour/contrib/hbmxml/hbmxmlp.prg rename to harbour/contrib/hbmxml/format.prg diff --git a/harbour/contrib/hbmxml/hbmxml.hbp b/harbour/contrib/hbmxml/hbmxml.hbp index 82cf9b4736..253ea73451 100644 --- a/harbour/contrib/hbmxml/hbmxml.hbp +++ b/harbour/contrib/hbmxml/hbmxml.hbp @@ -19,8 +19,9 @@ -instfile=inc:hbmxml.ch -instfile=inc:hbmxml.hbx -hbmxml.c -hbmxmlp.prg -hbmxmlx.prg +hbmxml.hbx + +core.c +format.prg 3rd/minixml/mxml.hbc{HBMK_HAS_MXML_LOCAL} diff --git a/harbour/contrib/hbmxml/hbmxmlx.prg b/harbour/contrib/hbmxml/hbmxmlx.prg deleted file mode 100644 index 7446c1bf01..0000000000 --- a/harbour/contrib/hbmxml/hbmxmlx.prg +++ /dev/null @@ -1,54 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * extern puller - * - * Copyright 2010-2011 Petr Chornyj - * www - http://harbour-project.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * whether to permit this exception to apply to your modifications. - * If you do not wish that, delete this exception notice. - * - */ - -#define __HBEXTREQ__ -#include "hbmxml.hbx" diff --git a/harbour/contrib/hbxdiff/hbxdiff.c b/harbour/contrib/hbxdiff/core.c similarity index 100% rename from harbour/contrib/hbxdiff/hbxdiff.c rename to harbour/contrib/hbxdiff/core.c diff --git a/harbour/contrib/hbxdiff/hbxdiff.hbp b/harbour/contrib/hbxdiff/hbxdiff.hbp index d7f3e76e1d..561b499229 100644 --- a/harbour/contrib/hbxdiff/hbxdiff.hbp +++ b/harbour/contrib/hbxdiff/hbxdiff.hbp @@ -19,7 +19,8 @@ -instfile=inc:hbxdiff.ch -instfile=inc:hbxdiff.hbx -hbxdiff.c -hbxdiffx.prg +hbxdiff.hbx + +core.c 3rd/libxdiff/xdiff.hbc{HBMK_HAS_XDIFF_LOCAL} diff --git a/harbour/contrib/hbxdiff/hbxdiffx.prg b/harbour/contrib/hbxdiff/hbxdiffx.prg deleted file mode 100644 index 5a7b2f1c00..0000000000 --- a/harbour/contrib/hbxdiff/hbxdiffx.prg +++ /dev/null @@ -1,54 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * extern puller - * - * Copyright 2011 Viktor Szakats (harbour.01 syenar.hu) - * www - http://harbour-project.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * whether to permit this exception to apply to your modifications. - * If you do not wish that, delete this exception notice. - * - */ - -#define __HBEXTREQ__ -#include "hbxdiff.hbx"