/* Generated by ./src/xlat/gen.sh from ./src/xlat/kd_modes.in; do not edit. */

#include "gcc_compat.h"
#include "static_assert.h"

#if defined(KD_TEXT) || (defined(HAVE_DECL_KD_TEXT) && HAVE_DECL_KD_TEXT)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((KD_TEXT) == (0x0), "KD_TEXT != 0x0");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define KD_TEXT 0x0
#endif
#if defined(KD_GRAPHICS) || (defined(HAVE_DECL_KD_GRAPHICS) && HAVE_DECL_KD_GRAPHICS)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((KD_GRAPHICS) == (0x1), "KD_GRAPHICS != 0x1");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define KD_GRAPHICS 0x1
#endif
#if defined(KD_TEXT0) || (defined(HAVE_DECL_KD_TEXT0) && HAVE_DECL_KD_TEXT0)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((KD_TEXT0) == (0x2), "KD_TEXT0 != 0x2");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define KD_TEXT0 0x2
#endif
#if defined(KD_TEXT1) || (defined(HAVE_DECL_KD_TEXT1) && HAVE_DECL_KD_TEXT1)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((KD_TEXT1) == (0x3), "KD_TEXT1 != 0x3");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define KD_TEXT1 0x3
#endif
#undef XLAT_PREV_VAL

#ifndef XLAT_MACROS_ONLY

# ifdef IN_MPERS

#  error static const struct xlat kd_modes in mpers mode

# else

DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
static const struct xlat_data kd_modes_xdata[] = {
 [KD_TEXT] = XLAT(KD_TEXT),
 #define XLAT_VAL_0 ((unsigned) (KD_TEXT))
 #define XLAT_STR_0 STRINGIFY(KD_TEXT)
 [KD_GRAPHICS] = XLAT(KD_GRAPHICS),
 #define XLAT_VAL_1 ((unsigned) (KD_GRAPHICS))
 #define XLAT_STR_1 STRINGIFY(KD_GRAPHICS)
 [KD_TEXT0] = XLAT(KD_TEXT0),
 #define XLAT_VAL_2 ((unsigned) (KD_TEXT0))
 #define XLAT_STR_2 STRINGIFY(KD_TEXT0)
 [KD_TEXT1] = XLAT(KD_TEXT1),
 #define XLAT_VAL_3 ((unsigned) (KD_TEXT1))
 #define XLAT_STR_3 STRINGIFY(KD_TEXT1)
};
static
const struct xlat kd_modes[1] = { {
 .data = kd_modes_xdata,
 .size = ARRAY_SIZE(kd_modes_xdata),
 .type = XT_INDEXED,
 .flags_mask = 0
#  ifdef XLAT_VAL_0
  | XLAT_VAL_0
#  endif
#  ifdef XLAT_VAL_1
  | XLAT_VAL_1
#  endif
#  ifdef XLAT_VAL_2
  | XLAT_VAL_2
#  endif
#  ifdef XLAT_VAL_3
  | XLAT_VAL_3
#  endif
  ,
 .flags_strsz = 0
#  ifdef XLAT_STR_0
  + sizeof(XLAT_STR_0)
#  endif
#  ifdef XLAT_STR_1
  + sizeof(XLAT_STR_1)
#  endif
#  ifdef XLAT_STR_2
  + sizeof(XLAT_STR_2)
#  endif
#  ifdef XLAT_STR_3
  + sizeof(XLAT_STR_3)
#  endif
  ,
} };
DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE

#  undef XLAT_STR_0
#  undef XLAT_VAL_0
#  undef XLAT_STR_1
#  undef XLAT_VAL_1
#  undef XLAT_STR_2
#  undef XLAT_VAL_2
#  undef XLAT_STR_3
#  undef XLAT_VAL_3
# endif /* !IN_MPERS */

#endif /* !XLAT_MACROS_ONLY */
