2009-09-10 02:45 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* include/hbzlib.ch
    * Minor formatting.

  * source/hbpcre/Makefile
    ! Fixed missing global.mk from prev commit.

  * source/hbpcre/Makefile
  - source/hbpcre/_hbconf.h
  - source/hbpcre/_hbpcreg.c
  + source/hbpcre/pcreglob.c
  * source/hbpcre/config.h
  * source/hbpcre/cnv_o2hb.bat
  * source/hbpcre/cnv_hb2o.bat
    + Modified to not require extra Harbour source file. _hbpcreg.c
      wasn't necessary even before, as this initialization is
      done from init code in hbrtl/hbregex.c.
    % Reduced content of local config stub _hbconf.h to just three
      lines. We don't need to suppress warnings anymore as we have
      HB_BUILD_WARN build option to control that, the rest is solved
      by adding such options to local Makefile.
    * Changed to use config.h instead of local stub (which
      is now just three lines and only needed to support dynlib
      build pass).

  * source/hbpcre/pcrevutf.c
  * source/hbpcre/pcreconf.c
  * source/hbpcre/pcreinfo.c
  * source/hbpcre/pcremktb.c
  * source/hbpcre/config.h
  * source/hbpcre/pcrenewl.c
  * source/hbpcre/pcreucd.c
  * source/hbpcre/pcreoutf.c
  * source/hbpcre/chartabs.c
  * source/hbpcre/pcrerefc.c
  * source/hbpcre/pcreget.c
  * source/hbpcre/pcrefinf.c
  * source/hbpcre/pcretryf.c
  * source/hbpcre/pcreexec.c
  * source/hbpcre/pcretabs.c
  * source/hbpcre/pcredfa.c
  * source/hbpcre/pcrever.c
  * source/hbpcre/pcrecomp.c
  * source/hbpcre/pcrexcls.c
  * source/hbpcre/pcrestud.c
    * Restored some original code after above changes.
      (config inclusion logic)
This commit is contained in:
Viktor Szakats
2009-09-10 00:53:58 +00:00
parent 8d0fb7e2a3
commit 608ae715c1
27 changed files with 142 additions and 141 deletions

View File

@@ -17,6 +17,54 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-09-10 02:45 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/hbzlib.ch
* Minor formatting.
* source/hbpcre/Makefile
! Fixed missing global.mk from prev commit.
* source/hbpcre/Makefile
- source/hbpcre/_hbconf.h
- source/hbpcre/_hbpcreg.c
+ source/hbpcre/pcreglob.c
* source/hbpcre/config.h
* source/hbpcre/cnv_o2hb.bat
* source/hbpcre/cnv_hb2o.bat
+ Modified to not require extra Harbour source file. _hbpcreg.c
wasn't necessary even before, as this initialization is
done from init code in hbrtl/hbregex.c.
% Reduced content of local config stub _hbconf.h to just three
lines. We don't need to suppress warnings anymore as we have
HB_BUILD_WARN build option to control that, the rest is solved
by adding such options to local Makefile.
* Changed to use config.h instead of local stub (which
is now just three lines and only needed to support dynlib
build pass).
* source/hbpcre/pcrevutf.c
* source/hbpcre/pcreconf.c
* source/hbpcre/pcreinfo.c
* source/hbpcre/pcremktb.c
* source/hbpcre/config.h
* source/hbpcre/pcrenewl.c
* source/hbpcre/pcreucd.c
* source/hbpcre/pcreoutf.c
* source/hbpcre/chartabs.c
* source/hbpcre/pcrerefc.c
* source/hbpcre/pcreget.c
* source/hbpcre/pcrefinf.c
* source/hbpcre/pcretryf.c
* source/hbpcre/pcreexec.c
* source/hbpcre/pcretabs.c
* source/hbpcre/pcredfa.c
* source/hbpcre/pcrever.c
* source/hbpcre/pcrecomp.c
* source/hbpcre/pcrexcls.c
* source/hbpcre/pcrestud.c
* Restored some original code after above changes.
(config inclusion logic)
2009-09-10 01:41 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* source/hbpcre/Makefile
* config/linux/sunpro.mk

View File

@@ -50,7 +50,6 @@
*
*/
#ifndef HB_ZLIB_CH_
#define HB_ZLIB_CH_

View File

@@ -4,10 +4,11 @@
ROOT := ../../
include $(TOP)$(ROOT)config/global.mk
HB_BUILD_WARN := no
C_SOURCES := \
_hbpcreg.c \
chartabs.c \
pcrecomp.c \
pcreconf.c \
@@ -15,6 +16,7 @@ C_SOURCES := \
pcreexec.c \
pcrefinf.c \
pcreget.c \
pcreglob.c \
pcreinfo.c \
pcremktb.c \
pcrenewl.c \
@@ -41,4 +43,11 @@ ifeq ($(HB_COMPILER),sunpro)
endif
endif
# suppress bcc warnings
ifeq ($(HB_COMPILER),bcc)
HB_CFLAGS += -w-use -w-csu -w-aus -w-sig
endif
HB_CFLAGS += -DHAVE_CONFIG_H
include $(TOP)$(ROOT)config/lib.mk

View File

@@ -1,25 +0,0 @@
/*
* $Id$
*/
#ifndef HB_CONFIG_H
#define HB_CONFIG_H
#if !defined( HB_DYNLIB )
#define PCRE_STATIC
#endif
#if defined( _MSC_VER )
#pragma warning( push, 1 )
#endif
#if defined( __BORLANDC__ )
#pragma warn -use
#pragma warn -csu
#pragma warn -aus
#pragma warn -sig
#endif
#include "config.h"
#endif

View File

@@ -20,8 +20,8 @@ and dead code stripping is activated. This leads to link errors. Pulling in the
header ensures that the array gets flagged as "someone outside this compilation
unit might reference this" and so it will always be supplied to the linker. */
#if 2875
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pcreinal.h"

View File

@@ -5,55 +5,53 @@ rem
rem Tested with PCRE 7.7
rem NOTE: Purpose of this script is to take the PCRE files
rem in Harbour repo and convert them back to the filenames
rem NOTE: Purpose of this script is to take the PCRE files
rem in Harbour repo and convert them back to the filenames
rem used in the original PCRE source distribution.
rem This is to aid finding local modifications and
rem This is to aid finding local modifications and
rem apply them after a PCRE source update.
rem [vszakats]
rem
rem
rem This tool uses 'GNU gsar' for search and replace.
rem
rem DISCLAIMER: This tool is targeted only to Harbour core
rem maintainers. If you're not one of them you
rem DISCLAIMER: This tool is targeted only to Harbour core
rem maintainers. If you're not one of them you
rem don't have to mess with this tool.
md ori_dst
del ori_dst\*.* /Y
copy LICENSE ori_dst\LICENSE
copy config.h ori_dst\config.h.generic
copy pcre.h ori_dst\pcre.h.generic
copy config.h ori_dst\config.h.generic
copy pcre.h ori_dst\pcre.h.generic
copy pcreinal.h ori_dst\pcre_internal.h
copy ucp.h ori_dst\ucp.h
copy chartabs.c ori_dst\pcre_chartables.c.dist
copy pcrecomp.c ori_dst\pcre_compile.c
copy pcreconf.c ori_dst\pcre_config.c
copy pcredfa.c ori_dst\pcre_dfa_exec.c
copy pcreexec.c ori_dst\pcre_exec.c
copy pcrefinf.c ori_dst\pcre_fullinfo.c
copy pcreget.c ori_dst\pcre_get.c
copy pcreinfo.c ori_dst\pcre_info.c
copy pcremktb.c ori_dst\pcre_maketables.c
copy ucp.h ori_dst\ucp.h
copy chartabs.c ori_dst\pcre_chartables.c.dist
copy pcrecomp.c ori_dst\pcre_compile.c
copy pcreconf.c ori_dst\pcre_config.c
copy pcredfa.c ori_dst\pcre_dfa_exec.c
copy pcreexec.c ori_dst\pcre_exec.c
copy pcrefinf.c ori_dst\pcre_fullinfo.c
copy pcreget.c ori_dst\pcre_get.c
copy pcreglob.c ori_dst\pcre_globals.c
copy pcreinfo.c ori_dst\pcre_info.c
copy pcremktb.c ori_dst\pcre_maketables.c
copy pcrenewl.c ori_dst\pcre_newline.c
copy pcreoutf.c ori_dst\pcre_ord2utf8.c
copy pcreprni.h ori_dst\pcre_printint.src
copy pcrerefc.c ori_dst\pcre_refcount.c
copy pcrestud.c ori_dst\pcre_study.c
copy pcretabs.c ori_dst\pcre_tables.c
copy pcretryf.c ori_dst\pcre_try_flipped.c
copy pcreucd.c ori_dst\pcre_ucd.c
copy pcrevutf.c ori_dst\pcre_valid_utf8.c
copy pcrever.c ori_dst\pcre_version.c
copy pcrexcls.c ori_dst\pcre_xclass.c
copy pcreoutf.c ori_dst\pcre_ord2utf8.c
copy pcreprni.h ori_dst\pcre_printint.src
copy pcrerefc.c ori_dst\pcre_refcount.c
copy pcrestud.c ori_dst\pcre_study.c
copy pcretabs.c ori_dst\pcre_tables.c
copy pcretryf.c ori_dst\pcre_try_flipped.c
copy pcreucd.c ori_dst\pcre_ucd.c
copy pcrevutf.c ori_dst\pcre_valid_utf8.c
copy pcrever.c ori_dst\pcre_version.c
copy pcrexcls.c ori_dst\pcre_xclass.c
cd ori_dst
gsar -o -s":x22pcreinal.h:x22" -r":x22pcre_internal.h:x22" *.*
gsar -o -s":x22ucpinter.h:x22" -r":x22ucpinternal.h:x22" *.*
gsar -o -s":x22_hbconf.h:x22" -r":x22config.h:x22" *.*
gsar -o -s":x22pcreprni.h:x22" -r":x22pcre_printint.src:x22" *.*
gsar -o -s"if 2875" -r"ifdef HAVE_CONFIG_H" *.*
gsar -o -s"if 1" -r"ifdef HAVE_CONFIG_H" *.*
cd ..

View File

@@ -5,29 +5,22 @@ rem
rem Tested with PCRE 7.7
rem NOTE: Purpose of this script is to take the original
rem PCRE file from its source distribution and convert
rem NOTE: Purpose of this script is to take the original
rem PCRE file from its source distribution and convert
rem them to the short filenames we use here in Harbour.
rem Short filenames are needed for full DJGPP support.
rem Some other automated modifications are also done
rem to help compiling the sources "as-is", to try to
rem Some other automated modifications are also done
rem to help compiling the sources "as-is", to try to
rem avoid any manual editing on these foreign sources.
rem [vszakats]
rem
rem
rem This tool uses 'GNU gsar' for search and replace.
rem and 'GNU unix2dos' for line ending conversion.
rem
rem DISCLAIMER: This tool is targeted only to Harbour core
rem maintainers. If you're not one of them you
rem DISCLAIMER: This tool is targeted only to Harbour core
rem maintainers. If you're not one of them you
rem don't have to mess with this tool.
attrib +R _hbconf.h
attrib +R _hbpcreg.c
del *.c
del *.h
attrib -R _hbconf.h
attrib -R _hbpcreg.c
copy ori_src\LICENSE LICENSE
copy ori_src\config.h.generic config.h
copy ori_src\pcre.h.generic pcre.h
@@ -40,6 +33,7 @@ copy ori_src\pcre_dfa_exec.c pcredfa.c
copy ori_src\pcre_exec.c pcreexec.c
copy ori_src\pcre_fullinfo.c pcrefinf.c
copy ori_src\pcre_get.c pcreget.c
copy ori_dst\pcre_globals.c pcreglob.c
copy ori_src\pcre_info.c pcreinfo.c
copy ori_src\pcre_maketables.c pcremktb.c
copy ori_src\pcre_newline.c pcrenewl.c
@@ -63,7 +57,3 @@ gsar -o -s":x22pcre_internal.h:x22" -r":x22pcreinal.h:x22" *.c
gsar -o -s":x22pcre_internal.h:x22" -r":x22pcreinal.h:x22" *.h
gsar -o -s":x22ucpinternal.h:x22" -r":x22ucpinter.h:x22" *.c
gsar -o -s":x22ucpinternal.h:x22" -r":x22ucpinter.h:x22" *.h
gsar -o -s":x22config.h:x22" -r":x22_hbconf.h:x22" *.c
gsar -o -s":x22config.h:x22" -r":x22_hbconf.h:x22" *.h
gsar -o -s":x22_hbconf.h:x22" -r":x22config.h:x22" _hbconf.h
gsar -o -s"ifdef HAVE_CONFIG_H" -r"if 2875" *.c

View File

@@ -1,6 +1,9 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
#if !defined( HB_DYNLIB )
#define PCRE_STATIC
#endif
/* On Unix-like systems config.h.in is converted by "configure" into config.h.
Some other environments also support the use of "configure". PCRE is written in

View File

@@ -42,8 +42,8 @@ POSSIBILITY OF SUCH DAMAGE.
supporting internal functions that are not used by other modules. */
#if 2875
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#define NLBLOCK cd /* Block containing newline information */

View File

@@ -41,8 +41,8 @@ POSSIBILITY OF SUCH DAMAGE.
/* This module contains the external function pcre_config(). */
#if 2875
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pcreinal.h"

View File

@@ -45,8 +45,8 @@ FSM). This is NOT Perl- compatible, but it has advantages in certain
applications. */
#if 2875
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#define NLBLOCK md /* Block containing newline information */

View File

