1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-04 21:59:02 +00:00

Nmap 3.999 truly just about ready now

This commit is contained in:
fyodor
2006-01-26 09:50:57 +00:00
parent d56b6299fd
commit 63f2b8c3de
33 changed files with 156 additions and 132 deletions

View File

@@ -122,7 +122,6 @@ OBJ = pcre_chartables.@OBJEXT@ \
pcre_globals.@OBJEXT@ \
pcre_info.@OBJEXT@ \
pcre_maketables.@OBJEXT@ \
pcre_printint.@OBJEXT@ \
pcre_refcount.@OBJEXT@ \
pcre_study.@OBJEXT@ \
pcre_tables.@OBJEXT@ \
@@ -185,11 +184,6 @@ pcre_maketables.@OBJEXT@: Makefile config.h pcre.h \
$(CC) -c $(CFLAGS) $(INCLS) $(DEFS) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_maketables.c
pcre_printint.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_printint.c
$(CC) -c $(CFLAGS) $(INCLS) $(DEFS) $(POSIX_MALLOC_THRESHOLD) \
$(top_srcdir)/pcre_printint.c
pcre_refcount.@OBJEXT@: Makefile config.h pcre.h \
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_refcount.c
$(CC) -c $(CFLAGS) $(INCLS) $(DEFS) $(POSIX_MALLOC_THRESHOLD) \

View File

@@ -46,7 +46,7 @@ configure.in.
write pcre.h
(3) Compile dftables.c as a stand-alone program, and then run it with
the single argument "chartables.c". This generates a set of standard
the single argument "pcre_chartables.c". This generates a set of standard
character tables and writes them to that file.
rem Mark Tetrode's commands

View File

@@ -23,7 +23,7 @@ this can be done via --enable-ebcdic. */
before the definition of an exported function, define this macro to contain the
relevant magic. It apears at the start of every exported function. */
#define EXPORT
#define PCRE_EXPORT
/* Define to empty if the "const" keyword does not work. */

View File

@@ -18,10 +18,10 @@ dnl A safety precaution
AC_PREREQ(2.57)
dnl Arrange to build config.h from config.in. Note that pcre.h is
dnl Arrange to build config.h from config.h.in. Note that pcre.h is
dnl built differently, as it is just a "substitution" file.
dnl Manual says this macro should come right after AC_INIT.
AC_CONFIG_HEADER(config.h:config.in)
AC_CONFIG_HEADER(config.h)
dnl Provide the current PCRE version information. Do not use numbers
dnl with leading zeros for the minor version, as they end up in a C
@@ -30,8 +30,8 @@ dnl digits for minor numbers less than 10. There are unlikely to be
dnl that many releases anyway.
PCRE_MAJOR=6
PCRE_MINOR=3
PCRE_DATE=15-Aug-2005
PCRE_MINOR=4
PCRE_DATE=05-Sep-2005
PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR}
dnl Default values for miscellaneous macros
@@ -201,4 +201,4 @@ if test "x$enable_shared" = "xno" ; then
fi
dnl This must be last; it determines what files are written as well as config.h
AC_OUTPUT(Makefile pcre.h:pcre.in)
AC_OUTPUT(Makefile pcre.h:pcre.h.in)

View File

@@ -129,9 +129,6 @@
<File
RelativePath=".\pcre_maketables.c">
</File>
<File
RelativePath=".\pcre_printint.c">
</File>
<File
RelativePath=".\pcre_refcount.c">
</File>

View File

@@ -45,6 +45,15 @@ supporting internal functions that are not used by other modules. */
#include "pcre_internal.h"
/* When DEBUG is defined, we need the pcre_printint() function, which is also
used by pcretest. DEBUG is not defined when building a production library. */
#ifdef DEBUG
#include "pcre_printint.src"
#endif
/*************************************************
* Code parameters and static tables *
*************************************************/
@@ -3839,7 +3848,7 @@ Returns: pointer to compiled data block, or NULL on error,
with errorptr and erroroffset set
*/
EXPORT pcre *
PCRE_EXPORT pcre *
pcre_compile(const char *pattern, int options, const char **errorptr,
int *erroroffset, const unsigned char *tables)
{
@@ -3847,7 +3856,7 @@ return pcre_compile2(pattern, options, NULL, errorptr, erroroffset, tables);
}
EXPORT pcre *
PCRE_EXPORT pcre *
pcre_compile2(const char *pattern, int options, int *errorcodeptr,
const char **errorptr, int *erroroffset, const unsigned char *tables)
{
@@ -5000,7 +5009,8 @@ if (reqbyte >= 0 &&
re->options |= PCRE_REQCHSET;
}
/* Print out the compiled data for debugging */
/* Print out the compiled data if debugging is enabled. This is never the
case when building a production library. */
#ifdef DEBUG
@@ -5038,7 +5048,7 @@ if ((re->options & PCRE_REQCHSET) != 0)
else printf("Req char = \\x%02x%s\n", ch, caseless);
}
_pcre_printint(re, stdout);
pcre_printint(re, stdout);
/* This check is done here in the debugging case so that the code that
was compiled can be seen. */

View File

