+ minor changes to tracing and locale-checks.
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.4071 2024/01/27 22:04:17 tom Exp $
+-- $Id: NEWS,v 1.4075 2024/02/04 00:53:44 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
+20240203
+ + minor changes to tracing and locale-checks.
+
20240127
+ amend change to z39-a (report by Sven Joachim).
+ use xterm+nopcfkeys, vt52-basic, dec+pp, dec+sl, vt52+arrows,
-5:0:10 6.4 20240127
+5:0:10 6.4 20240203
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1595 2024/01/27 11:04:16 tom Exp $
+# $Id: dist.mk,v 1.1596 2024/02/03 10:52:10 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 6
NCURSES_MINOR = 4
-NCURSES_PATCH = 20240127
+NCURSES_PATCH = 20240203
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
-# $Id: MKunctrl.awk,v 1.29 2020/02/02 23:34:34 tom Exp $
+# $Id: MKunctrl.awk,v 1.30 2024/02/03 21:09:14 tom Exp $
##############################################################################
-# Copyright 2020 Thomas E. Dickey #
+# Copyright 2020,2024 Thomas E. Dickey #
# Copyright 1998-2012,2017 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
print "\tint check = (int) ChCharOf(ch);"
print "\tconst char *result;"
print ""
- print "(void) sp;"
+ print "\t(void) sp;"
print "\tif (check >= 0 && check < (int)SIZEOF(unctrl_table)) {"
print "#if NCURSES_EXT_FUNCS"
print "\t\tif ((sp != 0)"
print "\t\telse"
print "\t\tif ((check >= 160)"
print "\t\t && (check < 256)"
+ print "\t\t && !_nc_unicode_locale()"
print "\t\t && ((sp != 0)"
print "\t\t && ((sp->_legacy_coding > 0)"
print "\t\t || (sp->_legacy_coding == 0"
/****************************************************************************
- * Copyright 2018-2022,2023 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 <locale.h>
#endif
-MODULE_ID("$Id: lib_setup.c,v 1.230 2023/11/04 21:02:27 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.231 2024/02/04 00:09:34 tom Exp $")
/****************************************************************************
*
NCURSES_EXPORT(int)
_nc_unicode_locale(void)
{
- int result = 0;
+ static bool initialized = FALSE;
+ static int result = 0;
+
+ if (!initialized) {
#if defined(_NC_WINDOWS) && USE_WIDEC_SUPPORT
- result = 1;
+ result = 1;
#elif HAVE_LANGINFO_CODESET
- char *env = nl_langinfo(CODESET);
- result = !strcmp(env, "UTF-8");
- T(("_nc_unicode_locale(%s) ->%d", env, result));
+ char *env = nl_langinfo(CODESET);
+ result = !strcmp(env, "UTF-8");
+ T(("_nc_unicode_locale(%s) ->%d", env, result));
#else
- char *env = _nc_get_locale();
- if (env != 0) {
- if (strstr(env, ".UTF-8") != 0) {
- result = 1;
- T(("_nc_unicode_locale(%s) ->%d", env, result));
+ char *env = _nc_get_locale();
+ if (env != 0) {
+ if (strstr(env, ".UTF-8") != 0) {
+ result = 1;
+ T(("_nc_unicode_locale(%s) ->%d", env, result));
+ }
}
- }
#endif
+ initialized = TRUE;
+ }
return result;
}
/****************************************************************************
- * Copyright 2018-2020,2022 Thomas E. Dickey *
+ * Copyright 2018-2022,2024 Thomas E. Dickey *
* Copyright 1998-2017,2018 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_traceatr.c,v 1.95 2022/06/11 22:40:56 tom Exp $")
+MODULE_ID("$Id: lib_traceatr.c,v 1.96 2024/02/04 00:11:35 tom Exp $")
#define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name))
} else {
PUTC_DATA;
int n;
+ int assume_unicode = _nc_unicode_locale()? 128 : 255;
(void) _nc_trace_bufcat(bufnum, "{ ");
for (PUTC_i = 0; PUTC_i < CCHARW_MAX; ++PUTC_i) {
UChar(ch->chars[PUTC_i])));
}
break;
- } else if (ch->chars[PUTC_i] > 255) {
+ } else if (ch->chars[PUTC_i] > assume_unicode) {
char temp[80];
_nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp))
- "{%d:\\u%lx}",
+ "{%d:\\u%04lx}",
_nc_wacs_width(ch->chars[PUTC_i]),
(unsigned long) ch->chars[PUTC_i]);
(void) _nc_trace_bufcat(bufnum, temp);
/****************************************************************************
- * Copyright 2020 Thomas E. Dickey *
+ * Copyright 2020,2024 Thomas E. Dickey *
* Copyright 1998-2009,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#include <ctype.h>
-MODULE_ID("$Id: lib_tracechr.c,v 1.23 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: lib_tracechr.c,v 1.24 2024/02/04 00:11:35 tom Exp $")
#ifdef TRACE
? sp->tracechr_buf
: _nc_globals.tracechr_buf);
- if (ch > KEY_MIN || ch < 0) {
+ if ((ch > KEY_MIN && !_nc_unicode_locale()) || ch < 0) {
name = safe_keyname(SP_PARM, ch);
if (name == 0 || *name == '\0')
name = "NULL";
_nc_SPRINTF(MyBuffer, _nc_SLIMIT(MyBufSize)
- "'%.30s' = %#03o", name, ch);
- } else if (!is8bits(ch) || !isprint(UChar(ch))) {
+ "'%.30s' = \\x%02x", name, ch);
+ } else if (!is8bits(ch)
+ || (_nc_unicode_locale() && !is7bits(ch))
+ || !isprint(UChar(ch))) {
/*
* workaround for glibc bug:
* sprintf changes the result from unctrl() to an empty string if it
* does not correspond to a valid multibyte sequence.
*/
_nc_SPRINTF(MyBuffer, _nc_SLIMIT(MyBufSize)
- "%#03o", ch);
+ "\\x%02x", ch);
} else {
name = safe_unctrl(SP_PARM, (chtype) ch);
if (name == 0 || *name == 0)
name = "null"; /* shouldn't happen */
_nc_SPRINTF(MyBuffer, _nc_SLIMIT(MyBufSize)
- "'%.30s' = %#03o", name, ch);
+ "'%.30s' = \\x%02x", name, ch);
}
return (MyBuffer);
}
/****************************************************************************
- * Copyright 2018-2022,2023 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.315 2023/09/16 16:38:41 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)
-ncurses6 (6.4+20240127) unstable; urgency=low
+ncurses6 (6.4+20240203) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 27 Jan 2024 06:04:16 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 03 Feb 2024 05:52:10 -0500
ncurses6 (5.9+20131005) unstable; urgency=low
-ncurses6 (6.4+20240127) unstable; urgency=low
+ncurses6 (6.4+20240203) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 27 Jan 2024 06:04:16 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 03 Feb 2024 05:52:10 -0500
ncurses6 (5.9+20131005) unstable; urgency=low
-ncurses6 (6.4+20240127) unstable; urgency=low
+ncurses6 (6.4+20240203) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 27 Jan 2024 06:04:16 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 03 Feb 2024 05:52:10 -0500
ncurses6 (5.9+20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.630 2024/01/27 11:04:16 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.631 2024/02/03 10:52:10 tom Exp $\r
\r
; TODO add examples\r
; TODO bump ABI to 6\r
!define VERSION_MAJOR "6"\r
!define VERSION_MINOR "4"\r
!define VERSION_YYYY "2024"\r
-!define VERSION_MMDD "0127"\r
+!define VERSION_MMDD "0203"\r
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
\r
!define MY_ABI "5"\r
Summary: shared libraries for terminal handling
Name: mingw32-ncurses6
Version: 6.4
-Release: 20240127
+Release: 20240203
License: X11
Group: Development/Libraries
URL: https://invisible-island.net/ncurses/
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.4
-Release: 20240127
+Release: 20240203
License: X11
Group: Development/Libraries
URL: https://invisible-island.net/ncurses/
Summary: Curses library with POSIX thread support.
Name: ncursest6
Version: 6.4
-Release: 20240127
+Release: 20240203
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz