-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3482 2020/05/02 23:42:21 tom Exp $
+-- $Id: NEWS,v 1.3484 2020/05/09 14:53:16 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.
+20200509
+ + add "-r" option to the dots test-programs, to help with scripting
+ a performance comparison.
+ + build-fix test/move_field.c for NetBSD curses, whose form headers
+ use different names than SVr4 or ncurses.
+
20200502
+ add details on the change to Linux SGR 21 in 2018 -TD
+ add xterm-direct16 and xterm-direct256 -TD
-5:0:10 6.2 20200502
+5:0:10 6.2 20200509
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1348 2020/05/02 09:32:34 tom Exp $
+# $Id: dist.mk,v 1.1349 2020/05/09 09:21:38 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 = 2
-NCURSES_PATCH = 20200502
+NCURSES_PATCH = 20200509
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_mouse.c,v 1.186 2020/05/02 21:13:04 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.187 2020/05/09 23:24:03 tom Exp $")
#include <tic.h>
if (intro >= 96) {
if (intro >= 160) {
- button = (intro - 152); /* buttons 8-11 */
+ button = (int) (intro - 152); /* buttons 8-11 */
} else if (intro >= 96) {
- button = (intro - 92); /* buttons 4-7 */
+ button = (int) (intro - 92); /* buttons 4-7 */
}
} else {
button = (intro & 3);
-ncurses6 (6.2+20200502) unstable; urgency=low
+ncurses6 (6.2+20200509) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 02 May 2020 05:32:34 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 09 May 2020 05:21:38 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.2+20200502) unstable; urgency=low
+ncurses6 (6.2+20200509) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 02 May 2020 05:32:34 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 09 May 2020 05:21:38 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.2+20200502) unstable; urgency=low
+ncurses6 (6.2+20200509) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 02 May 2020 05:32:34 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 09 May 2020 05:21:38 -0400
ncurses6 (5.9-20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.392 2020/05/02 09:32:34 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.393 2020/05/09 09:21:38 tom Exp $\r
\r
; TODO add examples\r
; TODO bump ABI to 6\r
!define VERSION_MAJOR "6"\r
!define VERSION_MINOR "2"\r
!define VERSION_YYYY "2020"\r
-!define VERSION_MMDD "0502"\r
+!define VERSION_MMDD "0509"\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.2
-Release: 20200502
+Release: 20200509
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.2
-Release: 20200502
+Release: 20200509
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: Curses library with POSIX thread support.
Name: ncursest6
Version: 6.2
-Release: 20200502
+Release: 20200509
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
* authorization. *
****************************************************************************/
/*
- * $Id: clip_printw.c,v 1.17 2020/02/02 23:34:34 tom Exp $
+ * $Id: clip_printw.c,v 1.19 2020/05/10 00:40:23 tom Exp $
*
* demonstrate how to use printw without wrapping.
*/
need = (unsigned) st.count + 1;
_nc_SPRINTF(fmt, _nc_SLIMIT(sizeof(fmt)) "%%c%%%ds%%c", st.count);
} else {
- need = (unsigned) getmaxx(win) - 1;
+ int want = getmaxx(win);
+ if (want < 10)
+ want = 10;
+ need = (unsigned) want - 1;
_nc_STRCPY(fmt, "%c%s%c", sizeof(fmt));
}
if ((buffer = typeMalloc(char, need + 1)) != 0) {
/*
* Author: Thomas E. Dickey
*
- * $Id: demo_terminfo.c,v 1.50 2020/02/02 23:34:34 tom Exp $
+ * $Id: demo_terminfo.c,v 1.51 2020/05/09 13:56:40 tom Exp $
*
* A simple demo of the terminfo interface.
*/
case 's':
s_opt = TRUE;
break;
-#ifdef NCURSES_VERSION
case 'x':
+#ifdef NCURSES_VERSION
x_opt = TRUE;
+#endif
break;
+#ifdef NCURSES_VERSION
case 'y':
y_opt = TRUE;
x_opt = TRUE;
/*
* Author: Thomas E. Dickey <dickey@clark.net> 1999
*
- * $Id: dots.c,v 1.36 2020/02/02 23:34:34 tom Exp $
+ * $Id: dots.c,v 1.39 2020/05/10 00:31:03 tom Exp $
*
* A simple demo of the terminfo interface.
*/
outs(clear_screen);
outs(cursor_normal);
- printf("\n\n%ld total cells, rate %.2f/sec\n",
- total_chars,
- ((double) (total_chars) / (double) (time((time_t *) 0) - started)));
+ fflush(stdout);
+ fprintf(stderr, "\n\n%ld total cells, rate %.2f/sec\n",
+ total_chars,
+ ((double) (total_chars) / (double) (time((time_t *) 0) - started)));
}
static void
#endif
," -f use tigetnum rather than <term.h> mapping"
," -m SIZE set margin (default: 2)"
+ ," -r SECS self-interrupt/exit after specified number of seconds"
," -s MSECS delay 1% of the time (default: 1 msecs)"
};
size_t n;
int my_colors;
int f_option = 0;
int m_option = 2;
+ int r_option = 0;
int s_option = 1;
size_t need;
char *my_env;
- while ((ch = getopt(argc, argv, "T:efm:s:")) != -1) {
+ while ((ch = getopt(argc, argv, "T:efm:r:s:")) != -1) {
switch (ch) {
case 'T':
need = 6 + strlen(optarg);
case 'm':
m_option = atoi(optarg);
break;
+ case 'r':
+ r_option = atoi(optarg);
+ break;
case 's':
s_option = atoi(optarg);
break;
}
}
+ SetupAlarm(r_option);
InitAndCatch(setupterm((char *) 0, 1, (int *) 0), onsig);
srand((unsigned) time(0));
/*
* Author: Thomas E. Dickey
*
- * $Id: dots_curses.c,v 1.16 2020/02/02 23:34:34 tom Exp $
+ * $Id: dots_curses.c,v 1.19 2020/05/10 00:31:59 tom Exp $
*
* A simple demo of the curses interface used for comparison with termcap.
*/
{
endwin();
- printf("\n\n%ld total cells, rate %.2f/sec\n",
- total_chars,
- ((double) (total_chars) / (double) (time((time_t *) 0) - started)));
+ fflush(stdout);
+ fprintf(stderr, "\n\n%ld total cells, rate %.2f/sec\n",
+ total_chars,
+ ((double) (total_chars) / (double) (time((time_t *) 0) - started)));
}
static void
," -e allow environment $LINES / $COLUMNS"
#endif
," -m SIZE set margin (default: 2)"
+ ," -r SECS self-interrupt/exit after specified number of seconds"
," -s MSECS delay 1% of the time (default: 1 msecs)"
};
size_t n;
bool d_option = FALSE;
#endif
int m_option = 2;
+ int r_option = 0;
int s_option = 1;
size_t need;
char *my_env;
- while ((ch = getopt(argc, argv, "T:dem:s:")) != -1) {
+ while ((ch = getopt(argc, argv, "T:dem:r:s:")) != -1) {
switch (ch) {
case 'T':
need = 6 + strlen(optarg);
case 'm':
m_option = atoi(optarg);
break;
+ case 'r':
+ r_option = atoi(optarg);
+ break;
case 's':
s_option = atoi(optarg);
break;
srand((unsigned) time(0));
+ SetupAlarm(r_option);
InitAndCatch(initscr(), onsig);
+
if (has_colors()) {
start_color();
#if HAVE_USE_DEFAULT_COLORS
/*
* Author: Thomas E. Dickey - 2007
*
- * $Id: dots_mvcur.c,v 1.22 2020/02/02 23:34:34 tom Exp $
+ * $Id: dots_mvcur.c,v 1.25 2020/05/10 00:32:11 tom Exp $
*
* A simple demo of the terminfo interface, and mvcur.
*/
outs(clear_screen);
outs(cursor_normal);
- printf("\n\n%ld total cells, rate %.2f/sec\n",
- total_chars,
- ((double) (total_chars) / (double) (time((time_t *) 0) - started)));
+ fflush(stdout);
+ fprintf(stderr, "\n\n%ld total cells, rate %.2f/sec\n",
+ total_chars,
+ ((double) (total_chars) / (double) (time((time_t *) 0) - started)));
}
static void
#endif
," -f use tigetnum rather than <term.h> mapping"
," -m SIZE set margin (default: 2)"
+ ," -r SECS self-interrupt/exit after specified number of seconds"
," -s MSECS delay 1% of the time (default: 1 msecs)"
};
size_t n;
int my_colors;
int f_option = 0;
int m_option = 2;
+ int r_option = 0;
int s_option = 1;
size_t need;
char *my_env;
- while ((ch = getopt(argc, argv, "T:efm:s:")) != -1) {
+ while ((ch = getopt(argc, argv, "T:efm:r:s:")) != -1) {
switch (ch) {
case 'T':
need = 6 + strlen(optarg);
case 'm':
m_option = atoi(optarg);
break;
+ case 'r':
+ r_option = atoi(optarg);
+ break;
case 's':
s_option = atoi(optarg);
break;
}
}
+ SetupAlarm(r_option);
InitAndCatch((sp = newterm((char *) 0, stdout, stdin)), onsig);
refresh(); /* needed with Solaris curses to cancel endwin */
/*
* Author: Thomas E. Dickey
*
- * $Id: dots_termcap.c,v 1.20 2020/02/02 23:34:34 tom Exp $
+ * $Id: dots_termcap.c,v 1.23 2020/05/10 00:32:22 tom Exp $
*
* A simple demo of the termcap interface.
*/
outs(t_cl);
outs(t_ve);
- printf("\n\n%ld total cells, rate %.2f/sec\n",
- total_chars,
- ((double) (total_chars) / (double) (time((time_t *) 0) - started)));
+ fflush(stdout);
+ fprintf(stderr, "\n\n%ld total cells, rate %.2f/sec\n",
+ total_chars,
+ ((double) (total_chars) / (double) (time((time_t *) 0) - started)));
}
static void
," -T TERM override $TERM"
," -e allow environment $LINES / $COLUMNS"
," -m SIZE set margin (default: 2)"
+ ," -r SECS self-interrupt/exit after specified number of seconds"
," -s MSECS delay 1% of the time (default: 1 msecs)"
};
size_t n;
int num_columns;
int e_option = 0;
int m_option = 2;
+ int r_option = 0;
int s_option = 1;
double r;
double c;
size_t need;
char *my_env;
- while ((ch = getopt(argc, argv, "T:em:s:")) != -1) {
+ while ((ch = getopt(argc, argv, "T:em:r:s:")) != -1) {
switch (ch) {
case 'T':
need = 6 + strlen(optarg);
case 'm':
m_option = atoi(optarg);
break;
+ case 'r':
+ r_option = atoi(optarg);
+ break;
case 's':
s_option = atoi(optarg);
break;
srand((unsigned) time(0));
+ SetupAlarm((unsigned) r_option);
InitAndCatch(ch = tgetent(buffer, name), onsig);
if (ch < 0) {
fprintf(stderr, "terminal description not found\n");
/*
* Author: Thomas E. Dickey
*
- * $Id: dots_xcurses.c,v 1.19 2020/02/02 23:34:34 tom Exp $
+ * $Id: dots_xcurses.c,v 1.22 2020/05/10 00:32:33 tom Exp $
*
* A simple demo of the wide-curses interface used for comparison with termcap.
*/
{
endwin();
- printf("\n\n%ld total cells, rate %.2f/sec\n",
- total_chars,
- ((double) (total_chars) / (double) (time((time_t *) 0) - started)));
+ fflush(stdout);
+ fprintf(stderr, "\n\n%ld total cells, rate %.2f/sec\n",
+ total_chars,
+ ((double) (total_chars) / (double) (time((time_t *) 0) - started)));
}
static void
," -e allow environment $LINES / $COLUMNS"
#endif
," -m SIZE set margin (default: 2)"
+ ," -r SECS self-interrupt/exit after specified number of seconds"
," -s MSECS delay 1% of the time (default: 1 msecs)"
#if HAVE_ALLOC_PAIR
," -x use alloc_pair() rather than init_pair()"
bool d_option = FALSE;
#endif
int m_option = 2;
+ int r_option = 0;
int s_option = 1;
size_t need;
char *my_env;
- while ((ch = getopt(argc, argv, "T:dem:s:x")) != -1) {
+ while ((ch = getopt(argc, argv, "T:dem:r:s:x")) != -1) {
switch (ch) {
case 'T':
need = 6 + strlen(optarg);
case 'm':
m_option = atoi(optarg);
break;
+ case 'r':
+ r_option = atoi(optarg);
+ break;
case 's':
s_option = atoi(optarg);
break;
srand((unsigned) time(0));
+ SetupAlarm(r_option);
InitAndCatch(initscr(), onsig);
if (has_colors()) {
start_color();
* authorization. *
****************************************************************************/
/*
- * $Id: move_field.c,v 1.6 2020/03/28 17:43:03 tom Exp $
+ * $Id: move_field.c,v 1.7 2020/05/09 12:52:00 tom Exp $
*
* Demonstrate move_field().
*/
#include <edit_field.h>
#include <popup_msg.h>
+#ifdef HAVE_NETBSD_FORM_H
+#define form_field_row(field) (field)->form_row
+#define form_field_col(field) (field)->form_col
+#else /* e.g., SVr4, ncurses */
+#define form_field_row(field) (field)->frow
+#define form_field_col(field) (field)->fcol
+#endif
+
#define DO_DEMO CTRL('F') /* actual key for toggling demo-mode */
#define MY_DEMO EDIT_FIELD('f') /* internal request-code */
getyx(stdscr, currow, curcol);
mvprintw(LINES - 1, 0,
"Field at [%d,%d]. Press %s to quit moving.",
- getbegy(sub) + field->frow,
- getbegx(sub) + field->fcol,
+ getbegy(sub) + form_field_row(field),
+ getbegx(sub) + form_field_col(field),
keyname(DO_DEMO));
clrtobot();
move(currow, curcol);
show_status(form, my_field);
ch = '?';
while ((ch = wgetch(form_win(form))) != DO_DEMO) {
- int field_y = my_field->frow;
- int field_x = my_field->fcol;
+ int field_y = form_field_row(my_field);
+ int field_x = form_field_col(my_field);
switch (ch) {
case 'h':
/****************************************************************************
* Author: Thomas E. Dickey 1996-on *
****************************************************************************/
-/* $Id: test.priv.h,v 1.185 2020/02/02 23:34:34 tom Exp $ */
+/* $Id: test.priv.h,v 1.186 2020/05/10 00:36:06 tom Exp $ */
#ifndef __TEST_PRIV_H
#define __TEST_PRIV_H 1
#define InitAndCatch(init,handler) do { init; CATCHALL(handler); } while (0)
#endif
+#if defined(_WIN32) || defined(USE_WIN32CON_DRIVER)
+#define SetupAlarm(opt) (void)opt
+#else
+#define SetupAlarm(opt) if (opt) alarm((unsigned)opt)
+#endif
+
/*
* Workaround for clean(er) compile with Solaris's legacy curses.
* The same would be needed for HPUX 10.20