NCBI C Toolkit Cross Reference

C/regexp/pcre.h


  1 /*************************************************
  2 *       Perl-Compatible Regular Expressions      *
  3 *************************************************/
  4 
  5 /* Copyright (c) 1997-2001 University of Cambridge */
  6 
  7 #ifndef _PCRE_H
  8 #define _PCRE_H
  9 
 10 /* The file pcre.h was build by "configure" */
 11 
 12 #define PCRE_MAJOR          3
 13 #define PCRE_MINOR          9
 14 #define PCRE_DATE           02-Jan-2002
 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 <stdlib.h>
 20 
 21 /* Allow for C++ users */
 22 
 23 #ifdef __cplusplus
 24 extern "C" {
 25 #endif
 26 
 27 /* Options */
 28 
 29 #define PCRE_CASELESS        0x0001
 30 #define PCRE_MULTILINE       0x0002
 31 #define PCRE_DOTALL          0x0004
 32 #define PCRE_EXTENDED        0x0008
 33 #define PCRE_ANCHORED        0x0010
 34 #define PCRE_DOLLAR_ENDONLY  0x0020
 35 #define PCRE_EXTRA           0x0040
 36 #define PCRE_NOTBOL          0x0080
 37 #define PCRE_NOTEOL          0x0100
 38 #define PCRE_UNGREEDY        0x0200
 39 #define PCRE_NOTEMPTY        0x0400
 40 #define PCRE_UTF8            0x0800
 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 /* Request types for pcre_fullinfo() */
 53 
 54 #define PCRE_INFO_OPTIONS         0
 55 #define PCRE_INFO_SIZE            1
 56 #define PCRE_INFO_CAPTURECOUNT    2
 57 #define PCRE_INFO_BACKREFMAX      3
 58 #define PCRE_INFO_FIRSTCHAR       4
 59 #define PCRE_INFO_FIRSTTABLE      5
 60 #define PCRE_INFO_LASTLITERAL     6
 61 
 62 /* Types */
 63 
 64 struct real_pcre;        /* declaration; the definition is private  */
 65 struct real_pcre_extra;  /* declaration; the definition is private */
 66 
 67 typedef struct real_pcre pcre;
 68 typedef struct real_pcre_extra pcre_extra;
 69 
 70 /* Store get and free functions. These can be set to alternative malloc/free
 71    functions if required */
 72 
 73 extern void *(*pcre_malloc)(size_t);
 74 extern void  (*pcre_free)(void *);
 75 
 76 /* Functions */
 77 
 78 extern pcre *pcre_compile(const char *, int, const char **, int *,
 79                           const unsigned char *);
 80 extern int  pcre_copy_substring(const char *, int *, int, int, char *, int);
 81 extern int  pcre_exec(const pcre *, const pcre_extra *, const char *,
 82                       int, int, int, int *, int);
 83 extern void pcre_free_substring(const char *);
 84 extern void pcre_free_substring_list(const char **);
 85 extern int  pcre_get_substring(const char *, int *, int, int, const char **);
 86 extern int  pcre_get_substring_list(const char *, int *, int, const char ***);
 87 extern int  pcre_info(const pcre *, int *, int *);
 88 extern int  pcre_fullinfo(const pcre *, const pcre_extra *, int, void *);
 89 extern const unsigned char *pcre_maketables(void);
 90 extern pcre_extra *pcre_study(const pcre *, int, const char **);
 91 extern const char *pcre_version(void);
 92 
 93 #ifdef __cplusplus
 94 }  /* extern "C" */
 95 #endif
 96 
 97 #endif /* End of pcre.h */
 98 

source navigation ]   [ diff markup ]   [ identifier search ]   [ freetext search ]   [ file search ]  

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.