~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to regex/my_regex.h

  • Committer: Brian Aker
  • Date: 2008-07-08 21:36:11 UTC
  • mfrom: (77.1.34 codestyle)
  • Revision ID: brian@tangent.org-20080708213611-b0k2zy8eldttqct3
Merging up Monty's changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef _REGEX_H_
2
 
#define _REGEX_H_       /* never again */
3
 
/* ========= begin header generated by ./mkh ========= */
4
 
#ifdef __cplusplus
5
 
extern "C" {
6
 
#endif
7
 
 
8
 
#include "m_ctype.h"
9
 
 
10
 
/* === regex2.h === */
11
 
#ifdef _WIN64
12
 
typedef __int64 regoff_t;
13
 
#else
14
 
typedef off_t regoff_t;
15
 
#endif
16
 
struct re_guts;                 /* none of your business :-) */
17
 
typedef struct {
18
 
        int re_magic;
19
 
        size_t re_nsub;         /* number of parenthesized subexpressions */
20
 
        const char *re_endp;    /* end pointer for REG_PEND */
21
 
        struct re_guts *re_g;   /* none of your business :-) */
22
 
        CHARSET_INFO *charset;  /* For ctype things */
23
 
} my_regex_t;
24
 
typedef struct {
25
 
        regoff_t rm_so;         /* start of match */
26
 
        regoff_t rm_eo;         /* end of match */
27
 
} my_regmatch_t;
28
 
 
29
 
 
30
 
/* === regcomp.c === */
31
 
extern int my_regcomp(my_regex_t *, const char *, int, CHARSET_INFO *charset);
32
 
#define REG_BASIC       0000
33
 
#define REG_EXTENDED    0001
34
 
#define REG_ICASE       0002
35
 
#define REG_NOSUB       0004
36
 
#define REG_NEWLINE     0010
37
 
#define REG_NOSPEC      0020
38
 
#define REG_PEND        0040
39
 
#define REG_DUMP        0200
40
 
 
41
 
 
42
 
/* === regerror.c === */
43
 
#define REG_NOMATCH      1
44
 
#define REG_BADPAT       2
45
 
#define REG_ECOLLATE     3
46
 
#define REG_ECTYPE       4
47
 
#define REG_EESCAPE      5
48
 
#define REG_ESUBREG      6
49
 
#define REG_EBRACK       7
50
 
#define REG_EPAREN       8
51
 
#define REG_EBRACE       9
52
 
#define REG_BADBR       10
53
 
#define REG_ERANGE      11
54
 
#define REG_ESPACE      12
55
 
#define REG_BADRPT      13
56
 
#define REG_EMPTY       14
57
 
#define REG_ASSERT      15
58
 
#define REG_INVARG      16
59
 
#define REG_ATOI        255     /* convert name to number (!) */
60
 
#define REG_ITOA        0400    /* convert number to name (!) */
61
 
extern size_t my_regerror(int, const my_regex_t *, char *, size_t);
62
 
 
63
 
 
64
 
/* === regexec.c === */
65
 
extern int my_regexec(const my_regex_t *, const char *, size_t, my_regmatch_t [], int);
66
 
#define REG_NOTBOL      00001
67
 
#define REG_NOTEOL      00002
68
 
#define REG_STARTEND    00004
69
 
#define REG_TRACE       00400   /* tracing of execution */
70
 
#define REG_LARGE       01000   /* force large representation */
71
 
#define REG_BACKR       02000   /* force use of backref code */
72
 
 
73
 
 
74
 
/* === regfree.c === */
75
 
extern void my_regfree(my_regex_t *);
76
 
 
77
 
/* === reginit.c === */
78
 
 
79
 
extern void my_regex_init(CHARSET_INFO *cs);    /* Should be called for multithread progs */
80
 
extern void my_regex_end(void); /* If one wants a clean end */
81
 
 
82
 
#ifdef __cplusplus
83
 
}
84
 
#endif
85
 
/* ========= end header generated by ./mkh ========= */
86
 
#endif