Lines Matching +full:- +full:- +full:style
5 * Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
6 * Copyright (c) 1999-2018 The strace developers.
37 get_xlat_style(enum xlat_style style) in get_xlat_style() argument
39 if (xlat_verbose(style) == XLAT_STYLE_DEFAULT) in get_xlat_style()
40 return style | xlat_verbosity; in get_xlat_style()
42 return style; in get_xlat_style()
46 sprint_xlat_val(uint64_t val, enum xlat_style style) in sprint_xlat_val() argument
50 switch (xlat_format(style)) { in sprint_xlat_val()
68 print_xlat_val(uint64_t val, enum xlat_style style) in print_xlat_val() argument
70 tprints(sprint_xlat_val(val, style)); in print_xlat_val()
81 for (; pos->str != NULL; pos++) in xlookup()
82 if (pos->val == val) in xlookup()
83 return pos->str; in xlookup()
91 const uint64_t val2 = ((const struct xlat *) b)->val; in xlat_bsearch_compare()
92 return (val1 > val2) ? 1 : (val1 < val2) ? -1 : 0; in xlat_bsearch_compare()
111 memb_left -= e - pos; in xlat_search()
112 return e->str; in xlat_search()
124 * @param style Style in which xlat value should be printed.
130 printxvals_ex(const uint64_t val, const char *dflt, enum xlat_style style, in printxvals_ex() argument
135 style = get_xlat_style(style); in printxvals_ex()
137 if (xlat_verbose(style) == XLAT_STYLE_RAW) { in printxvals_ex()
138 print_xlat_val(val, style); in printxvals_ex()
156 if (xlat_verbose(style) == XLAT_STYLE_VERBOSE) { in printxvals_ex()
157 print_xlat_val(val, style); in printxvals_ex()
167 /* No hits -- print raw # instead. */ in printxvals_ex()
168 print_xlat_val(val, style); in printxvals_ex()
180 enum xlat_style style) in sprintxval_ex() argument
182 style = get_xlat_style(style); in sprintxval_ex()
184 if (xlat_verbose(style) == XLAT_STYLE_RAW) in sprintxval_ex()
185 return xsnprintf(buf, size, "%s", sprint_xlat_val(val, style)); in sprintxval_ex()
190 if (xlat_verbose(style) == XLAT_STYLE_VERBOSE) in sprintxval_ex()
192 sprint_xlat_val(val, style), str); in sprintxval_ex()
198 sprint_xlat_val(val, style), dflt); in sprintxval_ex()
200 return xsnprintf(buf, size, "%s", sprint_xlat_val(val, style)); in sprintxval_ex()
214 * @param style Style in which xlat value should be printed.
221 const char *dflt, enum xlat_style style, in printxval_sized() argument
224 style = get_xlat_style(style); in printxval_sized()
226 if (xlat_verbose(style) == XLAT_STYLE_RAW) { in printxval_sized()
227 print_xlat_val(val, style); in printxval_sized()
234 if (xlat_verbose(style) == XLAT_STYLE_VERBOSE) { in printxval_sized()
235 print_xlat_val(val, style); in printxval_sized()
243 print_xlat_val(val, style); in printxval_sized()
251 const char *dflt, enum xlat_style style) in printxval_searchn_ex() argument
253 return printxval_sized(xlat, xlat_size, val, dflt, style, in printxval_searchn_ex()
283 const char *dflt, enum xlat_style style) in printxval_indexn_ex() argument
285 return printxval_sized(xlat, xlat_size, val, dflt, style, xlat_idx); in printxval_indexn_ex()
295 * +------------+------------+---------+------------+
296 * | flags != 0 | xlat found | style | output |
297 * +------------+------------+---------+------------+
300 * +------------+------------+---------+------------+
304 * +------------+------------+---------+------------+
308 * +------------+------------+---------+------------+
312 enum xlat_style style) in sprintflags_ex() argument
319 style = get_xlat_style(style); in sprintflags_ex()
321 if (xlat_verbose(style) == XLAT_STYLE_RAW) { in sprintflags_ex()
326 sprint_xlat_val(flags, style)); in sprintflags_ex()
331 if (flags == 0 && xlat->val == 0 && xlat->str) { in sprintflags_ex()
332 if (xlat_verbose(style) == XLAT_STYLE_VERBOSE) { in sprintflags_ex()
334 xlat->str); in sprintflags_ex()
336 strcpy(outptr, xlat->str); in sprintflags_ex()
342 if (xlat_verbose(style) == XLAT_STYLE_VERBOSE && flags) in sprintflags_ex()
344 sprint_xlat_val(flags, style)); in sprintflags_ex()
346 for (; flags && xlat->str; xlat++) { in sprintflags_ex()
347 if (xlat->val && (flags & xlat->val) == xlat->val) { in sprintflags_ex()
350 else if (xlat_verbose(style) == XLAT_STYLE_VERBOSE) in sprintflags_ex()
353 outptr = stpcpy(outptr, xlat->str); in sprintflags_ex()
355 flags &= ~xlat->val; in sprintflags_ex()
362 if (found || xlat_verbose(style) != XLAT_STYLE_VERBOSE) in sprintflags_ex()
364 sprint_xlat_val(flags, style)); in sprintflags_ex()
370 if (found && xlat_verbose(style) == XLAT_STYLE_VERBOSE) in sprintflags_ex()
380 * +------------+--------------+------------+---------+------------+
381 * | flags != 0 | dflt != NULL | xlat found | style | output |
382 * +------------+--------------+------------+---------+------------+
386 * +------------+--------------+------------+---------+------------+
392 * +------------+--------------+------------+---------+------------+
398 * +------------+--------------+------------+---------+------------+
401 printflags_ex(uint64_t flags, const char *dflt, enum xlat_style style, in printflags_ex() argument
404 style = get_xlat_style(style); in printflags_ex()
406 if (xlat_verbose(style) == XLAT_STYLE_RAW) { in printflags_ex()
408 print_xlat_val(flags, style); in printflags_ex()
419 if (xlat_verbose(style) == XLAT_STYLE_VERBOSE) { in printflags_ex()
422 print_xlat_val(flags, style); in printflags_ex()
427 for (; (flags || !n) && xlat->str; ++xlat) { in printflags_ex()
428 if ((flags == xlat->val) || in printflags_ex()
429 (xlat->val && (flags & xlat->val) == xlat->val)) { in printflags_ex()
430 if (xlat_verbose(style) == XLAT_STYLE_VERBOSE in printflags_ex()
434 (n++ ? "|" : init_sep), xlat->str); in printflags_ex()
435 flags &= ~xlat->val; in printflags_ex()
446 print_xlat_val(flags, style); in printflags_ex()
450 if (xlat_verbose(style) == XLAT_STYLE_VERBOSE) in printflags_ex()
454 if (xlat_verbose(style) != XLAT_STYLE_VERBOSE) in printflags_ex()
455 print_xlat_val(flags, style); in printflags_ex()
467 print_xlat_ex(const uint64_t val, const char *str, enum xlat_style style) in print_xlat_ex() argument
469 bool default_str = style & PXF_DEFAULT_STR; in print_xlat_ex()
470 style = get_xlat_style(style); in print_xlat_ex()
472 switch (xlat_verbose(style)) { in print_xlat_ex()
476 print_xlat_val(val, style); in print_xlat_ex()
486 print_xlat_val(val, style); in print_xlat_ex()
490 error_func_msg("Unexpected style value of %#x", style); in print_xlat_ex()
494 print_xlat_val(val, style); in print_xlat_ex()
502 enum xlat_style style) in printxval_dispatch_ex() argument
506 printxvals_ex(val, dflt, style, xlat, NULL); in printxval_dispatch_ex()
510 printxval_searchn_ex(xlat, xlat_size, val, dflt, style); in printxval_dispatch_ex()
514 printxval_indexn_ex(xlat, xlat_size, val, dflt, style); in printxval_dispatch_ex()