summaryrefslogtreecommitdiff
path: root/src/lib/evil/regex/utils.h
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2013-11-01 16:00:39 +0100
committerCedric Bail <cedric.bail@samsung.com>2013-11-04 16:40:29 +0900
commitbc07d80e0cc1d2f7e72db2c83f2c37e91e2aef44 (patch)
tree6da1c43b55fa739cf051f7b7fe2cd771734e9e55 /src/lib/evil/regex/utils.h
parent058e03aa7401a197d400ee8330bae5d54e8c42db (diff)
evil: add regex code (needed for elm).
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
Diffstat (limited to '')
-rw-r--r--src/lib/evil/regex/utils.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/lib/evil/regex/utils.h b/src/lib/evil/regex/utils.h
new file mode 100644
index 0000000000..1a997ac8fc
--- /dev/null
+++ b/src/lib/evil/regex/utils.h
@@ -0,0 +1,22 @@
1/* utility definitions */
2#ifdef _POSIX2_RE_DUP_MAX
3#define DUPMAX _POSIX2_RE_DUP_MAX
4#else
5#define DUPMAX 255
6#endif
7#define INFINITY (DUPMAX + 1)
8#define NC (CHAR_MAX - CHAR_MIN + 1)
9typedef unsigned char uch;
10
11/* switch off assertions (if not already off) if no REDEBUG */
12#ifndef REDEBUG
13#ifndef NDEBUG
14#define NDEBUG /* no assertions please */
15#endif
16#endif
17#include <assert.h>
18
19/* for old systems with bcopy() but no memmove() */
20#ifdef USEBCOPY
21#define memmove(d, s, c) bcopy(s, d, c)
22#endif