]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.9 - patch 20141101
authorThomas E. Dickey <dickey@invisible-island.net>
Sat, 1 Nov 2014 20:48:24 +0000 (20:48 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sat, 1 Nov 2014 20:48:24 +0000 (20:48 +0000)
+ improve strict compiler-warnings by adding a cast in TRACE_RETURN
  and making a new TRACE_RETURN1 macro for cases where the cast does
  not apply.

18 files changed:
NEWS
dist.mk
form/form.priv.h
include/term_entry.h
menu/menu.priv.h
ncurses/base/lib_mouse.c
ncurses/base/lib_set_term.c
ncurses/curses.priv.h
ncurses/tinfo/db_iterator.c
ncurses/tinfo/lib_setup.c
ncurses/tinfo/write_entry.c
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec
panel/panel.priv.h

diff --git a/NEWS b/NEWS
index 72d730eb05b7686226d8d8a88322d8102c27ed6b..bf9b1ae70d8c23edc8654443ff66d99292b186d3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2293 2014/10/25 00:20:09 tom Exp $
+-- $Id: NEWS,v 1.2295 2014/11/01 13:57:28 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,11 @@ See the AUTHORS file for the corresponding full names.
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20141101
+       + improve strict compiler-warnings by adding a cast in TRACE_RETURN
+         and making a new TRACE_RETURN1 macro for cases where the cast does
+         not apply.
+
 20141025
        + in-progress changes to integrate the win32 console driver with the
          msys2 configuration.
diff --git a/dist.mk b/dist.mk
index f544bc08a1db1d55d4fa6a5f9a30981d7b78f054..b0ce115e2b404a14e026d94858e3eb51b0ce5289 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.1012 2014/10/23 23:38:02 tom Exp $
+# $Id: dist.mk,v 1.1013 2014/10/27 10:16:13 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -37,7 +37,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 9
-NCURSES_PATCH = 20141025
+NCURSES_PATCH = 20141101
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 59f8eb19ae9ec724baebd61afc3aae117337bf93..4d1dfe7bf01e533d8790bc4759c819dcb3d59bd3 100644 (file)
@@ -30,7 +30,7 @@
  *   Author:  Juergen Pfeifer, 1995,1997                                    *
  ****************************************************************************/
 
-/* $Id: form.priv.h,v 0.37 2014/07/27 00:21:42 tom Exp $ */
+/* $Id: form.priv.h,v 0.38 2014/11/01 13:56:14 tom Exp $ */
 
 #ifndef FORM_PRIV_H
 #define FORM_PRIV_H 1
@@ -220,11 +220,11 @@ extern NCURSES_EXPORT(wchar_t *) _nc_Widen_String(char *, int *);
 
 #ifdef TRACE
 
-#define returnField(code)      TRACE_RETURN(code,field)
-#define returnFieldPtr(code)   TRACE_RETURN(code,field_ptr)
-#define returnForm(code)       TRACE_RETURN(code,form)
-#define returnFieldType(code)  TRACE_RETURN(code,field_type)
-#define returnFormHook(code)   TRACE_RETURN(code,form_hook)
+#define returnField(code)      TRACE_RETURN1(code,field)
+#define returnFieldPtr(code)   TRACE_RETURN1(code,field_ptr)
+#define returnForm(code)       TRACE_RETURN1(code,form)
+#define returnFieldType(code)  TRACE_RETURN1(code,field_type)
+#define returnFormHook(code)   TRACE_RETURN1(code,form_hook)
 
 extern NCURSES_EXPORT(FIELD **)            _nc_retrace_field_ptr (FIELD **);
 extern NCURSES_EXPORT(FIELD *)     _nc_retrace_field (FIELD *);
index f7c32c6cf61c4b4b9a046b84917b2ce81e9cf67c..b12710d3d083d7f9885792488978c71b49e9a264 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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            *
@@ -32,7 +32,7 @@
  *     and: Thomas E. Dickey                        1998-on                 *
  ****************************************************************************/
 
-/* $Id: term_entry.h,v 1.44 2013/05/25 20:13:38 tom Exp $ */
+/* $Id: term_entry.h,v 1.45 2014/11/01 14:47:00 tom Exp $ */
 
 /*
  *     term_entry.h -- interface to entry-manipulation code
@@ -170,7 +170,7 @@ extern NCURSES_EXPORT(int) _nc_parse_entry (ENTRY *, int, bool);
 extern NCURSES_EXPORT(int) _nc_capcmp (const char *, const char *);
 
 /* write_entry.c: writing an entry to the file system */
-extern NCURSES_EXPORT(void) _nc_set_writedir (char *);
+extern NCURSES_EXPORT(void) _nc_set_writedir (const char *);
 extern NCURSES_EXPORT(void) _nc_write_entry (TERMTYPE *const);
 
 /* comp_parse.c: entry list handling */
index 763ca4a675fdd8ca017b27f09de9d2b6b6549c09..b54b1952b838d2f9e05485296a6d324790eac2ff 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2009,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2012,2014 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            *
@@ -30,7 +30,7 @@
  *   Author:  Juergen Pfeifer, 1995,1997                                    *
  ****************************************************************************/
 
-/* $Id: menu.priv.h,v 1.24 2012/03/10 23:43:41 tom Exp $ */
+/* $Id: menu.priv.h,v 1.25 2014/11/01 14:47:00 tom Exp $ */
 
 /***************************************************************************
 * Module menu.priv.h                                                       *
@@ -130,12 +130,12 @@ extern NCURSES_EXPORT(int)  _nc_menu_cursor_pos (const MENU* menu, const ITEM* i
 
 #ifdef TRACE
 
-#define returnItem(code)       TRACE_RETURN(code,item)
-#define returnItemPtr(code)    TRACE_RETURN(code,item_ptr)
-#define returnItemOpts(code)   TRACE_RETURN(code,item_opts)
-#define returnMenu(code)       TRACE_RETURN(code,menu)
-#define returnMenuHook(code)   TRACE_RETURN(code,menu_hook)
-#define returnMenuOpts(code)   TRACE_RETURN(code,menu_opts)
+#define returnItem(code)       TRACE_RETURN1(code,item)
+#define returnItemPtr(code)    TRACE_RETURN1(code,item_ptr)
+#define returnItemOpts(code)   TRACE_RETURN1(code,item_opts)
+#define returnMenu(code)       TRACE_RETURN1(code,menu)
+#define returnMenuHook(code)   TRACE_RETURN1(code,menu_hook)
+#define returnMenuOpts(code)   TRACE_RETURN1(code,menu_opts)
 
 extern NCURSES_EXPORT(ITEM *)      _nc_retrace_item (ITEM *);
 extern NCURSES_EXPORT(ITEM **)     _nc_retrace_item_ptr (ITEM **);
index 174df4b6c329efc823052fa15f6f319a33989efd..60bf488c8c6464c619e10ac4244e6a89c1474e20 100644 (file)
@@ -84,7 +84,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_mouse.c,v 1.164 2014/10/25 08:24:23 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.165 2014/11/01 12:27:59 tom Exp $")
 
 #include <tic.h>
 
@@ -446,8 +446,8 @@ allow_gpm_mouse(SCREEN *sp GCC_UNUSED)
 #endif
        /* GPM does printf's without checking if stdout is a terminal */
     if (NC_ISATTY(fileno(stdout))) {
-       char *list = getenv("NCURSES_GPM_TERMS");
-       char *env = getenv("TERM");
+       const char *list = getenv("NCURSES_GPM_TERMS");
+       const char *env = getenv("TERM");
        if (list != 0) {
            if (env != 0) {
                result = _nc_name_match(list, env, "|:");
@@ -608,7 +608,7 @@ initialize_mousetype(SCREEN *sp)
            int rc;
 
            if (!sp->_emxmouse_buttons[0]) {
-               char *s = getenv("MOUSE_BUTTONS_123");
+               const char *s = getenv("MOUSE_BUTTONS_123");
 
                sp->_emxmouse_buttons[0] = 1;
                if (s && strlen(s) >= 3) {
index c1cf134ba942cb21bbe023c4d88fe8a227c980dc..f2870ebb5396d63d73a3abab2a4f03472956bf41 100644 (file)
@@ -47,7 +47,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_set_term.c,v 1.149 2014/03/08 20:32:59 tom Exp $")
+MODULE_ID("$Id: lib_set_term.c,v 1.150 2014/11/01 12:30:47 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define MaxColors      InfoOf(sp).maxcolors
@@ -242,8 +242,8 @@ no_mouse_wrap(SCREEN *sp GCC_UNUSED)
 }
 
 #if NCURSES_EXT_FUNCS && USE_COLORFGBG
-static char *
-extract_fgbg(char *src, int *result)
+static const char *
+extract_fgbg(const char *src, int *result)
 {
     char *dst = 0;
     long value = strtol(src, &dst, 0);
@@ -442,7 +442,7 @@ NCURSES_SP_NAME(_nc_setupscreen) (
      * decide later if it is worth having default attributes as well.
      */
     if (getenv("COLORFGBG") != 0) {
-       char *p = getenv("COLORFGBG");
+       const char *p = getenv("COLORFGBG");
        TR(TRACE_CHARPUT | TRACE_MOVE, ("decoding COLORFGBG %s", p));
        p = extract_fgbg(p, &(sp->_default_fg));
        p = extract_fgbg(p, &(sp->_default_bg));
index cd2c5e0e621184167e07b55b69e96af7f1518db1..66d15944e516c291d7762fbc9e2a6314f4a7104d 100644 (file)
@@ -34,7 +34,7 @@
  ****************************************************************************/
 
 /*
- * $Id: curses.priv.h,v 1.545 2014/10/24 23:57:28 tom Exp $
+ * $Id: curses.priv.h,v 1.546 2014/11/01 13:52:34 tom Exp $
  *
  *     curses.priv.h
  *
@@ -1625,7 +1625,8 @@ extern NCURSES_EXPORT(void)       _nc_locked_tracef (const char *, ...) GCC_PRINTFLIKE
 
 #define TR(n, a)       if (USE_TRACEF(n)) _nc_locked_tracef a
 #define T(a)           TR(TRACE_CALLS, a)
-#define TRACE_RETURN(value,type)     return _nc_retrace_##type(value)
+#define TRACE_RETURN(value,type)     return _nc_retrace_##type((type)(value))
+#define TRACE_RETURN1(value,dst)     return _nc_retrace_##dst(value)
 #define TRACE_RETURN2(value,dst,src) return _nc_retrace_##dst##_##src(value)
 #define TRACE_RETURN_SP(value,type)  return _nc_retrace_##type(SP_PARM, value)
 
@@ -1634,18 +1635,18 @@ extern NCURSES_EXPORT(void)     _nc_locked_tracef (const char *, ...) GCC_PRINTFLIKE
 #define returnAttr(code)       TRACE_RETURN(code,attr_t)
 #define returnBits(code)       TRACE_RETURN(code,unsigned)
 #define returnBool(code)       TRACE_RETURN(code,bool)
-#define returnCPtr(code)       TRACE_RETURN(code,cptr)
-#define returnCVoidPtr(code)   TRACE_RETURN(code,cvoid_ptr)
+#define returnCPtr(code)       TRACE_RETURN1(code,cptr)
+#define returnCVoidPtr(code)   TRACE_RETURN1(code,cvoid_ptr)
 #define returnChar(code)       TRACE_RETURN(code,char)
 #define returnChtype(code)     TRACE_RETURN(code,chtype)
 #define returnCode(code)       TRACE_RETURN(code,int)
 #define returnIntAttr(code)    TRACE_RETURN2(code,int,attr_t)
 #define returnMMask(code)      TRACE_RETURN_SP(code,mmask_t)
-#define returnPtr(code)                TRACE_RETURN(code,ptr)
-#define returnSP(code)         TRACE_RETURN(code,sp)
+#define returnPtr(code)                TRACE_RETURN1(code,ptr)
+#define returnSP(code)         TRACE_RETURN1(code,sp)
 #define returnVoid             T((T_RETURN(""))); return
-#define returnVoidPtr(code)    TRACE_RETURN(code,void_ptr)
-#define returnWin(code)                TRACE_RETURN(code,win)
+#define returnVoidPtr(code)    TRACE_RETURN1(code,void_ptr)
+#define returnWin(code)                TRACE_RETURN1(code,win)
 
 extern NCURSES_EXPORT(NCURSES_BOOL)     _nc_retrace_bool (int);
 extern NCURSES_EXPORT(NCURSES_CONST void *) _nc_retrace_cvoid_ptr (NCURSES_CONST void *);
index a14fb2161e01ac18efd26b5658d473eb38d87541..94a4082047b3d4978afda6ed7617f7315c308328 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2006-2012,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 2006-2013,2014 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            *
@@ -43,7 +43,7 @@
 #include <hashed_db.h>
 #endif
 
-MODULE_ID("$Id: db_iterator.c,v 1.38 2013/12/14 21:23:20 tom Exp $")
+MODULE_ID("$Id: db_iterator.c,v 1.39 2014/11/01 14:47:00 tom Exp $")
 
 #define HaveTicDirectory _nc_globals.have_tic_directory
 #define KeepTicDirectory _nc_globals.keep_tic_directory
@@ -187,7 +187,7 @@ _nc_tic_dir(const char *path)
            HaveTicDirectory = TRUE;
        } else if (HaveTicDirectory == 0) {
            if (use_terminfo_vars()) {
-               char *envp;
+               const char *envp;
                if ((envp = getenv("TERMINFO")) != 0)
                    return _nc_tic_dir(envp);
            }
index 522929009c1f7a9612265507b6d4bc4807a1663f..0b81a5e06de3860b7228524c46a0d20c6928fa33 100644 (file)
@@ -48,7 +48,7 @@
 #include <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.160 2014/04/26 18:47:20 juergen Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.161 2014/11/01 12:33:16 tom Exp $")
 
 /****************************************************************************
  *
@@ -574,7 +574,7 @@ NCURSES_EXPORT(int)
 _nc_locale_breaks_acs(TERMINAL * termp)
 {
     const char *env_name = "NCURSES_NO_UTF8_ACS";
-    char *env;
+    const char *env;
     int value;
     int result = 0;
 
index 77f90cb5ffc7c4ebb1c26b105393d56ce020c204..b2edd5d9e63993b13c110d3593021f9d9c1b5e5a 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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            *
@@ -47,7 +47,7 @@
 #define TRACE_OUT(p)           /*nothing */
 #endif
 
-MODULE_ID("$Id: write_entry.c,v 1.91 2013/12/14 21:29:42 tom Exp $")
+MODULE_ID("$Id: write_entry.c,v 1.92 2014/11/01 14:47:00 tom Exp $")
 
 static int total_written;
 
@@ -185,7 +185,7 @@ make_db_root(const char *path)
  * Set the write directory for compiled entries.
  */
 NCURSES_EXPORT(void)
-_nc_set_writedir(char *dir)
+_nc_set_writedir(const char *dir)
 {
     const char *destination;
     char actual[PATH_MAX];
index 1c9dab77e01da8eb4a6e35e96c4b3dd01f69aac8..66ac7dd15126dc5582af4026a7bda6fc151e862f 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20141025) unstable; urgency=low
+ncurses6 (5.9-20141101) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Thu, 23 Oct 2014 19:38:02 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 27 Oct 2014 06:16:13 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 1c9dab77e01da8eb4a6e35e96c4b3dd01f69aac8..66ac7dd15126dc5582af4026a7bda6fc151e862f 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20141025) unstable; urgency=low
+ncurses6 (5.9-20141101) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Thu, 23 Oct 2014 19:38:02 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 27 Oct 2014 06:16:13 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 393fad2a54e719826bbc672c3df3de9714f7b948..496ff8af8cc2ceba7eb7752cb440186e8704b916 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20141025) unstable; urgency=low
+ncurses6 (5.9-20141101) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Thu, 23 Oct 2014 19:38:02 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 27 Oct 2014 06:16:13 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index ec82c4a4088d39bb9ab2e510964299825b283f40..3d4b9e63402ef5adae0368f58f7c65d5033c82b8 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.67 2014/10/23 23:38:02 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.68 2014/10/27 10:16:13 tom Exp $\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "5"\r
 !define VERSION_MINOR "9"\r
 !define VERSION_YYYY  "2014"\r
-!define VERSION_MMDD  "1025"\r
+!define VERSION_MMDD  "1101"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 65488c006933bef062ffd47ac1b7b72702ee4562..a76ee6af73f3489a474272d25433533ee6a885d1 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 5.9
-Release: 20141025
+Release: 20141101
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 44cbd97bf8ee7668597e56164b47bea893d8d775..05c9159eb4ffae67eed629605c8230cc3f97c1c8 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 5.9
-Release: 20141025
+Release: 20141101
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 76607fb2c0cad688df27210150329fd704a205a7..1156c72daa2cfdb67b4912d0faf2c455e7121e9a 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2012,2014 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.25 2012/12/15 23:57:43 tom Exp $ */
+/* $Id: panel.priv.h,v 1.26 2014/11/01 14:48:03 tom Exp $ */
 
 #ifndef NCURSES_PANEL_PRIV_H
 #define NCURSES_PANEL_PRIV_H 1
+/* *INDENT-OFF* */
 
 #if HAVE_CONFIG_H
 #  include <ncurses_cfg.h>
@@ -60,7 +61,7 @@ struct screen;              /* forward declaration */
 #    define USER_PTR(ptr) _nc_my_visbuf((const char *)ptr)
 #  endif
 
-#  define returnPanel(code)    TRACE_RETURN(code,panel)
+#  define returnPanel(code)    TRACE_RETURN1(code,panel)
 
    extern NCURSES_EXPORT(PANEL *) _nc_retrace_panel (PANEL *);
    extern NCURSES_EXPORT(void) _nc_dPanel (const char*, const PANEL*);
@@ -210,5 +211,6 @@ struct screen;              /* forward declaration */
 /* These may become later renamed and part of panel.h and the public API */
 extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_update_panels)(SCREEN*);
 #endif
+/* *INDENT-ON* */
 
 #endif /* NCURSES_PANEL_PRIV_H */