- newscr->_clear = TRUE;
- curscr->_clear = FALSE;
-
- def_shell_mode();
- def_prog_mode();
-
- for (rop = ripoff_stack;
- rop != ripoff_sp && (rop - ripoff_stack) < N_RIPS;
- rop++) {
-
- /* If we must simulate soft labels, grab off the line to be used.
- We assume that we must simulate, if it is none of the standard
- formats (4-4 or 3-2-3) for which there may be some hardware
- support. */
- if (rop->hook == _nc_slk_initialize)
- if (!(num_labels <= 0 || !SLK_STDFMT(slk_format)))
- continue;
- if (rop->hook) {
- int count;
- WINDOW *w;
-
- count = (rop->line < 0) ? -rop->line : rop->line;
- T(("ripping off %i lines at %s", count,
- ((rop->line < 0)
- ? "bottom"
- : "top")));
-
- w = newwin(count, scolumns,
- ((rop->line < 0)
- ? SP->_lines_avail - count
- : 0),
- 0);
- if (w) {
- rop->win = w;
- rop->hook(w, scolumns);
- } else {
- returnCode(ERR);
+ sp->_newscr->_clear = TRUE;
+ sp->_curscr->_clear = FALSE;
+
+ NCURSES_SP_NAME(def_shell_mode) (NCURSES_SP_ARG);
+ NCURSES_SP_NAME(def_prog_mode) (NCURSES_SP_ARG);
+
+ if (safe_ripoff_sp && safe_ripoff_sp != safe_ripoff_stack) {
+ for (rop = safe_ripoff_stack;
+ rop != safe_ripoff_sp && (rop - safe_ripoff_stack) < N_RIPS;
+ rop++) {
+
+ /* If we must simulate soft labels, grab off the line to be used.
+ We assume that we must simulate, if it is none of the standard
+ formats (4-4 or 3-2-3) for which there may be some hardware
+ support. */
+ if (rop->hook == _nc_slk_initialize) {
+ if (!(NumLabels <= 0 || !SLK_STDFMT(slk_format))) {
+ continue;
+ }
+ }
+ if (rop->hook) {
+ int count;
+ WINDOW *w;
+
+ count = (rop->line < 0) ? -rop->line : rop->line;
+ T(("ripping off %i lines at %s", count,
+ ((rop->line < 0)
+ ? "bottom"
+ : "top")));
+
+ w = NCURSES_SP_NAME(newwin) (NCURSES_SP_ARGx
+ count, scolumns,
+ ((rop->line < 0)
+ ? sp->_lines_avail - count
+ : 0),
+ 0);
+ if (w) {
+ rop->win = w;
+ rop->hook(w, scolumns);
+ } else {
+ ReturnScreenError();
+ }
+ if (rop->line < 0)
+ bottom_stolen += count;
+ else
+ sp->_topstolen += count;
+ sp->_lines_avail -= count;