OpenMoHAA
0.82.0
Loading...
Searching...
No Matches
slre.h
1
/*
2
* Copyright (c) 2004-2013 Sergey Lyubka <valenok@gmail.com>
3
* Copyright (c) 2013 Cesanta Software Limited
4
* All rights reserved
5
*
6
* This library is dual-licensed: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation. For the terms of this
9
* license, see <http://www.gnu.org/licenses/>.
10
*
11
* You are free to use this library under the terms of the GNU General
12
* Public License, but WITHOUT ANY WARRANTY; without even the implied
13
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
* See the GNU General Public License for more details.
15
*
16
* Alternatively, you can license this library under a commercial
17
* license, as set out in <http://cesanta.com/products.html>.
18
*/
19
20
/*
21
* This is a regular expression library that implements a subset of Perl RE.
22
* Please refer to README.md for a detailed reference.
23
*/
24
25
#ifndef SLRE_HEADER_DEFINED
26
#define SLRE_HEADER_DEFINED
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
32
struct
slre_cap
{
33
const
char
*ptr;
34
size_t
len;
35
};
36
37
38
size_t
slre_match(
const
char
*regexp,
const
char
*buf,
size_t
buf_len,
39
struct
slre_cap
*caps,
int
num_caps,
int
flags);
40
41
/* Possible flags for slre_match() */
42
enum
{ SLRE_IGNORE_CASE = 1 };
43
44
45
/* slre_match() failure codes */
46
#define SLRE_NO_MATCH -1
47
#define SLRE_UNEXPECTED_QUANTIFIER -2
48
#define SLRE_UNBALANCED_BRACKETS -3
49
#define SLRE_INTERNAL_ERROR -4
50
#define SLRE_INVALID_CHARACTER_SET -5
51
#define SLRE_INVALID_METACHARACTER -6
52
#define SLRE_CAPS_ARRAY_TOO_SMALL -7
53
#define SLRE_TOO_MANY_BRANCHES -8
54
#define SLRE_TOO_MANY_BRACKETS -9
55
56
#ifdef __cplusplus
57
}
58
#endif
59
60
#endif
/* SLRE_HEADER_DEFINED */
slre_cap
Definition
slre.h:32
code
fgame
slre.h
Generated by
1.13.2