add cast to XtCalloc() call
[nedit-bw.git] / extend_regex_size.patch
blobc4f8fd8744d7d746249c1cd3fe85aa710e9939a5
1 From: unknown, probably Tony or maillist
2 Subject: Extend the size for regular expressions
4 ---
6 source/regularExp.c | 4 ++--
7 1 file changed, 2 insertions(+), 2 deletions(-)
9 diff --quilt old/source/regularExp.c new/source/regularExp.c
10 --- old/source/regularExp.c
11 +++ new/source/regularExp.c
12 @@ -450,11 +450,11 @@ static const char CVSID[] = "$Id: regula
13 of the actual compiled regex code, i.e. skipping over the MAGIC number and
14 the two counters at the front. */
16 #define REGEX_START_OFFSET 3
18 -#define MAX_COMPILED_SIZE 32767UL /* Largest size a compiled regex can be.
19 +#define MAX_COMPILED_SIZE 65535UL /* Largest size a compiled regex can be.
20 Probably could be 65535UL. */
22 /* Global work variables for `CompileRE'. */
24 static unsigned char *Reg_Parse; /* Input scan ptr (scans user's regex) */
25 @@ -612,11 +612,11 @@ regexp * CompileRE (const char *exp, cha
26 if (Reg_Size >= MAX_COMPILED_SIZE) {
27 /* Too big for NEXT pointers NEXT_PTR_SIZE bytes long to span.
28 This is a real issue since the first BRANCH node usually points
29 to the end of the compiled regex code. */
31 - sprintf (Error_Text, "regexp > %lu bytes", MAX_COMPILED_SIZE);
32 + sprintf (Error_Text, "regexp > %lu bytes\n", MAX_COMPILED_SIZE);
33 REG_FAIL (Error_Text);
36 /* Allocate memory. */