1 /*************************************************
2 * Perl-Compatible Regular Expressions *
3 *************************************************/
5 /* Copyright (c) 1998 University of Cambridge */
14 /* Have to include stdlib.h in order to ensure that size_t is defined;
15 it is needed here for malloc. */
17 #ifndef DONT_HAVE_SYS_TYPES_H
18 #include <sys/types.h>
22 /* Allow for C++ users */
30 #define PCRE_CASELESS 0x0001
31 #define PCRE_EXTENDED 0x0002
32 #define PCRE_ANCHORED 0x0004
33 #define PCRE_MULTILINE 0x0008
34 #define PCRE_DOTALL 0x0010
35 #define PCRE_DOLLAR_ENDONLY 0x0020
36 #define PCRE_EXTRA 0x0040
37 #define PCRE_NOTBOL 0x0080
38 #define PCRE_NOTEOL 0x0100
39 #define PCRE_UNGREEDY 0x0400
41 #define PCRE_LOCALE 0x0200
44 /* Exec-time error codes */
46 #define PCRE_ERROR_NOMATCH (-1)
47 #define PCRE_ERROR_BADREF (-2)
48 #define PCRE_ERROR_NULL (-3)
49 #define PCRE_ERROR_BADOPTION (-4)
50 #define PCRE_ERROR_BADMAGIC (-5)
51 #define PCRE_ERROR_UNKNOWN_NODE (-6)
52 #define PCRE_ERROR_NOMEMORY (-7)
57 typedef void pcre_extra
;
59 /* Store get and free functions. These can be set to alternative malloc/free
60 functions if required. */
62 extern void *(*pcre_malloc
)(size_t);
63 extern void (*pcre_free
)(void *);
68 extern pcre
*pcre_compile(const char *, int, const char **, int *, PyObject
*);
69 extern int pcre_exec(const pcre
*, const pcre_extra
*, const char *,
70 int, int, int, int *, int);
72 extern pcre
*pcre_compile(const char *, int, const char **, int *);
73 extern int pcre_exec(const pcre
*, const pcre_extra
*, const char *,
74 int, int, int *, int);
76 extern int pcre_info(const pcre
*, int *, int *);
77 extern pcre_extra
*pcre_study(const pcre
*, int, const char **);
78 extern const char *pcre_version(void);
84 #endif /* End of pcre.h */