+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(WINDOW *)
+_nc_makenew(int num_lines, int num_columns, int begy, int begx, int flags)
+{
+ return NCURSES_SP_NAME(_nc_makenew) (CURRENT_SCREEN,
+ num_lines, num_columns,
+ begy, begx, flags);
+}
+#endif
+
+/*
+ * wgetch() and other functions with a WINDOW* parameter may use a SCREEN*
+ * internally, and it is useful to allow those to be invoked without switching
+ * SCREEN's, e.g., for multi-threaded applications.
+ */
+NCURSES_EXPORT(SCREEN *)
+_nc_screen_of(WINDOW *win)
+{
+ SCREEN *sp = 0;
+
+ if (win != 0) {
+ WINDOWLIST *wp = (WINDOWLIST *) win;
+ sp = wp->screen;
+ }
+ return (sp);
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(WINDOW *)
+_nc_curscr_of(SCREEN *sp)
+{
+ return sp == 0 ? 0 : sp->_curscr;
+}
+
+NCURSES_EXPORT(WINDOW *)
+_nc_newscr_of(SCREEN *sp)
+{
+ return sp == 0 ? 0 : sp->_newscr;
+}
+
+NCURSES_EXPORT(WINDOW *)
+_nc_stdscr_of(SCREEN *sp)
+{
+ return sp == 0 ? 0 : sp->_stdscr;
+}
+#endif