Diff
Not logged in

Differences From Artifact [2aff7aacbb]:

To Artifact [a8ffe9df20]:


643
644
645
646
647
648
649







650
651
652
653
654
655
656
CONST char *
Tcl_UtfNext(
    CONST char *src)		/* The current location in the string. */
{
    int byte = *((unsigned char *) src);
    int left = totalBytes[byte];
    const char *next = src + 1;








    while (--left) {
	byte = *((unsigned char *) next);
	if ((byte & 0xC0) != 0x80) {
	    /*
	     * src points to non-trail byte; We ran out of trail bytes
	     * before the needs of the lead byte were satisfied.







>
>
>
>
>
>
>







643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
CONST char *
Tcl_UtfNext(
    CONST char *src)		/* The current location in the string. */
{
    int byte = *((unsigned char *) src);
    int left = totalBytes[byte];
    const char *next = src + 1;

    if (((*src) & 0xC0) == 0x80) {
        if ((((*++src) & 0xC0) == 0x80) && (((*++src) & 0xC0) == 0x80)) {
            ++src;
        }
        return src;
    }

    while (--left) {
	byte = *((unsigned char *) next);
	if ((byte & 0xC0) != 0x80) {
	    /*
	     * src points to non-trail byte; We ran out of trail bytes
	     * before the needs of the lead byte were satisfied.