summaryrefslogtreecommitdiff
path: root/win32/regex/utils.h
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2014-07-31 18:18:18 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2014-07-31 18:18:18 +0200
commit680a012532e2d962a55c1a588900c3b52c0d6b69 (patch)
tree613b0399000e5c72290efa2497cf008fbccb12df /win32/regex/utils.h
parent3c97ca53d8279f0f16ca2f82a703bafa517e39f3 (diff)
parentee0ffcb7bcb46d3d129bd262781d54afa736ffbb (diff)
Merge branch 'master' of /pub/repo.git/Balau
Diffstat (limited to 'win32/regex/utils.h')
-rw-r--r--win32/regex/utils.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/win32/regex/utils.h b/win32/regex/utils.h
new file mode 100644
index 0000000..1a997ac
--- /dev/null
+++ b/win32/regex/utils.h
@@ -0,0 +1,22 @@
+/* utility definitions */
+#ifdef _POSIX2_RE_DUP_MAX
+#define DUPMAX _POSIX2_RE_DUP_MAX
+#else
+#define DUPMAX 255
+#endif
+#define INFINITY (DUPMAX + 1)
+#define NC (CHAR_MAX - CHAR_MIN + 1)
+typedef unsigned char uch;
+
+/* switch off assertions (if not already off) if no REDEBUG */
+#ifndef REDEBUG
+#ifndef NDEBUG
+#define NDEBUG /* no assertions please */
+#endif
+#endif
+#include <assert.h>
+
+/* for old systems with bcopy() but no memmove() */
+#ifdef USEBCOPY
+#define memmove(d, s, c) bcopy(s, d, c)
+#endif