+/*
+ * The legacy layout for TERMTYPE uses "short" for all of the numbers. Moving
+ * past that, numeric capabilities can be "int" by using a TERMTYPE2 structure
+ * in TERMINAL, and doing most of the internal work using TERMTYPE2. There are
+ * a few places (mostly to expose the legacy layout) where the distinction
+ * needs attention.
+ */
+#if NCURSES_EXT_COLORS && HAVE_INIT_EXTENDED_COLOR
+#define NCURSES_EXT_NUMBERS 1
+#define NCURSES_INT2 int
+#define TerminalType(tp) (tp)->type2
+#else
+#define NCURSES_EXT_NUMBERS 0
+#define NCURSES_INT2 short
+#define TerminalType(tp) (tp)->type
+#endif
+
+#ifdef CUR
+#undef CUR
+#define CUR TerminalType(cur_term).
+#endif