summaryrefslogtreecommitdiff
path: root/ext/pcre/pcrelib/pcre.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcre/pcrelib/pcre.h')
-rw-r--r--ext/pcre/pcrelib/pcre.h84
1 files changed, 60 insertions, 24 deletions
diff --git a/ext/pcre/pcrelib/pcre.h b/ext/pcre/pcrelib/pcre.h
index f6fbe73cfb..2815e56b2c 100644
--- a/ext/pcre/pcrelib/pcre.h
+++ b/ext/pcre/pcrelib/pcre.h
@@ -2,7 +2,7 @@
* Perl-Compatible Regular Expressions *
*************************************************/
-/* Copyright (c) 1997-2001 University of Cambridge */
+/* Copyright (c) 1997-2002 University of Cambridge */
#ifndef _PCRE_H
#define _PCRE_H
@@ -11,9 +11,10 @@
make changes to pcre.in. */
#include "php_compat.h"
+
#define PCRE_MAJOR 3
-#define PCRE_MINOR 9
-#define PCRE_DATE 02-Jan-2002
+#define PCRE_MINOR 92
+#define PCRE_DATE 11-Sep-2002
/* Win32 uses DLL by default */
@@ -72,6 +73,9 @@ extern "C" {
#define PCRE_INFO_FIRSTCHAR 4
#define PCRE_INFO_FIRSTTABLE 5
#define PCRE_INFO_LASTLITERAL 6
+#define PCRE_INFO_NAMEENTRYSIZE 7
+#define PCRE_INFO_NAMECOUNT 8
+#define PCRE_INFO_NAMETABLE 9
/* Types */
@@ -81,32 +85,64 @@ struct real_pcre_extra; /* declaration; the definition is private */
typedef struct real_pcre pcre;
typedef struct real_pcre_extra pcre_extra;
-/* Store get and free functions. These can be set to alternative malloc/free
-functions if required. Some magic is required for Win32 DLL; it is null on
-other OS. */
-
+/* The structure for passing out data via the pcre_callout_function. We use a
+structure so that new fields can be added on the end in future versions,
+without changing the API of the function, thereby allowing old clients to work
+without modification. */
+
+typedef struct pcre_callout_block {
+ int version; /* Identifies version of block */
+ /* ------------------------ Version 0 ------------------------------- */
+ int callout_number; /* Number compiled into pattern */
+ int *offset_vector; /* The offset vector */
+ const char *subject; /* The subject being matched */
+ int subject_length; /* The length of the subject */
+ int start_match; /* Offset to start of this match attempt */
+ int current_position; /* Where we currently are */
+ int capture_top; /* Max current capture */
+ int capture_last; /* Most recently closed capture */
+ /* ------------------------------------------------------------------ */
+} pcre_callout_block;
+
+/* Indirection for store get and free functions. These can be set to
+alternative malloc/free functions if required. There is also an optional
+callout function that is triggered by the (?) regex item. Some magic is
+required for Win32 DLL; it is null on other OS. For Virtual Pascal, these have
+to be different again. */
+
+#ifndef VPCOMPAT
PCRE_DL_IMPORT extern void *(*pcre_malloc)(size_t);
PCRE_DL_IMPORT extern void (*pcre_free)(void *);
+PCRE_DL_IMPORT extern int (*pcre_callout)(pcre_callout_block *);
+#else /* VPCOMPAT */
+extern void *pcre_malloc(size_t);
+extern void pcre_free(void *);
+extern int pcre_callout(pcre_callout_block *);
+#endif /* VPCOMPAT */
+
+/* Exported PCRE functions */
+
+PCRE_DL_IMPORT extern pcre *pcre_compile(const char *, int, const char **,
+ int *, const unsigned char *);
+PCRE_DL_IMPORT extern int pcre_copy_substring(const char *, int *, int, int,
+ char *, int);
+PCRE_DL_IMPORT extern int pcre_exec(const pcre *, const pcre_extra *,
+ const char *, int, int, int, int *, int);
+PCRE_DL_IMPORT extern void pcre_free_substring(const char *);
+PCRE_DL_IMPORT extern void pcre_free_substring_list(const char **);
+PCRE_DL_IMPORT extern int pcre_get_substring(const char *, int *, int, int,
+ const char **);
+PCRE_DL_IMPORT extern int pcre_get_substring_list(const char *, int *, int,
+ const char ***);
+PCRE_DL_IMPORT extern int pcre_info(const pcre *, int *, int *);
+PCRE_DL_IMPORT extern int pcre_fullinfo(const pcre *, const pcre_extra *, int,
+ void *);
+PCRE_DL_IMPORT extern const unsigned char *pcre_maketables(void);
+PCRE_DL_IMPORT extern pcre_extra *pcre_study(const pcre *, int, const char **);
+PCRE_DL_IMPORT extern const char *pcre_version(void);
#undef PCRE_DL_IMPORT
-/* Functions */
-
-extern pcre *pcre_compile(const char *, int, const char **, int *,
- const unsigned char *);
-extern int pcre_copy_substring(const char *, int *, int, int, char *, int);
-extern int pcre_exec(const pcre *, const pcre_extra *, const char *,
- int, int, int, int *, int);
-extern void pcre_free_substring(const char *);
-extern void pcre_free_substring_list(const char **);
-extern int pcre_get_substring(const char *, int *, int, int, const char **);
-extern int pcre_get_substring_list(const char *, int *, int, const char ***);
-extern int pcre_info(const pcre *, int *, int *);
-extern int pcre_fullinfo(const pcre *, const pcre_extra *, int, void *);
-extern const unsigned char *pcre_maketables(void);
-extern pcre_extra *pcre_study(const pcre *, int, const char **);
-extern const char *pcre_version(void);
-
#ifdef __cplusplus
} /* extern "C" */
#endif