+#define init_vars(name) \
+ if (!name##_used) { \
+ name##_used = TRUE; \
+ memset(name##_vars, 0, sizeof(name##_vars)); \
+ }
+
+static NCURSES_INLINE char *
+tparam_internal(TPARM_STATE *tps, const char *string, TPARM_DATA *data)
+{
+ int number;
+ int len;
+ int level;
+ int x, y;
+ int i;
+ const char *s;
+ const char *cp = string;
+ size_t len2 = strlen(cp);
+ bool incremented_two = FALSE;
+ bool termcap_hack = tparm_tc_compat(tps, data);
+ /*
+ * SVr4 curses stores variables 'A' to 'Z' in the TERMINAL structure (so
+ * they are initialized once to zero), and variables 'a' to 'z' on the
+ * stack in tparm, referring to the former as "static" and the latter as
+ * "dynamic". However, it makes no check to ensure that the "dynamic"
+ * variables are initialized.
+ *
+ * Solaris xpg4 curses makes no distinction between the upper/lower, and
+ * stores the common set of 26 variables on the stack, without initializing
+ * them.
+ *
+ * In ncurses, both sets of variables are initialized on the first use.
+ */
+ bool dynamic_used = FALSE;
+ int dynamic_vars[NUM_VARS];
+
+ tparm_trace_call(tps, string, data);
+