- T((T_CALLED("newterm(\"%s\",%p,%p)"), name, ofp, ifp));
-
- /* this loads the capability entry, then sets LINES and COLS */
- if (setupterm(name, fileno(ofp), &errret) == ERR)
- return 0;
-
- /* implement filter mode */
- if (filter_mode) {
- LINES = 1;
-
- if (init_tabs != -1)
- TABSIZE = init_tabs;
- else
- TABSIZE = 8;
-
- T(("TABSIZE = %d", TABSIZE));
-
- 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;
- }
-
- /* 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))
- return 0;
- }
- /* this actually allocates the screen structure, and saves the
- * original terminal settings.
+NCURSES_EXPORT(SCREEN *)
+newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp)
+{
+ int value;
+ int errret;
+ int slk_format = _nc_globals.slk_format;
+ SCREEN *current;
+ SCREEN *result = 0;
+
+ START_TRACE();
+ T((T_CALLED("newterm(\"%s\",%p,%p)"), name, ofp, ifp));
+
+ /* this loads the capability entry, then sets LINES and COLS */
+ if (setupterm(name, fileno(ofp), &errret) == ERR) {
+ result = 0;
+ } else {
+ /*
+ * This actually allocates the screen structure, and saves the original
+ * terminal settings.