Added regex support as per issue #164.

jq now depends on oniguruma for regex support.
Modified configure.ac accordingly.

Added valgrind suppression file for oniguruma to prevent one-time and bounded
leaks from causing tests to fail.

Signed-off-by: Nicolas Williams <nico@cryptonector.com>
This commit is contained in:
William Langford authored and Nicolas Williams committed 2014-06-18 21:02:47 -05:00
1 parent 5d9d1b1020
commit 8ff935c01a
7 files changed
+420 -2

No files matched your search

+7
View File
@@ -59,6 +59,13 @@ int jvp_utf8_is_valid(const char* in, const char* end) {
return 1;
}
int jvp_utf8_decode_length(char startchar) {
if ((startchar & 0x80) == 0) return 1;
else if ((startchar & 0xC0) == 0xC0) return 2;
else if ((startchar & 0xE0) == 0xE0) return 3;
else return 4;
}
int jvp_utf8_encode_length(int codepoint) {
if (codepoint <= 0x7F) return 1;
else if (codepoint <= 0x7FF) return 2;