+ T((T_CALLED("_nc_tinfo:doupdate(%p)"), (void *) SP_PARM));
+
+ if (SP_PARM == 0)
+ returnCode(ERR);
+
+#if !USE_REENTRANT
+ /*
+ * It is "legal" but unlikely that an application could assign a new
+ * value to one of the standard windows. Check for that possibility
+ * and try to recover.
+ *
+ * We do not allow applications to assign new values in the reentrant
+ * model.
+ */
+#define SyncScreens(internal,exported) \
+ if (internal == 0) internal = exported; \
+ if (internal != exported) exported = internal
+
+ SyncScreens(CurScreen(SP_PARM), curscr);
+ SyncScreens(NewScreen(SP_PARM), newscr);
+ SyncScreens(StdScreen(SP_PARM), stdscr);
+#endif
+
+ if (CurScreen(SP_PARM) == 0
+ || NewScreen(SP_PARM) == 0
+ || StdScreen(SP_PARM) == 0)
+ returnCode(ERR);