|
|
|
@@ -4961,7 +4961,7 @@ namespace stdex
|
|
|
|
|
uint32_t nominator;
|
|
|
|
|
|
|
|
|
|
this->interval.end = start;
|
|
|
|
|
if (this->interval.end + 1 >= end ||
|
|
|
|
|
if (this->interval.end >= end || this->interval.end + 1 >= end ||
|
|
|
|
|
(case_insensitive ? ctype.toupper(text[this->interval.end]) : text[this->interval.end]) != 'R' ||
|
|
|
|
|
(case_insensitive ? ctype.toupper(text[this->interval.end + 1]) : text[this->interval.end + 1]) != 'F')
|
|
|
|
|
goto error; // incomplete or wrong reference ID
|
|
|
|
@@ -5199,7 +5199,7 @@ namespace stdex
|
|
|
|
|
const bool case_insensitive = flags & match_case_insensitive ? true : false;
|
|
|
|
|
|
|
|
|
|
this->interval.end = start;
|
|
|
|
|
if (this->interval.end + 1 >= end ||
|
|
|
|
|
if (this->interval.end >= end || this->interval.end + 1 >= end ||
|
|
|
|
|
(case_insensitive ? ctype.toupper(text[this->interval.end]) : text[this->interval.end]) != 'S' ||
|
|
|
|
|
(case_insensitive ? ctype.toupper(text[this->interval.end + 1]) : text[this->interval.end + 1]) != 'I')
|
|
|
|
|
goto error; // incomplete or wrong reference ID
|
|
|
|
@@ -5894,7 +5894,7 @@ namespace stdex
|
|
|
|
|
_In_ int flags = match_default)
|
|
|
|
|
{
|
|
|
|
|
stdex_assert(text || start >= end);
|
|
|
|
|
if (start + 2 < end &&
|
|
|
|
|
if (start < end && start + 2 < end &&
|
|
|
|
|
text[start] == '*' &&
|
|
|
|
|
text[start + 1] == '/' &&
|
|
|
|
|
text[start + 2] == '*')
|
|
|
|
@@ -6090,7 +6090,7 @@ namespace stdex
|
|
|
|
|
for (;;) {
|
|
|
|
|
if (this->interval.end < end && text[this->interval.end]) {
|
|
|
|
|
if ('0' <= text[this->interval.end] && text[this->interval.end] <= '9') {
|
|
|
|
|
size_t _value = static_cast<size_t>(value) * 10 + static_cast<size_t>(text[this->interval.end] - '0');
|
|
|
|
|
size_t _value = static_cast<size_t>(value) * 10 + text[this->interval.end] - '0';
|
|
|
|
|
if (_value > UINT16_MAX) {
|
|
|
|
|
value = 0;
|
|
|
|
|
this->interval.invalidate();
|
|
|
|
@@ -6472,7 +6472,7 @@ namespace stdex
|
|
|
|
|
for (;;) {
|
|
|
|
|
if (this->interval.end < end && text[this->interval.end]) {
|
|
|
|
|
if ('0' <= text[this->interval.end] && text[this->interval.end] <= '9') {
|
|
|
|
|
celi_del = celi_del * 10 + static_cast<size_t>(text[this->interval.end] - '0');
|
|
|
|
|
celi_del = celi_del * 10 + text[this->interval.end] - '0';
|
|
|
|
|
this->interval.end++;
|
|
|
|
|
}
|
|
|
|
|
else if (text[this->interval.end] == '.') {
|
|
|
|
@@ -6480,7 +6480,7 @@ namespace stdex
|
|
|
|
|
for (;;) {
|
|
|
|
|
if (this->interval.end < end && text[this->interval.end]) {
|
|
|
|
|
if ('0' <= text[this->interval.end] && text[this->interval.end] <= '9') {
|
|
|
|
|
decimalni_del = decimalni_del * 10 + static_cast<size_t>(text[this->interval.end] - '0');
|
|
|
|
|
decimalni_del = decimalni_del * 10 + text[this->interval.end] - '0';
|
|
|
|
|
decimalni_del_n *= 10;
|
|
|
|
|
this->interval.end++;
|
|
|
|
|
}
|
|
|
|
@@ -7368,8 +7368,8 @@ namespace stdex
|
|
|
|
|
_In_ int flags = match_multiline)
|
|
|
|
|
{
|
|
|
|
|
_Unreferenced_(flags);
|
|
|
|
|
stdex_assert(text || start + 1 >= end);
|
|
|
|
|
if (start + 1 < end &&
|
|
|
|
|
stdex_assert(text || start >= end);
|
|
|
|
|
if (start < end && start + 1 < end &&
|
|
|
|
|
text[start] == '/' &&
|
|
|
|
|
text[start + 1] == '*')
|
|
|
|
|
{
|
|
|
|
@@ -7419,8 +7419,8 @@ namespace stdex
|
|
|
|
|
_In_ int flags = match_multiline)
|
|
|
|
|
{
|
|
|
|
|
_Unreferenced_(flags);
|
|
|
|
|
stdex_assert(text || start + 3 >= end);
|
|
|
|
|
if (start + 3 < end &&
|
|
|
|
|
stdex_assert(text || start >= end);
|
|
|
|
|
if (start < end && start + 3 < end &&
|
|
|
|
|
text[start] == '<' &&
|
|
|
|
|
text[start + 1] == '!' &&
|
|
|
|
|
text[start + 2] == '-' &&
|
|
|
|
@@ -7457,8 +7457,8 @@ namespace stdex
|
|
|
|
|
_In_ int flags = match_multiline)
|
|
|
|
|
{
|
|
|
|
|
_Unreferenced_(flags);
|
|
|
|
|
stdex_assert(text || start + 2 >= end);
|
|
|
|
|
if (start + 2 < end &&
|
|
|
|
|
stdex_assert(text || start >= end);
|
|
|
|
|
if (start < end && start + 2 < end &&
|
|
|
|
|
text[start] == '-' &&
|
|
|
|
|
text[start + 1] == '-' &&
|
|
|
|
|
text[start + 2] == '>')
|
|
|
|
@@ -7571,8 +7571,8 @@ namespace stdex
|
|
|
|
|
{
|
|
|
|
|
_Unreferenced_(flags);
|
|
|
|
|
this->interval.end = start;
|
|
|
|
|
stdex_assert(text || this->interval.end + 3 >= end);
|
|
|
|
|
if (this->interval.end + 3 < end &&
|
|
|
|
|
stdex_assert(text || this->interval.end >= end);
|
|
|
|
|
if (this->interval.end < end && this->interval.end + 3 < end &&
|
|
|
|
|
(text[this->interval.end] == 'u' || text[this->interval.end] == 'U') &&
|
|
|
|
|
(text[this->interval.end + 1] == 'r' || text[this->interval.end + 1] == 'R') &&
|
|
|
|
|
(text[this->interval.end + 2] == 'l' || text[this->interval.end + 2] == 'L') &&
|
|
|
|
@@ -7681,8 +7681,8 @@ namespace stdex
|
|
|
|
|
{
|
|
|
|
|
_Unreferenced_(flags);
|
|
|
|
|
this->interval.end = start;
|
|
|
|
|
stdex_assert(text || this->interval.end + 6 >= end);
|
|
|
|
|
if (this->interval.end + 6 < end &&
|
|
|
|
|
stdex_assert(text || this->interval.end >= end);
|
|
|
|
|
if (this->interval.end < end && this->interval.end + 6 < end &&
|
|
|
|
|
text[this->interval.end] == '@' &&
|
|
|
|
|
(text[this->interval.end + 1] == 'i' || text[this->interval.end + 1] == 'I') &&
|
|
|
|
|
(text[this->interval.end + 2] == 'm' || text[this->interval.end + 2] == 'M') &&
|
|
|
|
@@ -7811,7 +7811,7 @@ namespace stdex
|
|
|
|
|
// Skip whitespace.
|
|
|
|
|
for (; this->interval.end < end && text[this->interval.end] && ctype.is(ctype.space, text[this->interval.end]); this->interval.end++);
|
|
|
|
|
|
|
|
|
|
if (this->interval.end + 7 < end &&
|
|
|
|
|
if (this->interval.end < end && this->interval.end + 7 < end &&
|
|
|
|
|
(text[this->interval.end] == 'c' || text[this->interval.end] == 'C') &&
|
|
|
|
|
(text[this->interval.end + 1] == 'h' || text[this->interval.end + 1] == 'H') &&
|
|
|
|
|
(text[this->interval.end + 2] == 'a' || text[this->interval.end + 2] == 'A') &&
|
|
|
|
@@ -8074,7 +8074,7 @@ namespace stdex
|
|
|
|
|
else if (text[this->interval.end] == '!') {
|
|
|
|
|
// <!...
|
|
|
|
|
this->interval.end++;
|
|
|
|
|
if (this->interval.end + 1 < end &&
|
|
|
|
|
if (this->interval.end < end && this->interval.end + 1 < end &&
|
|
|
|
|
text[this->interval.end] == '-' &&
|
|
|
|
|
text[this->interval.end + 1] == '-')
|
|
|
|
|
{
|
|
|
|
@@ -8149,7 +8149,7 @@ namespace stdex
|
|
|
|
|
this->attributes.clear();
|
|
|
|
|
for (;;) {
|
|
|
|
|
if (this->type == html_sequence_t::element_start &&
|
|
|
|
|
this->interval.end + 1 < end &&
|
|
|
|
|
this->interval.end < end && this->interval.end + 1 < end &&
|
|
|
|
|
text[this->interval.end] == '/' &&
|
|
|
|
|
text[this->interval.end + 1] == '>')
|
|
|
|
|
{
|
|
|
|
@@ -8166,7 +8166,7 @@ namespace stdex
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (this->type == html_sequence_t::declaration &&
|
|
|
|
|
this->interval.end + 1 < end &&
|
|
|
|
|
this->interval.end < end && this->interval.end + 1 < end &&
|
|
|
|
|
text[this->interval.end] == '!' &&
|
|
|
|
|
text[this->interval.end + 1] == '>')
|
|
|
|
|
{
|
|
|
|
@@ -8175,7 +8175,7 @@ namespace stdex
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (this->type == html_sequence_t::declaration &&
|
|
|
|
|
this->interval.end + 1 < end &&
|
|
|
|
|
this->interval.end < end && this->interval.end + 1 < end &&
|
|
|
|
|
text[this->interval.end] == '-' &&
|
|
|
|
|
text[this->interval.end + 1] == '-')
|
|
|
|
|
{
|
|
|
|
@@ -8285,8 +8285,8 @@ namespace stdex
|
|
|
|
|
_In_ int flags = match_multiline)
|
|
|
|
|
{
|
|
|
|
|
_Unreferenced_(flags);
|
|
|
|
|
stdex_assert(text || start + 2 >= end);
|
|
|
|
|
if (start + 2 < end &&
|
|
|
|
|
stdex_assert(text || start >= end);
|
|
|
|
|
if (start < end && start + 2 < end &&
|
|
|
|
|
text[start] == '<' &&
|
|
|
|
|
text[start + 1] == '!' &&
|
|
|
|
|
text[start + 2] == '[')
|
|
|
|
@@ -8342,8 +8342,8 @@ namespace stdex
|
|
|
|
|
_In_ int flags = match_multiline)
|
|
|
|
|
{
|
|
|
|
|
_Unreferenced_(flags);
|
|
|
|
|
stdex_assert(text || start + 2 >= end);
|
|
|
|
|
if (start + 2 < end &&
|
|
|
|
|
stdex_assert(text || start >= end);
|
|
|
|
|
if (start < end && start + 2 < end &&
|
|
|
|
|
text[start] == ']' &&
|
|
|
|
|
text[start + 1] == ']' &&
|
|
|
|
|
text[start + 2] == '>')
|
|
|
|
|