aboutsummaryrefslogtreecommitdiff
path: root/src/tre.patch
blob: 61b6535e381df5b905f9e3bc052f77b5f8a4bc0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
diff -r c8148182a381 lib/tre-config.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/tre-config.h	Mon Jul 04 13:22:19 2016 -0400
@@ -0,0 +1,45 @@
+/* tre-config.h.in.  This file has all definitions that are needed in
+   `tre.h'.  Note that this file must contain only the bare minimum
+   of definitions without the TRE_ prefix to avoid conflicts between
+   definitions here and definitions included from somewhere else. */
+
+/* Define to 1 if you have the <libutf8.h> header file. */
+#undef HAVE_LIBUTF8_H
+
+/* Define to 1 if the system has the type `reg_errcode_t'. */
+#undef HAVE_REG_ERRCODE_T
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#undef HAVE_WCHAR_H
+
+/* Define if you want to enable approximate matching functionality. */
+#undef TRE_APPROX
+
+/* Define to enable multibyte character set support. */
+#undef TRE_MULTIBYTE
+
+/* Define to the absolute path to the system tre.h */
+#undef TRE_SYSTEM_REGEX_H_PATH
+
+/* Define to include the system regex.h from tre.h */
+#undef TRE_USE_SYSTEM_REGEX_H
+
+/* Define to enable wide character (wchar_t) support. */
+#undef TRE_WCHAR
+
+/* TRE version string. */
+#define TRE_VERSION "0.8.0"
+
+/* TRE version level 1. */
+#undef TRE_VERSION_1
+
+/* TRE version level 2. */
+#undef TRE_VERSION_2
+
+/* TRE version level 3. */
+#undef TRE_VERSION_3
+
+#define TRE_REGEX_T_FIELD value
--- tre/lib/tre-parse.c.orig	2017-10-26 10:06:49.512031304 -0400
+++ tre/lib/tre-parse.c	2017-10-26 10:07:01.048160259 -0400
@@ -1543,7 +1543,7 @@
 					     ctx->position);
 		  if (!tmp1)
 		    return REG_ESPACE;
-		  tmp2 = tre_ast_new_literal(ctx->mem, L'\n' + 1, TRE_CHAR_MAX,
+		  tmp2 = tre_ast_new_literal(ctx->mem, L'\r' + 1, TRE_CHAR_MAX,
 					     ctx->position + 1);
 		  if (!tmp2)
 		    return REG_ESPACE;
--- tre/lib/tre-match-utils.h.orig	2017-10-26 09:46:14.225633020 -0400
+++ tre/lib/tre-match-utils.h	2017-10-26 09:46:16.193657010 -0400
@@ -146,7 +146,7 @@
     && (prev_c != L'\n' || !reg_newline))				      \
    || ((assertions & ASSERT_AT_EOL)					      \
        && (next_c != L'\0' || reg_noteol)				      \
-       && (next_c != L'\n' || !reg_newline))				      \
+       && ((next_c != L'\r' && next_c != L'\n') || !reg_newline))				      \
    || ((assertions & ASSERT_AT_BOW)					      \
        && (IS_WORD_CHAR(prev_c) || !IS_WORD_CHAR(next_c)))	              \
    || ((assertions & ASSERT_AT_EOW)					      \