Revision: 902
http://www.exim.org/viewvc/pcre2?view=rev&revision=902
Author: ph10
Date: 2018-01-01 15:13:24 +0000 (Mon, 01 Jan 2018)
Log Message:
-----------
Tidy ACROSSCHAR macro to take same form as FORWARDCHAR and BACKCHAR.
Modified Paths:
--------------
code/trunk/src/pcre2_dfa_match.c
code/trunk/src/pcre2_intmodedep.h
code/trunk/src/pcre2_match.c
Modified: code/trunk/src/pcre2_dfa_match.c
===================================================================
--- code/trunk/src/pcre2_dfa_match.c 2018-01-01 15:05:27 UTC (rev 901)
+++ code/trunk/src/pcre2_dfa_match.c 2018-01-01 15:13:24 UTC (rev 902)
@@ -508,7 +508,8 @@
{
if (current_subject <= start_subject) break;
current_subject--;
- ACROSSCHAR(current_subject > start_subject, *current_subject, current_subject--);
+ ACROSSCHAR(current_subject > start_subject, current_subject,
+ current_subject--);
}
}
else
@@ -3380,7 +3381,7 @@
while (t < end_subject && !IS_NEWLINE(t))
{
t++;
- ACROSSCHAR(t < end_subject, *t, t++);
+ ACROSSCHAR(t < end_subject, t, t++);
}
}
else
@@ -3485,8 +3486,7 @@
while (start_match < end_subject && !WAS_NEWLINE(start_match))
{
start_match++;
- ACROSSCHAR(start_match < end_subject, *start_match,
- start_match++);
+ ACROSSCHAR(start_match < end_subject, start_match, start_match++);
}
}
else
@@ -3648,8 +3648,7 @@
#ifdef SUPPORT_UNICODE
if (utf)
{
- ACROSSCHAR(start_match < end_subject, *start_match,
- start_match++);
+ ACROSSCHAR(start_match < end_subject, start_match, start_match++);
}
#endif
if (start_match > end_subject) break;
Modified: code/trunk/src/pcre2_intmodedep.h
===================================================================
--- code/trunk/src/pcre2_intmodedep.h 2018-01-01 15:05:27 UTC (rev 901)
+++ code/trunk/src/pcre2_intmodedep.h 2018-01-01 15:13:24 UTC (rev 902)
@@ -351,7 +351,7 @@
/* Same as above, but it allows a fully customizable form. */
#define ACROSSCHAR(condition, eptr, action) \
- while((condition) && ((eptr) & 0xc0u) == 0x80u) action
+ while((condition) && ((*eptr) & 0xc0u) == 0x80u) action
/* Deposit a character into memory, returning the number of code units. */
@@ -457,7 +457,7 @@
/* Same as above, but it allows a fully customizable form. */
#define ACROSSCHAR(condition, eptr, action) \
- if ((condition) && ((eptr) & 0xfc00u) == 0xdc00u) action
+ if ((condition) && ((*eptr) & 0xfc00u) == 0xdc00u) action
/* Deposit a character into memory, returning the number of code units. */
Modified: code/trunk/src/pcre2_match.c
===================================================================
--- code/trunk/src/pcre2_match.c 2018-01-01 15:05:27 UTC (rev 901)
+++ code/trunk/src/pcre2_match.c 2018-01-01 15:13:24 UTC (rev 902)
@@ -879,7 +879,7 @@
}
Feptr++;
#ifdef SUPPORT_UNICODE
- if (utf) ACROSSCHAR(Feptr < mb->end_subject, *Feptr, Feptr++);
+ if (utf) ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++);
#endif
Fecode++;
break;
@@ -2776,7 +2776,7 @@
if (mb->partial > 1) return PCRE2_ERROR_PARTIAL;
}
Feptr++;
- ACROSSCHAR(Feptr < mb->end_subject, *Feptr, Feptr++);
+ ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++);
}
break;
@@ -2789,7 +2789,7 @@
RRETURN(MATCH_NOMATCH);
}
Feptr++;
- ACROSSCHAR(Feptr < mb->end_subject, *Feptr, Feptr++);
+ ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++);
}
break;
@@ -2943,7 +2943,7 @@
if (cc < 128 && (mb->ctypes[cc] & ctype_space) != 0)
RRETURN(MATCH_NOMATCH);
Feptr++;
- ACROSSCHAR(Feptr < mb->end_subject, *Feptr, Feptr++);
+ ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++);
}
break;
@@ -2977,7 +2977,7 @@
if (cc < 128 && (mb->ctypes[cc] & ctype_word) != 0)
RRETURN(MATCH_NOMATCH);
Feptr++;
- ACROSSCHAR(Feptr < mb->end_subject, *Feptr, Feptr++);
+ ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++);
}
break;
@@ -4110,7 +4110,7 @@
if (mb->partial > 1) return PCRE2_ERROR_PARTIAL;
}
Feptr++;
- ACROSSCHAR(Feptr < mb->end_subject, *Feptr, Feptr++);
+ ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++);
}
break;
@@ -4125,7 +4125,7 @@
break;
}
Feptr++;
- ACROSSCHAR(Feptr < mb->end_subject, *Feptr, Feptr++);
+ ACROSSCHAR(Feptr < mb->end_subject, Feptr, Feptr++);
}
}
else
@@ -6378,7 +6378,7 @@
while (t < end_subject && !IS_NEWLINE(t))
{
t++;
- ACROSSCHAR(t < end_subject, *t, t++);
+ ACROSSCHAR(t < end_subject, t, t++);
}
}
else
@@ -6489,8 +6489,7 @@
while (start_match < end_subject && !WAS_NEWLINE(start_match))
{
start_match++;
- ACROSSCHAR(start_match < end_subject, *start_match,
- start_match++);
+ ACROSSCHAR(start_match < end_subject, start_match, start_match++);
}
}
else
@@ -6709,7 +6708,7 @@
new_start_match = start_match + 1;
#ifdef SUPPORT_UNICODE
if (utf)
- ACROSSCHAR(new_start_match < end_subject, *new_start_match,
+ ACROSSCHAR(new_start_match < end_subject, new_start_match,
new_start_match++);
#endif
break;