+#if USE_REENTRANT
+NCURSES_EXPORT(char *)
+NCURSES_SP_NAME(longname) (NCURSES_SP_DCL0)
+{
+ static char empty[] =
+ {'\0'};
+ char *ptr;
+
+ T((T_CALLED("longname(%p)"), (void *) SP_PARM));
+
+ if (SP_PARM) {
+ for (ptr = SP_PARM->_ttytype + strlen(SP_PARM->_ttytype);
+ ptr > SP_PARM->_ttytype;
+ ptr--)
+ if (*ptr == '|')
+ returnPtr(ptr + 1);
+ returnPtr(SP_PARM->_ttytype);
+ }
+ return empty;
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(char *)
+longname(void)
+{
+ return NCURSES_SP_NAME(longname) (CURRENT_SCREEN);
+}
+#endif
+
+#else