Before this change there were two forms of xlat entries: those that use XLAT
or XLAT_END macros, and others verbatim entries. This change converts
the latter to use new XLAT_PAIR macro.
This is necessary for the upcoming change of xlat.val type.
* xlat.h (XLAT_PAIR): New macro.
* xlat/gen.sh (cond_xlat, gen_header): Use it.
};
# define XLAT(val) { (unsigned)(val), #val }
+# define XLAT_PAIR(val, str) { (unsigned)(val), str }
# define XLAT_END { 0, 0 }
#endif
xlat=" XLAT(${val}),"
else
m="${m#1<<}"
- xlat=" { ${val}, \"${m}\" },"
+ xlat=" XLAT_PAIR(${val}, \"${m}\"),"
fi
if [ -z "${def}" ]; then
;;
'1<<'[A-Z_]*) # symbolic constants with shift
if [ -n "${unconditional}" ]; then
- echo " { ${line}, \"${line#1<<}\" },"
+ echo " XLAT_PAIR(${line}, \"${line#1<<}\"),"
else
cond_xlat "${line}"
fi