• Home
  • Raw
  • Download

Lines Matching refs:u8c

665 static int utf8ncursor(struct utf8cursor *u8c, const struct utf8data *data,  in utf8ncursor()  argument
672 u8c->data = data; in utf8ncursor()
673 u8c->s = s; in utf8ncursor()
674 u8c->p = NULL; in utf8ncursor()
675 u8c->ss = NULL; in utf8ncursor()
676 u8c->sp = NULL; in utf8ncursor()
677 u8c->len = len; in utf8ncursor()
678 u8c->slen = 0; in utf8ncursor()
679 u8c->ccc = STOPPER; in utf8ncursor()
680 u8c->nccc = STOPPER; in utf8ncursor()
682 if (u8c->len != len) in utf8ncursor()
700 static int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data,
703 return utf8ncursor(u8c, data, s, (unsigned int)-1);
734 static int utf8byte(struct utf8cursor *u8c) in utf8byte() argument
741 if (u8c->p && *u8c->s == '\0') { in utf8byte()
742 u8c->s = u8c->p; in utf8byte()
743 u8c->p = NULL; in utf8byte()
747 if (!u8c->p && (u8c->len == 0 || *u8c->s == '\0')) { in utf8byte()
749 if (u8c->ccc == STOPPER) in utf8byte()
754 } else if ((*u8c->s & 0xC0) == 0x80) { in utf8byte()
756 if (!u8c->p) in utf8byte()
757 u8c->len--; in utf8byte()
758 return (unsigned char)*u8c->s++; in utf8byte()
762 if (u8c->p) { in utf8byte()
763 leaf = utf8lookup(u8c->data, u8c->hangul, u8c->s); in utf8byte()
765 leaf = utf8nlookup(u8c->data, u8c->hangul, in utf8byte()
766 u8c->s, u8c->len); in utf8byte()
775 if (utf8agetab[LEAF_GEN(leaf)] > u8c->data->maxage) { in utf8byte()
778 u8c->len -= utf8clen(u8c->s); in utf8byte()
779 u8c->p = u8c->s + utf8clen(u8c->s); in utf8byte()
780 u8c->s = LEAF_STR(leaf); in utf8byte()
782 if (*u8c->s == '\0') { in utf8byte()
783 if (u8c->ccc == STOPPER) in utf8byte()
789 leaf = utf8lookup(u8c->data, u8c->hangul, u8c->s); in utf8byte()
799 if (ccc != STOPPER && u8c->ccc < ccc && ccc < u8c->nccc) in utf8byte()
800 u8c->nccc = ccc; in utf8byte()
806 if (ccc == u8c->ccc) { in utf8byte()
807 if (!u8c->p) in utf8byte()
808 u8c->len--; in utf8byte()
809 return (unsigned char)*u8c->s++; in utf8byte()
814 if (u8c->nccc == STOPPER) { in utf8byte()
820 u8c->ccc = MINCCC - 1; in utf8byte()
821 u8c->nccc = ccc; in utf8byte()
822 u8c->sp = u8c->p; in utf8byte()
823 u8c->ss = u8c->s; in utf8byte()
824 u8c->slen = u8c->len; in utf8byte()
825 if (!u8c->p) in utf8byte()
826 u8c->len -= utf8clen(u8c->s); in utf8byte()
827 u8c->s += utf8clen(u8c->s); in utf8byte()
830 if (!u8c->p) in utf8byte()
831 u8c->len -= utf8clen(u8c->s); in utf8byte()
832 u8c->s += utf8clen(u8c->s); in utf8byte()
833 } else if (u8c->nccc != MAXCCC + 1) { in utf8byte()
835 u8c->ccc = u8c->nccc; in utf8byte()
836 u8c->nccc = MAXCCC + 1; in utf8byte()
837 u8c->s = u8c->ss; in utf8byte()
838 u8c->p = u8c->sp; in utf8byte()
839 u8c->len = u8c->slen; in utf8byte()
842 u8c->ccc = STOPPER; in utf8byte()
843 u8c->nccc = STOPPER; in utf8byte()
844 u8c->sp = NULL; in utf8byte()
845 u8c->ss = NULL; in utf8byte()
846 u8c->slen = 0; in utf8byte()