| 478 |
len += gcaa; \ |
len += gcaa; \ |
| 479 |
} |
} |
| 480 |
|
|
| 481 |
|
/* Get the next UTF-8 character, testing for UTF-8 mode, not advancing the |
| 482 |
|
pointer, incrementing length if there are extra bytes. This is called when we |
| 483 |
|
know we are in UTF-8 mode. */ |
| 484 |
|
|
| 485 |
|
#define GETCHARLENTEST(c, eptr, len) \ |
| 486 |
|
c = *eptr; \ |
| 487 |
|
if (utf8 && c >= 0xc0) \ |
| 488 |
|
{ \ |
| 489 |
|
int gcii; \ |
| 490 |
|
int gcaa = _pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ |
| 491 |
|
int gcss = 6*gcaa; \ |
| 492 |
|
c = (c & _pcre_utf8_table3[gcaa]) << gcss; \ |
| 493 |
|
for (gcii = 1; gcii <= gcaa; gcii++) \ |
| 494 |
|
{ \ |
| 495 |
|
gcss -= 6; \ |
| 496 |
|
c |= (eptr[gcii] & 0x3f) << gcss; \ |
| 497 |
|
} \ |
| 498 |
|
len += gcaa; \ |
| 499 |
|
} |
| 500 |
|
|
| 501 |
/* If the pointer is not at the start of a character, move it back until |
/* If the pointer is not at the start of a character, move it back until |
| 502 |
it is. This is called only in UTF-8 mode - we don't put a test within the macro |
it is. This is called only in UTF-8 mode - we don't put a test within the macro |
| 503 |
because almost all calls are already within a block of UTF-8 only code. */ |
because almost all calls are already within a block of UTF-8 only code. */ |