u8c 2990 fs/unicode/mkutf8data.c int utf8ncursor(struct utf8cursor *u8c, struct tree *tree, const char *s, u8c 2997 fs/unicode/mkutf8data.c u8c->tree = tree; u8c 2998 fs/unicode/mkutf8data.c u8c->s = s; u8c 2999 fs/unicode/mkutf8data.c u8c->p = NULL; u8c 3000 fs/unicode/mkutf8data.c u8c->ss = NULL; u8c 3001 fs/unicode/mkutf8data.c u8c->sp = NULL; u8c 3002 fs/unicode/mkutf8data.c u8c->len = len; u8c 3003 fs/unicode/mkutf8data.c u8c->slen = 0; u8c 3004 fs/unicode/mkutf8data.c u8c->ccc = STOPPER; u8c 3005 fs/unicode/mkutf8data.c u8c->nccc = STOPPER; u8c 3006 fs/unicode/mkutf8data.c u8c->unichar = 0; u8c 3008 fs/unicode/mkutf8data.c if (u8c->len != len) u8c 3025 fs/unicode/mkutf8data.c int utf8cursor(struct utf8cursor *u8c, struct tree *tree, const char *s) u8c 3027 fs/unicode/mkutf8data.c return utf8ncursor(u8c, tree, s, (unsigned int)-1); u8c 3057 fs/unicode/mkutf8data.c int utf8byte(struct utf8cursor *u8c) u8c 3064 fs/unicode/mkutf8data.c if (u8c->p && *u8c->s == '\0') { u8c 3065 fs/unicode/mkutf8data.c u8c->s = u8c->p; u8c 3066 fs/unicode/mkutf8data.c u8c->p = NULL; u8c 3070 fs/unicode/mkutf8data.c if (!u8c->p && (u8c->len == 0 || *u8c->s == '\0')) { u8c 3072 fs/unicode/mkutf8data.c if (u8c->ccc == STOPPER) u8c 3077 fs/unicode/mkutf8data.c } else if ((*u8c->s & 0xC0) == 0x80) { u8c 3079 fs/unicode/mkutf8data.c if (!u8c->p) u8c 3080 fs/unicode/mkutf8data.c u8c->len--; u8c 3081 fs/unicode/mkutf8data.c return (unsigned char)*u8c->s++; u8c 3085 fs/unicode/mkutf8data.c if (u8c->p) { u8c 3086 fs/unicode/mkutf8data.c leaf = utf8lookup(u8c->tree, u8c->hangul, u8c->s); u8c 3088 fs/unicode/mkutf8data.c leaf = utf8nlookup(u8c->tree, u8c->hangul, u8c 3089 fs/unicode/mkutf8data.c u8c->s, u8c->len); u8c 3097 fs/unicode/mkutf8data.c if (ages[LEAF_GEN(leaf)] > u8c->tree->maxage) { u8c 3100 fs/unicode/mkutf8data.c u8c->len -= utf8clen(u8c->s); u8c 3101 fs/unicode/mkutf8data.c u8c->p = u8c->s + utf8clen(u8c->s); u8c 3102 fs/unicode/mkutf8data.c u8c->s = LEAF_STR(leaf); u8c 3104 fs/unicode/mkutf8data.c if (*u8c->s == '\0') { u8c 3105 fs/unicode/mkutf8data.c if (u8c->ccc == STOPPER) u8c 3110 fs/unicode/mkutf8data.c leaf = utf8lookup(u8c->tree, u8c->hangul, u8c->s); u8c 3113 fs/unicode/mkutf8data.c u8c->unichar = utf8decode(u8c->s); u8c 3119 fs/unicode/mkutf8data.c if (ccc != STOPPER && u8c->ccc < ccc && ccc < u8c->nccc) u8c 3120 fs/unicode/mkutf8data.c u8c->nccc = ccc; u8c 3126 fs/unicode/mkutf8data.c if (ccc == u8c->ccc) { u8c 3127 fs/unicode/mkutf8data.c if (!u8c->p) u8c 3128 fs/unicode/mkutf8data.c u8c->len--; u8c 3129 fs/unicode/mkutf8data.c return (unsigned char)*u8c->s++; u8c 3134 fs/unicode/mkutf8data.c if (u8c->nccc == STOPPER) { u8c 3140 fs/unicode/mkutf8data.c assert(u8c->ccc == STOPPER); u8c 3141 fs/unicode/mkutf8data.c u8c->ccc = MINCCC - 1; u8c 3142 fs/unicode/mkutf8data.c u8c->nccc = ccc; u8c 3143 fs/unicode/mkutf8data.c u8c->sp = u8c->p; u8c 3144 fs/unicode/mkutf8data.c u8c->ss = u8c->s; u8c 3145 fs/unicode/mkutf8data.c u8c->slen = u8c->len; u8c 3146 fs/unicode/mkutf8data.c if (!u8c->p) u8c 3147 fs/unicode/mkutf8data.c u8c->len -= utf8clen(u8c->s); u8c 3148 fs/unicode/mkutf8data.c u8c->s += utf8clen(u8c->s); u8c 3151 fs/unicode/mkutf8data.c if (!u8c->p) u8c 3152 fs/unicode/mkutf8data.c u8c->len -= utf8clen(u8c->s); u8c 3153 fs/unicode/mkutf8data.c u8c->s += utf8clen(u8c->s); u8c 3154 fs/unicode/mkutf8data.c } else if (u8c->nccc != MAXCCC + 1) { u8c 3156 fs/unicode/mkutf8data.c u8c->ccc = u8c->nccc; u8c 3157 fs/unicode/mkutf8data.c u8c->nccc = MAXCCC + 1; u8c 3158 fs/unicode/mkutf8data.c u8c->s = u8c->ss; u8c 3159 fs/unicode/mkutf8data.c u8c->p = u8c->sp; u8c 3160 fs/unicode/mkutf8data.c u8c->len = u8c->slen; u8c 3163 fs/unicode/mkutf8data.c u8c->ccc = STOPPER; u8c 3164 fs/unicode/mkutf8data.c u8c->nccc = STOPPER; u8c 3165 fs/unicode/mkutf8data.c u8c->sp = NULL; u8c 3166 fs/unicode/mkutf8data.c u8c->ss = NULL; u8c 3167 fs/unicode/mkutf8data.c u8c->slen = 0; u8c 3179 fs/unicode/mkutf8data.c struct utf8cursor u8c; u8c 3184 fs/unicode/mkutf8data.c if (utf8cursor(&u8c, tree, s)) u8c 3186 fs/unicode/mkutf8data.c while ((c = utf8byte(&u8c)) > 0) u8c 3199 fs/unicode/mkutf8data.c if (utf8cursor(&u8c, tree, s)) u8c 3201 fs/unicode/mkutf8data.c while ((c = utf8byte(&u8c)) > 0) u8c 583 fs/unicode/utf8-norm.c int utf8ncursor(struct utf8cursor *u8c, const struct utf8data *data, u8c 590 fs/unicode/utf8-norm.c u8c->data = data; u8c 591 fs/unicode/utf8-norm.c u8c->s = s; u8c 592 fs/unicode/utf8-norm.c u8c->p = NULL; u8c 593 fs/unicode/utf8-norm.c u8c->ss = NULL; u8c 594 fs/unicode/utf8-norm.c u8c->sp = NULL; u8c 595 fs/unicode/utf8-norm.c u8c->len = len; u8c 596 fs/unicode/utf8-norm.c u8c->slen = 0; u8c 597 fs/unicode/utf8-norm.c u8c->ccc = STOPPER; u8c 598 fs/unicode/utf8-norm.c u8c->nccc = STOPPER; u8c 600 fs/unicode/utf8-norm.c if (u8c->len != len) u8c 618 fs/unicode/utf8-norm.c int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data, u8c 621 fs/unicode/utf8-norm.c return utf8ncursor(u8c, data, s, (unsigned int)-1); u8c 652 fs/unicode/utf8-norm.c int utf8byte(struct utf8cursor *u8c) u8c 659 fs/unicode/utf8-norm.c if (u8c->p && *u8c->s == '\0') { u8c 660 fs/unicode/utf8-norm.c u8c->s = u8c->p; u8c 661 fs/unicode/utf8-norm.c u8c->p = NULL; u8c 665 fs/unicode/utf8-norm.c if (!u8c->p && (u8c->len == 0 || *u8c->s == '\0')) { u8c 667 fs/unicode/utf8-norm.c if (u8c->ccc == STOPPER) u8c 672 fs/unicode/utf8-norm.c } else if ((*u8c->s & 0xC0) == 0x80) { u8c 674 fs/unicode/utf8-norm.c if (!u8c->p) u8c 675 fs/unicode/utf8-norm.c u8c->len--; u8c 676 fs/unicode/utf8-norm.c return (unsigned char)*u8c->s++; u8c 680 fs/unicode/utf8-norm.c if (u8c->p) { u8c 681 fs/unicode/utf8-norm.c leaf = utf8lookup(u8c->data, u8c->hangul, u8c->s); u8c 683 fs/unicode/utf8-norm.c leaf = utf8nlookup(u8c->data, u8c->hangul, u8c 684 fs/unicode/utf8-norm.c u8c->s, u8c->len); u8c 693 fs/unicode/utf8-norm.c if (utf8agetab[LEAF_GEN(leaf)] > u8c->data->maxage) { u8c 696 fs/unicode/utf8-norm.c u8c->len -= utf8clen(u8c->s); u8c 697 fs/unicode/utf8-norm.c u8c->p = u8c->s + utf8clen(u8c->s); u8c 698 fs/unicode/utf8-norm.c u8c->s = LEAF_STR(leaf); u8c 700 fs/unicode/utf8-norm.c if (*u8c->s == '\0') { u8c 701 fs/unicode/utf8-norm.c if (u8c->ccc == STOPPER) u8c 707 fs/unicode/utf8-norm.c leaf = utf8lookup(u8c->data, u8c->hangul, u8c->s); u8c 717 fs/unicode/utf8-norm.c if (ccc != STOPPER && u8c->ccc < ccc && ccc < u8c->nccc) u8c 718 fs/unicode/utf8-norm.c u8c->nccc = ccc; u8c 724 fs/unicode/utf8-norm.c if (ccc == u8c->ccc) { u8c 725 fs/unicode/utf8-norm.c if (!u8c->p) u8c 726 fs/unicode/utf8-norm.c u8c->len--; u8c 727 fs/unicode/utf8-norm.c return (unsigned char)*u8c->s++; u8c 732 fs/unicode/utf8-norm.c if (u8c->nccc == STOPPER) { u8c 738 fs/unicode/utf8-norm.c u8c->ccc = MINCCC - 1; u8c 739 fs/unicode/utf8-norm.c u8c->nccc = ccc; u8c 740 fs/unicode/utf8-norm.c u8c->sp = u8c->p; u8c 741 fs/unicode/utf8-norm.c u8c->ss = u8c->s; u8c 742 fs/unicode/utf8-norm.c u8c->slen = u8c->len; u8c 743 fs/unicode/utf8-norm.c if (!u8c->p) u8c 744 fs/unicode/utf8-norm.c u8c->len -= utf8clen(u8c->s); u8c 745 fs/unicode/utf8-norm.c u8c->s += utf8clen(u8c->s); u8c 748 fs/unicode/utf8-norm.c if (!u8c->p) u8c 749 fs/unicode/utf8-norm.c u8c->len -= utf8clen(u8c->s); u8c 750 fs/unicode/utf8-norm.c u8c->s += utf8clen(u8c->s); u8c 751 fs/unicode/utf8-norm.c } else if (u8c->nccc != MAXCCC + 1) { u8c 753 fs/unicode/utf8-norm.c u8c->ccc = u8c->nccc; u8c 754 fs/unicode/utf8-norm.c u8c->nccc = MAXCCC + 1; u8c 755 fs/unicode/utf8-norm.c u8c->s = u8c->ss; u8c 756 fs/unicode/utf8-norm.c u8c->p = u8c->sp; u8c 757 fs/unicode/utf8-norm.c u8c->len = u8c->slen; u8c 760 fs/unicode/utf8-norm.c u8c->ccc = STOPPER; u8c 761 fs/unicode/utf8-norm.c u8c->nccc = STOPPER; u8c 762 fs/unicode/utf8-norm.c u8c->sp = NULL; u8c 763 fs/unicode/utf8-norm.c u8c->ss = NULL; u8c 764 fs/unicode/utf8-norm.c u8c->slen = 0; u8c 166 fs/unicode/utf8-selftest.c struct utf8cursor u8c; u8c 185 fs/unicode/utf8-selftest.c if (utf8cursor(&u8c, data, nfdi_test_data[i].str) < 0) u8c 188 fs/unicode/utf8-selftest.c while ((c = utf8byte(&u8c)) > 0) { u8c 202 fs/unicode/utf8-selftest.c struct utf8cursor u8c; u8c 221 fs/unicode/utf8-selftest.c if (utf8cursor(&u8c, data, nfdicf_test_data[i].str) < 0) u8c 224 fs/unicode/utf8-selftest.c while ((c = utf8byte(&u8c)) > 0) { u8c 95 fs/unicode/utf8n.h extern int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data, u8c 97 fs/unicode/utf8n.h extern int utf8ncursor(struct utf8cursor *u8c, const struct utf8data *data, u8c 106 fs/unicode/utf8n.h extern int utf8byte(struct utf8cursor *u8c);