moved almost all hardcoded constants to "define.dat"
[k8-i-v-a-n.git] / src / felib / regex.h
blob1703933627d024482286f36f4e90aa91cb4c7081
1 /* Copyright (c) 2003, David Leonard. All rights reserved. */
2 /* $Id: regex.h 1008 2006-02-05 13:01:44Z d $ */
3 #ifndef _SEE_h_regex_
4 #define _SEE_h_regex_
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
11 typedef struct SEE_RegExpr SEE_RegExpr;
13 typedef struct {
14 int start, end;
15 } Capture;
18 #define SEERX_IS_CAPTURE_UNDEFINED(c) ((c).end == -1)
20 #define SEERX_FLAG_GLOBAL 0x01 /* 'g'-flag */
21 #define SEERX_FLAG_IGNORECASE 0x02 /* 'i'-flag */
22 #define SEERX_FLAG_MULTILINE 0x04 /* 'm'-flag */
25 extern SEE_RegExpr *SEE_regex_parse (const char *source, int patLen, int flags);
26 extern int SEE_regex_count_captures (const SEE_RegExpr *regex);
27 extern int SEE_regex_get_flags (const SEE_RegExpr *regex);
28 extern int SEE_regex_match (SEE_RegExpr *regex, const char *text, int textLen, int start, Capture *captures);
30 extern void SEE_regex_free (SEE_RegExpr *regex);
33 #ifdef __cplusplus
35 #endif
36 #endif