+#if NCURSES_SP_FUNCS
+ if (TerminalOf(SP_PARM) != 0) {
+ name = TerminalOf(SP_PARM)->_termname;
+ }
+#else
+ if (cur_term != 0)
+ name = cur_term->_termname;
+#endif
+
+ returnPtr(name);
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(char *)
+termname(void)
+{
+ return NCURSES_SP_NAME(termname) (CURRENT_SCREEN);