From: Eugene Syromyatnikov Date: Fri, 1 Mar 2019 18:31:41 +0000 (+0100) Subject: defs.h: add ability to pass style to printxval_index_ex macro X-Git-Tag: v5.3~117 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=19845de0d330b820ed22e2f4e166441750e52e22;p=strace defs.h: add ability to pass style to printxval_index_ex macro So it matches its name. * defs.h (printxval_index_ex): Add style__ macro, pass it as the 5th argument to the printxval_indexn_ex call. --- diff --git a/defs.h b/defs.h index f71be3a2..4f3b8f3e 100644 --- a/defs.h +++ b/defs.h @@ -738,9 +738,9 @@ printxval_indexn(const struct xlat *xlat, size_t xlat_size, uint64_t val, # define printxval_index(xlat__, val__, dflt__) \ printxval_indexn(xlat__, ARRAY_SIZE(xlat__) - 1, val__, dflt__) -# define printxval_index_ex(xlat__, val__, dflt__) \ +# define printxval_index_ex(xlat__, val__, dflt__, style__) \ printxval_indexn_ex((xlat__), ARRAY_SIZE(xlat__) - 1, (val__), \ - (dflt__), XLAT_STYLE_DEFAULT) + (dflt__), (style__)) extern int sprintxval_ex(char *buf, size_t size, const struct xlat *, unsigned int val, const char *dflt, enum xlat_style);