-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1974 2012/11/18 02:16:21 tom Exp $
+-- $Id: NEWS,v 1.1976 2012/11/24 20:02:52 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.
+20121124
+ + correct order of color initialization versus display in some of the
+ test-programs, e.g., test_addstr.c
+ > fixes based on Coverity report:
+ + delete windows on exit from some of the test-programs.
+
20121117
> fixes based on Coverity report:
+ add missing braces around FreeAndNull in two places.
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.901 2012/11/17 16:48:42 tom Exp $
+# $Id: dist.mk,v 1.902 2012/11/24 17:11:44 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 = 5
NCURSES_MINOR = 9
-NCURSES_PATCH = 20121117
+NCURSES_PATCH = 20121124
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
#include <ctype.h>
#include <tic.h>
-MODULE_ID("$Id: captoinfo.c,v 1.73 2012/10/27 21:27:02 tom Exp $")
+MODULE_ID("$Id: captoinfo.c,v 1.75 2012/11/24 20:48:54 tom Exp $")
#define MAX_PUSHED 16 /* max # args we can push onto the stack */
&& ((in0 == 4 && in1 == 10 && in2 == 48)
|| (in0 == 3 && in1 == 9 && in2 == 38))) {
/* dumb-down an optimized case from xterm-256color for termcap */
- str = strstr(str, ";m");
+ if ((str = strstr(str, ";m")) == 0)
+ break; /* cannot happen */
++str;
if (in2 == 48) {
bufptr = save_string(bufptr, "[48;5;%dm");
* but that may not be the end of the string.
*/
assert(str != 0);
- if (*str == '\0')
+ if (str == 0 || *str == '\0')
break;
} /* endwhile (*str) */
-ncurses6 (5.9-20121117) unstable; urgency=low
+ncurses6 (5.9-20121124) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 17 Nov 2012 11:58:08 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 24 Nov 2012 12:13:21 -0500
ncurses6 (5.9-20120608) unstable; urgency=low
Summary: shared libraries for terminal handling
Name: ncurses6
Release: 5.9
-Version: 20121117
+Version: 20121124
License: X11
Group: Development/Libraries
Source: ncurses-%{release}-%{version}.tgz
/****************************************************************************
- * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
/*
* Author: Thomas E. Dickey (1998-on)
*
- * $Id: ditto.c,v 1.41 2011/05/21 18:55:07 tom Exp $
+ * $Id: ditto.c,v 1.42 2012/11/24 20:16:18 tom Exp $
*
* The program illustrates how to set up multiple screens from a single
* program.
int which1; /* this screen's index in DITTO[] array */
int length; /* length of windows[] and peeks[] */
char **titles; /* per-window titles */
+ WINDOW **parents; /* display boxes around each screen's data */
WINDOW **windows; /* display data from each screen */
PEEK *peeks; /* indices for each screen's fifo */
FIFO fifo; /* fifo for this screen */
scrollok(stdscr, TRUE);
box(stdscr, 0, 0);
+ target->parents = typeCalloc(WINDOW *, (size_t) target->length);
target->windows = typeCalloc(WINDOW *, (size_t) target->length);
target->peeks = typeCalloc(PEEK, (size_t) target->length);
nodelay(inner, TRUE);
#endif
+ target->parents[k] = outer;
target->windows[k] = inner;
}
doupdate();
* authorization. *
****************************************************************************/
/*
- * $Id: ins_wide.c,v 1.17 2012/06/09 20:29:33 tom Exp $
+ * $Id: ins_wide.c,v 1.18 2012/11/24 19:57:17 tom Exp $
*
* Demonstrate the wins_wstr() and wins_wch functions.
* Thomas Dickey - 2002/11/23
(void) cbreak(); /* take input chars one at a time, no wait for \n */
(void) noecho(); /* don't echo input */
keypad(stdscr, TRUE);
+
+ /*
+ * Show the characters inserted in color, to distinguish from those
+ * that are shifted.
+ */
+ if (has_colors()) {
+ start_color();
+ init_pair(1, COLOR_WHITE, COLOR_BLUE);
+ }
}
limit = LINES - 5;
doupdate();
- /*
- * Show the characters inserted in color, to distinguish from those that
- * are shifted.
- */
if (has_colors()) {
- start_color();
- init_pair(1, COLOR_WHITE, COLOR_BLUE);
wbkgdset(work, (chtype) (COLOR_PAIR(1) | ' '));
}
* authorization. *
****************************************************************************/
/*
- * $Id: inserts.c,v 1.24 2012/06/09 20:29:33 tom Exp $
+ * $Id: inserts.c,v 1.25 2012/11/24 19:57:17 tom Exp $
*
* Demonstrate the winsstr() and winsch functions.
* Thomas Dickey - 2002/10/19
(void) cbreak(); /* take input chars one at a time, no wait for \n */
(void) noecho(); /* don't echo input */
keypad(stdscr, TRUE);
+
+ /*
+ * Show the characters inserted in color, to distinguish from those
+ * that are shifted.
+ */
+ if (has_colors()) {
+ start_color();
+ init_pair(1, COLOR_WHITE, COLOR_BLUE);
+ }
}
limit = LINES - 5;
doupdate();
- /*
- * Show the characters inserted in color, to distinguish from those that
- * are shifted.
- */
if (has_colors()) {
- start_color();
- init_pair(1, COLOR_WHITE, COLOR_BLUE);
wbkgdset(work, (chtype) (COLOR_PAIR(1) | ' '));
}
* authorization. *
****************************************************************************/
/*
- * $Id: test_add_wchstr.c,v 1.17 2012/10/27 19:37:30 tom Exp $
+ * $Id: test_add_wchstr.c,v 1.19 2012/11/24 20:04:13 tom Exp $
*
* Demonstrate the waddwchstr() and wadd_wch functions.
* Thomas Dickey - 2009/9/12
(void) cbreak(); /* take input chars one at a time, no wait for \n */
(void) noecho(); /* don't echo input */
keypad(stdscr, TRUE);
+
+ /*
+ * Show the characters added in color, to distinguish from those that
+ * are shifted.
+ */
+ if (has_colors()) {
+ start_color();
+ init_pair(1, COLOR_WHITE, COLOR_BLUE);
+ }
}
limit = LINES - 5;
doupdate();
- /*
- * Show the characters added in color, to distinguish from those that
- * are shifted.
- */
if (has_colors()) {
- start_color();
- init_pair(1, COLOR_WHITE, COLOR_BLUE);
wbkgdset(work, (chtype) (COLOR_PAIR(1) | ' '));
}
break;
}
}
+ delwin(show);
if (level > 0) {
- delwin(show);
delwin(work);
delwin(look);
}
* authorization. *
****************************************************************************/
/*
- * $Id: test_addchstr.c,v 1.15 2012/10/27 19:31:42 tom Exp $
+ * $Id: test_addchstr.c,v 1.16 2012/11/24 19:51:05 tom Exp $
*
* Demonstrate the waddchstr() and waddch functions.
* Thomas Dickey - 2009/9/12
(void) cbreak(); /* take input chars one at a time, no wait for \n */
(void) noecho(); /* don't echo input */
keypad(stdscr, TRUE);
+
+ /*
+ * Show the characters added in color, to distinguish from those that
+ * are shifted.
+ */
+ if (has_colors()) {
+ start_color();
+ init_pair(1, COLOR_WHITE, COLOR_BLUE);
+ }
}
limit = LINES - 5;
doupdate();
- /*
- * Show the characters added in color, to distinguish from those that
- * are shifted.
- */
if (has_colors()) {
- start_color();
- init_pair(1, COLOR_WHITE, COLOR_BLUE);
show_attr = (attr_t) COLOR_PAIR(1);
wbkgdset(work, show_attr | ' ');
} else {
* authorization. *
****************************************************************************/
/*
- * $Id: test_addstr.c,v 1.7 2012/06/09 20:29:33 tom Exp $
+ * $Id: test_addstr.c,v 1.9 2012/11/24 19:49:02 tom Exp $
*
* Demonstrate the waddstr() and waddch functions.
* Thomas Dickey - 2009/9/12
(void) cbreak(); /* take input chars one at a time, no wait for \n */
(void) noecho(); /* don't echo input */
keypad(stdscr, TRUE);
+
+ /*
+ * Show the characters added in color, to distinguish from those that
+ * are shifted.
+ */
+ if (has_colors()) {
+ start_color();
+ init_pair(1, COLOR_WHITE, COLOR_BLUE);
+ }
}
limit = LINES - 5;
doupdate();
- /*
- * Show the characters added in color, to distinguish from those that
- * are shifted.
- */
if (has_colors()) {
- start_color();
- init_pair(1, COLOR_WHITE, COLOR_BLUE);
wbkgdset(work, (chtype) (COLOR_PAIR(1) | ' '));
}
break;
}
}
+ delwin(show);
if (level > 0) {
- delwin(show);
delwin(work);
delwin(look);
}
* authorization. *
****************************************************************************/
/*
- * $Id: test_addwstr.c,v 1.8 2012/06/09 20:29:33 tom Exp $
+ * $Id: test_addwstr.c,v 1.10 2012/11/24 20:04:54 tom Exp $
*
* Demonstrate the waddwstr() and wadd_wch functions.
* Thomas Dickey - 2009/9/12
(void) cbreak(); /* take input chars one at a time, no wait for \n */
(void) noecho(); /* don't echo input */
keypad(stdscr, TRUE);
+
+ /*
+ * Show the characters inserted in color, to distinguish from those that
+ * are shifted.
+ */
+ if (has_colors()) {
+ start_color();
+ init_pair(1, COLOR_WHITE, COLOR_BLUE);
+ }
}
limit = LINES - 5;
doupdate();
- /*
- * Show the characters inserted in color, to distinguish from those that
- * are shifted.
- */
if (has_colors()) {
- start_color();
- init_pair(1, COLOR_WHITE, COLOR_BLUE);
wbkgdset(work, (chtype) (COLOR_PAIR(1) | ' '));
}
break;
}
}
+ delwin(show);
if (level > 0) {
- delwin(show);
delwin(work);
delwin(look);
}
* wrs(5/28/93) -- modified to be consistent (perform identically) with either
* PDCurses or under Unix System V, R4
*
- * $Id: testcurs.c,v 1.45 2012/11/03 19:27:18 tom Exp $
+ * $Id: testcurs.c,v 1.46 2012/11/24 19:38:20 tom Exp $
*/
#include <test.priv.h>
raw();
wgetch(pad);
- spad = subpad(pad, 12, 25, 6, 52);
- MvWAddStr(spad, 2, 2, "This is a new subpad");
- box(spad, 0, 0);
+ if ((spad = subpad(pad, 12, 25, 6, 52)) != 0) {
+ MvWAddStr(spad, 2, 2, "This is a new subpad");
+ box(spad, 0, 0);
+ delwin(spad);
+ }
prefresh(pad, 0, 0, 0, 0, 15, 75);
keypad(pad, TRUE);
raw();