+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+_nc_set_tty_mode(TTY * buf)
+{
+ return NCURSES_SP_NAME(_nc_set_tty_mode) (CURRENT_SCREEN, buf);
+}
+#endif
+
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(def_shell_mode) (NCURSES_SP_DCL0)
+{
+ int rc = ERR;
+ TERMINAL *termp = TerminalOf(SP_PARM);
+
+ T((T_CALLED("def_shell_mode(%p)"), (void *) SP_PARM));
+
+ if (termp != 0) {
+#ifdef USE_TERM_DRIVER
+ rc = CallDriver_2(SP_PARM, mode, FALSE, TRUE);
+#else
+ /*
+ * If XTABS was on, remove the tab and backtab capabilities.
+ */
+ if (_nc_get_tty_mode(&termp->Ottyb) == OK) {
+#ifdef TERMIOS
+ if (termp->Ottyb.c_oflag & OFLAGS_TABS)
+ tab = back_tab = NULL;
+#else
+ if (termp->Ottyb.sg_flags & XTABS)
+ tab = back_tab = NULL;
+#endif
+ rc = OK;
+ }
+#endif
+ }
+ returnCode(rc);
+}
+
+#if NCURSES_SP_FUNCS