| 3 |
*************************************************/ |
*************************************************/ |
| 4 |
|
|
| 5 |
/* PCRE is a library of functions to support regular expressions whose syntax |
/* PCRE is a library of functions to support regular expressions whose syntax |
| 6 |
and semantics are as close as possible to those of the Perl 5 language. |
and semantics are as close as possible to those of the Perl 5 language (but see |
| 7 |
|
below for why this module is different). |
| 8 |
|
|
| 9 |
Written by Philip Hazel |
Written by Philip Hazel |
| 10 |
Copyright (c) 1997-2007 University of Cambridge |
Copyright (c) 1997-2009 University of Cambridge |
| 11 |
|
|
| 12 |
----------------------------------------------------------------------------- |
----------------------------------------------------------------------------- |
| 13 |
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
| 46 |
|
|
| 47 |
|
|
| 48 |
#ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
| 49 |
#include <config.h> |
#include "config.h" |
| 50 |
#endif |
#endif |
| 51 |
|
|
| 52 |
#define NLBLOCK md /* Block containing newline information */ |
#define NLBLOCK md /* Block containing newline information */ |
| 61 |
#define SP " " |
#define SP " " |
| 62 |
|
|
| 63 |
|
|
|
|
|
| 64 |
/************************************************* |
/************************************************* |
| 65 |
* Code parameters and static tables * |
* Code parameters and static tables * |
| 66 |
*************************************************/ |
*************************************************/ |
| 84 |
small value. ***NOTE*** If the start of this table is modified, the two tables |
small value. ***NOTE*** If the start of this table is modified, the two tables |
| 85 |
that follow must also be modified. */ |
that follow must also be modified. */ |
| 86 |
|
|
| 87 |
static uschar coptable[] = { |
static const uschar coptable[] = { |
| 88 |
0, /* End */ |
0, /* End */ |
| 89 |
0, 0, 0, 0, 0, /* \A, \G, \K, \B, \b */ |
0, 0, 0, 0, 0, /* \A, \G, \K, \B, \b */ |
| 90 |
0, 0, 0, 0, 0, 0, /* \D, \d, \S, \s, \W, \w */ |
0, 0, 0, 0, 0, 0, /* \D, \d, \S, \s, \W, \w */ |
| 91 |
0, 0, /* Any, Anybyte */ |
0, 0, 0, /* Any, AllAny, Anybyte */ |
| 92 |
0, 0, 0, /* NOTPROP, PROP, EXTUNI */ |
0, 0, 0, /* NOTPROP, PROP, EXTUNI */ |
| 93 |
0, 0, 0, 0, 0, /* \R, \H, \h, \V, \v */ |
0, 0, 0, 0, 0, /* \R, \H, \h, \V, \v */ |
| 94 |
0, 0, 0, 0, 0, /* \Z, \z, Opt, ^, $ */ |
0, 0, 0, 0, 0, /* \Z, \z, Opt, ^, $ */ |
| 132 |
0, /* DEF */ |
0, /* DEF */ |
| 133 |
0, 0, /* BRAZERO, BRAMINZERO */ |
0, 0, /* BRAZERO, BRAMINZERO */ |
| 134 |
0, 0, 0, 0, /* PRUNE, SKIP, THEN, COMMIT */ |
0, 0, 0, 0, /* PRUNE, SKIP, THEN, COMMIT */ |
| 135 |
0, 0 /* FAIL, ACCEPT */ |
0, 0, 0 /* FAIL, ACCEPT, SKIPZERO */ |
| 136 |
}; |
}; |
| 137 |
|
|
| 138 |
/* These 2 tables allow for compact code for testing for \D, \d, \S, \s, \W, |
/* These 2 tables allow for compact code for testing for \D, \d, \S, \s, \W, |
| 139 |
and \w */ |
and \w */ |
| 140 |
|
|
| 141 |
static uschar toptable1[] = { |
static const uschar toptable1[] = { |
| 142 |
0, 0, 0, 0, 0, 0, |
0, 0, 0, 0, 0, 0, |
| 143 |
ctype_digit, ctype_digit, |
ctype_digit, ctype_digit, |
| 144 |
ctype_space, ctype_space, |
ctype_space, ctype_space, |
| 145 |
ctype_word, ctype_word, |
ctype_word, ctype_word, |
| 146 |
0 /* OP_ANY */ |
0, 0 /* OP_ANY, OP_ALLANY */ |
| 147 |
}; |
}; |
| 148 |
|
|
| 149 |
static uschar toptable2[] = { |
static const uschar toptable2[] = { |
| 150 |
0, 0, 0, 0, 0, 0, |
0, 0, 0, 0, 0, 0, |
| 151 |
ctype_digit, 0, |
ctype_digit, 0, |
| 152 |
ctype_space, 0, |
ctype_space, 0, |
| 153 |
ctype_word, 0, |
ctype_word, 0, |
| 154 |
1 /* OP_ANY */ |
1, 1 /* OP_ANY, OP_ALLANY */ |
| 155 |
}; |
}; |
| 156 |
|
|
| 157 |
|
|
| 223 |
rlevel function call recursion level |
rlevel function call recursion level |
| 224 |
recursing regex recursive call level |
recursing regex recursive call level |
| 225 |
|
|
| 226 |
Returns: > 0 => |
Returns: > 0 => number of match offset pairs placed in offsets |
| 227 |
= 0 => |
= 0 => offsets overflowed; longest matches are present |
| 228 |
-1 => failed to match |
-1 => failed to match |
| 229 |
< -1 => some kind of unexpected problem |
< -1 => some kind of unexpected problem |
| 230 |
|
|
| 511 |
stateblock *current_state = active_states + i; |
stateblock *current_state = active_states + i; |
| 512 |
const uschar *code; |
const uschar *code; |
| 513 |
int state_offset = current_state->offset; |
int state_offset = current_state->offset; |
| 514 |
int count, codevalue; |
int count, codevalue, rrc; |
|
#ifdef SUPPORT_UCP |
|
|
int chartype, script; |
|
|
#endif |
|
| 515 |
|
|
| 516 |
#ifdef DEBUG |
#ifdef DEBUG |
| 517 |
printf ("%.*sProcessing state %d c=", rlevel*2-2, SP, state_offset); |
printf ("%.*sProcessing state %d c=", rlevel*2-2, SP, state_offset); |
| 691 |
break; |
break; |
| 692 |
|
|
| 693 |
/*-----------------------------------------------------------------*/ |
/*-----------------------------------------------------------------*/ |
| 694 |
|
case OP_SKIPZERO: |
| 695 |
|
code += 1 + GET(code, 2); |
| 696 |
|
while (*code == OP_ALT) code += GET(code, 1); |
| 697 |
|
ADD_ACTIVE(code - start_code + 1 + LINK_SIZE, 0); |
| 698 |
|
break; |
| 699 |
|
|
| 700 |
|
/*-----------------------------------------------------------------*/ |
| 701 |
case OP_CIRC: |
case OP_CIRC: |
| 702 |
if ((ptr == start_subject && (md->moptions & PCRE_NOTBOL) == 0) || |
if ((ptr == start_subject && (md->moptions & PCRE_NOTBOL) == 0) || |
| 703 |
((ims & PCRE_MULTILINE) != 0 && |
((ims & PCRE_MULTILINE) != 0 && |
| 736 |
|
|
| 737 |
/*-----------------------------------------------------------------*/ |
/*-----------------------------------------------------------------*/ |
| 738 |
case OP_ANY: |
case OP_ANY: |
| 739 |
if (clen > 0 && ((ims & PCRE_DOTALL) != 0 || !IS_NEWLINE(ptr))) |
if (clen > 0 && !IS_NEWLINE(ptr)) |
| 740 |
|
{ ADD_NEW(state_offset + 1, 0); } |
| 741 |
|
break; |
| 742 |
|
|
| 743 |
|
/*-----------------------------------------------------------------*/ |
| 744 |
|
case OP_ALLANY: |
| 745 |
|
if (clen > 0) |
| 746 |
{ ADD_NEW(state_offset + 1, 0); } |
{ ADD_NEW(state_offset + 1, 0); } |
| 747 |
break; |
break; |
| 748 |
|
|
| 757 |
if ((md->moptions & PCRE_NOTEOL) == 0) |
if ((md->moptions & PCRE_NOTEOL) == 0) |
| 758 |
{ |
{ |
| 759 |
if (clen == 0 || |
if (clen == 0 || |
| 760 |
(IS_NEWLINE(ptr) && |
((md->poptions & PCRE_DOLLAR_ENDONLY) == 0 && IS_NEWLINE(ptr) && |
| 761 |
((ims & PCRE_MULTILINE) != 0 || ptr == end_subject - md->nllen) |
((ims & PCRE_MULTILINE) != 0 || ptr == end_subject - md->nllen) |
| 762 |
)) |
)) |
| 763 |
{ ADD_ACTIVE(state_offset + 1, 0); } |
{ ADD_ACTIVE(state_offset + 1, 0); } |
| 822 |
if (clen > 0) |
if (clen > 0) |
| 823 |
{ |
{ |
| 824 |
BOOL OK; |
BOOL OK; |
| 825 |
int category = _pcre_ucp_findprop(c, &chartype, &script); |
const ucd_record * prop = GET_UCD(c); |
| 826 |
switch(code[1]) |
switch(code[1]) |
| 827 |
{ |
{ |
| 828 |
case PT_ANY: |
case PT_ANY: |
| 830 |
break; |
break; |
| 831 |
|
|
| 832 |
case PT_LAMP: |
case PT_LAMP: |
| 833 |
OK = chartype == ucp_Lu || chartype == ucp_Ll || chartype == ucp_Lt; |
OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || prop->chartype == ucp_Lt; |
| 834 |
break; |
break; |
| 835 |
|
|
| 836 |
case PT_GC: |
case PT_GC: |
| 837 |
OK = category == code[2]; |
OK = _pcre_ucp_gentype[prop->chartype] == code[2]; |
| 838 |
break; |
break; |
| 839 |
|
|
| 840 |
case PT_PC: |
case PT_PC: |
| 841 |
OK = chartype == code[2]; |
OK = prop->chartype == code[2]; |
| 842 |
break; |
break; |
| 843 |
|
|
| 844 |
case PT_SC: |
case PT_SC: |
| 845 |
OK = script == code[2]; |
OK = prop->script == code[2]; |
| 846 |
break; |
break; |
| 847 |
|
|
| 848 |
/* Should never occur, but keep compilers from grumbling. */ |
/* Should never occur, but keep compilers from grumbling. */ |
| 862 |
/* ========================================================================== */ |
/* ========================================================================== */ |
| 863 |
/* These opcodes likewise inspect the subject character, but have an |
/* These opcodes likewise inspect the subject character, but have an |
| 864 |
argument that is not a data character. It is one of these opcodes: |
argument that is not a data character. It is one of these opcodes: |
| 865 |
OP_ANY, OP_DIGIT, OP_NOT_DIGIT, OP_WHITESPACE, OP_NOT_SPACE, OP_WORDCHAR, |
OP_ANY, OP_ALLANY, OP_DIGIT, OP_NOT_DIGIT, OP_WHITESPACE, OP_NOT_SPACE, |
| 866 |
OP_NOT_WORDCHAR. The value is loaded into d. */ |
OP_WORDCHAR, OP_NOT_WORDCHAR. The value is loaded into d. */ |
| 867 |
|
|
| 868 |
case OP_TYPEPLUS: |
case OP_TYPEPLUS: |
| 869 |
case OP_TYPEMINPLUS: |
case OP_TYPEMINPLUS: |
| 874 |
{ |
{ |
| 875 |
if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || |
if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || |
| 876 |
(c < 256 && |
(c < 256 && |
| 877 |
(d != OP_ANY || |
(d != OP_ANY || !IS_NEWLINE(ptr)) && |
|
(ims & PCRE_DOTALL) != 0 || |
|
|
!IS_NEWLINE(ptr) |
|
|
) && |
|
| 878 |
((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) |
((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) |
| 879 |
{ |
{ |
| 880 |
if (count > 0 && codevalue == OP_TYPEPOSPLUS) |
if (count > 0 && codevalue == OP_TYPEPOSPLUS) |
| 897 |
{ |
{ |
| 898 |
if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || |
if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || |
| 899 |
(c < 256 && |
(c < 256 && |
| 900 |
(d != OP_ANY || |
(d != OP_ANY || !IS_NEWLINE(ptr)) && |
|
(ims & PCRE_DOTALL) != 0 || |
|
|
!IS_NEWLINE(ptr) |
|
|
) && |
|
| 901 |
((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) |
((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) |
| 902 |
{ |
{ |
| 903 |
if (codevalue == OP_TYPEPOSQUERY) |
if (codevalue == OP_TYPEPOSQUERY) |
| 919 |
{ |
{ |
| 920 |
if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || |
if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || |
| 921 |
(c < 256 && |
(c < 256 && |
| 922 |
(d != OP_ANY || |
(d != OP_ANY || !IS_NEWLINE(ptr)) && |
|
(ims & PCRE_DOTALL) != 0 || |
|
|
!IS_NEWLINE(ptr) |
|
|
) && |
|
| 923 |
((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) |
((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) |
| 924 |
{ |
{ |
| 925 |
if (codevalue == OP_TYPEPOSSTAR) |
if (codevalue == OP_TYPEPOSSTAR) |
| 939 |
{ |
{ |
| 940 |
if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || |
if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || |
| 941 |
(c < 256 && |
(c < 256 && |
| 942 |
(d != OP_ANY || |
(d != OP_ANY || !IS_NEWLINE(ptr)) && |
|
(ims & PCRE_DOTALL) != 0 || |
|
|
!IS_NEWLINE(ptr) |
|
|
) && |
|
| 943 |
((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) |
((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) |
| 944 |
{ |
{ |
| 945 |
if (++count >= GET2(code, 1)) |
if (++count >= GET2(code, 1)) |
| 960 |
{ |
{ |
| 961 |
if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || |
if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || |
| 962 |
(c < 256 && |
(c < 256 && |
| 963 |
(d != OP_ANY || |
(d != OP_ANY || !IS_NEWLINE(ptr)) && |
|
(ims & PCRE_DOTALL) != 0 || |
|
|
!IS_NEWLINE(ptr) |
|
|
) && |
|
| 964 |
((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) |
((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) |
| 965 |
{ |
{ |
| 966 |
if (codevalue == OP_TYPEPOSUPTO) |
if (codevalue == OP_TYPEPOSUPTO) |
| 991 |
if (clen > 0) |
if (clen > 0) |
| 992 |
{ |
{ |
| 993 |
BOOL OK; |
BOOL OK; |
| 994 |
int category = _pcre_ucp_findprop(c, &chartype, &script); |
const ucd_record * prop = GET_UCD(c); |
| 995 |
switch(code[2]) |
switch(code[2]) |
| 996 |
{ |
{ |
| 997 |
case PT_ANY: |
case PT_ANY: |
| 999 |
break; |
break; |
| 1000 |
|
|
| 1001 |
case PT_LAMP: |
case PT_LAMP: |
| 1002 |
OK = chartype == ucp_Lu || chartype == ucp_Ll || chartype == ucp_Lt; |
OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || prop->chartype == ucp_Lt; |
| 1003 |
break; |
break; |
| 1004 |
|
|
| 1005 |
case PT_GC: |
case PT_GC: |
| 1006 |
OK = category == code[3]; |
OK = _pcre_ucp_gentype[prop->chartype] == code[3]; |
| 1007 |
break; |
break; |
| 1008 |
|
|
| 1009 |
case PT_PC: |
case PT_PC: |
| 1010 |
OK = chartype == code[3]; |
OK = prop->chartype == code[3]; |
| 1011 |
break; |
break; |
| 1012 |
|
|
| 1013 |
case PT_SC: |
case PT_SC: |
| 1014 |
OK = script == code[3]; |
OK = prop->script == code[3]; |
| 1015 |
break; |
break; |
| 1016 |
|
|
| 1017 |
/* Should never occur, but keep compilers from grumbling. */ |
/* Should never occur, but keep compilers from grumbling. */ |
| 1040 |
case OP_EXTUNI_EXTRA + OP_TYPEPOSPLUS: |
case OP_EXTUNI_EXTRA + OP_TYPEPOSPLUS: |
| 1041 |
count = current_state->count; /* Already matched */ |
count = current_state->count; /* Already matched */ |
| 1042 |
if (count > 0) { ADD_ACTIVE(state_offset + 2, 0); } |
if (count > 0) { ADD_ACTIVE(state_offset + 2, 0); } |
| 1043 |
if (clen > 0 && _pcre_ucp_findprop(c, &chartype, &script) != ucp_M) |
if (clen > 0 && UCD_CATEGORY(c) != ucp_M) |
| 1044 |
{ |
{ |
| 1045 |
const uschar *nptr = ptr + clen; |
const uschar *nptr = ptr + clen; |
| 1046 |
int ncount = 0; |
int ncount = 0; |
| 1054 |
int nd; |
int nd; |
| 1055 |
int ndlen = 1; |
int ndlen = 1; |
| 1056 |
GETCHARLEN(nd, nptr, ndlen); |
GETCHARLEN(nd, nptr, ndlen); |
| 1057 |
if (_pcre_ucp_findprop(nd, &chartype, &script) != ucp_M) break; |
if (UCD_CATEGORY(nd) != ucp_M) break; |
| 1058 |
ncount++; |
ncount++; |
| 1059 |
nptr += ndlen; |
nptr += ndlen; |
| 1060 |
} |
} |
| 1213 |
if (clen > 0) |
if (clen > 0) |
| 1214 |
{ |
{ |
| 1215 |
BOOL OK; |
BOOL OK; |
| 1216 |
int category = _pcre_ucp_findprop(c, &chartype, &script); |
const ucd_record * prop = GET_UCD(c); |
| 1217 |
switch(code[2]) |
switch(code[2]) |
| 1218 |
{ |
{ |
| 1219 |
case PT_ANY: |
case PT_ANY: |
| 1221 |
break; |
break; |
| 1222 |
|
|
| 1223 |
case PT_LAMP: |
case PT_LAMP: |
| 1224 |
OK = chartype == ucp_Lu || chartype == ucp_Ll || chartype == ucp_Lt; |
OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || prop->chartype == ucp_Lt; |
| 1225 |
break; |
break; |
| 1226 |
|
|
| 1227 |
case PT_GC: |
case PT_GC: |
| 1228 |
OK = category == code[3]; |
OK = _pcre_ucp_gentype[prop->chartype] == code[3]; |
| 1229 |
break; |
break; |
| 1230 |
|
|
| 1231 |
case PT_PC: |
case PT_PC: |
| 1232 |
OK = chartype == code[3]; |
OK = prop->chartype == code[3]; |
| 1233 |
break; |
break; |
| 1234 |
|
|
| 1235 |
case PT_SC: |
case PT_SC: |
| 1236 |
OK = script == code[3]; |
OK = prop->script == code[3]; |
| 1237 |
break; |
break; |
| 1238 |
|
|
| 1239 |
/* Should never occur, but keep compilers from grumbling. */ |
/* Should never occur, but keep compilers from grumbling. */ |
| 1271 |
QS2: |
QS2: |
| 1272 |
|
|
| 1273 |
ADD_ACTIVE(state_offset + 2, 0); |
ADD_ACTIVE(state_offset + 2, 0); |
| 1274 |
if (clen > 0 && _pcre_ucp_findprop(c, &chartype, &script) != ucp_M) |
if (clen > 0 && UCD_CATEGORY(c) != ucp_M) |
| 1275 |
{ |
{ |
| 1276 |
const uschar *nptr = ptr + clen; |
const uschar *nptr = ptr + clen; |
| 1277 |
int ncount = 0; |
int ncount = 0; |
| 1286 |
int nd; |
int nd; |
| 1287 |
int ndlen = 1; |
int ndlen = 1; |
| 1288 |
GETCHARLEN(nd, nptr, ndlen); |
GETCHARLEN(nd, nptr, ndlen); |
| 1289 |
if (_pcre_ucp_findprop(nd, &chartype, &script) != ucp_M) break; |
if (UCD_CATEGORY(nd) != ucp_M) break; |
| 1290 |
ncount++; |
ncount++; |
| 1291 |
nptr += ndlen; |
nptr += ndlen; |
| 1292 |
} |
} |
| 1460 |
if (clen > 0) |
if (clen > 0) |
| 1461 |
{ |
{ |
| 1462 |
BOOL OK; |
BOOL OK; |
| 1463 |
int category = _pcre_ucp_findprop(c, &chartype, &script); |
const ucd_record * prop = GET_UCD(c); |
| 1464 |
switch(code[4]) |
switch(code[4]) |
| 1465 |
{ |
{ |
| 1466 |
case PT_ANY: |
case PT_ANY: |
| 1468 |
break; |
break; |
| 1469 |
|
|
| 1470 |
case PT_LAMP: |
case PT_LAMP: |
| 1471 |
OK = chartype == ucp_Lu || chartype == ucp_Ll || chartype == ucp_Lt; |
OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || prop->chartype == ucp_Lt; |
| 1472 |
break; |
break; |
| 1473 |
|
|
| 1474 |
case PT_GC: |
case PT_GC: |
| 1475 |
OK = category == code[5]; |
OK = _pcre_ucp_gentype[prop->chartype] == code[5]; |
| 1476 |
break; |
break; |
| 1477 |
|
|
| 1478 |
case PT_PC: |
case PT_PC: |
| 1479 |
OK = chartype == code[5]; |
OK = prop->chartype == code[5]; |
| 1480 |
break; |
break; |
| 1481 |
|
|
| 1482 |
case PT_SC: |
case PT_SC: |
| 1483 |
OK = script == code[5]; |
OK = prop->script == code[5]; |
| 1484 |
break; |
break; |
| 1485 |
|
|
| 1486 |
/* Should never occur, but keep compilers from grumbling. */ |
/* Should never occur, but keep compilers from grumbling. */ |
| 1513 |
if (codevalue != OP_EXTUNI_EXTRA + OP_TYPEEXACT) |
if (codevalue != OP_EXTUNI_EXTRA + OP_TYPEEXACT) |
| 1514 |
{ ADD_ACTIVE(state_offset + 4, 0); } |
{ ADD_ACTIVE(state_offset + 4, 0); } |
| 1515 |
count = current_state->count; /* Number already matched */ |
count = current_state->count; /* Number already matched */ |
| 1516 |
if (clen > 0 && _pcre_ucp_findprop(c, &chartype, &script) != ucp_M) |
if (clen > 0 && UCD_CATEGORY(c) != ucp_M) |
| 1517 |
{ |
{ |
| 1518 |
const uschar *nptr = ptr + clen; |
const uschar *nptr = ptr + clen; |
| 1519 |
int ncount = 0; |
int ncount = 0; |
| 1527 |
int nd; |
int nd; |
| 1528 |
int ndlen = 1; |
int ndlen = 1; |
| 1529 |
GETCHARLEN(nd, nptr, ndlen); |
GETCHARLEN(nd, nptr, ndlen); |
| 1530 |
if (_pcre_ucp_findprop(nd, &chartype, &script) != ucp_M) break; |
if (UCD_CATEGORY(nd) != ucp_M) break; |
| 1531 |
ncount++; |
ncount++; |
| 1532 |
nptr += ndlen; |
nptr += ndlen; |
| 1533 |
} |
} |
| 1707 |
other case of the character. */ |
other case of the character. */ |
| 1708 |
|
|
| 1709 |
#ifdef SUPPORT_UCP |
#ifdef SUPPORT_UCP |
| 1710 |
othercase = _pcre_ucp_othercase(c); |
othercase = UCD_OTHERCASE(c); |
| 1711 |
#else |
#else |
| 1712 |
othercase = NOTACHAR; |
othercase = NOTACHAR; |
| 1713 |
#endif |
#endif |
| 1732 |
to wait for them to pass before continuing. */ |
to wait for them to pass before continuing. */ |
| 1733 |
|
|
| 1734 |
case OP_EXTUNI: |
case OP_EXTUNI: |
| 1735 |
if (clen > 0 && _pcre_ucp_findprop(c, &chartype, &script) != ucp_M) |
if (clen > 0 && UCD_CATEGORY(c) != ucp_M) |
| 1736 |
{ |
{ |
| 1737 |
const uschar *nptr = ptr + clen; |
const uschar *nptr = ptr + clen; |
| 1738 |
int ncount = 0; |
int ncount = 0; |
| 1740 |
{ |
{ |
| 1741 |
int nclen = 1; |
int nclen = 1; |
| 1742 |
GETCHARLEN(c, nptr, nclen); |
GETCHARLEN(c, nptr, nclen); |
| 1743 |
if (_pcre_ucp_findprop(c, &chartype, &script) != ucp_M) break; |
if (UCD_CATEGORY(c) != ucp_M) break; |
| 1744 |
ncount++; |
ncount++; |
| 1745 |
nptr += nclen; |
nptr += nclen; |
| 1746 |
} |
} |
| 1908 |
if (utf8 && d >= 128) |
if (utf8 && d >= 128) |
| 1909 |
{ |
{ |
| 1910 |
#ifdef SUPPORT_UCP |
#ifdef SUPPORT_UCP |
| 1911 |
otherd = _pcre_ucp_othercase(d); |
otherd = UCD_OTHERCASE(d); |
| 1912 |
#endif /* SUPPORT_UCP */ |
#endif /* SUPPORT_UCP */ |
| 1913 |
} |
} |
| 1914 |
else |
else |
| 1946 |
if (utf8 && d >= 128) |
if (utf8 && d >= 128) |
| 1947 |
{ |
{ |
| 1948 |
#ifdef SUPPORT_UCP |
#ifdef SUPPORT_UCP |
| 1949 |
otherd = _pcre_ucp_othercase(d); |
otherd = UCD_OTHERCASE(d); |
| 1950 |
#endif /* SUPPORT_UCP */ |
#endif /* SUPPORT_UCP */ |
| 1951 |
} |
} |
| 1952 |
else |
else |
| 1982 |
if (utf8 && d >= 128) |
if (utf8 && d >= 128) |
| 1983 |
{ |
{ |
| 1984 |
#ifdef SUPPORT_UCP |
#ifdef SUPPORT_UCP |
| 1985 |
otherd = _pcre_ucp_othercase(d); |
otherd = UCD_OTHERCASE(d); |
| 1986 |
#endif /* SUPPORT_UCP */ |
#endif /* SUPPORT_UCP */ |
| 1987 |
} |
} |
| 1988 |
else |
else |
| 2014 |
if (utf8 && d >= 128) |
if (utf8 && d >= 128) |
| 2015 |
{ |
{ |
| 2016 |
#ifdef SUPPORT_UCP |
#ifdef SUPPORT_UCP |
| 2017 |
otherd = _pcre_ucp_othercase(d); |
otherd = UCD_OTHERCASE(d); |
| 2018 |
#endif /* SUPPORT_UCP */ |
#endif /* SUPPORT_UCP */ |
| 2019 |
} |
} |
| 2020 |
else |
else |
| 2049 |
if (utf8 && d >= 128) |
if (utf8 && d >= 128) |
| 2050 |
{ |
{ |
| 2051 |
#ifdef SUPPORT_UCP |
#ifdef SUPPORT_UCP |
| 2052 |
otherd = _pcre_ucp_othercase(d); |
otherd = UCD_OTHERCASE(d); |
| 2053 |
#endif /* SUPPORT_UCP */ |
#endif /* SUPPORT_UCP */ |
| 2054 |
} |
} |
| 2055 |
else |
else |
| 2157 |
|
|
| 2158 |
/* ========================================================================== */ |
/* ========================================================================== */ |
| 2159 |
/* These are the opcodes for fancy brackets of various kinds. We have |
/* These are the opcodes for fancy brackets of various kinds. We have |
| 2160 |
to use recursion in order to handle them. */ |
to use recursion in order to handle them. The "always failing" assertion |
| 2161 |
|
(?!) is optimised to OP_FAIL when compiling, so we have to support that, |
| 2162 |
|
though the other "backtracking verbs" are not supported. */ |
| 2163 |
|
|
| 2164 |
|
case OP_FAIL: |
| 2165 |
|
break; |
| 2166 |
|
|
| 2167 |
case OP_ASSERT: |
case OP_ASSERT: |
| 2168 |
case OP_ASSERT_NOT: |
case OP_ASSERT_NOT: |
| 2200 |
{ |
{ |
| 2201 |
int local_offsets[1000]; |
int local_offsets[1000]; |
| 2202 |
int local_workspace[1000]; |
int local_workspace[1000]; |
| 2203 |
int condcode = code[LINK_SIZE+1]; |
int codelink = GET(code, 1); |
| 2204 |
|
int condcode; |
| 2205 |
|
|
| 2206 |
|
/* Because of the way auto-callout works during compile, a callout item |
| 2207 |
|
is inserted between OP_COND and an assertion condition. This does not |
| 2208 |
|
happen for the other conditions. */ |
| 2209 |
|
|
| 2210 |
|
if (code[LINK_SIZE+1] == OP_CALLOUT) |
| 2211 |
|
{ |
| 2212 |
|
rrc = 0; |
| 2213 |
|
if (pcre_callout != NULL) |
| 2214 |
|
{ |
| 2215 |
|
pcre_callout_block cb; |
| 2216 |
|
cb.version = 1; /* Version 1 of the callout block */ |
| 2217 |
|
cb.callout_number = code[LINK_SIZE+2]; |
| 2218 |
|
cb.offset_vector = offsets; |
| 2219 |
|
cb.subject = (PCRE_SPTR)start_subject; |
| 2220 |
|
cb.subject_length = end_subject - start_subject; |
| 2221 |
|
cb.start_match = current_subject - start_subject; |
| 2222 |
|
cb.current_position = ptr - start_subject; |
| 2223 |
|
cb.pattern_position = GET(code, LINK_SIZE + 3); |
| 2224 |
|
cb.next_item_length = GET(code, 3 + 2*LINK_SIZE); |
| 2225 |
|
cb.capture_top = 1; |
| 2226 |
|
cb.capture_last = -1; |
| 2227 |
|
cb.callout_data = md->callout_data; |
| 2228 |
|
if ((rrc = (*pcre_callout)(&cb)) < 0) return rrc; /* Abandon */ |
| 2229 |
|
} |
| 2230 |
|
if (rrc > 0) break; /* Fail this thread */ |
| 2231 |
|
code += _pcre_OP_lengths[OP_CALLOUT]; /* Skip callout data */ |
| 2232 |
|
} |
| 2233 |
|
|
| 2234 |
|
condcode = code[LINK_SIZE+1]; |
| 2235 |
|
|
| 2236 |
/* Back reference conditions are not supported */ |
/* Back reference conditions are not supported */ |
| 2237 |
|
|
| 2240 |
/* The DEFINE condition is always false */ |
/* The DEFINE condition is always false */ |
| 2241 |
|
|
| 2242 |
if (condcode == OP_DEF) |
if (condcode == OP_DEF) |
| 2243 |
{ |
{ ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); } |
|
ADD_ACTIVE(state_offset + GET(code, 1) + LINK_SIZE + 1, 0); |
|
|
} |
|
| 2244 |
|
|
| 2245 |
/* The only supported version of OP_RREF is for the value RREF_ANY, |
/* The only supported version of OP_RREF is for the value RREF_ANY, |
| 2246 |
which means "test if in any recursion". We can't test for specifically |
which means "test if in any recursion". We can't test for specifically |
| 2250 |
{ |
{ |
| 2251 |
int value = GET2(code, LINK_SIZE+2); |
int value = GET2(code, LINK_SIZE+2); |
| 2252 |
if (value != RREF_ANY) return PCRE_ERROR_DFA_UCOND; |
if (value != RREF_ANY) return PCRE_ERROR_DFA_UCOND; |
| 2253 |
if (recursing > 0) { ADD_ACTIVE(state_offset + LINK_SIZE + 4, 0); } |
if (recursing > 0) |
| 2254 |
else { ADD_ACTIVE(state_offset + GET(code, 1) + LINK_SIZE + 1, 0); } |
{ ADD_ACTIVE(state_offset + LINK_SIZE + 4, 0); } |
| 2255 |
|
else { ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); } |
| 2256 |
} |
} |
| 2257 |
|
|
| 2258 |
/* Otherwise, the condition is an assertion */ |
/* Otherwise, the condition is an assertion */ |
| 2282 |
(condcode == OP_ASSERT || condcode == OP_ASSERTBACK)) |
(condcode == OP_ASSERT || condcode == OP_ASSERTBACK)) |
| 2283 |
{ ADD_ACTIVE(endasscode + LINK_SIZE + 1 - start_code, 0); } |
{ ADD_ACTIVE(endasscode + LINK_SIZE + 1 - start_code, 0); } |
| 2284 |
else |
else |
| 2285 |
{ ADD_ACTIVE(state_offset + GET(code, 1) + LINK_SIZE + 1, 0); } |
{ ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); } |
| 2286 |
} |
} |
| 2287 |
} |
} |
| 2288 |
break; |
break; |
| 2434 |
/* Handle callouts */ |
/* Handle callouts */ |
| 2435 |
|
|
| 2436 |
case OP_CALLOUT: |
case OP_CALLOUT: |
| 2437 |
|
rrc = 0; |
| 2438 |
if (pcre_callout != NULL) |
if (pcre_callout != NULL) |
| 2439 |
{ |
{ |
|
int rrc; |
|
| 2440 |
pcre_callout_block cb; |
pcre_callout_block cb; |
| 2441 |
cb.version = 1; /* Version 1 of the callout block */ |
cb.version = 1; /* Version 1 of the callout block */ |
| 2442 |
cb.callout_number = code[1]; |
cb.callout_number = code[1]; |
| 2451 |
cb.capture_last = -1; |
cb.capture_last = -1; |
| 2452 |
cb.callout_data = md->callout_data; |
cb.callout_data = md->callout_data; |
| 2453 |
if ((rrc = (*pcre_callout)(&cb)) < 0) return rrc; /* Abandon */ |
if ((rrc = (*pcre_callout)(&cb)) < 0) return rrc; /* Abandon */ |
|
if (rrc == 0) { ADD_ACTIVE(state_offset + 2 + 2*LINK_SIZE, 0); } |
|
| 2454 |
} |
} |
| 2455 |
|
if (rrc == 0) |
| 2456 |
|
{ ADD_ACTIVE(state_offset + _pcre_OP_lengths[OP_CALLOUT], 0); } |
| 2457 |
break; |
break; |
| 2458 |
|
|
| 2459 |
|
|
| 2473 |
|
|
| 2474 |
if (new_count <= 0) |
if (new_count <= 0) |
| 2475 |
{ |
{ |
| 2476 |
if (match_count < 0 && /* No matches found */ |
if (rlevel == 1 && /* Top level, and */ |
| 2477 |
rlevel == 1 && /* Top level match function */ |
( /* either... */ |
| 2478 |
(md->moptions & PCRE_PARTIAL) != 0 && /* Want partial matching */ |
(md->moptions & PCRE_PARTIAL_HARD) != 0 /* Hard partial */ |
| 2479 |
ptr >= end_subject && /* Reached end of subject */ |
|| /* or... */ |
| 2480 |
ptr > current_subject) /* Matched non-empty string */ |
((md->moptions & PCRE_PARTIAL_SOFT) != 0 && /* Soft partial and */ |
| 2481 |
|
match_count < 0) /* no matches */ |
| 2482 |
|
) && /* And... */ |
| 2483 |
|
ptr >= end_subject && /* Reached end of subject */ |
| 2484 |
|
ptr > current_subject) /* Matched non-empty string */ |
| 2485 |
{ |
{ |
| 2486 |
if (offsetcount >= 2) |
if (offsetcount >= 2) |
| 2487 |
{ |
{ |
| 2540 |
< -1 => some kind of unexpected problem |
< -1 => some kind of unexpected problem |
| 2541 |
*/ |
*/ |
| 2542 |
|
|
| 2543 |
PCRE_EXP_DEFN int |
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION |
| 2544 |
pcre_dfa_exec(const pcre *argument_re, const pcre_extra *extra_data, |
pcre_dfa_exec(const pcre *argument_re, const pcre_extra *extra_data, |
| 2545 |
const char *subject, int length, int start_offset, int options, int *offsets, |
const char *subject, int length, int start_offset, int options, int *offsets, |
| 2546 |
int offsetcount, int *workspace, int wscount) |
int offsetcount, int *workspace, int wscount) |
| 2639 |
md->moptions |= re->options & (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE); |
md->moptions |= re->options & (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE); |
| 2640 |
#ifdef BSR_ANYCRLF |
#ifdef BSR_ANYCRLF |
| 2641 |
else md->moptions |= PCRE_BSR_ANYCRLF; |
else md->moptions |= PCRE_BSR_ANYCRLF; |
| 2642 |
#endif |
#endif |
| 2643 |
} |
} |
| 2644 |
|
|
| 2645 |
/* Handle different types of newline. The three bits give eight cases. If |
/* Handle different types of newline. The three bits give eight cases. If |
| 2646 |
nothing is set at run time, whatever was used at compile time applies. */ |
nothing is set at run time, whatever was used at compile time applies. */ |
| 2649 |
PCRE_NEWLINE_BITS) |
PCRE_NEWLINE_BITS) |
| 2650 |
{ |
{ |
| 2651 |
case 0: newline = NEWLINE; break; /* Compile-time default */ |
case 0: newline = NEWLINE; break; /* Compile-time default */ |
| 2652 |
case PCRE_NEWLINE_CR: newline = '\r'; break; |
case PCRE_NEWLINE_CR: newline = CHAR_CR; break; |
| 2653 |
case PCRE_NEWLINE_LF: newline = '\n'; break; |
case PCRE_NEWLINE_LF: newline = CHAR_NL; break; |
| 2654 |
case PCRE_NEWLINE_CR+ |
case PCRE_NEWLINE_CR+ |
| 2655 |
PCRE_NEWLINE_LF: newline = ('\r' << 8) | '\n'; break; |
PCRE_NEWLINE_LF: newline = (CHAR_CR << 8) | CHAR_NL; break; |
| 2656 |
case PCRE_NEWLINE_ANY: newline = -1; break; |
case PCRE_NEWLINE_ANY: newline = -1; break; |
| 2657 |
case PCRE_NEWLINE_ANYCRLF: newline = -2; break; |
case PCRE_NEWLINE_ANYCRLF: newline = -2; break; |
| 2658 |
default: return PCRE_ERROR_BADNEWLINE; |
default: return PCRE_ERROR_BADNEWLINE; |
| 2748 |
} |
} |
| 2749 |
|
|
| 2750 |
/* Call the main matching function, looping for a non-anchored regex after a |
/* Call the main matching function, looping for a non-anchored regex after a |
| 2751 |
failed match. Unless restarting, optimize by moving to the first match |
failed match. If not restarting, perform certain optimizations at the start of |
| 2752 |
character if possible, when not anchored. Then unless wanting a partial match, |
a match. */ |
|
check for a required later character. */ |
|
| 2753 |
|
|
| 2754 |
for (;;) |
for (;;) |
| 2755 |
{ |
{ |
| 2759 |
{ |
{ |
| 2760 |
const uschar *save_end_subject = end_subject; |
const uschar *save_end_subject = end_subject; |
| 2761 |
|
|
| 2762 |
/* Advance to a unique first char if possible. If firstline is TRUE, the |
/* If firstline is TRUE, the start of the match is constrained to the first |
| 2763 |
start of the match is constrained to the first line of a multiline string. |
line of a multiline string. Implement this by temporarily adjusting |
| 2764 |
Implement this by temporarily adjusting end_subject so that we stop |
end_subject so that we stop scanning at a newline. If the match fails at |
| 2765 |
scanning at a newline. If the match fails at the newline, later code breaks |
the newline, later code breaks this loop. */ |
|
this loop. */ |
|
| 2766 |
|
|
| 2767 |
if (firstline) |
if (firstline) |
| 2768 |
{ |
{ |
| 2769 |
const uschar *t = current_subject; |
USPTR t = current_subject; |
| 2770 |
|
#ifdef SUPPORT_UTF8 |
| 2771 |
|
if (utf8) |
| 2772 |
|
{ |
| 2773 |
|
while (t < md->end_subject && !IS_NEWLINE(t)) |
| 2774 |
|
{ |
| 2775 |
|
t++; |
| 2776 |
|
while (t < end_subject && (*t & 0xc0) == 0x80) t++; |
| 2777 |
|
} |
| 2778 |
|
} |
| 2779 |
|
else |
| 2780 |
|
#endif |
| 2781 |
while (t < md->end_subject && !IS_NEWLINE(t)) t++; |
while (t < md->end_subject && !IS_NEWLINE(t)) t++; |
| 2782 |
end_subject = t; |
end_subject = t; |
| 2783 |
} |
} |
| 2784 |
|
|
| 2785 |
if (first_byte >= 0) |
/* There are some optimizations that avoid running the match if a known |
| 2786 |
|
starting point is not found, or if a known later character is not present. |
| 2787 |
|
However, there is an option that disables these, for testing and for |
| 2788 |
|
ensuring that all callouts do actually occur. */ |
| 2789 |
|
|
| 2790 |
|
if ((options & PCRE_NO_START_OPTIMIZE) == 0) |
| 2791 |
{ |
{ |
|
if (first_byte_caseless) |
|
|
while (current_subject < end_subject && |
|
|
lcc[*current_subject] != first_byte) |
|
|
current_subject++; |
|
|
else |
|
|
while (current_subject < end_subject && *current_subject != first_byte) |
|
|
current_subject++; |
|
|
} |
|
| 2792 |
|
|
| 2793 |
/* Or to just after a linebreak for a multiline match if possible */ |
/* Advance to a known first byte. */ |
| 2794 |
|
|
| 2795 |
else if (startline) |
if (first_byte >= 0) |
|
{ |
|
|
if (current_subject > md->start_subject + start_offset) |
|
| 2796 |
{ |
{ |
| 2797 |
while (current_subject <= end_subject && !WAS_NEWLINE(current_subject)) |
if (first_byte_caseless) |
| 2798 |
current_subject++; |
while (current_subject < end_subject && |
| 2799 |
|
lcc[*current_subject] != first_byte) |
| 2800 |
|
current_subject++; |
| 2801 |
|
else |
| 2802 |
|
while (current_subject < end_subject && |
| 2803 |
|
*current_subject != first_byte) |
| 2804 |
|
current_subject++; |
| 2805 |
|
} |
| 2806 |
|
|
| 2807 |
|
/* Or to just after a linebreak for a multiline match if possible */ |
| 2808 |
|
|
| 2809 |
/* If we have just passed a CR and the newline option is ANY or |
else if (startline) |
| 2810 |
ANYCRLF, and we are now at a LF, advance the match position by one more |
{ |
| 2811 |
character. */ |
if (current_subject > md->start_subject + start_offset) |
| 2812 |
|
{ |
| 2813 |
if (current_subject[-1] == '\r' && |
#ifdef SUPPORT_UTF8 |
| 2814 |
(md->nltype == NLTYPE_ANY || md->nltype == NLTYPE_ANYCRLF) && |
if (utf8) |
| 2815 |
current_subject < end_subject && |
{ |
| 2816 |
*current_subject == '\n') |
while (current_subject < end_subject && |
| 2817 |
current_subject++; |
!WAS_NEWLINE(current_subject)) |
| 2818 |
|
{ |
| 2819 |
|
current_subject++; |
| 2820 |
|
while(current_subject < end_subject && |
| 2821 |
|
(*current_subject & 0xc0) == 0x80) |
| 2822 |
|
current_subject++; |
| 2823 |
|
} |
| 2824 |
|
} |
| 2825 |
|
else |
| 2826 |
|
#endif |
| 2827 |
|
while (current_subject < end_subject && !WAS_NEWLINE(current_subject)) |
| 2828 |
|
current_subject++; |
| 2829 |
|
|
| 2830 |
|
/* If we have just passed a CR and the newline option is ANY or |
| 2831 |
|
ANYCRLF, and we are now at a LF, advance the match position by one |
| 2832 |
|
more character. */ |
| 2833 |
|
|
| 2834 |
|
if (current_subject[-1] == CHAR_CR && |
| 2835 |
|
(md->nltype == NLTYPE_ANY || md->nltype == NLTYPE_ANYCRLF) && |
| 2836 |
|
current_subject < end_subject && |
| 2837 |
|
*current_subject == CHAR_NL) |
| 2838 |
|
current_subject++; |
| 2839 |
|
} |
| 2840 |
} |
} |
|
} |
|
| 2841 |
|
|
| 2842 |
/* Or to a non-unique first char after study */ |
/* Or to a non-unique first char after study */ |
| 2843 |
|
|
| 2844 |
else if (start_bits != NULL) |
else if (start_bits != NULL) |
|
{ |
|
|
while (current_subject < end_subject) |
|
| 2845 |
{ |
{ |
| 2846 |
register unsigned int c = *current_subject; |
while (current_subject < end_subject) |
| 2847 |
if ((start_bits[c/8] & (1 << (c&7))) == 0) current_subject++; |
{ |
| 2848 |
else break; |
register unsigned int c = *current_subject; |
| 2849 |
|
if ((start_bits[c/8] & (1 << (c&7))) == 0) current_subject++; |
| 2850 |
|
else break; |
| 2851 |
|
} |
| 2852 |
} |
} |
| 2853 |
} |
} |
| 2854 |
|
|
| 2870 |
showed up when somebody was matching /^C/ on a 32-megabyte string... so we |
showed up when somebody was matching /^C/ on a 32-megabyte string... so we |
| 2871 |
don't do this when the string is sufficiently long. |
don't do this when the string is sufficiently long. |
| 2872 |
|
|
| 2873 |
ALSO: this processing is disabled when partial matching is requested. |
ALSO: this processing is disabled when partial matching is requested, and can |
| 2874 |
*/ |
also be explicitly deactivated. */ |
| 2875 |
|
|
| 2876 |
if (req_byte >= 0 && |
if ((options & PCRE_NO_START_OPTIMIZE) == 0 && |
| 2877 |
|
req_byte >= 0 && |
| 2878 |
end_subject - current_subject < REQ_BYTE_MAX && |
end_subject - current_subject < REQ_BYTE_MAX && |
| 2879 |
(options & PCRE_PARTIAL) == 0) |
(options & PCRE_PARTIAL) == 0) |
| 2880 |
{ |
{ |
| 2950 |
not contain any explicit matches for \r or \n, and the newline option is CRLF |
not contain any explicit matches for \r or \n, and the newline option is CRLF |
| 2951 |
or ANY or ANYCRLF, advance the match position by one more character. */ |
or ANY or ANYCRLF, advance the match position by one more character. */ |
| 2952 |
|
|
| 2953 |
if (current_subject[-1] == '\r' && |
if (current_subject[-1] == CHAR_CR && |
| 2954 |
current_subject < end_subject && |
current_subject < end_subject && |
| 2955 |
*current_subject == '\n' && |
*current_subject == CHAR_NL && |
| 2956 |
(re->flags & PCRE_HASCRORLF) == 0 && |
(re->flags & PCRE_HASCRORLF) == 0 && |
| 2957 |
(md->nltype == NLTYPE_ANY || |
(md->nltype == NLTYPE_ANY || |
| 2958 |
md->nltype == NLTYPE_ANYCRLF || |
md->nltype == NLTYPE_ANYCRLF || |