summaryrefslogtreecommitdiff
path: root/pcre_newline.c
diff options
context:
space:
mode:
authorzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-12-03 07:58:30 +0000
committerzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-12-03 07:58:30 +0000
commitad1a6e3a96050e61e6e2127d3a00ded77a1eb80c (patch)
tree4987dde0d6b3aee6401d3e89ce6ddc3acef49df3 /pcre_newline.c
parentc9fa02b130f1a9da7b17b915e75248f19afb6d7a (diff)
downloadpcre-ad1a6e3a96050e61e6e2127d3a00ded77a1eb80c.tar.gz
renaming utf8 to utf, JIT compiler update, disallowing invalid utf chars
git-svn-id: svn://vcs.exim.org/pcre/code/branches/pcre16@781 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_newline.c')
-rw-r--r--pcre_newline.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/pcre_newline.c b/pcre_newline.c
index 92b81d1..0c2ddcd 100644
--- a/pcre_newline.c
+++ b/pcre_newline.c
@@ -67,17 +67,17 @@ Arguments:
type the newline type
endptr pointer to the end of the string
lenptr where to return the length
- utf8 TRUE if in utf8 mode
+ utf TRUE if in utf mode
Returns: TRUE or FALSE
*/
BOOL
PRIV(is_newline)(PCRE_PUCHAR ptr, int type, PCRE_PUCHAR endptr, int *lenptr,
- BOOL utf8)
+ BOOL utf)
{
int c;
-if (utf8) { GETCHAR(c, ptr); } else c = *ptr;
+if (utf) { GETCHAR(c, ptr); } else c = *ptr;
if (type == NLTYPE_ANYCRLF) switch(c)
{
@@ -96,7 +96,7 @@ else switch(c)
case 0x000c: *lenptr = 1; return TRUE; /* FF */
case 0x000d: *lenptr = (ptr < endptr - 1 && ptr[1] == 0x0a)? 2 : 1;
return TRUE; /* CR */
- case 0x0085: *lenptr = utf8? 2 : 1; return TRUE; /* NEL */
+ case 0x0085: *lenptr = utf? 2 : 1; return TRUE; /* NEL */
case 0x2028: /* LS */
case 0x2029: *lenptr = 3; return TRUE; /* PS */
default: return FALSE;
@@ -117,19 +117,19 @@ Arguments:
type the newline type
startptr pointer to the start of the string
lenptr where to return the length
- utf8 TRUE if in utf8 mode
+ utf TRUE if in utf mode
Returns: TRUE or FALSE
*/
BOOL
PRIV(was_newline)(PCRE_PUCHAR ptr, int type, PCRE_PUCHAR startptr, int *lenptr,
- BOOL utf8)
+ BOOL utf)
{
int c;
ptr--;
#ifdef SUPPORT_UTF8
-if (utf8)
+if (utf)
{
BACKCHAR(ptr);
GETCHAR(c, ptr);
@@ -154,7 +154,7 @@ else switch(c)
case 0x000b: /* VT */
case 0x000c: /* FF */
case 0x000d: *lenptr = 1; return TRUE; /* CR */
- case 0x0085: *lenptr = utf8? 2 : 1; return TRUE; /* NEL */
+ case 0x0085: *lenptr = utf? 2 : 1; return TRUE; /* NEL */
case 0x2028: /* LS */
case 0x2029: *lenptr = 3; return TRUE; /* PS */
default: return FALSE;