@@ -42,8 +42,8 @@ POSSIBILITY OF SUCH DAMAGE.
pattern matching using an NFA algorithm, trying to mimic Perl as closely as
possible. There are also some static supporting functions. */
#if 2875
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#define NLBLOCK md /* Block containing newline information */

View File

@@ -42,8 +42,8 @@ POSSIBILITY OF SUCH DAMAGE.
information about a compiled pattern. */
#if 2875
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pcreinal.h"

View File

@@ -43,8 +43,8 @@ from the subject string after a regex match has succeeded. The original idea
for these functions came from Scott Wimer. */
#if 2875
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pcreinal.h"

View File

@@ -1,10 +1,3 @@
/*
* $Id$
*/
/* See pcre_globals.c in PCRE source package for the original of
this file. We need to override it, so we've made it local. */
/*************************************************
* Perl-Compatible Regular Expressions *
*************************************************/
@@ -53,32 +46,18 @@ indirection. These values can be changed by the caller, but are shared between
all threads. However, when compiling for Virtual Pascal, things are done
differently, and global variables are not used (see pcre.in). */
#include "hbapi.h"
static void * hb_pcre_grab( size_t size )
{
return hb_xgrab( size );
}
static void hb_pcre_free( void * ptr )
{
hb_xfree( ptr );
}
#if 1
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pcreinal.h"
#ifndef VPCOMPAT
HB_EXTERN_BEGIN
PCRE_EXP_DATA_DEFN void *(*pcre_malloc)(size_t) = hb_pcre_grab;
PCRE_EXP_DATA_DEFN void (*pcre_free)(void *) = hb_pcre_free;
PCRE_EXP_DATA_DEFN void *(*pcre_stack_malloc)(size_t) = hb_pcre_grab;
PCRE_EXP_DATA_DEFN void (*pcre_stack_free)(void *) = hb_pcre_free;
PCRE_EXP_DATA_DEFN void *(*pcre_malloc)(size_t) = malloc;
PCRE_EXP_DATA_DEFN void (*pcre_free)(void *) = free;
PCRE_EXP_DATA_DEFN void *(*pcre_stack_malloc)(size_t) = malloc;
PCRE_EXP_DATA_DEFN void (*pcre_stack_free)(void *) = free;
PCRE_EXP_DATA_DEFN int (*pcre_callout)(pcre_callout_block *) = NULL;
HB_EXTERN_END
#endif
/* End of pcre_globals.c */

View File

@@ -43,8 +43,8 @@ information about a compiled pattern. However, use of this function is now
deprecated, as it has been superseded by pcre_fullinfo(). */
#if 2875
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pcreinal.h"

View File

@@ -45,8 +45,8 @@ compilation of dftables.c, in which case the macro DFTABLES is defined. */
#ifndef DFTABLES
# if 2875
# include "_hbconf.h"
# ifdef HAVE_CONFIG_H
# include "config.h"
# endif
# include "pcreinal.h"
#endif

View File

@@ -47,8 +47,8 @@ and NLTYPE_ANY. The full list of Unicode newline characters is taken from
http://unicode.org/unicode/reports/tr18/. */
#if 2875
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pcreinal.h"

View File

@@ -41,8 +41,8 @@ POSSIBILITY OF SUCH DAMAGE.
/* This file contains a private PCRE function that converts an ordinal
character value into a UTF8 string. */
#if 2875
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pcreinal.h"

View File

@@ -44,8 +44,8 @@ pattern data block. This might be helpful in applications where the block is
shared by different users. */
#if 2875
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pcreinal.h"

View File

@@ -42,8 +42,8 @@ POSSIBILITY OF SUCH DAMAGE.
supporting functions. */
#if 2875
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pcreinal.h"

View File

@@ -44,8 +44,8 @@ uses macros to change their names from _pcre_xxx to xxxx, thereby avoiding name
clashes with the library. */
#if 2875
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pcreinal.h"

View File

@@ -43,8 +43,8 @@ see if it was compiled with the opposite endianness. If so, it uses an
auxiliary local function to flip the appropriate bytes. */
#if 2875
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pcreinal.h"

View File

@@ -1,5 +1,5 @@
#if 2875
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pcreinal.h"

View File

@@ -42,8 +42,8 @@ POSSIBILITY OF SUCH DAMAGE.
string that identifies the PCRE version that is in use. */
#if 2875
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pcreinal.h"

View File

@@ -42,8 +42,8 @@ POSSIBILITY OF SUCH DAMAGE.
strings. */
#if 2875
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pcreinal.h"

View File

@@ -42,8 +42,8 @@ POSSIBILITY OF SUCH DAMAGE.
class. It is used by both pcre_exec() and pcre_def_exec(). */
#if 2875
#include "_hbconf.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pcreinal.h"