/****************************************************************************
- * Copyright 2018-2020,2021 Thomas E. Dickey *
+ * Copyright 2018-2023,2024 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.312 2021/09/04 10:29:59 tom Exp $")
+MODULE_ID("$Id: tty_update.c,v 1.316 2024/02/04 00:09:34 tom Exp $")
/*
* This define controls the line-breakout optimization. Every once in a
* not checked.
*/
if (is8bits(CharOf(CHDEREF(ch)))
+ && (!is7bits(CharOf(CHDEREF(ch))) && _nc_unicode_locale())
&& (isprint(CharOf(CHDEREF(ch)))
|| (SP_PARM->_legacy_coding > 0 && CharOf(CHDEREF(ch)) >= 160)
|| (SP_PARM->_legacy_coding > 1 && CharOf(CHDEREF(ch)) >= 128)
* 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
if (check_pending(NCURSES_SP_ARG))
goto cleanup;
- nonempty = min(screen_lines(SP_PARM), NewScreen(SP_PARM)->_maxy + 1);
+ nonempty = Min(screen_lines(SP_PARM), NewScreen(SP_PARM)->_maxy + 1);
if (SP_PARM->_scrolling) {
NCURSES_SP_NAME(_nc_scroll_optimize) (NCURSES_SP_ARG);
if (0 != SP_PARM) {
int i;
NCURSES_CH_T blank = ClrBlank(NCURSES_SP_ARGx StdScreen(SP_PARM));
- int nonempty = min(screen_lines(SP_PARM),
+ int nonempty = Min(screen_lines(SP_PARM),
NewScreen(SP_PARM)->_maxy + 1);
ClearScreen(NCURSES_SP_ARGx blank);
ClrBottom(NCURSES_SP_DCLx int total)
{
int top = total;
- int last = min(screen_columns(SP_PARM), NewScreen(SP_PARM)->_maxx + 1);
+ int last = Min(screen_columns(SP_PARM), NewScreen(SP_PARM)->_maxx + 1);
NCURSES_CH_T blank = NewScreen(SP_PARM)->_line[total - 1].text[last - 1];
if (clr_eos && can_clear_with(NCURSES_SP_ARGx CHREF(blank))) {
** nLastChar = position of last different character in new line
**
** move to firstChar
-** overwrite chars up to min(oLastChar, nLastChar)
+** overwrite chars up to Min(oLastChar, nLastChar)
** if oLastChar < nLastChar
** insert newLine[oLastChar+1..nLastChar]
** else
}
ClrToEOL(NCURSES_SP_ARGx blank, FALSE);
} else {
- n = max(nLastChar, oLastChar);
+ n = Max(nLastChar, oLastChar);
PutRange(NCURSES_SP_ARGx
oldLine,
newLine,
break;
}
- n = min(oLastChar, nLastChar);
+ n = Min(oLastChar, nLastChar);
if (n >= firstChar) {
GoTo(NCURSES_SP_ARGx lineno, firstChar);
PutRange(NCURSES_SP_ARGx
}
if (oLastChar < nLastChar) {
- int m = max(nLastNonblank, oLastNonblank);
+ int m = Max(nLastNonblank, oLastNonblank);
#if USE_WIDEC_SUPPORT
if (n) {
while (isWidecExt(newLine[n + 1]) && n) {