- * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. *
+ * Copyright 2018,2020 Thomas E. Dickey *
+ * Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
/* for extended XPG4 conformance requires cbreak() at this point */
/* (SVr4 curses does this anyway) */
/* for extended XPG4 conformance requires cbreak() at this point */
/* (SVr4 curses does this anyway) */
+#elif defined(EXP_WIN32_DRIVER)
+ buf.dwFlagIn = CONMODE_IN_DEFAULT;
+ buf.dwFlagOut = CONMODE_OUT_DEFAULT | VT_FLAG_OUT;
+ if (WINCONSOLE.isTermInfoConsole) {
+ buf.dwFlagIn |= VT_FLAG_IN;
+ }
INIT_TERM_DRIVER();
/* this loads the capability entry, then sets LINES and COLS */
if (
TINFO_SETUP_TERM(&new_term, name,
fileno(_ofp), &errret, FALSE) != ERR) {
INIT_TERM_DRIVER();
/* this loads the capability entry, then sets LINES and COLS */
if (
TINFO_SETUP_TERM(&new_term, name,
fileno(_ofp), &errret, FALSE) != ERR) {
/* allow user to set maximum escape delay from the environment */
if ((value = _nc_getenv_num("ESCDELAY")) >= 0) {
/* allow user to set maximum escape delay from the environment */
if ((value = _nc_getenv_num("ESCDELAY")) >= 0) {
- return NCURSES_SP_NAME(newterm) (CURRENT_SCREEN_PRE, name, ofp, ifp);
+ SCREEN *rc;
+ _nc_lock_global(prescreen);
+ START_TRACE();
+ rc = NCURSES_SP_NAME(newterm) (CURRENT_SCREEN_PRE, name, ofp, ifp);
+ _nc_forget_prescr();
+ _nc_unlock_global(prescreen);
+ return rc;