/****************************************************************************
- * Copyright 2018-2020,2021 Thomas E. Dickey *
+ * Copyright 2018-2021,2022 Thomas E. Dickey *
* Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#include <ctype.h>
-MODULE_ID("$Id: tty_update.c,v 1.311 2021/08/16 21:51:11 tom Exp $")
+MODULE_ID("$Id: tty_update.c,v 1.314 2022/07/23 22:12:59 tom Exp $")
/*
* This define controls the line-breakout optimization. Every once in a
* An aggressive way to handle this would be to emit CR/LF after the
* char and then assume the wrap is done, you're on the first position
* of the next line, and the terminal out of its weird state. Here
- * it's safe to just tell the code that the cursor is in hyperspace and
+ * it is safe to just tell the code that the cursor is in hyperspace and
* let the next mvcur() call straighten things out.
*/
SP_PARM->_curscol = -1;
* We do not allow applications to assign new values in the reentrant
* model.
*/
+#if NCURSES_SP_FUNCS
+ if (SP_PARM == CURRENT_SCREEN) {
+#endif
#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);
+ SyncScreens(CurScreen(SP_PARM), curscr);
+ SyncScreens(NewScreen(SP_PARM), newscr);
+ SyncScreens(StdScreen(SP_PARM), stdscr);
+#if NCURSES_SP_FUNCS
+ }
#endif
+#endif /* !USE_REENTRANT */
if (CurScreen(SP_PARM) == 0
|| NewScreen(SP_PARM) == 0
/*
* This is the support for magic-cookie terminals. The theory: we scan
* the virtual screen looking for attribute turnons. Where we find one,
- * check to make sure it's realizable by seeing if the required number of
+ * check to make sure it is realizable by seeing if the required number of
* un-attributed blanks are present before and after the attributed range;
* try to shift the range boundaries over blanks (not changing the screen
* display) so this becomes true. If it is, shift the beginning attribute
bool end_onscreen = FALSE;
int m, n = j;
- /* find end of span, if it's onscreen */
+ /* find end of span, if it is onscreen */
for (m = i; m < screen_lines(SP_PARM); m++) {
for (; n < screen_columns(SP_PARM); n++) {
attr_t testattr =