+ modify tputs' error check to allow it to be used without first
calling tgetent or setupterm, noting that terminfo initialization
is requires for supporting the terminfo delay feature (report by
Sebastiano Vigna).
+ fix several warnings from clang --analyze
+ add null-pointer check in comp_parse.c, when a "use=" clause refers
to a nonexisting terminal description (report/patch by Miroslav
Lichvar, cf:
20210227).
25 files changed:
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3660 2021/05/01 21:55:29 tom Exp $
+-- $Id: NEWS,v 1.3662 2021/05/08 23:37:13 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
-------------------------------------------------------------------------------
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.
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
+20210508
+ + modify tputs' error check to allow it to be used without first
+ calling tgetent or setupterm, noting that terminfo initialization
+ is requires for supporting the terminfo delay feature (report by
+ Sebastiano Vigna).
+ + fix several warnings from clang --analyze
+ + add null-pointer check in comp_parse.c, when a "use=" clause refers
+ to a nonexisting terminal description (report/patch by Miroslav
+ Lichvar, cf: 20210227).
+
20210501
+ add a special case in the configure script to work around one of the
build-time breakages reported for OpenBSD 6 here:
20210501
+ add a special case in the configure script to work around one of the
build-time breakages reported for OpenBSD 6 here:
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1413 2021/05/01 09:40:30 tom Exp $
+# $Id: dist.mk,v 1.1414 2021/05/08 13:20:24 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
# 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
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 6
NCURSES_MINOR = 2
-NCURSES_PATCH = 20210501
+NCURSES_PATCH = 20210508
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
-MODULE_ID("$Id: m_post.c,v 1.35 2021/03/27 23:46:29 tom Exp $")
+MODULE_ID("$Id: m_post.c,v 1.36 2021/05/08 20:20:01 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
/*---------------------------------------------------------------------------
| Facility : libnmenu
lastvert = (menu->opt & O_NONCYCLIC) ? (ITEM *)0 : item;
lastvert = (menu->opt & O_NONCYCLIC) ? (ITEM *)0 : item;
- ITEM *lasthor;
-
- wmove(menu->win, y, 0);
-
- hitem = item;
- lasthor = (menu->opt & O_NONCYCLIC) ? (ITEM *)0 : hitem;
-
- _nc_Post_Item(menu, hitem);
- wattron(menu->win, (int)menu->back);
- if (((hitem = hitem->right) != lasthor) && hitem)
+ wmove(menu->win, y, 0);
+
+ hitem = item;
+ lasthor = (menu->opt & O_NONCYCLIC) ? (ITEM *)0 : hitem;
+
+ do
- int i, j, cy, cx;
- chtype ch = ' ';
+ _nc_Post_Item(menu, hitem);
- getyx(menu->win, cy, cx);
- for (j = 0; j < menu->spc_rows; j++)
+ wattron(menu->win, (int)menu->back);
+ if (((hitem = hitem->right) != lasthor) && hitem)
- wmove(menu->win, cy + j, cx);
- for (i = 0; i < menu->spc_cols; i++)
+ int i, j, cy, cx;
+ chtype ch = ' ';
+
+ getyx(menu->win, cy, cx);
+ for (j = 0; j < menu->spc_rows; j++)
+ wmove(menu->win, cy + j, cx);
+ for (i = 0; i < menu->spc_cols; i++)
+ {
+ waddch(menu->win, ch);
+ }
+ wmove(menu->win, cy, cx + menu->spc_cols);
- wmove(menu->win, cy, cx + menu->spc_cols);
- }
- while (hitem && (hitem != lasthor));
- wattroff(menu->win, (int)menu->back);
+ while (hitem && (hitem != lasthor));
+ wattroff(menu->win, (int)menu->back);
- item = item->down;
- y += menu->spc_rows;
+ item = item->down;
+ y += menu->spc_rows;
+ }
+ while (item && (item != lastvert));
- while (item && (item != lastvert));
}
/*---------------------------------------------------------------------------
}
/*---------------------------------------------------------------------------
-MODULE_ID("$Id: lib_bkgd.c,v 1.62 2021/02/13 20:06:54 tom Exp $")
+MODULE_ID("$Id: lib_bkgd.c,v 1.63 2021/05/08 14:58:12 tom Exp $")
static const NCURSES_CH_T blank = NewChar(BLANK_TEXT);
static const NCURSES_CH_T blank = NewChar(BLANK_TEXT);
- if ((pair = GetPair(win->_nc_bkgd)) != 0)
+ if (GetPair(win->_nc_bkgd) != 0)
SET_WINDOW_PAIR(win, 0);
if ((pair = GetPair(CHDEREF(ch))) != 0)
SET_WINDOW_PAIR(win, pair);
SET_WINDOW_PAIR(win, 0);
if ((pair = GetPair(CHDEREF(ch))) != 0)
SET_WINDOW_PAIR(win, pair);
#define CUR SP_TERMTYPE
#endif
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_color.c,v 1.146 2021/02/14 00:17:09 tom Exp $")
+MODULE_ID("$Id: lib_color.c,v 1.147 2021/05/08 15:11:48 tom Exp $")
#ifdef USE_TERM_DRIVER
#define CanChange InfoOf(SP_PARM).canchange
#ifdef USE_TERM_DRIVER
#define CanChange InfoOf(SP_PARM).canchange
- if ((n = tigetflag(name)) > 0) {
+ if (tigetflag(name) > 0) {
n = (width + 2) / 3;
result->bits.red = UChar(n);
result->bits.green = UChar(n);
n = (width + 2) / 3;
result->bits.red = UChar(n);
result->bits.green = UChar(n);
(void *) g,
(void *) b));
(void *) g,
(void *) b));
- if (sp == 0)
- returnCode(result);
-
- maxcolors = MaxColors;
+ if (sp != 0) {
+ maxcolors = MaxColors;
- if (color < 0 || !OkColorHi(color) || !sp->_coloron) {
- result = ERR;
- } else {
- int c_r, c_g, c_b;
+ if (color >= 0 && OkColorHi(color) && sp->_coloron) {
+ int c_r, c_g, c_b;
- if (sp->_direct_color.value) {
- rgb_bits_t *work = &(sp->_direct_color);
+ if (sp->_direct_color.value) {
+ rgb_bits_t *work = &(sp->_direct_color);
#define max_direct_color(name) ((1 << work->bits.name) - 1)
#define value_direct_color(max) (1000 * ((color >> bitoff) & max)) / max
#define max_direct_color(name) ((1 << work->bits.name) - 1)
#define value_direct_color(max) (1000 * ((color >> bitoff) & max)) / max
- int max_r = max_direct_color(red);
- int max_g = max_direct_color(green);
- int max_b = max_direct_color(blue);
+ int max_r = max_direct_color(red);
+ int max_g = max_direct_color(green);
+ int max_b = max_direct_color(blue);
- c_b = value_direct_color(max_b);
- bitoff += work->bits.blue;
+ c_b = value_direct_color(max_b);
+ bitoff += work->bits.blue;
- c_g = value_direct_color(max_g);
- bitoff += work->bits.green;
+ c_g = value_direct_color(max_g);
+ bitoff += work->bits.green;
- c_r = value_direct_color(max_r);
+ c_r = value_direct_color(max_r);
- } else {
- c_r = sp->_color_table[color].red;
- c_g = sp->_color_table[color].green;
- c_b = sp->_color_table[color].blue;
- }
+ } else {
+ c_r = sp->_color_table[color].red;
+ c_g = sp->_color_table[color].green;
+ c_b = sp->_color_table[color].blue;
+ }
+
+ if (r)
+ *r = c_r;
+ if (g)
+ *g = c_g;
+ if (b)
+ *b = c_b;
+ TR(TRACE_ATTRS, ("...color_content(%d,%d,%d,%d)",
+ color, c_r, c_g, c_b));
+ result = OK;
+ }
+ }
+ if (result != OK) {
- *b = c_b;
-
- TR(TRACE_ATTRS, ("...color_content(%d,%d,%d,%d)",
- color, c_r, c_g, c_b));
- result = OK;
#undef CUR
#define CUR SP_TERMTYPE
#undef CUR
#define CUR SP_TERMTYPE
-MODULE_ID("$Id: lib_set_term.c,v 1.177 2021/04/17 15:04:41 tom Exp $")
+MODULE_ID("$Id: lib_set_term.c,v 1.179 2021/05/08 21:48:34 tom Exp $")
#ifdef USE_TERM_DRIVER
#define MaxColors InfoOf(sp).maxcolors
#ifdef USE_TERM_DRIVER
#define MaxColors InfoOf(sp).maxcolors
fflush(output);
_setmode(fileno(output), _O_BINARY);
#endif
fflush(output);
_setmode(fileno(output), _O_BINARY);
#endif
- NCURSES_SP_NAME(_nc_set_buffer) (NCURSES_SP_ARGx output, TRUE);
sp->_lines = (NCURSES_SIZE_T) slines;
sp->_lines_avail = (NCURSES_SIZE_T) slines;
sp->_columns = (NCURSES_SIZE_T) scolumns;
sp->_lines = (NCURSES_SIZE_T) slines;
sp->_lines_avail = (NCURSES_SIZE_T) slines;
sp->_columns = (NCURSES_SIZE_T) scolumns;
p = extract_fgbg(p, &(sp->_default_fg));
p = extract_fgbg(p, &(sp->_default_bg));
if (*p) /* assume rxvt was compiled with xpm support */
p = extract_fgbg(p, &(sp->_default_fg));
p = extract_fgbg(p, &(sp->_default_bg));
if (*p) /* assume rxvt was compiled with xpm support */
- p = extract_fgbg(p, &(sp->_default_bg));
+ extract_fgbg(p, &(sp->_default_bg));
TR(TRACE_CHARPUT | TRACE_MOVE, ("decoded fg=%d, bg=%d",
sp->_default_fg, sp->_default_bg));
if (sp->_default_fg >= MaxColors) {
TR(TRACE_CHARPUT | TRACE_MOVE, ("decoded fg=%d, bg=%d",
sp->_default_fg, sp->_default_bg));
if (sp->_default_fg >= MaxColors) {
formats (4-4 or 3-2-3) for which there may be some hardware
support. */
if (rop->hook == _nc_slk_initialize) {
formats (4-4 or 3-2-3) for which there may be some hardware
support. */
if (rop->hook == _nc_slk_initialize) {
+ if (!TerminalOf(sp)) {
+ continue;
+ }
if (!(NumLabels <= 0 || !SLK_STDFMT(slk_format))) {
continue;
}
if (!(NumLabels <= 0 || !SLK_STDFMT(slk_format))) {
continue;
}
-MODULE_ID("$Id: new_pair.c,v 1.21 2021/02/14 00:17:09 tom Exp $")
+MODULE_ID("$Id: new_pair.c,v 1.22 2021/05/08 15:26:34 tom Exp $")
+ if (!found && SP_PARM->_color_pairs != NULL) {
for (pair = 1; pair <= hint; pair++) {
if (SP_PARM->_color_pairs[pair].mode == cpFREE) {
T(("found gap %d", pair));
for (pair = 1; pair <= hint; pair++) {
if (SP_PARM->_color_pairs[pair].mode == cpFREE) {
T(("found gap %d", pair));
/****************************************************************************
/****************************************************************************
- * Copyright 2018-2019,2020 Thomas E. Dickey *
+ * Copyright 2018-2020,2021 Thomas E. Dickey *
* Copyright 1998-2013,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* Copyright 1998-2013,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
-MODULE_ID("$Id: alloc_entry.c,v 1.64 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: alloc_entry.c,v 1.65 2021/05/04 23:15:34 tom Exp $")
#define ABSENT_OFFSET -1
#define CANCELLED_OFFSET -2
#define ABSENT_OFFSET -1
#define CANCELLED_OFFSET -2
_nc_align_termtype(to, from);
#endif
for_each_boolean(i, from) {
_nc_align_termtype(to, from);
#endif
for_each_boolean(i, from) {
- if (to->Booleans[i] != (char) CANCELLED_BOOLEAN) {
+ if (to->Booleans[i] != (NCURSES_SBOOL) CANCELLED_BOOLEAN) {
int mergebool = from->Booleans[i];
if (mergebool == CANCELLED_BOOLEAN)
int mergebool = from->Booleans[i];
if (mergebool == CANCELLED_BOOLEAN)
-MODULE_ID("$Id: comp_parse.c,v 1.112 2021/02/27 21:01:21 tom Exp $")
+MODULE_ID("$Id: comp_parse.c,v 1.113 2021/05/08 15:03:42 tom Exp $")
static void sanity_check2(TERMTYPE2 *, bool);
NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2;
static void sanity_check2(TERMTYPE2 *, bool);
NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2;
/* verify that there are no earlier uses */
for (j = 0; j < i; ++j) {
/* verify that there are no earlier uses */
for (j = 0; j < i; ++j) {
- if (!strcmp(qp->uses[j].link->tterm.term_names,
- rp->tterm.term_names)) {
+ if (qp->uses[j].link != NULL
+ && !strcmp(qp->uses[j].link->tterm.term_names,
+ rp->tterm.term_names)) {
_nc_warning("duplicate use=%s", lookfor);
break;
}
_nc_warning("duplicate use=%s", lookfor);
break;
}
/* verify that there are no earlier uses */
for (j = 0; j < i; ++j) {
/* verify that there are no earlier uses */
for (j = 0; j < i; ++j) {
- if (!strcmp(qp->uses[j].link->tterm.term_names,
- rp->tterm.term_names)) {
+ if (qp->uses[j].link != NULL
+ && !strcmp(qp->uses[j].link->tterm.term_names,
+ rp->tterm.term_names)) {
_nc_warning("duplicate use=%s", lookfor);
break;
}
_nc_warning("duplicate use=%s", lookfor);
break;
}
#include <termcap.h> /* ospeed */
#include <tic.h>
#include <termcap.h> /* ospeed */
#include <tic.h>
-MODULE_ID("$Id: lib_tputs.c,v 1.107 2021/04/03 18:45:53 tom Exp $")
+MODULE_ID("$Id: lib_tputs.c,v 1.108 2021/05/08 23:27:40 tom Exp $")
NCURSES_EXPORT_VAR(char) PC = 0; /* used by termcap library */
NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0; /* used by termcap library */
NCURSES_EXPORT_VAR(char) PC = 0; /* used by termcap library */
NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0; /* used by termcap library */
NCURSES_SP_OUTC outc)
{
NCURSES_SP_OUTC my_outch = GetOutCh();
NCURSES_SP_OUTC outc)
{
NCURSES_SP_OUTC my_outch = GetOutCh();
- bool always_delay;
- bool normal_delay;
+ bool always_delay = FALSE;
+ bool normal_delay = FALSE;
int number;
#if BSD_TPUTS
int trailpad;
int number;
#if BSD_TPUTS
int trailpad;
- if (SP_PARM != 0 && !HasTInfoTerminal(SP_PARM))
- return ERR;
-
if (!VALID_STRING(string))
return ERR;
if (!VALID_STRING(string))
return ERR;
+ if (SP_PARM != 0 && HasTInfoTerminal(SP_PARM)) {
+ if (
- (SP_PARM != 0 && SP_PARM->_term == 0)
+ (SP_PARM != 0 && SP_PARM->_term == 0)
- ) {
- always_delay = FALSE;
- normal_delay = TRUE;
- } else {
- always_delay = (string == bell) || (string == flash_screen);
- normal_delay =
- !xon_xoff
- && padding_baud_rate
+ ) {
+ always_delay = FALSE;
+ normal_delay = TRUE;
+ } else {
+ always_delay = (string == bell) || (string == flash_screen);
+ normal_delay =
+ !xon_xoff
+ && padding_baud_rate
- && !GetNoPadding(SP_PARM)
+ && !GetNoPadding(SP_PARM)
- && (_nc_baudrate(ospeed) >= padding_baud_rate);
+ && (_nc_baudrate(ospeed) >= padding_baud_rate);
+ }
#if BSD_TPUTS
/*
* This ugly kluge deals with the fact that some ancient BSD programs
#if BSD_TPUTS
/*
* This ugly kluge deals with the fact that some ancient BSD programs
-ncurses6 (6.2+20210501) unstable; urgency=low
+ncurses6 (6.2+20210508) unstable; urgency=low
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 01 May 2021 05:40:30 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 08 May 2021 09:20:24 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.2+20210501) unstable; urgency=low
+ncurses6 (6.2+20210508) unstable; urgency=low
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 01 May 2021 05:40:30 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 08 May 2021 09:20:24 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.2+20210501) unstable; urgency=low
+ncurses6 (6.2+20210508) unstable; urgency=low
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 01 May 2021 05:40:30 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 08 May 2021 09:20:24 -0400
ncurses6 (5.9-20120608) unstable; urgency=low
ncurses6 (5.9-20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.456 2021/05/01 09:40:30 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.457 2021/05/08 13:20:24 tom Exp $\r
\r
; TODO add examples\r
; TODO bump ABI to 6\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 "2021"\r
!define VERSION_MAJOR "6"\r
!define VERSION_MINOR "2"\r
!define VERSION_YYYY "2021"\r
-!define VERSION_MMDD "0501"\r
+!define VERSION_MMDD "0508"\r
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
\r
!define MY_ABI "5"\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
Summary: shared libraries for terminal handling
Name: mingw32-ncurses6
Version: 6.2
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.2
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.2
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: Curses library with POSIX thread support.
Name: ncursest6
Version: 6.2
Summary: Curses library with POSIX thread support.
Name: ncursest6
Version: 6.2
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
* authorization. *
****************************************************************************/
/*
* authorization. *
****************************************************************************/
/*
- * $Id: demo_menus.c,v 1.72 2021/03/20 16:05:49 tom Exp $
+ * $Id: demo_menus.c,v 1.73 2021/05/08 19:41:08 tom Exp $
*
* Demonstrate a variety of functions from the menu library.
* Thomas Dickey - 2005/4/9
*
* Demonstrate a variety of functions from the menu library.
* Thomas Dickey - 2005/4/9
}
_nc_SPRINTF(buf, _nc_SLIMIT(need) "0x%02x = {", tlevel);
if (tlevel == 0) {
}
_nc_SPRINTF(buf, _nc_SLIMIT(need) "0x%02x = {", tlevel);
if (tlevel == 0) {
- _nc_STRCAT(buf, t_tbl[0].name, need);
+ _nc_STRCAT(buf, t_tbl[0].name ? t_tbl[0].name : "", need);
_nc_STRCAT(buf, ", ", need);
} else {
for (n = 1; t_tbl[n].name != 0; n++)
_nc_STRCAT(buf, ", ", need);
} else {
for (n = 1; t_tbl[n].name != 0; n++)
/****************************************************************************
/****************************************************************************
- * Copyright 2019,2020 Thomas E. Dickey *
+ * Copyright 2019-2020,2021 Thomas E. Dickey *
* Copyright 1998-2014,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* Copyright 1998-2014,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
- * $Id: hanoi.c,v 1.41 2020/02/02 23:34:34 tom Exp $
+ * $Id: hanoi.c,v 1.42 2021/05/08 20:44:44 tom Exp $
*/
#include <test.priv.h>
*/
#include <test.priv.h>
- switch (ch = (argc - optind)) {
+ switch (argc - optind) {
case 2:
if (strcmp(argv[optind + 1], "a")) {
usage();
case 2:
if (strcmp(argv[optind + 1], "a")) {
usage();
* Eric S. Raymond <esr@snark.thyrsus.com> July 22 1995. Mouse support
* added September 20th 1995.
*
* Eric S. Raymond <esr@snark.thyrsus.com> July 22 1995. Mouse support
* added September 20th 1995.
*
- * $Id: knight.c,v 1.48 2021/04/25 00:10:43 tom Exp $
+ * $Id: knight.c,v 1.49 2021/05/08 19:32:15 tom Exp $
*/
#include <test.priv.h>
*/
#include <test.priv.h>
for (i = 0; i < ylimit; i++) {
for (j = 0; j < xlimit; j++) {
for (i = 0; i < ylimit; i++) {
for (j = 0; j < xlimit; j++) {
+ memset(squares, 0, sizeof(squares));
memset(history, 0, sizeof(history));
history[0].y = history[0].x = -1;
history[1].y = history[1].x = -1;
memset(history, 0, sizeof(history));
history[0].y = history[0].x = -1;
history[1].y = history[1].x = -1;
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
-$Id: ncurses.c,v 1.524 2021/03/20 16:11:50 tom Exp $
+$Id: ncurses.c,v 1.525 2021/05/08 19:44:31 tom Exp $
***************************************************************************/
***************************************************************************/
"Number repeats. Toggle legend:? filler:a timer:t scrollmark:s."
};
int n = ((int) SIZEOF(legend) - (LINES - line));
"Number repeats. Toggle legend:? filler:a timer:t scrollmark:s."
};
int n = ((int) SIZEOF(legend) - (LINES - line));
+ if (n >= 0 && n < (int) SIZEOF(legend)) {
if (move(line, 0) != ERR) {
if (show_panner_legend)
printw("%s", legend[n]);
if (move(line, 0) != ERR) {
if (show_panner_legend)
printw("%s", legend[n]);
}
_nc_SPRINTF(buf, _nc_SLIMIT(need) "0x%02x = {", tlevel);
if (tlevel == 0) {
}
_nc_SPRINTF(buf, _nc_SLIMIT(need) "0x%02x = {", tlevel);
if (tlevel == 0) {
- _nc_STRCAT(buf, t_tbl[0].name, need);
+ _nc_STRCAT(buf, t_tbl[0].name ? t_tbl[0].name : "", need);
_nc_STRCAT(buf, ", ", need);
} else {
for (n = 1; t_tbl[n].name != 0; n++)
_nc_STRCAT(buf, ", ", need);
} else {
for (n = 1; t_tbl[n].name != 0; n++)
* authorization. *
****************************************************************************/
/*
* authorization. *
****************************************************************************/
/*
- * $Id: picsmap.c,v 1.138 2021/05/01 20:38:40 tom Exp $
+ * $Id: picsmap.c,v 1.139 2021/05/08 15:56:05 tom Exp $
*
* Author: Thomas E. Dickey
*
*
* Author: Thomas E. Dickey
*
if (tries & 2) {
int len = (int) strlen(filename);
if (tries & 2) {
int len = (int) strlen(filename);
* authorization. *
****************************************************************************/
/*
* authorization. *
****************************************************************************/
/*
- * $Id: test_add_wchstr.c,v 1.28 2021/03/27 23:41:34 tom Exp $
+ * $Id: test_add_wchstr.c,v 1.29 2021/05/08 20:04:10 tom Exp $
*
* Demonstrate the waddwchstr() and wadd_wch functions.
* Thomas Dickey - 2009/9/12
*
* Demonstrate the waddwchstr() and wadd_wch functions.
* Thomas Dickey - 2009/9/12
size_t adjust = 0;
size_t n;
size_t adjust = 0;
size_t n;
- for (n = 0; n < result; ++n) {
+ for (n = 0; source[n] != 0; ++n) {
- if (source[n] < 256 && (s = unctrl((chtype) source[n])) != 0) {
+ if ((source[n] < 256) && (s = unctrl((chtype) source[n])) != 0) {
adjust += (strlen(s) - 1);
}
}
adjust += (strlen(s) - 1);
}
}
* scroll operation worked, and the refresh() code only had to do a
* partial repaint.
*
* scroll operation worked, and the refresh() code only had to do a
* partial repaint.
*
- * $Id: view.c,v 1.140 2021/03/27 22:42:22 tom Exp $
+ * $Id: view.c,v 1.141 2021/05/08 15:57:04 tom Exp $
*/
#include <test.priv.h>
*/
#include <test.priv.h>
static bool n_option = FALSE;
#endif
static bool n_option = FALSE;
#endif
-static GCC_NORETURN void usage(void);
-
-static void
+static GCC_NORETURN void
failed(const char *msg)
{
endwin();
failed(const char *msg)
{
endwin();
+static GCC_NORETURN void
usage(void)
{
static const char *msg[] =
usage(void)
{
static const char *msg[] =