@@ -58,7 +58,7 @@ Arguments:
Returns: 0 if data returned, negative on error
*/
EXPORT int
PCRE_EXPORT int
pcre_config(int what, void *where)
{
switch (what)

View File

@@ -758,7 +758,7 @@ for (;;)
if (clen > 0)
{
int rqdtype, category;
category = ucp_findchar(c, &chartype, &othercase);
category = _pcre_ucp_findchar(c, &chartype, &othercase);
rqdtype = code[1];
if (rqdtype >= 128)
{
@@ -865,7 +865,7 @@ for (;;)
if (count > 0) { ADD_ACTIVE(state_offset + 3, 0); }
if (clen > 0)
{
int category = ucp_findchar(c, &chartype, &othercase);
int category = _pcre_ucp_findchar(c, &chartype, &othercase);
int rqdtype = code[2];
if ((d == OP_PROP) ==
(rqdtype == ((rqdtype >= 128)? (category + 128) : chartype)))
@@ -878,7 +878,7 @@ for (;;)
case OP_EXTUNI_EXTRA + OP_TYPEMINPLUS:
count = current_state->count; /* Already matched */
if (count > 0) { ADD_ACTIVE(state_offset + 2, 0); }
if (clen > 0 && ucp_findchar(c, &chartype, &othercase) != ucp_M)
if (clen > 0 && _pcre_ucp_findchar(c, &chartype, &othercase) != ucp_M)
{
const uschar *nptr = ptr + clen;
int ncount = 0;
@@ -887,7 +887,7 @@ for (;;)
int nd;
int ndlen = 1;
GETCHARLEN(nd, nptr, ndlen);
if (ucp_findchar(nd, &chartype, &othercase) != ucp_M) break;
if (_pcre_ucp_findchar(nd, &chartype, &othercase) != ucp_M) break;
ncount++;
nptr += ndlen;
}
@@ -911,7 +911,7 @@ for (;;)
ADD_ACTIVE(state_offset + 3, 0);
if (clen > 0)
{
int category = ucp_findchar(c, &chartype, &othercase);
int category = _pcre_ucp_findchar(c, &chartype, &othercase);
int rqdtype = code[2];
if ((d == OP_PROP) ==
(rqdtype == ((rqdtype >= 128)? (category + 128) : chartype)))
@@ -932,7 +932,7 @@ for (;;)
QS2:
ADD_ACTIVE(state_offset + 2, 0);
if (clen > 0 && ucp_findchar(c, &chartype, &othercase) != ucp_M)
if (clen > 0 && _pcre_ucp_findchar(c, &chartype, &othercase) != ucp_M)
{
const uschar *nptr = ptr + clen;
int ncount = 0;
@@ -941,7 +941,7 @@ for (;;)
int nd;
int ndlen = 1;
GETCHARLEN(nd, nptr, ndlen);
if (ucp_findchar(nd, &chartype, &othercase) != ucp_M) break;
if (_pcre_ucp_findchar(nd, &chartype, &othercase) != ucp_M) break;
ncount++;
nptr += ndlen;
}
@@ -958,7 +958,7 @@ for (;;)
count = current_state->count; /* Number already matched */
if (clen > 0)
{
int category = ucp_findchar(c, &chartype, &othercase);
int category = _pcre_ucp_findchar(c, &chartype, &othercase);
int rqdtype = code[4];
if ((d == OP_PROP) ==
(rqdtype == ((rqdtype >= 128)? (category + 128) : chartype)))
@@ -978,7 +978,7 @@ for (;;)
if (codevalue != OP_EXTUNI_EXTRA + OP_TYPEEXACT)
{ ADD_ACTIVE(state_offset + 4, 0); }
count = current_state->count; /* Number already matched */
if (clen > 0 && ucp_findchar(c, &chartype, &othercase) != ucp_M)
if (clen > 0 && _pcre_ucp_findchar(c, &chartype, &othercase) != ucp_M)
{
const uschar *nptr = ptr + clen;
int ncount = 0;
@@ -987,7 +987,7 @@ for (;;)
int nd;
int ndlen = 1;
GETCHARLEN(nd, nptr, ndlen);
if (ucp_findchar(nd, &chartype, &othercase) != ucp_M) break;
if (_pcre_ucp_findchar(nd, &chartype, &othercase) != ucp_M) break;
ncount++;
nptr += ndlen;
}
@@ -1022,11 +1022,11 @@ for (;;)
/* If we have Unicode property support, we can use it to test the
other case of the character, if there is one. The result of
ucp_findchar() is < 0 if the char isn't found, and othercase is
_pcre_ucp_findchar() is < 0 if the char isn't found, and othercase is
returned as zero if there isn't another case. */
#ifdef SUPPORT_UCP
if (ucp_findchar(c, &chartype, &othercase) < 0)
if (_pcre_ucp_findchar(c, &chartype, &othercase) < 0)
#endif
othercase = -1;
@@ -1050,7 +1050,7 @@ for (;;)
to wait for them to pass before continuing. */
case OP_EXTUNI:
if (clen > 0 && ucp_findchar(c, &chartype, &othercase) != ucp_M)
if (clen > 0 && _pcre_ucp_findchar(c, &chartype, &othercase) != ucp_M)
{
const uschar *nptr = ptr + clen;
int ncount = 0;
@@ -1058,7 +1058,7 @@ for (;;)
{
int nclen = 1;
GETCHARLEN(c, nptr, nclen);
if (ucp_findchar(c, &chartype, &othercase) != ucp_M) break;
if (_pcre_ucp_findchar(c, &chartype, &othercase) != ucp_M) break;
ncount++;
nptr += nclen;
}
@@ -1096,7 +1096,7 @@ for (;;)
if (utf8 && c >= 128)
{
#ifdef SUPPORT_UCP
if (ucp_findchar(d, &chartype, &otherd) < 0) otherd = -1;
if (_pcre_ucp_findchar(d, &chartype, &otherd) < 0) otherd = -1;
#endif /* SUPPORT_UCP */
}
else
@@ -1123,7 +1123,7 @@ for (;;)
if (utf8 && c >= 128)
{
#ifdef SUPPORT_UCP
if (ucp_findchar(c, &chartype, &otherd) < 0) otherd = -1;
if (_pcre_ucp_findchar(c, &chartype, &otherd) < 0) otherd = -1;
#endif /* SUPPORT_UCP */
}
else
@@ -1150,7 +1150,7 @@ for (;;)
if (utf8 && c >= 128)
{
#ifdef SUPPORT_UCP
if (ucp_findchar(c, &chartype, &otherd) < 0) otherd = -1;
if (_pcre_ucp_findchar(c, &chartype, &otherd) < 0) otherd = -1;
#endif /* SUPPORT_UCP */
}
else
@@ -1181,7 +1181,7 @@ for (;;)
if (utf8 && c >= 128)
{
#ifdef SUPPORT_UCP
if (ucp_findchar(d, &chartype, &otherd) < 0) otherd = -1;
if (_pcre_ucp_findchar(d, &chartype, &otherd) < 0) otherd = -1;
#endif /* SUPPORT_UCP */
}
else
@@ -1424,7 +1424,6 @@ for (;;)
/*-----------------------------------------------------------------*/
case OP_ONCE:
{
const uschar *endcode;
int local_offsets[2];
int local_workspace[1000];
@@ -1446,7 +1445,6 @@ for (;;)
const uschar *end_subpattern = code;
int charcount = local_offsets[1] - local_offsets[0];
int next_state_offset, repeat_state_offset;
BOOL is_repeated;
do { end_subpattern += GET(end_subpattern, 1); }
while (*end_subpattern == OP_ALT);
@@ -1613,7 +1611,7 @@ Returns: > 0 => number of match offset pairs placed in offsets
< -1 => some kind of unexpected problem
*/
EXPORT int
PCRE_EXPORT int
pcre_dfa_exec(const pcre *argument_re, const pcre_extra *extra_data,
const char *subject, int length, int start_offset, int options, int *offsets,
int offsetcount, int *workspace, int wscount)

View File

@@ -1354,7 +1354,7 @@ for (;;)
{
int chartype, rqdtype;
int othercase;
int category = ucp_findchar(c, &chartype, &othercase);
int category = _pcre_ucp_findchar(c, &chartype, &othercase);
rqdtype = *(++ecode);
ecode++;
@@ -1381,7 +1381,7 @@ for (;;)
{
int chartype;
int othercase;
int category = ucp_findchar(c, &chartype, &othercase);
int category = _pcre_ucp_findchar(c, &chartype, &othercase);
if (category == ucp_M) RRETURN(MATCH_NOMATCH);
while (eptr < md->end_subject)
{
@@ -1390,7 +1390,7 @@ for (;;)
{
GETCHARLEN(c, eptr, len);
}
category = ucp_findchar(c, &chartype, &othercase);
category = _pcre_ucp_findchar(c, &chartype, &othercase);
if (category != ucp_M) break;
eptr += len;
}
@@ -1841,7 +1841,7 @@ for (;;)
ecode += length;
/* If we have Unicode property support, we can use it to test the other
case of the character, if there is one. The result of ucp_findchar() is
case of the character, if there is one. The result of _pcre_ucp_findchar() is
< 0 if the char isn't found, and othercase is returned as zero if there
isn't one. */
@@ -1850,7 +1850,7 @@ for (;;)
#ifdef SUPPORT_UCP
int chartype;
int othercase;
if (ucp_findchar(fc, &chartype, &othercase) < 0 || dc != othercase)
if (_pcre_ucp_findchar(fc, &chartype, &othercase) < 0 || dc != othercase)
#endif
RRETURN(MATCH_NOMATCH);
}
@@ -1920,7 +1920,7 @@ for (;;)
int othercase;
int chartype;
if ((ims & PCRE_CASELESS) != 0 &&
ucp_findchar(fc, &chartype, &othercase) >= 0 &&
_pcre_ucp_findchar(fc, &chartype, &othercase) >= 0 &&
othercase > 0)
oclength = _pcre_ord2utf8(othercase, occhars);
#endif /* SUPPORT_UCP */
@@ -2439,7 +2439,7 @@ for (;;)
for (i = 1; i <= min; i++)
{
GETCHARINC(c, eptr);
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
if ((*prop_test_variable == prop_test_against) == prop_fail_result)
RRETURN(MATCH_NOMATCH);
}
@@ -2453,7 +2453,7 @@ for (;;)
for (i = 1; i <= min; i++)
{
GETCHARINCTEST(c, eptr);
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH);
while (eptr < md->end_subject)
{
@@ -2462,7 +2462,7 @@ for (;;)
{
GETCHARLEN(c, eptr, len);
}
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
if (prop_category != ucp_M) break;
eptr += len;
}
@@ -2632,7 +2632,7 @@ for (;;)
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
GETCHARINC(c, eptr);
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
if ((*prop_test_variable == prop_test_against) == prop_fail_result)
RRETURN(MATCH_NOMATCH);
}
@@ -2649,7 +2649,7 @@ for (;;)
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
GETCHARINCTEST(c, eptr);
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH);
while (eptr < md->end_subject)
{
@@ -2658,7 +2658,7 @@ for (;;)
{
GETCHARLEN(c, eptr, len);
}
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
if (prop_category != ucp_M) break;
eptr += len;
}
@@ -2790,7 +2790,7 @@ for (;;)
int len = 1;
if (eptr >= md->end_subject) break;
GETCHARLEN(c, eptr, len);
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
if ((*prop_test_variable == prop_test_against) == prop_fail_result)
break;
eptr+= len;
@@ -2816,7 +2816,7 @@ for (;;)
{
if (eptr >= md->end_subject) break;
GETCHARINCTEST(c, eptr);
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
if (prop_category == ucp_M) break;
while (eptr < md->end_subject)
{
@@ -2825,7 +2825,7 @@ for (;;)
{
GETCHARLEN(c, eptr, len);
}
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
if (prop_category != ucp_M) break;
eptr += len;
}
@@ -2846,7 +2846,7 @@ for (;;)
{
GETCHARLEN(c, eptr, len);
}
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
if (prop_category != ucp_M) break;
eptr--;
}
@@ -3200,7 +3200,7 @@ Returns: > 0 => success; value is the number of elements filled in
< -1 => some kind of unexpected problem
*/
EXPORT int
PCRE_EXPORT int
pcre_exec(const pcre *argument_re, const pcre_extra *extra_data,
const char *subject, int length, int start_offset, int options, int *offsets,
int offsetcount)

View File

@@ -61,7 +61,7 @@ Arguments:
Returns: 0 if data returned, negative on error
*/
EXPORT int
PCRE_EXPORT int
pcre_fullinfo(const pcre *argument_re, const pcre_extra *extra_data, int what,
void *where)
{

View File

@@ -68,7 +68,7 @@ Returns: number of capturing subpatterns
or negative values on error
*/
EXPORT int
PCRE_EXPORT int
pcre_info(const pcre *argument_re, int *optptr, int *first_byte)
{
real_pcre internal_re;

View File

@@ -43,6 +43,11 @@ modules, but which are not relevant to the exported API. This includes some
functions whose names all begin with "_pcre_". */
/* Get the definitions provided by running "configure" */
#ifndef PCRE_INTERNAL_H
#define PCRE_INTERNAL_H
#ifndef WIN32
#include "config.h"
#else
@@ -51,9 +56,9 @@ functions whose names all begin with "_pcre_". */
/* Define DEBUG to get debugging output on stdout. */
/****
#if 0
#define DEBUG
****/
#endif
/* Use a macro for debugging printing, 'cause that eliminates the use of #ifdef
inline, and there are *still* stupid compilers about that don't like indented
@@ -116,9 +121,12 @@ Unix, where it is defined in sys/types, so use "uschar" instead. */
typedef unsigned char uschar;
/* Include the public PCRE header */
/* Include the public PCRE header and the definitions of UCP character
property values. */
#include "pcre.h"
#include "ucp.h"
/* Include the (copy of) the public ucp header, changing the external name into a private one. This does no harm, even if we aren't compiling UCP support. */
@@ -865,7 +873,7 @@ total length. */
#define tables_length (ctypes_offset + 256)
/* Layout of the UCP type table that translates property names into codes for
ucp_findchar(). */
pcre_ucp_findchar(). */
typedef struct {
const char *name;
@@ -898,11 +906,12 @@ one of the exported public functions. They have to be "external" in the C
sense, but are not part of the PCRE public API. */
extern int _pcre_ord2utf8(int, uschar *);
extern void _pcre_printint(pcre *, FILE *);
extern real_pcre * _pcre_try_flipped(const real_pcre *, real_pcre *,
const pcre_study_data *, pcre_study_data *);
extern int _pcre_ucp_findchar(const int, int *, int *);
extern int _pcre_valid_utf8(const uschar *, int);
extern BOOL _pcre_xclass(int, const uschar *);
#endif
/* End of pcre_internal.h */

View File

@@ -38,12 +38,15 @@ POSSIBILITY OF SUCH DAMAGE.
*/
/* This module contains an PCRE private debugging function for printing out the
/* This module contains a PCRE private debugging function for printing out the
internal form of a compiled regular expression, along with some supporting
local functions. */
local functions. This source file is used in two places:
(1) It is #included by pcre_compile.c when it is compiled in debugging mode
(DEBUG defined in pcre_internal.h). It is not included in production compiles.
#include "pcre_internal.h"
(2) It is always #included by pcretest.c, which can be asked to print out a
compiled regex for debugging purposes. */
static const char *OP_names[] = { OP_NAME_LIST };
@@ -121,8 +124,8 @@ return "??";
/* Make this function work for a regex with integers either byte order.
However, we assume that what we are passed is a compiled regex. */
EXPORT void
_pcre_printint(pcre *external_re, FILE *f)
static void
pcre_printint(pcre *external_re, FILE *f)
{
real_pcre *re = (real_pcre *)external_re;
uschar *codestart, *code;
@@ -448,4 +451,4 @@ for(;;)
}
}
/* End of pcre_printint.c */
/* End of pcre_printint.src */

View File

@@ -63,7 +63,7 @@ Returns: the (possibly updated) count value (a non-negative number), or
a negative error number
*/
EXPORT int
PCRE_EXPORT int
pcre_refcount(pcre *argument_re, int adjust)
{
real_pcre *re = (real_pcre *)argument_re;

View File

@@ -401,7 +401,7 @@ Returns: pointer to a pcre_extra block, with study_data filled in and the
NULL on error or if no optimization possible
*/
EXPORT pcre_extra *
PCRE_EXPORT pcre_extra *
pcre_study(const pcre *external_re, int options, const char **errorptr)
{
uschar start_bits[32];

View File

@@ -39,7 +39,9 @@ POSSIBILITY OF SUCH DAMAGE.
/* This module contains some fixed tables that are used by more than one of the
PCRE code modules. */
PCRE code modules. The tables are also #included by the pcretest program, which
uses macros to change their names from _pcre_xxx to xxxx, thereby avoiding name
clashes with the library. */
#include "pcre_internal.h"
@@ -81,8 +83,7 @@ const uschar _pcre_utf8_table4[] = {
3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 };
/* This table translates Unicode property names into code values for the
ucp_findchar() function. It is used by pcretest as well as by the library
functions. */
ucp_findchar() function. */
const ucp_type_table _pcre_utt[] = {
{ "C", 128 + ucp_C },

View File

@@ -94,7 +94,7 @@ Returns: the new block if is is indeed a byte-flipped regex
NULL if it is not
*/
EXPORT real_pcre *
PCRE_EXPORT real_pcre *
_pcre_try_flipped(const real_pcre *re, real_pcre *internal_re,
const pcre_study_data *study, pcre_study_data *internal_study)
{

View File

@@ -52,7 +52,7 @@ string that identifies the PCRE version that is in use. */
#define STRING(a) # a
#define XSTRING(s) STRING(s)
EXPORT const char *
PCRE_EXPORT const char *
pcre_version(void)
{
return XSTRING(PCRE_MAJOR) "." XSTRING(PCRE_MINOR) " " XSTRING(PCRE_DATE);

View File

@@ -1,4 +1,4 @@
#define EXPORT
#define PCRE_EXPORT
#define HAVE_STRERROR 1
#define HAVE_MEMMOVE 1

View File

@@ -60,7 +60,7 @@ Arguments:
Returns: TRUE if character matches, else FALSE
*/
EXPORT BOOL
PCRE_EXPORT BOOL
_pcre_xclass(int c, const uschar *data)
{
int t;
@@ -102,7 +102,7 @@ while ((t = *data++) != XCL_END)
{
int chartype, othercase;
int rqdtype = *data++;
int category = ucp_findchar(c, &chartype, &othercase);
int category = _pcre_ucp_findchar(c, &chartype, &othercase);
if (rqdtype >= 128)
{
if ((rqdtype - 128 == category) == (t == XCL_PROP)) return !negated;

View File

@@ -131,7 +131,7 @@ static const char *const pstring[] = {
* Translate error code to string *
*************************************************/
EXPORT size_t
PCRE_EXPORT size_t
regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
{
const char *message, *addmessage;
@@ -166,7 +166,7 @@ return length + addlength;
* Free store held by a regex *
*************************************************/
EXPORT void
PCRE_EXPORT void
regfree(regex_t *preg)
{
(pcre_free)(preg->re_pcre);
@@ -189,7 +189,7 @@ Returns: 0 on success
various non-zero codes on failure
*/
EXPORT int
PCRE_EXPORT int
regcomp(regex_t *preg, const char *pattern, int cflags)
{
const char *errorptr;
@@ -225,7 +225,7 @@ ints. However, if the number of possible capturing brackets is small, use a
block of store on the stack, to reduce the use of malloc/free. The threshold is
in a macro that can be changed at configure time. */
EXPORT int
PCRE_EXPORT int
regexec(const regex_t *preg, const char *string, size_t nmatch,
regmatch_t pmatch[], int eflags)
{

View File

@@ -53,8 +53,6 @@ enum {
ucp_Zs /* Space separator */
};
extern int ucp_findchar(const int, int *, int *);
#endif
/* End of ucp.h */