+ if ((SP->_current_attr = typeCalloc(NCURSES_CH_T, 1)) == 0)
+ returnCode(ERR);
+
+ /*
+ * We should always check the screensize, just in case.
+ */
+ _nc_get_screensize(&slines, &scolumns);
+ SET_LINES(slines);
+ SET_COLS(scolumns);
+ T((T_CREATE("screen %s %dx%d"), termname(), LINES, COLS));
+
+ SP->_filtered = filtered;
+
+ /* implement filter mode */
+ if (filtered) {
+ slines = 1;
+ SET_LINES(slines);
+ clear_screen = 0;
+ cursor_down = parm_down_cursor = 0;
+ cursor_address = 0;
+ cursor_up = parm_up_cursor = 0;
+ row_address = 0;
+
+ cursor_home = carriage_return;
+ T(("filter screensize %dx%d", LINES, COLS));
+ }
+
+ /* 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 (num_labels <= 0 || !SLK_STDFMT(slk_format)) {
+ if (slk_format) {
+ if (ERR == _nc_ripoffline(-SLK_LINES(slk_format),
+ _nc_slk_initialize))
+ returnCode(ERR);
+ }
+ }
+#ifdef __DJGPP__
+ T(("setting output mode to binary"));
+ fflush(output);
+ setmode(output, O_BINARY);
+#endif