-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1703 2011/05/14 21:49:54 tom Exp $
+-- $Id: NEWS,v 1.1704 2011/05/21 19:01:38 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.
+20110521
+ + fix warnings from clang 2.7 "--analyze"
+
20110514
+ compiler-warning fixes in panel and progs.
+ modify CF_PKG_CONFIG macro, from changes to tin -TD
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.816 2011/05/14 17:22:21 tom Exp $
+# $Id: dist.mk,v 1.817 2011/05/21 17:35:14 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 = 20110514
+NCURSES_PATCH = 20110521
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 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 *
#include "menu.priv.h"
-MODULE_ID("$Id: m_driver.c,v 1.29 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_driver.c,v 1.30 2011/05/21 18:56:41 tom Exp $")
/* Macros */
result = E_UNKNOWN_COMMAND;
}
- if (E_OK == result)
+ if (item == 0)
+ {
+ result = E_BAD_STATE;
+ }
+ else if (E_OK == result)
{
/* Adjust the top row if it turns out that the current item unfortunately
doesn't appear in the menu window */
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 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 *
#include <curses.priv.h>
-MODULE_ID("$Id: wresize.c,v 1.34 2010/06/05 22:36:26 tom Exp $")
+MODULE_ID("$Id: wresize.c,v 1.35 2011/05/21 18:55:07 tom Exp $")
static int
cleanup_lines(struct ldat *data, int length)
for (col = 0; col <= ToCols; ++col)
s[col] = win->_nc_bkgd;
}
- } else {
- assert(pline != 0);
+ } else if (pline != 0 && pline[win->_pary + row].text != 0) {
s = &pline[win->_pary + row].text[win->_parx];
+ } else {
+ s = 0;
}
if_USE_SCROLL_HINTS(new_lines[row].oldindex = row);
/****************************************************************************
- * Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 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 *
#include <ctype.h>
#include <tic.h>
-MODULE_ID("$Id: comp_expand.c,v 1.21 2010/01/16 17:11:23 tom Exp $")
+MODULE_ID("$Id: comp_expand.c,v 1.22 2011/05/21 18:55:07 tom Exp $")
static int
trailing_spaces(const char *src)
size_t need = (2 + strlen(str)) * 4;
int ch;
-#if NO_LEAKS
if (srcp == 0) {
+#if NO_LEAKS
if (buffer != 0) {
FreeAndNull(buffer);
length = 0;
}
+#endif
return 0;
}
-#endif
if (buffer == 0 || need > length) {
if ((buffer = typeRealloc(char, length = need, buffer)) == 0)
return 0;
#include <locale.h>
#endif
-MODULE_ID("$Id: lib_setup.c,v 1.136 2011/04/16 15:32:45 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.137 2011/05/21 17:35:14 tom Exp $")
/****************************************************************************
*
int value;
int result = 0;
- if ((env = getenv(env_name)) != 0) {
+ if (getenv(env_name) != 0) {
result = _nc_getenv_num(env_name);
} else if ((value = tigetnum("U8")) >= 0) {
result = value; /* use extension feature */
#include <ctype.h>
#include <tic.h>
-MODULE_ID("$Id: lib_tparm.c,v 1.82 2011/01/15 22:19:12 tom Exp $")
+MODULE_ID("$Id: lib_tparm.c,v 1.83 2011/05/21 18:11:56 tom Exp $")
/*
* char *
}
#ifdef TRACE
if (USE_TRACEF(TRACE_CALLS)) {
- for (i = 0; i < popcount; i++) {
+ for (i = 0; i < num_args; i++) {
if (p_is_s[i] != 0)
save_text(", %s", _nc_visbuf(p_is_s[i]), 0);
else
/****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2011 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 *
* authorization. *
****************************************************************************/
-/* $Id: panel.priv.h,v 1.23 2009/04/11 20:33:55 tom Exp $ */
+/* $Id: panel.priv.h,v 1.24 2011/05/21 18:55:07 tom Exp $ */
#ifndef NCURSES_PANEL_PRIV_H
#define NCURSES_PANEL_PRIV_H 1
---------------------------------------------------------------------------*/
#define PANEL_UPDATE(pan,panstart)\
{ PANEL* pan2 = ((panstart) ? (panstart) : _nc_bottom_panel);\
- while(pan2) {\
+ while(pan2 && pan2->win) {\
if ((pan2 != pan) && PANELS_OVERLAPPED(pan,pan2)) {\
int y, ix1, ix2, iy1, iy2;\
COMPUTE_INTERSECTION(pan, pan2, ix1, ix2, iy1, iy2);\
#define USE_LIBTINFO
#include <progs.priv.h>
-MODULE_ID("$Id: tabs.c,v 1.20 2011/05/14 22:34:36 tom Exp $")
+MODULE_ID("$Id: tabs.c,v 1.21 2011/05/21 18:31:21 tom Exp $")
static void usage(void) GCC_NORETURN;
bool no_op = FALSE;
int n, ch;
NCURSES_CONST char *term_name = 0;
- const char *mar_list = 0; /* ignored */
char *append = 0;
const char *tab_list = 0;
while ((ch = *++option) != '\0') {
switch (ch) {
case 'm':
- mar_list = option;
+ /*
+ * The "+mXXX" option is unimplemented because only the long-obsolete
+ * att510d implements smgl, which is needed to support
+ * this option.
+ */
break;
default:
/* special case of relative stops separated by spaces? */
#include <dump_entry.h>
#include <transform.h>
-MODULE_ID("$Id: tic.c,v 1.149 2011/05/14 23:24:57 tom Exp $")
+MODULE_ID("$Id: tic.c,v 1.150 2011/05/21 18:15:45 tom Exp $")
const char *_nc_progname = "tic";
static char *
stripped(char *src)
{
+ char *dst = 0;
+
while (isspace(UChar(*src)))
src++;
+
if (*src != '\0') {
- char *dst;
size_t len;
- if ((dst = strdup(src)) == NULL)
+ if ((dst = strdup(src)) == NULL) {
failed("strdup");
-
- assert(dst != 0);
-
- len = strlen(dst);
- while (--len != 0 && isspace(UChar(dst[len])))
- dst[len] = '\0';
- return dst;
+ } else {
+ len = strlen(dst);
+ while (--len != 0 && isspace(UChar(dst[len])))
+ dst[len] = '\0';
+ }
}
- return 0;
+ return dst;
}
static FILE *
#include <hashed_db.h>
#endif
-MODULE_ID("$Id: toe.c,v 1.53 2011/05/14 22:35:49 tom Exp $")
+MODULE_ID("$Id: toe.c,v 1.54 2011/05/21 18:32:13 tom Exp $")
#define isDotname(name) (!strcmp(name, ".") || !strcmp(name, ".."))
}
#endif
+static void failed(const char *) GCC_NORETURN;
+
static void
failed(const char *msg)
{
#include <dump_entry.h>
#include <transform.h>
-MODULE_ID("$Id: tset.c,v 1.83 2011/05/14 22:50:45 tom Exp $")
+MODULE_ID("$Id: tset.c,v 1.84 2011/05/21 18:55:32 tom Exp $")
/*
* SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
#undef CTRL
#define CTRL(x) ((x) & 0x1f)
+static void failed(const char *) GCC_NORETURN;
+static void exit_error(void) GCC_NORETURN;
+static void err(const char *,...) GCC_NORETURN;
+
const char *_nc_progname = "tset";
static TTY mode, oldmode, original;
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 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.40 2010/11/14 01:06:47 tom Exp $
+ * $Id: ditto.c,v 1.41 2011/05/21 18:55:07 tom Exp $
*
* The program illustrates how to set up multiple screens from a single
* program.
DITTO *ditto; /* data for all screens */
} DDATA;
+static void failed(const char *) GCC_NORETURN;
+static void usage(void) GCC_NORETURN;
+
static void
failed(const char *s)
{
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
-$Id: ncurses.c,v 1.367 2011/04/23 21:16:43 tom Exp $
+$Id: ncurses.c,v 1.368 2011/05/21 18:50:56 tom Exp $
***************************************************************************/
if (!(termattrs() & test)) {
printw(" (N/A)");
} else {
- if (ncv > 0 && (getbkgd(stdscr) & A_COLOR)) {
+ if (ncv > 0 && stdscr && (getbkgd(stdscr) & A_COLOR)) {
static const chtype table[] =
{
A_STANDOUT,
neww->next = current ? current->next : 0;
neww->last = current;
- neww->last->next = neww;
- neww->next->last = neww;
+ if (neww->last != 0)
+ neww->last->next = neww;
+ if (neww->next != 0)
+ neww->next->last = neww;
neww->wind = getwin(fp);
* authorization. *
****************************************************************************/
/*
- * $Id: redraw.c,v 1.6 2011/04/23 20:13:21 tom Exp $
+ * $Id: redraw.c,v 1.7 2011/05/21 18:38:35 tom Exp $
*
* Demonstrate the redrawwin() and wredrawln() functions.
* Thomas Dickey - 2006/11/4
keypad(win, TRUE);
getmaxyx(win, max_y, max_x);
getbegyx(win, beg_y, beg_x);
- while (!done) {
+ while (!done && win != 0) {
ch = wgetch(win);
getyx(win, y, x);
switch (ch) {
* scroll operation worked, and the refresh() code only had to do a
* partial repaint.
*
- * $Id: view.c,v 1.82 2011/05/14 17:43:12 tom Exp $
+ * $Id: view.c,v 1.83 2011/05/21 18:40:49 tom Exp $
*/
#include <test.priv.h>
static NCURSES_CH_T **lptr;
static int num_lines;
+static void usage(void) GCC_NORETURN;
+
static void
usage(void)
{