Re: [PATCH regexec.c] lookahead for REF, MINMOD, PLUS, CURLY*
[p5sagit/p5-mst-13.2.git] / ext / Encode / encode.h
1 #ifndef ENCODE_H
2 #define ENCODE_H
3 #ifndef U8
4 typedef unsigned char U8;
5 #endif
6
7 typedef struct encpage_s encpage_t;
8
9 struct encpage_s
10 {
11  const U8   *seq;
12  encpage_t  *next;
13  U8         min;
14  U8         max;
15  U8         dlen;
16  U8         slen;
17 };
18
19 typedef struct encode_s encode_t;
20 struct encode_s
21 {
22  encpage_t  *t_utf8;
23  encpage_t  *f_utf8;
24  const U8   *rep;
25  int        replen;
26  U8         min_el;
27  U8         max_el;
28  const char *name[2];
29 };
30
31 #ifdef U8
32 extern int do_encode(encpage_t *enc, const U8 *src, STRLEN *slen,
33                      U8 *dst, STRLEN dlen, STRLEN *dout, int approx);
34
35 extern void Encode_DefineEncoding(encode_t *enc);
36 #endif
37
38 #define ENCODE_NOSPACE  1
39 #define ENCODE_PARTIAL  2
40 #define ENCODE_NOREP    3
41 #define ENCODE_FALLBACK 4
42 #endif