diff options
author | Stef Walter <stef@thewalter.net> | 2003-09-20 07:12:49 +0000 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2003-09-20 07:12:49 +0000 |
commit | b49d8ebefe9b10c53a6a09ad564e22111b7b25c6 (patch) | |
tree | 1d5dd4abc38170a7bc106dabbc59b915017222f0 /win32/pcre | |
parent | 1cda9ebbd62916c7c2136722597a86c583e1ecf6 (diff) |
Initial Import
Diffstat (limited to 'win32/pcre')
-rw-r--r-- | win32/pcre/include/pcre.h | 113 | ||||
-rw-r--r-- | win32/pcre/include/pcreposix.h | 88 | ||||
-rw-r--r-- | win32/pcre/lib/libpcre-bcc.def | 21 | ||||
-rw-r--r-- | win32/pcre/lib/libpcre-bcc.lib | bin | 0 -> 4096 bytes | |||
-rw-r--r-- | win32/pcre/lib/libpcre.def | 20 | ||||
-rw-r--r-- | win32/pcre/lib/libpcre.la | 32 | ||||
-rw-r--r-- | win32/pcre/lib/libpcre.lib | bin | 0 -> 5116 bytes | |||
-rw-r--r-- | win32/pcre/lib/libpcreposix.la | 32 | ||||
-rw-r--r-- | win32/pcre/manifest/pcre-3.9-lib.mft | 13 | ||||
-rw-r--r-- | win32/pcre/manifest/pcre-3.9-lib.ver | 2 |
10 files changed, 321 insertions, 0 deletions
diff --git a/win32/pcre/include/pcre.h b/win32/pcre/include/pcre.h new file mode 100644 index 0000000..d6c2393 --- /dev/null +++ b/win32/pcre/include/pcre.h @@ -0,0 +1,113 @@ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* Copyright (c) 1997-2001 University of Cambridge */ + +#ifndef _PCRE_H +#define _PCRE_H + +/* The file pcre.h is build by "configure". Do not edit it; instead +make changes to pcre.in. */ + +#define PCRE_MAJOR 3 +#define PCRE_MINOR 9 +#define PCRE_DATE 02-Jan-2002 + +/* Win32 uses DLL by default */ + +#ifdef _WIN32 +# ifdef STATIC +# define PCRE_DL_IMPORT +# else +# define PCRE_DL_IMPORT __declspec(dllimport) +# endif +#else +# define PCRE_DL_IMPORT +#endif + +/* Have to include stdlib.h in order to ensure that size_t is defined; +it is needed here for malloc. */ + +#include <stdlib.h> + +/* Allow for C++ users */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Options */ + +#define PCRE_CASELESS 0x0001 +#define PCRE_MULTILINE 0x0002 +#define PCRE_DOTALL 0x0004 +#define PCRE_EXTENDED 0x0008 +#define PCRE_ANCHORED 0x0010 +#define PCRE_DOLLAR_ENDONLY 0x0020 +#define PCRE_EXTRA 0x0040 +#define PCRE_NOTBOL 0x0080 +#define PCRE_NOTEOL 0x0100 +#define PCRE_UNGREEDY 0x0200 +#define PCRE_NOTEMPTY 0x0400 +#define PCRE_UTF8 0x0800 + +/* Exec-time and get-time error codes */ + +#define PCRE_ERROR_NOMATCH (-1) +#define PCRE_ERROR_NULL (-2) +#define PCRE_ERROR_BADOPTION (-3) +#define PCRE_ERROR_BADMAGIC (-4) +#define PCRE_ERROR_UNKNOWN_NODE (-5) +#define PCRE_ERROR_NOMEMORY (-6) +#define PCRE_ERROR_NOSUBSTRING (-7) + +/* Request types for pcre_fullinfo() */ + +#define PCRE_INFO_OPTIONS 0 +#define PCRE_INFO_SIZE 1 +#define PCRE_INFO_CAPTURECOUNT 2 +#define PCRE_INFO_BACKREFMAX 3 +#define PCRE_INFO_FIRSTCHAR 4 +#define PCRE_INFO_FIRSTTABLE 5 +#define PCRE_INFO_LASTLITERAL 6 + +/* Types */ + +struct real_pcre; /* declaration; the definition is private */ +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. */ + +PCRE_DL_IMPORT extern void *(*pcre_malloc)(size_t); +PCRE_DL_IMPORT extern void (*pcre_free)(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 + +#endif /* End of pcre.h */ diff --git a/win32/pcre/include/pcreposix.h b/win32/pcre/include/pcreposix.h new file mode 100644 index 0000000..e70af2d --- /dev/null +++ b/win32/pcre/include/pcreposix.h @@ -0,0 +1,88 @@ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* Copyright (c) 1997-2001 University of Cambridge */ + +#ifndef _PCREPOSIX_H +#define _PCREPOSIX_H + +/* This is the header for the POSIX wrapper interface to the PCRE Perl- +Compatible Regular Expression library. It defines the things POSIX says should +be there. I hope. */ + +/* Have to include stdlib.h in order to ensure that size_t is defined. */ + +#include <stdlib.h> + +/* Allow for C++ users */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Options defined by POSIX. */ + +#define REG_ICASE 0x01 +#define REG_NEWLINE 0x02 +#define REG_NOTBOL 0x04 +#define REG_NOTEOL 0x08 + +/* These are not used by PCRE, but by defining them we make it easier +to slot PCRE into existing programs that make POSIX calls. */ + +#define REG_EXTENDED 0 +#define REG_NOSUB 0 + +/* Error values. Not all these are relevant or used by the wrapper. */ + +enum { + REG_ASSERT = 1, /* internal error ? */ + REG_BADBR, /* invalid repeat counts in {} */ + REG_BADPAT, /* pattern error */ + REG_BADRPT, /* ? * + invalid */ + REG_EBRACE, /* unbalanced {} */ + REG_EBRACK, /* unbalanced [] */ + REG_ECOLLATE, /* collation error - not relevant */ + REG_ECTYPE, /* bad class */ + REG_EESCAPE, /* bad escape sequence */ + REG_EMPTY, /* empty expression */ + REG_EPAREN, /* unbalanced () */ + REG_ERANGE, /* bad range inside [] */ + REG_ESIZE, /* expression too big */ + REG_ESPACE, /* failed to get memory */ + REG_ESUBREG, /* bad back reference */ + REG_INVARG, /* bad argument */ + REG_NOMATCH /* match failed */ +}; + + +/* The structure representing a compiled regular expression. */ + +typedef struct { + void *re_pcre; + size_t re_nsub; + size_t re_erroffset; +} regex_t; + +/* The structure in which a captured offset is returned. */ + +typedef int regoff_t; + +typedef struct { + regoff_t rm_so; + regoff_t rm_eo; +} regmatch_t; + +/* The functions */ + +extern int regcomp(regex_t *, const char *, int); +extern int regexec(regex_t *, const char *, size_t, regmatch_t *, int); +extern size_t regerror(int, const regex_t *, char *, size_t); +extern void regfree(regex_t *); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* End of pcreposix.h */ diff --git a/win32/pcre/lib/libpcre-bcc.def b/win32/pcre/lib/libpcre-bcc.def new file mode 100644 index 0000000..ecdd5c2 --- /dev/null +++ b/win32/pcre/lib/libpcre-bcc.def @@ -0,0 +1,21 @@ +LIBRARY PCRE.DLL + +EXPORTS + _pcre_compile = pcre_compile ; pcre_compile + _pcre_copy_substring = pcre_copy_substring ; pcre_copy_substring + _pcre_exec = pcre_exec ; pcre_exec + _pcre_free = pcre_free ; pcre_free + _pcre_free_substring = pcre_free_substring ; pcre_free_substring + _pcre_free_substring_list = pcre_free_substring_list ; pcre_free_substring_list + _pcre_fullinfo = pcre_fullinfo ; pcre_fullinfo + _pcre_get_substring = pcre_get_substring ; pcre_get_substring + _pcre_get_substring_list = pcre_get_substring_list ; pcre_get_substring_list + _pcre_info = pcre_info ; pcre_info + _pcre_maketables = pcre_maketables ; pcre_maketables + _pcre_malloc = pcre_malloc ; pcre_malloc + _pcre_study = pcre_study ; pcre_study + _pcre_version = pcre_version ; pcre_version + _regcomp = regcomp ; regcomp + _regerror = regerror ; regerror + _regexec = regexec ; regexec + _regfree = regfree ; regfree diff --git a/win32/pcre/lib/libpcre-bcc.lib b/win32/pcre/lib/libpcre-bcc.lib Binary files differnew file mode 100644 index 0000000..e807b0e --- /dev/null +++ b/win32/pcre/lib/libpcre-bcc.lib diff --git a/win32/pcre/lib/libpcre.def b/win32/pcre/lib/libpcre.def new file mode 100644 index 0000000..2db32cb --- /dev/null +++ b/win32/pcre/lib/libpcre.def @@ -0,0 +1,20 @@ +; i:\MINGW\BIN\dlltool.exe -Cn -a -z libpcre.def --export-all-symbols DLLTMPDIR.libpcre.a/get.o DLLTMPDIR.libpcre.a/maketables.o DLLTMPDIR.libpcre.a/pcre.o DLLTMPDIR.libpcre.a/study.o DLLTMPDIR.libpcreposix.a/pcreposix.o +EXPORTS + pcre_info @ 1 ; + pcre_copy_substring @ 2 ; + pcre_exec @ 3 ; + pcre_free @ 4 DATA ; + pcre_free_substring @ 5 ; + pcre_free_substring_list @ 6 ; + pcre_fullinfo @ 7 ; + pcre_get_substring @ 8 ; + pcre_get_substring_list @ 9 ; + pcre_compile @ 10 ; + pcre_maketables @ 11 ; + pcre_malloc @ 12 DATA ; + pcre_study @ 13 ; + pcre_version @ 14 ; + regcomp @ 15 ; + regerror @ 16 ; + regexec @ 17 ; + regfree @ 18 ; diff --git a/win32/pcre/lib/libpcre.la b/win32/pcre/lib/libpcre.la new file mode 100644 index 0000000..8072045 --- /dev/null +++ b/win32/pcre/lib/libpcre.la @@ -0,0 +1,32 @@ +# libpcre.la - a libtool library file +# Generated by ltmain.sh - GNU libtool 1.4 (1.920 2001/04/24 23:26:18) +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='' + +# Names of this library. +library_names='' + +# The name of the static archive. +old_library='libpcre.a' + +# Libraries that this one depends upon. +dependency_libs='' + +# Version information for libpcre. +current=0 +age=0 +revision=1 + +# Is this an already installed library? +installed=yes + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='c:/progra~1/pcre/lib' diff --git a/win32/pcre/lib/libpcre.lib b/win32/pcre/lib/libpcre.lib Binary files differnew file mode 100644 index 0000000..7b8be59 --- /dev/null +++ b/win32/pcre/lib/libpcre.lib diff --git a/win32/pcre/lib/libpcreposix.la b/win32/pcre/lib/libpcreposix.la new file mode 100644 index 0000000..39ab321 --- /dev/null +++ b/win32/pcre/lib/libpcreposix.la @@ -0,0 +1,32 @@ +# libpcreposix.la - a libtool library file +# Generated by ltmain.sh - GNU libtool 1.4 (1.920 2001/04/24 23:26:18) +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='' + +# Names of this library. +library_names='' + +# The name of the static archive. +old_library='libpcreposix.a' + +# Libraries that this one depends upon. +dependency_libs='' + +# Version information for libpcreposix. +current=0 +age=0 +revision=0 + +# Is this an already installed library? +installed=yes + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='c:/progra~1/pcre/lib' diff --git a/win32/pcre/manifest/pcre-3.9-lib.mft b/win32/pcre/manifest/pcre-3.9-lib.mft new file mode 100644 index 0000000..024ac72 --- /dev/null +++ b/win32/pcre/manifest/pcre-3.9-lib.mft @@ -0,0 +1,13 @@ +include/pcre.h +include/pcreposix.h +lib/libpcre-bcc.def +lib/libpcre-bcc.lib +lib/libpcre.a +lib/libpcre.def +lib/libpcre.dll.a +lib/libpcre.la +lib/libpcre.lib +lib/libpcreposix.a +lib/libpcreposix.la +manifest/pcre-3.9-lib.mft +manifest/pcre-3.9-lib.ver diff --git a/win32/pcre/manifest/pcre-3.9-lib.ver b/win32/pcre/manifest/pcre-3.9-lib.ver new file mode 100644 index 0000000..1bf9d6f --- /dev/null +++ b/win32/pcre/manifest/pcre-3.9-lib.ver @@ -0,0 +1,2 @@ +Pcre 3.9: developer files +Pcre: Perl-compatible regular-expression library |