Lines Matching refs:u8c

583 int utf8ncursor(struct utf8cursor *u8c, const struct utf8data *data,  in utf8ncursor()  argument
590 u8c->data = data; in utf8ncursor()
591 u8c->s = s; in utf8ncursor()
592 u8c->p = NULL; in utf8ncursor()
593 u8c->ss = NULL; in utf8ncursor()
594 u8c->sp = NULL; in utf8ncursor()
595 u8c->len = len; in utf8ncursor()
596 u8c->slen = 0; in utf8ncursor()
597 u8c->ccc = STOPPER; in utf8ncursor()
598 u8c->nccc = STOPPER; in utf8ncursor()
600 if (u8c->len != len) in utf8ncursor()
618 int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data, in utf8cursor() argument
621 return utf8ncursor(u8c, data, s, (unsigned int)-1); in utf8cursor()
652 int utf8byte(struct utf8cursor *u8c) in utf8byte() argument
659 if (u8c->p && *u8c->s == '\0') { in utf8byte()
660 u8c->s = u8c->p; in utf8byte()
661 u8c->p = NULL; in utf8byte()
665 if (!u8c->p && (u8c->len == 0 || *u8c->s == '\0')) { in utf8byte()
667 if (u8c->ccc == STOPPER) in utf8byte()
672 } else if ((*u8c->s & 0xC0) == 0x80) { in utf8byte()
674 if (!u8c->p) in utf8byte()
675 u8c->len--; in utf8byte()
676 return (unsigned char)*u8c->s++; in utf8byte()
680 if (u8c->p) { in utf8byte()
681 leaf = utf8lookup(u8c->data, u8c->hangul, u8c->s); in utf8byte()
683 leaf = utf8nlookup(u8c->data, u8c->hangul, in utf8byte()
684 u8c->s, u8c->len); in utf8byte()
693 if (utf8agetab[LEAF_GEN(leaf)] > u8c->data->maxage) { in utf8byte()
696 u8c->len -= utf8clen(u8c->s); in utf8byte()
697 u8c->p = u8c->s + utf8clen(u8c->s); in utf8byte()
698 u8c->s = LEAF_STR(leaf); in utf8byte()
700 if (*u8c->s == '\0') { in utf8byte()
701 if (u8c->ccc == STOPPER) in utf8byte()
707 leaf = utf8lookup(u8c->data, u8c->hangul, u8c->s); in utf8byte()
717 if (ccc != STOPPER && u8c->ccc < ccc && ccc < u8c->nccc) in utf8byte()
718 u8c->nccc = ccc; in utf8byte()
724 if (ccc == u8c->ccc) { in utf8byte()
725 if (!u8c->p) in utf8byte()
726 u8c->len--; in utf8byte()
727 return (unsigned char)*u8c->s++; in utf8byte()
732 if (u8c->nccc == STOPPER) { in utf8byte()
738 u8c->ccc = MINCCC - 1; in utf8byte()
739 u8c->nccc = ccc; in utf8byte()
740 u8c->sp = u8c->p; in utf8byte()
741 u8c->ss = u8c->s; in utf8byte()
742 u8c->slen = u8c->len; in utf8byte()
743 if (!u8c->p) in utf8byte()
744 u8c->len -= utf8clen(u8c->s); in utf8byte()
745 u8c->s += utf8clen(u8c->s); in utf8byte()
748 if (!u8c->p) in utf8byte()
749 u8c->len -= utf8clen(u8c->s); in utf8byte()
750 u8c->s += utf8clen(u8c->s); in utf8byte()
751 } else if (u8c->nccc != MAXCCC + 1) { in utf8byte()
753 u8c->ccc = u8c->nccc; in utf8byte()
754 u8c->nccc = MAXCCC + 1; in utf8byte()
755 u8c->s = u8c->ss; in utf8byte()
756 u8c->p = u8c->sp; in utf8byte()
757 u8c->len = u8c->slen; in utf8byte()
760 u8c->ccc = STOPPER; in utf8byte()
761 u8c->nccc = STOPPER; in utf8byte()
762 u8c->sp = NULL; in utf8byte()
763 u8c->ss = NULL; in utf8byte()
764 u8c->slen = 0; in utf8byte()