+#undef npush
+#endif
+
+#define spush(tps, x) \
+{ \
+ if (TPS(stack_ptr) < STACKSIZE) { \
+ TPS(stack)[TPS(stack_ptr)].num_type = FALSE; \
+ TPS(stack)[TPS(stack_ptr)].data.str = x; \
+ TPS(stack_ptr)++; \
+ } else { \
+ (void) tparm_error(tps, "spush: stack overflow"); \
+ } \
+}
+
+#if NCURSES_EXPANDED
+static NCURSES_INLINE void
+ (spush) (TPARM_STATE *tps, char *x) {
+ spush(tps, x);
+}
+
+#undef spush
+#endif
+
+#define npop(tps) \
+ ((TPS(stack_ptr)-- > 0) \
+ ? ((TPS(stack)[TPS(stack_ptr)].num_type) \
+ ? TPS(stack)[TPS(stack_ptr)].data.num \
+ : 0) \
+ : (tparm_error(tps, "npop: stack underflow"), \
+ TPS(stack_ptr) = 0))
+
+#if NCURSES_EXPANDED
+static NCURSES_INLINE int
+ (npop) (TPARM_STATE *tps) {
+ return npop(tps);
+}
+#undef npop
+#endif
+
+#define spop(tps) \
+ ((TPS(stack_ptr)-- > 0) \
+ ? ((!TPS(stack)[TPS(stack_ptr)].num_type \
+ && TPS(stack)[TPS(stack_ptr)].data.str != 0) \
+ ? TPS(stack)[TPS(stack_ptr)].data.str \
+ : dummy) \
+ : (tparm_error(tps, "spop: stack underflow"), \
+ dummy))
+
+#if NCURSES_EXPANDED