+#undef CUR
+#define CUR TerminalType(termp).
+
+#if USE_REENTRANT
+
+NCURSES_EXPORT(TERMINAL *)
+NCURSES_SP_NAME(_nc_get_cur_term) (NCURSES_SP_DCL0)
+{
+ return ((0 != TerminalOf(SP_PARM)) ? TerminalOf(SP_PARM) : CurTerm);
+}
+
+#if NCURSES_SP_FUNCS
+
+NCURSES_EXPORT(TERMINAL *)
+_nc_get_cur_term(void)
+{
+ return NCURSES_SP_NAME(_nc_get_cur_term) (CURRENT_SCREEN);
+}
+#endif
+
+NCURSES_EXPORT(TERMINAL *)
+NCURSES_PUBLIC_VAR(cur_term) (void)
+{
+#if NCURSES_SP_FUNCS
+ return NCURSES_SP_NAME(_nc_get_cur_term) (CURRENT_SCREEN);
+#else
+ return NCURSES_SP_NAME(_nc_get_cur_term) (NCURSES_SP_ARG);
+#endif
+}
+
+#else