Home | History | Annotate | Download | only in modules

Lines Matching refs:ei

128 	_ISO2022EncodingInfo ei;
144 #define _CEI_TO_EI(_cei_) (&(_cei_)->ei)
208 get_recommend(_ISO2022EncodingInfo * __restrict ei,
244 if (!ei->recommend[i]) {
245 ei->recommend[i] = malloc(sizeof(_ISO2022Charset));
247 p = realloc(ei->recommend[i],
248 sizeof(_ISO2022Charset) * (ei->recommendsize[i] + 1));
251 ei->recommend[i] = p;
253 if (!ei->recommend[i])
255 ei->recommendsize[i]++;
257 (ei->recommend[i] + (ei->recommendsize[i] - 1))->final = cs.final;
258 (ei->recommend[i] + (ei->recommendsize[i] - 1))->interm = cs.interm;
259 (ei->recommend[i] + (ei->recommendsize[i] - 1))->vers = cs.vers;
260 (ei->recommend[i] + (ei->recommendsize[i] - 1))->type = cs.type;
266 get_initg(_ISO2022EncodingInfo * __restrict ei,
279 ei->initg[token[4] - '0'].type = cs.type;
280 ei->initg[token[4] - '0'].final = cs.final;
281 ei->initg[token[4] - '0'].interm = cs.interm;
282 ei->initg[token[4] - '0'].vers = cs.vers;
288 get_max(_ISO2022EncodingInfo * __restrict ei,
292 ei->maxcharset = 1;
294 ei->maxcharset = 2;
296 ei->maxcharset = 3;
305 get_flags(_ISO2022EncodingInfo * __restrict ei,
334 ei->flags |= tags[i].flag;
344 _citrus_ISO2022_parse_variable(_ISO2022EncodingInfo * __restrict ei,
351 _DIAGASSERT(ei != NULL);
364 ei->maxcharset = 0;
366 ei->recommend[i] = NULL;
367 ei->recommendsize[i] = 0;
369 ei->flags = 0;
387 if ((ret = get_recommend(ei, buf)) != _NOTMATCH)
389 else if ((ret = get_initg(ei, buf)) != _NOTMATCH)
391 else if ((ret = get_max(ei, buf)) != _NOTMATCH)
393 else if ((ret = get_flags(ei, buf)) != _NOTMATCH)
406 free(ei->recommend[0]);
407 free(ei->recommend[1]);
408 free(ei->recommend[2]);
409 free(ei->recommend[3]);
416 _citrus_ISO2022_init_state(_ISO2022EncodingInfo * __restrict ei,
423 s->gr = (ei->flags & F_8BIT) ? 1 : -1;
426 if (ei->initg[i].final) {
427 s->g[i].type = ei->initg[i].type;
428 s->g[i].final = ei->initg[i].final;
429 s->g[i].interm = ei->initg[i].interm;
438 _citrus_ISO2022_pack_state(_ISO2022EncodingInfo * __restrict ei,
447 _citrus_ISO2022_unpack_state(_ISO2022EncodingInfo * __restrict ei,
456 _citrus_ISO2022_encoding_module_init(_ISO2022EncodingInfo * __restrict ei,
461 _DIAGASSERT(ei != NULL);
463 return _citrus_ISO2022_parse_variable(ei, var, lenvar);
468 _citrus_ISO2022_encoding_module_uninit(_ISO2022EncodingInfo *ei)
567 _ISO2022_sgetwchar(_ISO2022EncodingInfo * __restrict ei,
578 _DIAGASSERT(ei != NULL);
846 _citrus_ISO2022_mbrtowc_priv(_ISO2022EncodingInfo * __restrict ei,
858 _DIAGASSERT(ei != NULL);
863 _citrus_ISO2022_init_state(ei, psenc);
877 _citrus_ISO2022_init_state(ei, psenc);
891 wchar = _ISO2022_sgetwchar(ei, p, psenc->chlen - (p-psenc->ch),
918 wchar = _ISO2022_sgetwchar(ei, s0, n, &result, psenc);
969 recommendation(_ISO2022EncodingInfo * __restrict ei,
975 _DIAGASSERT(ei != NULL);
980 recommend = ei->recommend[i];
981 for (j = 0; j < ei->recommendsize[i]; j++) {
995 recommend = ei->recommend[i];
996 for (j = 0; j < ei->recommendsize[i]; j++) {
1009 if (ei->maxcharset == 0) {
1025 _ISO2022_sputwchar(_ISO2022EncodingInfo * __restrict ei, wchar_t wc,
1040 _DIAGASSERT(ei != NULL);
1048 cs = ei->initg[0].final ? ei->initg[0] : ascii;
1051 cs = ei->initg[1].final ? ei->initg[1] : iso88591;
1071 target = recommendation(ei, &cs);
1073 bit8 = ei->flags & F_8BIT;
1085 && !cs.interm && !(ei->flags & F_NOOLD))
1106 if (target == 0 && (ei->flags & F_LS0)) {
1109 } else if (target == 1 && (ei->flags & F_LS1)) {
1112 } else if (target == 2 && (ei->flags & F_LS2)) {
1116 } else if (target == 3 && (ei->flags & F_LS3)) {
1120 } else if (bit8 && target == 1 && (ei->flags & F_LS1R)) {
1124 } else if (bit8 && target == 2 && (ei->flags & F_LS2R)) {
1129 } else if (bit8 && target == 3 && (ei->flags & F_LS3R)) {
1133 } else if (target == 2 && (ei->flags & F_SS2)) {
1137 } else if (target == 3 && (ei->flags & F_SS3)) {
1141 } else if (bit8 && target == 2 && (ei->flags & F_SS2R)) {
1145 } else if (bit8 && target == 3 && (ei->flags & F_SS3R)) {
1159 else if ((ei->flags & F_8BIT) && psenc->gr == target)
1201 _citrus_ISO2022_put_state_reset(_ISO2022EncodingInfo * __restrict ei,
1211 _DIAGASSERT(ei != NULL);
1216 ret = _ISO2022_sputwchar(ei, L'\0', buf, sizeof(buf), &result, psenc,
1235 _citrus_ISO2022_wcrtomb_priv(_ISO2022EncodingInfo * __restrict ei,
1245 _DIAGASSERT(ei != NULL);
1251 ret = _ISO2022_sputwchar(ei, wc, buf, sizeof(buf), &result, psenc,
1271 _citrus_ISO2022_stdenc_wctocs(_ISO2022EncodingInfo * __restrict ei,
1301 _citrus_ISO2022_stdenc_cstowc(_ISO2022EncodingInfo * __restrict ei,
1306 _DIAGASSERT(ei != NULL && wc != NULL);
1315 _citrus_ISO2022_stdenc_get_state_desc_generic(_ISO2022EncodingInfo * __restrict ei,