Annotation of parser3/src/lib/pcre/pcre.h, revision 1.2

1.1       paf         1: /*************************************************
                      2: *       Perl-Compatible Regular Expressions      *
                      3: *************************************************/
                      4: 
                      5: /* Copyright (c) 1997-1999 University of Cambridge */
                      6: 
                      7: #ifndef _PCRE_H
                      8: #define _PCRE_H
                      9: 
                     10: #define PCRE_MAJOR 2
                     11: #define PCRE_MINOR 08
                     12: #define PCRE_DATE  31-Aug-1999
                     13: 
                     14: # define PCRE_DL_IMPORT
                     15: 
                     16: /* Have to include stdlib.h in order to ensure that size_t is defined;
                     17: it is needed here for malloc. */
                     18: 
                     19: #include <sys/types.h>
                     20: #include <stdlib.h>
                     21: 
                     22: /* Allow for C++ users */
                     23: 
                     24: #ifdef __cplusplus
                     25: extern "C" {
                     26: #endif
                     27: 
                     28: /* Options */
                     29: 
                     30: #define PCRE_CASELESS        0x0001
                     31: #define PCRE_MULTILINE       0x0002
                     32: #define PCRE_DOTALL          0x0004
                     33: #define PCRE_EXTENDED        0x0008
                     34: #define PCRE_ANCHORED        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        0x0200
                     40: #define PCRE_NOTEMPTY        0x0400
                     41: 
                     42: /* Exec-time and get-time error codes */
                     43: 
                     44: #define PCRE_ERROR_NOMATCH        (-1)
                     45: #define PCRE_ERROR_NULL           (-2)
                     46: #define PCRE_ERROR_BADOPTION      (-3)
                     47: #define PCRE_ERROR_BADMAGIC       (-4)
                     48: #define PCRE_ERROR_UNKNOWN_NODE   (-5)
                     49: #define PCRE_ERROR_NOMEMORY       (-6)
                     50: #define PCRE_ERROR_NOSUBSTRING    (-7)
                     51: 
                     52: /* Types */
                     53: 
                     54: typedef void pcre;
                     55: typedef void pcre_extra;
                     56: 
                     57: /* Store get and free functions. These can be set to alternative malloc/free
                     58: functions if required. Some magic is required for Win32 DLL; it is null on
                     59: other OS. */
                     60: 
                     61: PCRE_DL_IMPORT extern void *(*pcre_malloc)(size_t);
                     62: PCRE_DL_IMPORT extern void  (*pcre_free)(void *);
                     63: 
                     64: #undef PCRE_DL_IMPORT
                     65: 
                     66: /* Functions */
                     67: 
                     68: extern pcre *pcre_compile(const char *, int, const char **, int *,
                     69:   const unsigned char *);
                     70: extern int pcre_copy_substring(const char *, int *, int, int, char *, int);
                     71: extern int pcre_exec(const pcre *, const pcre_extra *, const char *,
                     72:   int, int, int, int *, int);
                     73: extern int pcre_get_substring(const char *, int *, int, int, const char **);
                     74: extern int pcre_get_substring_list(const char *, int *, int, const char ***);
                     75: extern int pcre_info(const pcre *, int *, int *);
                     76: #ifndef DFTABLES
                     77: extern unsigned const char *pcre_maketables(void);
                     78: #endif
                     79: extern pcre_extra *pcre_study(const pcre *, int, const char **);
                     80: extern const char *pcre_version(void);
                     81: 
                     82: #ifdef __cplusplus
                     83: }  /* extern "C" */
                     84: #endif
                     85: 
                     86: #endif /* End of pcre.h */

E-mail: