Lines Matching refs:xlat

123 xlookup(const struct xlat *xlat, const unsigned int val)  in xlookup()  argument
125 for (; xlat->str != NULL; xlat++) in xlookup()
126 if (xlat->val == val) in xlookup()
127 return xlat->str; in xlookup()
135 const unsigned int val2 = ((const struct xlat *) b)->val; in xlat_bsearch_compare()
140 xlat_search(const struct xlat *xlat, const size_t nmemb, const unsigned int val) in xlat_search() argument
142 const struct xlat *e = in xlat_search()
144 xlat, nmemb, sizeof(*xlat), xlat_bsearch_compare); in xlat_search()
210 printxval(const struct xlat *xlat, const unsigned int val, const char *dflt) in printxval() argument
212 const char *str = xlookup(xlat, val); in printxval()
291 addflags(const struct xlat *xlat, int flags) in addflags() argument
293 for (; xlat->str; xlat++) { in addflags()
294 if (xlat->val && (flags & xlat->val) == xlat->val) { in addflags()
295 tprintf("|%s", xlat->str); in addflags()
296 flags &= ~xlat->val; in addflags()
310 sprintflags(const char *prefix, const struct xlat *xlat, int flags) in sprintflags() argument
318 for (; xlat->str; xlat++) { in sprintflags()
319 if ((flags & xlat->val) == xlat->val) { in sprintflags()
322 outptr = stpcpy(outptr, xlat->str); in sprintflags()
324 flags &= ~xlat->val; in sprintflags()
339 printflags(const struct xlat *xlat, int flags, const char *dflt) in printflags() argument
344 if (flags == 0 && xlat->val == 0) { in printflags()
345 tprints(xlat->str); in printflags()
350 for (n = 0; xlat->str; xlat++) { in printflags()
351 if (xlat->val && (flags & xlat->val) == xlat->val) { in printflags()
352 tprintf("%s%s", sep, xlat->str); in printflags()
353 flags &= ~xlat->val; in printflags()