Lines Matching defs:lp
266 canonical(const Lc_language_t* lp, const Lc_territory_t* tp, const Lc_charset_t* cp, const Lc_attribute_list_t* ap, unsigned long flags, char* buf, size_t siz)
280 if (lp)
282 if (lp->flags & (LC_debug|LC_default))
284 for (t = lp->code; s < e && (*s = *t++); s++);
291 t = lp->name;
305 for (t = lp->code; s < e && (*s = *t++); s++);
312 if (lp)
314 if ((flags & (LC_abbreviated|LC_default)) && streq(lp->code, tp->code))
352 if (lp && (!(flags & (LC_abbreviated|LC_default)) || cp != lp->charset) && s < e)
433 const Lc_language_t* lp;
457 lp = mp->language;
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)
574 lp = &lc_languages[0];
576 lp = 0;
577 if (!lp || !lp->code)
579 for (lp = lc_languages; lp->code && !match(s, lp->name, 0, 0); lp++);
580 if (!lp || !lp->code)
601 lp = tp->languages[0];
603 if (!lp || !lp->code)
613 if (!(lp = newof(0, Lc_language_t, 1, z)))
615 name = ((Lc_language_t*)lp)->code = ((Lc_language_t*)lp)->name = (const char*)(lp + 1);
616 memcpy((char*)lp->code, s, z - 1);
626 ((Lc_language_t*)lp)->charset = cp;
644 if (tp->languages[0] == lp)
657 s = (char*)lp->code;
667 if (lp != &lc_languages[0])
669 for (i = 0; i < elementsof(tp->languages) && lp != tp->languages[i]; i++);
681 for (i = 0; i < elementsof(tp->languages) && lp != tp->languages[i]; i++);
702 if (!(cp = lp->charset) || !match_charset(w, cp))
711 for (i = 0; i < elementsof(lp->attributes) && (ap = lp->attributes[i]); i++)
722 if (i >= elementsof(lp->attributes) && (ap = newof(0, Lc_attribute_t, 1, sizeof(Lc_attribute_list_t) + s - w + 1)))
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);
748 cp = ppa ? ppa : lp->charset;
750 z = canonical(lp, tp, cp, al, 0, s = tmp, sizeof(tmp));
789 lc->language = lp ? lp : &lc_languages[0];
801 if (lp == tp->languages[i])
806 lc->index = MAKELCID(MAKELANGID(lp->index, n), SORT_DEFAULT);