修訂 | 56a81c7e79f73d397cc8074401d039f59c34cad5 (tree) |
---|---|
時間 | 2021-05-09 09:34:51 |
作者 | Thomas E. Dickey <dickey@invi...> |
Commiter | Thomas E. Dickey |
ncurses 6.2 - patch 20210508
+ modify tputs' error check to allow it to be used without first
+ fix several warnings from clang --analyze
+ add null-pointer check in comp_parse.c, when a "use=" clause refers
@@ -26,7 +26,7 @@ | ||
26 | 26 | -- sale, use or other dealings in this Software without prior written -- |
27 | 27 | -- authorization. -- |
28 | 28 | ------------------------------------------------------------------------------- |
29 | --- $Id: NEWS,v 1.3660 2021/05/01 21:55:29 tom Exp $ | |
29 | +-- $Id: NEWS,v 1.3662 2021/05/08 23:37:13 tom Exp $ | |
30 | 30 | ------------------------------------------------------------------------------- |
31 | 31 | |
32 | 32 | This is a log of changes that ncurses has gone through since Zeyd started |
@@ -46,6 +46,16 @@ See the AUTHORS file for the corresponding full names. | ||
46 | 46 | Changes through 1.9.9e did not credit all contributions; |
47 | 47 | it is not possible to add this information. |
48 | 48 | |
49 | +20210508 | |
50 | + + modify tputs' error check to allow it to be used without first | |
51 | + calling tgetent or setupterm, noting that terminfo initialization | |
52 | + is requires for supporting the terminfo delay feature (report by | |
53 | + Sebastiano Vigna). | |
54 | + + fix several warnings from clang --analyze | |
55 | + + add null-pointer check in comp_parse.c, when a "use=" clause refers | |
56 | + to a nonexisting terminal description (report/patch by Miroslav | |
57 | + Lichvar, cf: 20210227). | |
58 | + | |
49 | 59 | 20210501 |
50 | 60 | + add a special case in the configure script to work around one of the |
51 | 61 | build-time breakages reported for OpenBSD 6 here: |
@@ -1 +1 @@ | ||
1 | -5:0:10 6.2 20210501 | |
1 | +5:0:10 6.2 20210508 |
@@ -26,7 +26,7 @@ | ||
26 | 26 | # use or other dealings in this Software without prior written # |
27 | 27 | # authorization. # |
28 | 28 | ############################################################################## |
29 | -# $Id: dist.mk,v 1.1413 2021/05/01 09:40:30 tom Exp $ | |
29 | +# $Id: dist.mk,v 1.1414 2021/05/08 13:20:24 tom Exp $ | |
30 | 30 | # Makefile for creating ncurses distributions. |
31 | 31 | # |
32 | 32 | # This only needs to be used directly as a makefile by developers, but |
@@ -38,7 +38,7 @@ SHELL = /bin/sh | ||
38 | 38 | # These define the major/minor/patch versions of ncurses. |
39 | 39 | NCURSES_MAJOR = 6 |
40 | 40 | NCURSES_MINOR = 2 |
41 | -NCURSES_PATCH = 20210501 | |
41 | +NCURSES_PATCH = 20210508 | |
42 | 42 | |
43 | 43 | # We don't append the patch to the version, since this only applies to releases |
44 | 44 | VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) |
@@ -38,7 +38,7 @@ | ||
38 | 38 | |
39 | 39 | #include "menu.priv.h" |
40 | 40 | |
41 | -MODULE_ID("$Id: m_post.c,v 1.35 2021/03/27 23:46:29 tom Exp $") | |
41 | +MODULE_ID("$Id: m_post.c,v 1.36 2021/05/08 20:20:01 tom Exp $") | |
42 | 42 | |
43 | 43 | /*--------------------------------------------------------------------------- |
44 | 44 | | Facility : libnmenu |
@@ -215,45 +215,48 @@ _nc_Draw_Menu(const MENU *menu) | ||
215 | 215 | |
216 | 216 | lastvert = (menu->opt & O_NONCYCLIC) ? (ITEM *)0 : item; |
217 | 217 | |
218 | - do | |
218 | + if (item != NULL) | |
219 | 219 | { |
220 | - ITEM *lasthor; | |
221 | - | |
222 | - wmove(menu->win, y, 0); | |
223 | - | |
224 | - hitem = item; | |
225 | - lasthor = (menu->opt & O_NONCYCLIC) ? (ITEM *)0 : hitem; | |
226 | - | |
227 | 220 | do |
228 | 221 | { |
229 | - _nc_Post_Item(menu, hitem); | |
222 | + ITEM *lasthor; | |
230 | 223 | |
231 | - wattron(menu->win, (int)menu->back); | |
232 | - if (((hitem = hitem->right) != lasthor) && hitem) | |
224 | + wmove(menu->win, y, 0); | |
225 | + | |
226 | + hitem = item; | |
227 | + lasthor = (menu->opt & O_NONCYCLIC) ? (ITEM *)0 : hitem; | |
228 | + | |
229 | + do | |
233 | 230 | { |
234 | - int i, j, cy, cx; | |
235 | - chtype ch = ' '; | |
231 | + _nc_Post_Item(menu, hitem); | |
236 | 232 | |
237 | - getyx(menu->win, cy, cx); | |
238 | - for (j = 0; j < menu->spc_rows; j++) | |
233 | + wattron(menu->win, (int)menu->back); | |
234 | + if (((hitem = hitem->right) != lasthor) && hitem) | |
239 | 235 | { |
240 | - wmove(menu->win, cy + j, cx); | |
241 | - for (i = 0; i < menu->spc_cols; i++) | |
236 | + int i, j, cy, cx; | |
237 | + chtype ch = ' '; | |
238 | + | |
239 | + getyx(menu->win, cy, cx); | |
240 | + for (j = 0; j < menu->spc_rows; j++) | |
242 | 241 | { |
243 | - waddch(menu->win, ch); | |
242 | + wmove(menu->win, cy + j, cx); | |
243 | + for (i = 0; i < menu->spc_cols; i++) | |
244 | + { | |
245 | + waddch(menu->win, ch); | |
246 | + } | |
244 | 247 | } |
248 | + wmove(menu->win, cy, cx + menu->spc_cols); | |
245 | 249 | } |
246 | - wmove(menu->win, cy, cx + menu->spc_cols); | |
247 | 250 | } |
248 | - } | |
249 | - while (hitem && (hitem != lasthor)); | |
250 | - wattroff(menu->win, (int)menu->back); | |
251 | + while (hitem && (hitem != lasthor)); | |
252 | + wattroff(menu->win, (int)menu->back); | |
251 | 253 | |
252 | - item = item->down; | |
253 | - y += menu->spc_rows; | |
254 | + item = item->down; | |
255 | + y += menu->spc_rows; | |
254 | 256 | |
257 | + } | |
258 | + while (item && (item != lastvert)); | |
255 | 259 | } |
256 | - while (item && (item != lastvert)); | |
257 | 260 | } |
258 | 261 | |
259 | 262 | /*--------------------------------------------------------------------------- |
@@ -37,7 +37,7 @@ | ||
37 | 37 | |
38 | 38 | #include <curses.priv.h> |
39 | 39 | |
40 | -MODULE_ID("$Id: lib_bkgd.c,v 1.62 2021/02/13 20:06:54 tom Exp $") | |
40 | +MODULE_ID("$Id: lib_bkgd.c,v 1.63 2021/05/08 14:58:12 tom Exp $") | |
41 | 41 | |
42 | 42 | static const NCURSES_CH_T blank = NewChar(BLANK_TEXT); |
43 | 43 |
@@ -64,7 +64,7 @@ wbkgrndset(WINDOW *win, const ARG_CH_T ch) | ||
64 | 64 | { |
65 | 65 | int pair; |
66 | 66 | |
67 | - if ((pair = GetPair(win->_nc_bkgd)) != 0) | |
67 | + if (GetPair(win->_nc_bkgd) != 0) | |
68 | 68 | SET_WINDOW_PAIR(win, 0); |
69 | 69 | if ((pair = GetPair(CHDEREF(ch))) != 0) |
70 | 70 | SET_WINDOW_PAIR(win, pair); |
@@ -49,7 +49,7 @@ | ||
49 | 49 | #define CUR SP_TERMTYPE |
50 | 50 | #endif |
51 | 51 | |
52 | -MODULE_ID("$Id: lib_color.c,v 1.146 2021/02/14 00:17:09 tom Exp $") | |
52 | +MODULE_ID("$Id: lib_color.c,v 1.147 2021/05/08 15:11:48 tom Exp $") | |
53 | 53 | |
54 | 54 | #ifdef USE_TERM_DRIVER |
55 | 55 | #define CanChange InfoOf(SP_PARM).canchange |
@@ -266,7 +266,7 @@ init_direct_colors(NCURSES_SP_DCL0) | ||
266 | 266 | ; |
267 | 267 | } |
268 | 268 | |
269 | - if ((n = tigetflag(name)) > 0) { | |
269 | + if (tigetflag(name) > 0) { | |
270 | 270 | n = (width + 2) / 3; |
271 | 271 | result->bits.red = UChar(n); |
272 | 272 | result->bits.green = UChar(n); |
@@ -840,52 +840,57 @@ _nc_color_content(SCREEN *sp, int color, int *r, int *g, int *b) | ||
840 | 840 | (void *) g, |
841 | 841 | (void *) b)); |
842 | 842 | |
843 | - if (sp == 0) | |
844 | - returnCode(result); | |
845 | - | |
846 | - maxcolors = MaxColors; | |
843 | + if (sp != 0) { | |
844 | + maxcolors = MaxColors; | |
847 | 845 | |
848 | - if (color < 0 || !OkColorHi(color) || !sp->_coloron) { | |
849 | - result = ERR; | |
850 | - } else { | |
851 | - int c_r, c_g, c_b; | |
846 | + if (color >= 0 && OkColorHi(color) && sp->_coloron) { | |
847 | + int c_r, c_g, c_b; | |
852 | 848 | |
853 | - if (sp->_direct_color.value) { | |
854 | - rgb_bits_t *work = &(sp->_direct_color); | |
849 | + if (sp->_direct_color.value) { | |
850 | + rgb_bits_t *work = &(sp->_direct_color); | |
855 | 851 | |
856 | 852 | #define max_direct_color(name) ((1 << work->bits.name) - 1) |
857 | 853 | #define value_direct_color(max) (1000 * ((color >> bitoff) & max)) / max |
858 | 854 | |
859 | - int max_r = max_direct_color(red); | |
860 | - int max_g = max_direct_color(green); | |
861 | - int max_b = max_direct_color(blue); | |
855 | + int max_r = max_direct_color(red); | |
856 | + int max_g = max_direct_color(green); | |
857 | + int max_b = max_direct_color(blue); | |
862 | 858 | |
863 | - int bitoff = 0; | |
859 | + int bitoff = 0; | |
864 | 860 | |
865 | - c_b = value_direct_color(max_b); | |
866 | - bitoff += work->bits.blue; | |
861 | + c_b = value_direct_color(max_b); | |
862 | + bitoff += work->bits.blue; | |
867 | 863 | |
868 | - c_g = value_direct_color(max_g); | |
869 | - bitoff += work->bits.green; | |
864 | + c_g = value_direct_color(max_g); | |
865 | + bitoff += work->bits.green; | |
870 | 866 | |
871 | - c_r = value_direct_color(max_r); | |
867 | + c_r = value_direct_color(max_r); | |
872 | 868 | |
873 | - } else { | |
874 | - c_r = sp->_color_table[color].red; | |
875 | - c_g = sp->_color_table[color].green; | |
876 | - c_b = sp->_color_table[color].blue; | |
877 | - } | |
869 | + } else { | |
870 | + c_r = sp->_color_table[color].red; | |
871 | + c_g = sp->_color_table[color].green; | |
872 | + c_b = sp->_color_table[color].blue; | |
873 | + } | |
874 | + | |
875 | + if (r) | |
876 | + *r = c_r; | |
877 | + if (g) | |
878 | + *g = c_g; | |
879 | + if (b) | |
880 | + *b = c_b; | |
878 | 881 | |
882 | + TR(TRACE_ATTRS, ("...color_content(%d,%d,%d,%d)", | |
883 | + color, c_r, c_g, c_b)); | |
884 | + result = OK; | |
885 | + } | |
886 | + } | |
887 | + if (result != OK) { | |
879 | 888 | if (r) |
880 | - *r = c_r; | |
889 | + *r = 0; | |
881 | 890 | if (g) |
882 | - *g = c_g; | |
891 | + *g = 0; | |
883 | 892 | if (b) |
884 | - *b = c_b; | |
885 | - | |
886 | - TR(TRACE_ATTRS, ("...color_content(%d,%d,%d,%d)", | |
887 | - color, c_r, c_g, c_b)); | |
888 | - result = OK; | |
893 | + *b = 0; | |
889 | 894 | } |
890 | 895 | returnCode(result); |
891 | 896 | } |
@@ -54,7 +54,7 @@ | ||
54 | 54 | #undef CUR |
55 | 55 | #define CUR SP_TERMTYPE |
56 | 56 | |
57 | -MODULE_ID("$Id: lib_set_term.c,v 1.177 2021/04/17 15:04:41 tom Exp $") | |
57 | +MODULE_ID("$Id: lib_set_term.c,v 1.179 2021/05/08 21:48:34 tom Exp $") | |
58 | 58 | |
59 | 59 | #ifdef USE_TERM_DRIVER |
60 | 60 | #define MaxColors InfoOf(sp).maxcolors |
@@ -417,7 +417,6 @@ NCURSES_SP_NAME(_nc_setupscreen) ( | ||
417 | 417 | fflush(output); |
418 | 418 | _setmode(fileno(output), _O_BINARY); |
419 | 419 | #endif |
420 | - NCURSES_SP_NAME(_nc_set_buffer) (NCURSES_SP_ARGx output, TRUE); | |
421 | 420 | sp->_lines = (NCURSES_SIZE_T) slines; |
422 | 421 | sp->_lines_avail = (NCURSES_SIZE_T) slines; |
423 | 422 | sp->_columns = (NCURSES_SIZE_T) scolumns; |
@@ -500,7 +499,7 @@ NCURSES_SP_NAME(_nc_setupscreen) ( | ||
500 | 499 | p = extract_fgbg(p, &(sp->_default_fg)); |
501 | 500 | p = extract_fgbg(p, &(sp->_default_bg)); |
502 | 501 | if (*p) /* assume rxvt was compiled with xpm support */ |
503 | - p = extract_fgbg(p, &(sp->_default_bg)); | |
502 | + extract_fgbg(p, &(sp->_default_bg)); | |
504 | 503 | TR(TRACE_CHARPUT | TRACE_MOVE, ("decoded fg=%d, bg=%d", |
505 | 504 | sp->_default_fg, sp->_default_bg)); |
506 | 505 | if (sp->_default_fg >= MaxColors) { |
@@ -697,6 +696,9 @@ NCURSES_SP_NAME(_nc_setupscreen) ( | ||
697 | 696 | formats (4-4 or 3-2-3) for which there may be some hardware |
698 | 697 | support. */ |
699 | 698 | if (rop->hook == _nc_slk_initialize) { |
699 | + if (!TerminalOf(sp)) { | |
700 | + continue; | |
701 | + } | |
700 | 702 | if (!(NumLabels <= 0 || !SLK_STDFMT(slk_format))) { |
701 | 703 | continue; |
702 | 704 | } |
@@ -61,7 +61,7 @@ | ||
61 | 61 | |
62 | 62 | #endif |
63 | 63 | |
64 | -MODULE_ID("$Id: new_pair.c,v 1.21 2021/02/14 00:17:09 tom Exp $") | |
64 | +MODULE_ID("$Id: new_pair.c,v 1.22 2021/05/08 15:26:34 tom Exp $") | |
65 | 65 | |
66 | 66 | #if NCURSES_EXT_COLORS |
67 | 67 |
@@ -297,7 +297,7 @@ NCURSES_SP_NAME(alloc_pair) (NCURSES_SP_DCLx int fg, int bg) | ||
297 | 297 | found = TRUE; |
298 | 298 | } |
299 | 299 | } |
300 | - if (!found) { | |
300 | + if (!found && SP_PARM->_color_pairs != NULL) { | |
301 | 301 | for (pair = 1; pair <= hint; pair++) { |
302 | 302 | if (SP_PARM->_color_pairs[pair].mode == cpFREE) { |
303 | 303 | T(("found gap %d", pair)); |
@@ -1,5 +1,5 @@ | ||
1 | 1 | /**************************************************************************** |
2 | - * Copyright 2018-2019,2020 Thomas E. Dickey * | |
2 | + * Copyright 2018-2020,2021 Thomas E. Dickey * | |
3 | 3 | * Copyright 1998-2013,2017 Free Software Foundation, Inc. * |
4 | 4 | * * |
5 | 5 | * Permission is hereby granted, free of charge, to any person obtaining a * |
@@ -48,7 +48,7 @@ | ||
48 | 48 | |
49 | 49 | #include <tic.h> |
50 | 50 | |
51 | -MODULE_ID("$Id: alloc_entry.c,v 1.64 2020/02/02 23:34:34 tom Exp $") | |
51 | +MODULE_ID("$Id: alloc_entry.c,v 1.65 2021/05/04 23:15:34 tom Exp $") | |
52 | 52 | |
53 | 53 | #define ABSENT_OFFSET -1 |
54 | 54 | #define CANCELLED_OFFSET -2 |
@@ -242,7 +242,7 @@ _nc_merge_entry(ENTRY * const target, ENTRY * const source) | ||
242 | 242 | _nc_align_termtype(to, from); |
243 | 243 | #endif |
244 | 244 | for_each_boolean(i, from) { |
245 | - if (to->Booleans[i] != (char) CANCELLED_BOOLEAN) { | |
245 | + if (to->Booleans[i] != (NCURSES_SBOOL) CANCELLED_BOOLEAN) { | |
246 | 246 | int mergebool = from->Booleans[i]; |
247 | 247 | |
248 | 248 | if (mergebool == CANCELLED_BOOLEAN) |
@@ -48,7 +48,7 @@ | ||
48 | 48 | |
49 | 49 | #include <tic.h> |
50 | 50 | |
51 | -MODULE_ID("$Id: comp_parse.c,v 1.112 2021/02/27 21:01:21 tom Exp $") | |
51 | +MODULE_ID("$Id: comp_parse.c,v 1.113 2021/05/08 15:03:42 tom Exp $") | |
52 | 52 | |
53 | 53 | static void sanity_check2(TERMTYPE2 *, bool); |
54 | 54 | NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2; |
@@ -457,8 +457,9 @@ _nc_resolve_uses2(bool fullresolve, bool literal) | ||
457 | 457 | |
458 | 458 | /* verify that there are no earlier uses */ |
459 | 459 | for (j = 0; j < i; ++j) { |
460 | - if (!strcmp(qp->uses[j].link->tterm.term_names, | |
461 | - rp->tterm.term_names)) { | |
460 | + if (qp->uses[j].link != NULL | |
461 | + && !strcmp(qp->uses[j].link->tterm.term_names, | |
462 | + rp->tterm.term_names)) { | |
462 | 463 | _nc_warning("duplicate use=%s", lookfor); |
463 | 464 | break; |
464 | 465 | } |
@@ -487,8 +488,9 @@ _nc_resolve_uses2(bool fullresolve, bool literal) | ||
487 | 488 | |
488 | 489 | /* verify that there are no earlier uses */ |
489 | 490 | for (j = 0; j < i; ++j) { |
490 | - if (!strcmp(qp->uses[j].link->tterm.term_names, | |
491 | - rp->tterm.term_names)) { | |
491 | + if (qp->uses[j].link != NULL | |
492 | + && !strcmp(qp->uses[j].link->tterm.term_names, | |
493 | + rp->tterm.term_names)) { | |
492 | 494 | _nc_warning("duplicate use=%s", lookfor); |
493 | 495 | break; |
494 | 496 | } |
@@ -52,7 +52,7 @@ | ||
52 | 52 | #include <termcap.h> /* ospeed */ |
53 | 53 | #include <tic.h> |
54 | 54 | |
55 | -MODULE_ID("$Id: lib_tputs.c,v 1.107 2021/04/03 18:45:53 tom Exp $") | |
55 | +MODULE_ID("$Id: lib_tputs.c,v 1.108 2021/05/08 23:27:40 tom Exp $") | |
56 | 56 | |
57 | 57 | NCURSES_EXPORT_VAR(char) PC = 0; /* used by termcap library */ |
58 | 58 | NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0; /* used by termcap library */ |
@@ -276,8 +276,8 @@ NCURSES_SP_NAME(tputs) (NCURSES_SP_DCLx | ||
276 | 276 | NCURSES_SP_OUTC outc) |
277 | 277 | { |
278 | 278 | NCURSES_SP_OUTC my_outch = GetOutCh(); |
279 | - bool always_delay; | |
280 | - bool normal_delay; | |
279 | + bool always_delay = FALSE; | |
280 | + bool normal_delay = FALSE; | |
281 | 281 | int number; |
282 | 282 | #if BSD_TPUTS |
283 | 283 | int trailpad; |
@@ -305,32 +305,30 @@ NCURSES_SP_NAME(tputs) (NCURSES_SP_DCLx | ||
305 | 305 | } |
306 | 306 | #endif /* TRACE */ |
307 | 307 | |
308 | - if (SP_PARM != 0 && !HasTInfoTerminal(SP_PARM)) | |
309 | - return ERR; | |
310 | - | |
311 | 308 | if (!VALID_STRING(string)) |
312 | 309 | return ERR; |
313 | 310 | |
314 | - if ( | |
311 | + if (SP_PARM != 0 && HasTInfoTerminal(SP_PARM)) { | |
312 | + if ( | |
315 | 313 | #if NCURSES_SP_FUNCS |
316 | - (SP_PARM != 0 && SP_PARM->_term == 0) | |
314 | + (SP_PARM != 0 && SP_PARM->_term == 0) | |
317 | 315 | #else |
318 | - cur_term == 0 | |
316 | + cur_term == 0 | |
319 | 317 | #endif |
320 | - ) { | |
321 | - always_delay = FALSE; | |
322 | - normal_delay = TRUE; | |
323 | - } else { | |
324 | - always_delay = (string == bell) || (string == flash_screen); | |
325 | - normal_delay = | |
326 | - !xon_xoff | |
327 | - && padding_baud_rate | |
318 | + ) { | |
319 | + always_delay = FALSE; | |
320 | + normal_delay = TRUE; | |
321 | + } else { | |
322 | + always_delay = (string == bell) || (string == flash_screen); | |
323 | + normal_delay = | |
324 | + !xon_xoff | |
325 | + && padding_baud_rate | |
328 | 326 | #if NCURSES_NO_PADDING |
329 | - && !GetNoPadding(SP_PARM) | |
327 | + && !GetNoPadding(SP_PARM) | |
330 | 328 | #endif |
331 | - && (_nc_baudrate(ospeed) >= padding_baud_rate); | |
329 | + && (_nc_baudrate(ospeed) >= padding_baud_rate); | |
330 | + } | |
332 | 331 | } |
333 | - | |
334 | 332 | #if BSD_TPUTS |
335 | 333 | /* |
336 | 334 | * This ugly kluge deals with the fact that some ancient BSD programs |
@@ -1,8 +1,8 @@ | ||
1 | -ncurses6 (6.2+20210501) unstable; urgency=low | |
1 | +ncurses6 (6.2+20210508) unstable; urgency=low | |
2 | 2 | |
3 | 3 | * latest weekly patch |
4 | 4 | |
5 | - -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 01 May 2021 05:40:30 -0400 | |
5 | + -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 08 May 2021 09:20:24 -0400 | |
6 | 6 | |
7 | 7 | ncurses6 (5.9-20131005) unstable; urgency=low |
8 | 8 |
@@ -1,8 +1,8 @@ | ||
1 | -ncurses6 (6.2+20210501) unstable; urgency=low | |
1 | +ncurses6 (6.2+20210508) unstable; urgency=low | |
2 | 2 | |
3 | 3 | * latest weekly patch |
4 | 4 | |
5 | - -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 01 May 2021 05:40:30 -0400 | |
5 | + -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 08 May 2021 09:20:24 -0400 | |
6 | 6 | |
7 | 7 | ncurses6 (5.9-20131005) unstable; urgency=low |
8 | 8 |
@@ -1,8 +1,8 @@ | ||
1 | -ncurses6 (6.2+20210501) unstable; urgency=low | |
1 | +ncurses6 (6.2+20210508) unstable; urgency=low | |
2 | 2 | |
3 | 3 | * latest weekly patch |
4 | 4 | |
5 | - -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 01 May 2021 05:40:30 -0400 | |
5 | + -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 08 May 2021 09:20:24 -0400 | |
6 | 6 | |
7 | 7 | ncurses6 (5.9-20120608) unstable; urgency=low |
8 | 8 |
@@ -1,4 +1,4 @@ | ||
1 | -; $Id: mingw-ncurses.nsi,v 1.456 2021/05/01 09:40:30 tom Exp $ | |
1 | +; $Id: mingw-ncurses.nsi,v 1.457 2021/05/08 13:20:24 tom Exp $ | |
2 | 2 | |
3 | 3 | ; TODO add examples |
4 | 4 | ; TODO bump ABI to 6 |
@@ -10,7 +10,7 @@ | ||
10 | 10 | !define VERSION_MAJOR "6" |
11 | 11 | !define VERSION_MINOR "2" |
12 | 12 | !define VERSION_YYYY "2021" |
13 | -!define VERSION_MMDD "0501" | |
13 | +!define VERSION_MMDD "0508" | |
14 | 14 | !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD} |
15 | 15 | |
16 | 16 | !define MY_ABI "5" |
@@ -3,7 +3,7 @@ | ||
3 | 3 | Summary: shared libraries for terminal handling |
4 | 4 | Name: mingw32-ncurses6 |
5 | 5 | Version: 6.2 |
6 | -Release: 20210501 | |
6 | +Release: 20210508 | |
7 | 7 | License: X11 |
8 | 8 | Group: Development/Libraries |
9 | 9 | Source: ncurses-%{version}-%{release}.tgz |
@@ -1,7 +1,7 @@ | ||
1 | 1 | Summary: shared libraries for terminal handling |
2 | 2 | Name: ncurses6 |
3 | 3 | Version: 6.2 |
4 | -Release: 20210501 | |
4 | +Release: 20210508 | |
5 | 5 | License: X11 |
6 | 6 | Group: Development/Libraries |
7 | 7 | Source: ncurses-%{version}-%{release}.tgz |
@@ -1,7 +1,7 @@ | ||
1 | 1 | Summary: Curses library with POSIX thread support. |
2 | 2 | Name: ncursest6 |
3 | 3 | Version: 6.2 |
4 | -Release: 20210501 | |
4 | +Release: 20210508 | |
5 | 5 | License: X11 |
6 | 6 | Group: Development/Libraries |
7 | 7 | Source: ncurses-%{version}-%{release}.tgz |
@@ -27,7 +27,7 @@ | ||
27 | 27 | * authorization. * |
28 | 28 | ****************************************************************************/ |
29 | 29 | /* |
30 | - * $Id: demo_menus.c,v 1.72 2021/03/20 16:05:49 tom Exp $ | |
30 | + * $Id: demo_menus.c,v 1.73 2021/05/08 19:41:08 tom Exp $ | |
31 | 31 | * |
32 | 32 | * Demonstrate a variety of functions from the menu library. |
33 | 33 | * Thomas Dickey - 2005/4/9 |
@@ -565,7 +565,7 @@ tracetrace(unsigned tlevel) | ||
565 | 565 | } |
566 | 566 | _nc_SPRINTF(buf, _nc_SLIMIT(need) "0x%02x = {", tlevel); |
567 | 567 | if (tlevel == 0) { |
568 | - _nc_STRCAT(buf, t_tbl[0].name, need); | |
568 | + _nc_STRCAT(buf, t_tbl[0].name ? t_tbl[0].name : "", need); | |
569 | 569 | _nc_STRCAT(buf, ", ", need); |
570 | 570 | } else { |
571 | 571 | for (n = 1; t_tbl[n].name != 0; n++) |
@@ -1,5 +1,5 @@ | ||
1 | 1 | /**************************************************************************** |
2 | - * Copyright 2019,2020 Thomas E. Dickey * | |
2 | + * Copyright 2019-2020,2021 Thomas E. Dickey * | |
3 | 3 | * Copyright 1998-2014,2017 Free Software Foundation, Inc. * |
4 | 4 | * * |
5 | 5 | * Permission is hereby granted, free of charge, to any person obtaining a * |
@@ -42,7 +42,7 @@ | ||
42 | 42 | * |
43 | 43 | * Date: 05.Nov.90 |
44 | 44 | * |
45 | - * $Id: hanoi.c,v 1.41 2020/02/02 23:34:34 tom Exp $ | |
45 | + * $Id: hanoi.c,v 1.42 2021/05/08 20:44:44 tom Exp $ | |
46 | 46 | */ |
47 | 47 | |
48 | 48 | #include <test.priv.h> |
@@ -283,7 +283,7 @@ main(int argc, char **argv) | ||
283 | 283 | } |
284 | 284 | setlocale(LC_ALL, ""); |
285 | 285 | |
286 | - switch (ch = (argc - optind)) { | |
286 | + switch (argc - optind) { | |
287 | 287 | case 2: |
288 | 288 | if (strcmp(argv[optind + 1], "a")) { |
289 | 289 | usage(); |
@@ -34,7 +34,7 @@ | ||
34 | 34 | * Eric S. Raymond <esr@snark.thyrsus.com> July 22 1995. Mouse support |
35 | 35 | * added September 20th 1995. |
36 | 36 | * |
37 | - * $Id: knight.c,v 1.48 2021/04/25 00:10:43 tom Exp $ | |
37 | + * $Id: knight.c,v 1.49 2021/05/08 19:32:15 tom Exp $ | |
38 | 38 | */ |
39 | 39 | |
40 | 40 | #include <test.priv.h> |
@@ -621,10 +621,10 @@ play(void) | ||
621 | 621 | |
622 | 622 | for (i = 0; i < ylimit; i++) { |
623 | 623 | for (j = 0; j < xlimit; j++) { |
624 | - squares[i][j] = FALSE; | |
625 | 624 | unmarkcell(i, j); |
626 | 625 | } |
627 | 626 | } |
627 | + memset(squares, 0, sizeof(squares)); | |
628 | 628 | memset(history, 0, sizeof(history)); |
629 | 629 | history[0].y = history[0].x = -1; |
630 | 630 | history[1].y = history[1].x = -1; |
@@ -41,7 +41,7 @@ AUTHOR | ||
41 | 41 | Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993 |
42 | 42 | Thomas E. Dickey (beginning revision 1.27 in 1996). |
43 | 43 | |
44 | -$Id: ncurses.c,v 1.524 2021/03/20 16:11:50 tom Exp $ | |
44 | +$Id: ncurses.c,v 1.525 2021/05/08 19:44:31 tom Exp $ | |
45 | 45 | |
46 | 46 | ***************************************************************************/ |
47 | 47 |
@@ -5531,7 +5531,7 @@ panner_legend(int line) | ||
5531 | 5531 | "Number repeats. Toggle legend:? filler:a timer:t scrollmark:s." |
5532 | 5532 | }; |
5533 | 5533 | int n = ((int) SIZEOF(legend) - (LINES - line)); |
5534 | - if (n >= 0) { | |
5534 | + if (n >= 0 && n < (int) SIZEOF(legend)) { | |
5535 | 5535 | if (move(line, 0) != ERR) { |
5536 | 5536 | if (show_panner_legend) |
5537 | 5537 | printw("%s", legend[n]); |
@@ -6232,7 +6232,7 @@ tracetrace(unsigned tlevel) | ||
6232 | 6232 | } |
6233 | 6233 | _nc_SPRINTF(buf, _nc_SLIMIT(need) "0x%02x = {", tlevel); |
6234 | 6234 | if (tlevel == 0) { |
6235 | - _nc_STRCAT(buf, t_tbl[0].name, need); | |
6235 | + _nc_STRCAT(buf, t_tbl[0].name ? t_tbl[0].name : "", need); | |
6236 | 6236 | _nc_STRCAT(buf, ", ", need); |
6237 | 6237 | } else { |
6238 | 6238 | for (n = 1; t_tbl[n].name != 0; n++) |
@@ -27,7 +27,7 @@ | ||
27 | 27 | * authorization. * |
28 | 28 | ****************************************************************************/ |
29 | 29 | /* |
30 | - * $Id: picsmap.c,v 1.138 2021/05/01 20:38:40 tom Exp $ | |
30 | + * $Id: picsmap.c,v 1.139 2021/05/08 15:56:05 tom Exp $ | |
31 | 31 | * |
32 | 32 | * Author: Thomas E. Dickey |
33 | 33 | * |
@@ -604,7 +604,6 @@ read_palette(const char *filename) | ||
604 | 604 | continue; |
605 | 605 | } |
606 | 606 | } |
607 | - s += strlen(s); | |
608 | 607 | |
609 | 608 | if (tries & 2) { |
610 | 609 | int len = (int) strlen(filename); |
@@ -27,7 +27,7 @@ | ||
27 | 27 | * authorization. * |
28 | 28 | ****************************************************************************/ |
29 | 29 | /* |
30 | - * $Id: test_add_wchstr.c,v 1.28 2021/03/27 23:41:34 tom Exp $ | |
30 | + * $Id: test_add_wchstr.c,v 1.29 2021/05/08 20:04:10 tom Exp $ | |
31 | 31 | * |
32 | 32 | * Demonstrate the waddwchstr() and wadd_wch functions. |
33 | 33 | * Thomas Dickey - 2009/9/12 |
@@ -133,10 +133,10 @@ ChWLen(const wchar_t *source) | ||
133 | 133 | size_t adjust = 0; |
134 | 134 | size_t n; |
135 | 135 | |
136 | - for (n = 0; n < result; ++n) { | |
136 | + for (n = 0; source[n] != 0; ++n) { | |
137 | 137 | const char *s; |
138 | 138 | |
139 | - if (source[n] < 256 && (s = unctrl((chtype) source[n])) != 0) { | |
139 | + if ((source[n] < 256) && (s = unctrl((chtype) source[n])) != 0) { | |
140 | 140 | adjust += (strlen(s) - 1); |
141 | 141 | } |
142 | 142 | } |
@@ -52,7 +52,7 @@ | ||
52 | 52 | * scroll operation worked, and the refresh() code only had to do a |
53 | 53 | * partial repaint. |
54 | 54 | * |
55 | - * $Id: view.c,v 1.140 2021/03/27 22:42:22 tom Exp $ | |
55 | + * $Id: view.c,v 1.141 2021/05/08 15:57:04 tom Exp $ | |
56 | 56 | */ |
57 | 57 | |
58 | 58 | #include <test.priv.h> |
@@ -78,9 +78,7 @@ static int num_lines; | ||
78 | 78 | static bool n_option = FALSE; |
79 | 79 | #endif |
80 | 80 | |
81 | -static GCC_NORETURN void usage(void); | |
82 | - | |
83 | -static void | |
81 | +static GCC_NORETURN void | |
84 | 82 | failed(const char *msg) |
85 | 83 | { |
86 | 84 | endwin(); |
@@ -368,7 +366,7 @@ read_file(const char *filename) | ||
368 | 366 | free(my_blob); |
369 | 367 | } |
370 | 368 | |
371 | -static void | |
369 | +static GCC_NORETURN void | |
372 | 370 | usage(void) |
373 | 371 | { |
374 | 372 | static const char *msg[] = |