• Home
  • Raw
  • Download

Lines Matching refs:u8c

667 static int utf8ncursor(struct utf8cursor *u8c, const struct utf8data *data,  in utf8ncursor()  argument
674 u8c->data = data; in utf8ncursor()
675 u8c->s = s; in utf8ncursor()
676 u8c->p = NULL; in utf8ncursor()
677 u8c->ss = NULL; in utf8ncursor()
678 u8c->sp = NULL; in utf8ncursor()
679 u8c->len = len; in utf8ncursor()
680 u8c->slen = 0; in utf8ncursor()
681 u8c->ccc = STOPPER; in utf8ncursor()
682 u8c->nccc = STOPPER; in utf8ncursor()
684 if (u8c->len != len) in utf8ncursor()
702 static int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data,
705 return utf8ncursor(u8c, data, s, (unsigned int)-1);
736 static int utf8byte(struct utf8cursor *u8c) in utf8byte() argument
743 if (u8c->p && *u8c->s == '\0') { in utf8byte()
744 u8c->s = u8c->p; in utf8byte()
745 u8c->p = NULL; in utf8byte()
749 if (!u8c->p && (u8c->len == 0 || *u8c->s == '\0')) { in utf8byte()
751 if (u8c->ccc == STOPPER) in utf8byte()
756 } else if ((*u8c->s & 0xC0) == 0x80) { in utf8byte()
758 if (!u8c->p) in utf8byte()
759 u8c->len--; in utf8byte()
760 return (unsigned char)*u8c->s++; in utf8byte()
764 if (u8c->p) { in utf8byte()
765 leaf = utf8lookup(u8c->data, u8c->hangul, u8c->s); in utf8byte()
767 leaf = utf8nlookup(u8c->data, u8c->hangul, in utf8byte()
768 u8c->s, u8c->len); in utf8byte()
777 if (utf8agetab[LEAF_GEN(leaf)] > u8c->data->maxage) { in utf8byte()
780 u8c->len -= utf8clen(u8c->s); in utf8byte()
781 u8c->p = u8c->s + utf8clen(u8c->s); in utf8byte()
782 u8c->s = LEAF_STR(leaf); in utf8byte()
784 if (*u8c->s == '\0') { in utf8byte()
785 if (u8c->ccc == STOPPER) in utf8byte()
791 leaf = utf8lookup(u8c->data, u8c->hangul, u8c->s); in utf8byte()
801 if (ccc != STOPPER && u8c->ccc < ccc && ccc < u8c->nccc) in utf8byte()
802 u8c->nccc = ccc; in utf8byte()
808 if (ccc == u8c->ccc) { in utf8byte()
809 if (!u8c->p) in utf8byte()
810 u8c->len--; in utf8byte()
811 return (unsigned char)*u8c->s++; in utf8byte()
816 if (u8c->nccc == STOPPER) { in utf8byte()
822 u8c->ccc = MINCCC - 1; in utf8byte()
823 u8c->nccc = ccc; in utf8byte()
824 u8c->sp = u8c->p; in utf8byte()
825 u8c->ss = u8c->s; in utf8byte()
826 u8c->slen = u8c->len; in utf8byte()
827 if (!u8c->p) in utf8byte()
828 u8c->len -= utf8clen(u8c->s); in utf8byte()
829 u8c->s += utf8clen(u8c->s); in utf8byte()
832 if (!u8c->p) in utf8byte()
833 u8c->len -= utf8clen(u8c->s); in utf8byte()
834 u8c->s += utf8clen(u8c->s); in utf8byte()
835 } else if (u8c->nccc != MAXCCC + 1) { in utf8byte()
837 u8c->ccc = u8c->nccc; in utf8byte()
838 u8c->nccc = MAXCCC + 1; in utf8byte()
839 u8c->s = u8c->ss; in utf8byte()
840 u8c->p = u8c->sp; in utf8byte()
841 u8c->len = u8c->slen; in utf8byte()
844 u8c->ccc = STOPPER; in utf8byte()
845 u8c->nccc = STOPPER; in utf8byte()
846 u8c->sp = NULL; in utf8byte()
847 u8c->ss = NULL; in utf8byte()
848 u8c->slen = 0; in utf8byte()