Lines Matching refs:code
258 return match(s, cp->code, 0, 1) || match(s, cp->alternates, 3, 1) || cp->ms && match(s, cp->ms, 0, 1);
284 for (t = lp->code; s < e && (*s = *t++); s++);
305 for (t = lp->code; s < e && (*s = *t++); s++);
314 if ((flags & (LC_abbreviated|LC_default)) && streq(lp->code, tp->code))
335 for (t = tp->code; s < e && (*s = toupper(*t++)); s++);
355 t = cp->code;
356 if (streq(cp->code, "utf8") && (t = _locale_utf8_str))
360 for (t = cp->code; s < e && (c = *t++); s++)
390 char code[64];
397 if (!GetLocaleInfo(lc->index, LOCALE_IDEFAULTANSICODEPAGE, code, sizeof(code)))
398 code[0] = 0;
401 else if (streq(lc->charset->ms, code))
402 return sfsprintf(buf, siz, "%s_%s.%s", lang, ctry, code);
404 return sfsprintf(buf, siz, "%s_%s.%s,%s", lang, ctry, code, lc->charset->ms);
452 if (!strcasecmp(t, lc->code) || !strcasecmp(t, lc->name))
454 for (mp = lc_maps; mp->code; mp++)
455 if (streq(t, mp->code))
559 for (lp = lc_languages; lp->code && !streq(s, lp->code); lp++);
562 for (lp = lc_languages; lp->code && (!lp->alternates || !match(s, lp->alternates, n, 0)); lp++);
563 if (!lp->code)
567 for (lp = lc_languages; lp->code && !streq(s, lp->code); lp++);
569 if (lp->code)
577 if (!lp || !lp->code)
579 for (lp = lc_languages; lp->code && !match(s, lp->name, 0, 0); lp++);
580 if (!lp || !lp->code)
585 for (tp = lc_territories; tp->code && !streq(s, tp->code); tp++);
600 if (tp->code)
603 if (!lp || !lp->code)
615 name = ((Lc_language_t*)lp)->code = ((Lc_language_t*)lp)->name = (const char*)(lp + 1);
616 memcpy((char*)lp->code, s, z - 1);
620 for (ppa = lc_charsets; ppa->code; ppa++)
637 if (!tp || !tp->code)
643 for (tp = lc_territories; tp->code; tp++)
657 s = (char*)lp->code;
659 if (!tp || !tp->code)
664 for (tp = lc_territories; tp->code; tp++)
665 if (streq(s, tp->code))
678 for (tp = lc_territories; tp->code; tp++)
686 if (tp && !tp->code)
703 for (cp = lc_charsets; cp->code; cp++)
709 if (!cp->code)
740 for (cp = lc_charsets; cp->code; cp++)
745 sfprintf(sfstderr, "locale make %s charset_name=%s cp=%s ppa=%s lp=%s\n", name, charset_name, cp ? cp->code : 0, ppa, lp->charset);
747 if (!cp || !cp->code)
760 local[1].name = default_lc.code;
780 lc->code = lc->name + n;
784 strcpy((char*)lc->code, local[!i].name);
785 strcpy((char*)lc->code + local[!i].size, name + local[i].size);
788 strcpy((char*)lc->code, s);
792 if (streq(lc->charset->code, "utf8"))
811 sfprintf(sfstderr, "locale make %17s %16s %16s %16s language=%s territory=%s charset=%s%s\n", "", lc->name, lc->code, "", lc->language->name, lc->territory->name, lc->charset->code, (lc->flags & LC_local) ? " local" : "");
841 ls->lc.code = ls->lc.name = ls->buf;
850 if (!lc_territories[++ls->territory].code)