Main Page | Data Structures | File List | Globals

include/pcre.h

00001 /*************************************************
00002 *       Perl-Compatible Regular Expressions      *
00003 *************************************************/
00004 
00005 /* Copyright (c) 1997-2001 University of Cambridge */
00006 
00007 #ifndef _PCRE_H
00008 #define _PCRE_H
00009 
00010 /* The file pcre.h is build by "configure". Do not edit it; instead
00011 make changes to pcre.in. */
00012 
00013 #define PCRE_MAJOR          3
00014 #define PCRE_MINOR          9
00015 #define PCRE_DATE           02-Jan-2002
00016 
00017 /* Win32 uses DLL by default */
00018 
00019 #ifdef _WIN32
00020 # ifdef STATIC
00021 #  define PCRE_DL_IMPORT
00022 # else
00023 #  define PCRE_DL_IMPORT __declspec(dllimport)
00024 # endif
00025 #else
00026 # define PCRE_DL_IMPORT
00027 #endif
00028 
00029 /* Have to include stdlib.h in order to ensure that size_t is defined;
00030 it is needed here for malloc. */
00031 
00032 #include <stdlib.h>
00033 
00034 /* Allow for C++ users */
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00040 /* Options */
00041 
00042 #define PCRE_CASELESS        0x0001
00043 #define PCRE_MULTILINE       0x0002
00044 #define PCRE_DOTALL          0x0004
00045 #define PCRE_EXTENDED        0x0008
00046 #define PCRE_ANCHORED        0x0010
00047 #define PCRE_DOLLAR_ENDONLY  0x0020
00048 #define PCRE_EXTRA           0x0040
00049 #define PCRE_NOTBOL          0x0080
00050 #define PCRE_NOTEOL          0x0100
00051 #define PCRE_UNGREEDY        0x0200
00052 #define PCRE_NOTEMPTY        0x0400
00053 #define PCRE_UTF8            0x0800
00054 
00055 /* Exec-time and get-time error codes */
00056 
00057 #define PCRE_ERROR_NOMATCH        (-1)
00058 #define PCRE_ERROR_NULL           (-2)
00059 #define PCRE_ERROR_BADOPTION      (-3)
00060 #define PCRE_ERROR_BADMAGIC       (-4)
00061 #define PCRE_ERROR_UNKNOWN_NODE   (-5)
00062 #define PCRE_ERROR_NOMEMORY       (-6)
00063 #define PCRE_ERROR_NOSUBSTRING    (-7)
00064 
00065 /* Request types for pcre_fullinfo() */
00066 
00067 #define PCRE_INFO_OPTIONS         0
00068 #define PCRE_INFO_SIZE            1
00069 #define PCRE_INFO_CAPTURECOUNT    2
00070 #define PCRE_INFO_BACKREFMAX      3
00071 #define PCRE_INFO_FIRSTCHAR       4
00072 #define PCRE_INFO_FIRSTTABLE      5
00073 #define PCRE_INFO_LASTLITERAL     6
00074 
00075 /* Types */
00076 
00077 struct real_pcre;        /* declaration; the definition is private  */
00078 struct real_pcre_extra;  /* declaration; the definition is private */
00079 
00080 typedef struct real_pcre pcre;
00081 typedef struct real_pcre_extra pcre_extra;
00082 
00083 /* Store get and free functions. These can be set to alternative malloc/free
00084 functions if required. Some magic is required for Win32 DLL; it is null on
00085 other OS. */
00086 
00087 PCRE_DL_IMPORT extern void *(*pcre_malloc)(size_t);
00088 PCRE_DL_IMPORT extern void  (*pcre_free)(void *);
00089 
00090 #undef PCRE_DL_IMPORT
00091 
00092 /* Functions */
00093 
00094 extern pcre *pcre_compile(const char *, int, const char **, int *,
00095               const unsigned char *);
00096 extern int  pcre_copy_substring(const char *, int *, int, int, char *, int);
00097 extern int  pcre_exec(const pcre *, const pcre_extra *, const char *,
00098               int, int, int, int *, int);
00099 extern void pcre_free_substring(const char *);
00100 extern void pcre_free_substring_list(const char **);
00101 extern int  pcre_get_substring(const char *, int *, int, int, const char **);
00102 extern int  pcre_get_substring_list(const char *, int *, int, const char ***);
00103 extern int  pcre_info(const pcre *, int *, int *);
00104 extern int  pcre_fullinfo(const pcre *, const pcre_extra *, int, void *);
00105 extern const unsigned char *pcre_maketables(void);
00106 extern pcre_extra *pcre_study(const pcre *, int, const char **);
00107 extern const char *pcre_version(void);
00108 
00109 #ifdef __cplusplus
00110 }  /* extern "C" */
00111 #endif
00112 
00113 #endif /* End of pcre.h */

Generated on Fri Feb 20 15:17:48 2004 for PPR Libraries by doxygen 1.3.5