~ubuntu-branches/ubuntu/trusty/pcre3/trusty

« back to all changes in this revision

Viewing changes to pcre_internal.h

  • Committer: Package Import Robot
  • Author(s): Mark Baker
  • Date: 2012-09-13 19:58:45 UTC
  • mfrom: (23.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20120913195845-wd12z63sm0b07n59
Tags: 1:8.31-1
* New upstream release
* Applied patch from upstream bugzilla #1287 to fix bug where wrong
  value is in re_nsub in some cases (Closes: #686495)

Show diffs side-by-side

added added

removed removed

Lines of Context:
523
523
 
524
524
#define PUT2INC(a,n,d)  PUT2(a,n,d), a += IMM2_SIZE
525
525
 
 
526
/* The maximum length of a MARK name is currently one data unit; it may be
 
527
changed in future to be a fixed number of bytes or to depend on LINK_SIZE. */
 
528
 
 
529
#define MAX_MARK ((1 << (sizeof(pcre_uchar)*8)) - 1)
 
530
 
526
531
/* When UTF encoding is being used, a character is no longer just a single
527
532
character. The macros for character handling generate simple sequences when
528
533
used in character-mode, and more complicated ones for UTF characters.
887
892
   PCRE_NO_START_OPTIMIZE)
888
893
 
889
894
#define PUBLIC_STUDY_OPTIONS \
890
 
   PCRE_STUDY_JIT_COMPILE
 
895
   (PCRE_STUDY_JIT_COMPILE|PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE| \
 
896
    PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE)
891
897
 
892
898
/* Magic number to provide a small check against being handed junk. */
893
899
 
1939
1945
       ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49,
1940
1946
       ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59,
1941
1947
       ERR60, ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69,
1942
 
       ERR70, ERR71, ERR72, ERR73, ERR74, ERRCOUNT };
 
1948
       ERR70, ERR71, ERR72, ERR73, ERR74, ERR75, ERR76, ERRCOUNT };
 
1949
 
 
1950
/* JIT compiling modes. The function list is indexed by them. */
 
1951
enum { JIT_COMPILE, JIT_PARTIAL_SOFT_COMPILE, JIT_PARTIAL_HARD_COMPILE,
 
1952
       JIT_NUMBER_OF_COMPILE_MODES };
1943
1953
 
1944
1954
/* The real format of the start of the pcre block; the index of names and the
1945
1955
code vector run on as long as necessary after the end. We store an explicit
1969
1979
  pcre_uint32 size;               /* Total that was malloced */
1970
1980
  pcre_uint32 options;            /* Public options */
1971
1981
  pcre_uint16 flags;              /* Private flags */
1972
 
  pcre_uint16 dummy1;             /* For future use */
1973
 
  pcre_uint16 top_bracket;
1974
 
  pcre_uint16 top_backref;
 
1982
  pcre_uint16 max_lookbehind;     /* Longest lookbehind (characters) */
 
1983
  pcre_uint16 top_bracket;        /* Highest numbered group */
 
1984
  pcre_uint16 top_backref;        /* Highest numbered back reference */
1975
1985
  pcre_uint16 first_char;         /* Starting character */
1976
1986
  pcre_uint16 req_char;           /* This character must be seen */
1977
1987
  pcre_uint16 name_table_offset;  /* Offset to name table that follows */
1978
1988
  pcre_uint16 name_entry_size;    /* Size of any name items */
1979
1989
  pcre_uint16 name_count;         /* Number of name items */
1980
1990
  pcre_uint16 ref_count;          /* Reference count */
1981
 
 
1982
1991
  const pcre_uint8 *tables;       /* Pointer to tables or NULL for std */
1983
1992
  const pcre_uint8 *nullpad;      /* NULL padding */
1984
1993
} REAL_PCRE;
2024
2033
  int  workspace_size;              /* Size of workspace */
2025
2034
  int  bracount;                    /* Count of capturing parens as we compile */
2026
2035
  int  final_bracount;              /* Saved value after first pass */
 
2036
  int  max_lookbehind;              /* Maximum lookbehind (characters) */
2027
2037
  int  top_backref;                 /* Maximum back reference */
2028
2038
  unsigned int backref_map;         /* Bitmap of low back refs */
2029
2039
  int  assert_depth;                /* Depth of nested assertions */
2125
2135
  const  pcre_uchar *mark;        /* Mark pointer to pass back on success */
2126
2136
  const  pcre_uchar *nomatch_mark;/* Mark pointer to pass back on failure */
2127
2137
  const  pcre_uchar *once_target; /* Where to back up to for atomic groups */
 
2138
#ifdef NO_RECURSE
 
2139
  void  *match_frames_base;       /* For remembering malloc'd frames */
 
2140
#endif
2128
2141
} match_data;
2129
2142
 
2130
2143
/* A similar structure is used for the same purpose by the DFA matching
2179
2192
#define ctypes_offset (cbits_offset + cbit_length)
2180
2193
#define tables_length (ctypes_offset + 256)
2181
2194
 
2182
 
/* Internal function prefix */
 
2195
/* Internal function and data prefixes. */
2183
2196
 
2184
2197
#ifdef COMPILE_PCRE8
2185
2198
#ifndef PUBL
2288
2301
extern BOOL              PRIV(xclass)(int, const pcre_uchar *, BOOL);
2289
2302
 
2290
2303
#ifdef SUPPORT_JIT
2291
 
extern void              PRIV(jit_compile)(const REAL_PCRE *, PUBL(extra) *);
2292
 
extern int               PRIV(jit_exec)(const REAL_PCRE *, void *,
2293
 
                           const pcre_uchar *, int, int, int, int, int *, int);
 
2304
extern void              PRIV(jit_compile)(const REAL_PCRE *,
 
2305
                           PUBL(extra) *, int);
 
2306
extern int               PRIV(jit_exec)(const REAL_PCRE *, const PUBL(extra) *,
 
2307
                           const pcre_uchar *, int, int, int, int *, int);
2294
2308
extern void              PRIV(jit_free)(void *);
2295
2309
extern int               PRIV(jit_get_size)(void *);
2296
2310
extern const char*       PRIV(jit_get_target)(void);