]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.9 - patch 20130928
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 29 Sep 2013 01:03:55 +0000 (01:03 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 29 Sep 2013 01:03:55 +0000 (01:03 +0000)
+ some build-fixes for ncurses-examples with NetBSD-6.0 curses, though
  it lacks some common functions such as use_env() which is not yet
  addressed.
+ build-fix and some compiler warning fixes for ncurses-examples with
  OpenBSD 5.3
+ fix a possible null-pointer reference in a trace message from newterm.
+ quiet a few warnings from NetBSD 6.0 namespace pollution by
  nonstandard popcount() function in standard strings.h header.
+ ignore g++ 4.2.1 warnings for "-Weffc++" in c++/cursesmain.cc
+ fix a few overlooked places for --enable-string-hacks option.

30 files changed:
NEWS
c++/cursesmain.cc
dist.mk
ncurses/base/lib_newterm.c
ncurses/tinfo/getenv_num.c
ncurses/tinfo/lib_tparm.c
ncurses/tinfo/make_hash.c
ncurses/tinfo/write_entry.c
package/debian/changelog
package/mingw-ncurses.spec
package/ncurses.spec
progs/tput.c
test/cardfile.c
test/demo_defkey.c
test/demo_forms.c
test/demo_menus.c
test/demo_terminfo.c
test/dots.c
test/dots_mvcur.c
test/dots_termcap.c
test/edit_field.c
test/gdc.c
test/hanoi.c
test/ncurses.c
test/railroad.c
test/tclock.c
test/test.priv.h
test/test_vid_puts.c
test/test_vidputs.c
test/view.c

diff --git a/NEWS b/NEWS
index 35342b53db7a20934009c44d54e39787d11558a6..e114d40cf520bcd4aef5eb7cc92500c00f6c7e2e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- 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.2104 2013/09/21 20:41:37 tom Exp $
+-- $Id: NEWS,v 1.2109 2013/09/28 22:55:29 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
@@ -45,6 +45,18 @@ 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.
 
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20130928
+       + some build-fixes for ncurses-examples with NetBSD-6.0 curses, though
+         it lacks some common functions such as use_env() which is not yet
+         addressed.
+       + build-fix and some compiler warning fixes for ncurses-examples with
+         OpenBSD 5.3
+       + fix a possible null-pointer reference in a trace message from newterm.
+       + quiet a few warnings from NetBSD 6.0 namespace pollution by
+         nonstandard popcount() function in standard strings.h header.
+       + ignore g++ 4.2.1 warnings for "-Weffc++" in c++/cursesmain.cc
+       + fix a few overlooked places for --enable-string-hacks option.
+
 20130921
        + fix typo in curs_attr.3x (patch by Sven Joachim, cf: 20130831).
        + build-fix for --with-shared option for DragonFly and FreeBSD (report
 20130921
        + fix typo in curs_attr.3x (patch by Sven Joachim, cf: 20130831).
        + build-fix for --with-shared option for DragonFly and FreeBSD (report
index 1f82d4ad84cedbcae2e4c109a5dc587dfae5f31a..e87099504bdd7488e2b826e163ad93a97243099f 100644 (file)
@@ -1,6 +1,6 @@
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2003,2007 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2007,2013 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 #include "cursesapp.h"
 
 #if CPP_HAS_TRY_CATCH && HAVE_IOSTREAM
 #include "cursesapp.h"
 
 #if CPP_HAS_TRY_CATCH && HAVE_IOSTREAM
+#pragma GCC diagnostic ignored "-Weffc++"
 #include <iostream>
 #include <iostream>
+#pragma GCC diagnostic warning "-Weffc++"
 #else
 #undef CPP_HAS_TRY_CATCH
 #define CPP_HAS_TRY_CATCH 0
 #endif
 
 #else
 #undef CPP_HAS_TRY_CATCH
 #define CPP_HAS_TRY_CATCH 0
 #endif
 
-MODULE_ID("$Id: cursesmain.cc,v 1.14 2007/04/07 17:10:11 tom Exp $")
+MODULE_ID("$Id: cursesmain.cc,v 1.15 2013/09/28 20:56:47 tom Exp $")
 
 #if HAVE_LOCALE_H
 #include <locale.h>
 
 #if HAVE_LOCALE_H
 #include <locale.h>
diff --git a/dist.mk b/dist.mk
index 72ec539badc265a195c8592769a700730081a2d6..2cd3e99c1939864b4ccf8646248ea5dc8da92c10 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # 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.945 2013/09/21 15:25:41 tom Exp $
+# $Id: dist.mk,v 1.946 2013/09/28 17:24:42 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
@@ -37,7 +37,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 9
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 9
-NCURSES_PATCH = 20130921
+NCURSES_PATCH = 20130928
 
 # 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)
index 93d84323bc64486f7de7fd1c57ab4fa3021ae3ee..435763d096ea40a0092b082912565dfb7ff7c538 100644 (file)
@@ -48,7 +48,7 @@
 
 #include <tic.h>
 
 
 #include <tic.h>
 
-MODULE_ID("$Id: lib_newterm.c,v 1.89 2013/08/31 14:56:50 tom Exp $")
+MODULE_ID("$Id: lib_newterm.c,v 1.90 2013/09/28 21:02:56 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define NumLabels      InfoOf(SP_PARM).numlabels
 
 #ifdef USE_TERM_DRIVER
 #define NumLabels      InfoOf(SP_PARM).numlabels
@@ -181,7 +181,7 @@ NCURSES_SP_NAME(newterm) (NCURSES_SP_DCLx
     START_TRACE();
     T((T_CALLED("newterm(%p, \"%s\", %p,%p)"),
        (void *) SP_PARM,
     START_TRACE();
     T((T_CALLED("newterm(%p, \"%s\", %p,%p)"),
        (void *) SP_PARM,
-       name,
+       (name ? name : ""),
        (void *) ofp,
        (void *) ifp));
 
        (void *) ofp,
        (void *) ifp));
 
index 62f3d4d4ca8b3b391ca08bb431e6c2acbe461dcd..80a349a1a4e60ab12b74e763aff56d99f138882d 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <curses.priv.h>
 
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: getenv_num.c,v 1.4 2012/07/14 21:17:19 tom Exp $")
+MODULE_ID("$Id: getenv_num.c,v 1.5 2013/09/28 20:25:08 tom Exp $")
 
 NCURSES_EXPORT(int)
 _nc_getenv_num(const char *name)
 
 NCURSES_EXPORT(int)
 _nc_getenv_num(const char *name)
@@ -61,11 +61,11 @@ _nc_setenv_num(const char *name, int value)
     if (name != 0 && value >= 0) {
        char buffer[128];
 #if HAVE_SETENV
     if (name != 0 && value >= 0) {
        char buffer[128];
 #if HAVE_SETENV
-       sprintf(buffer, "%d", value);
+       _nc_SPRINTF(buffer, _nc_SLIMIT(sizeof(buffer)) "%d", value);
        setenv(name, buffer, 1);
 #elif HAVE_PUTENV
        char *s;
        setenv(name, buffer, 1);
 #elif HAVE_PUTENV
        char *s;
-       sprintf(buffer, "%s=%d", name, value);
+       _nc_SPRINTF(buffer, _nc_SLIMIT(sizeof(buffer)) "%s=%d", name, value);
        if ((s = strdup(buffer)) != 0)
            putenv(s);
 #endif
        if ((s = strdup(buffer)) != 0)
            putenv(s);
 #endif
index 18b6de077a1e4a7bd8402e9d720398856f8797e8..7e5b3f2a4fa91782ac91ab980ed52ff6b4d76414 100644 (file)
@@ -42,7 +42,7 @@
 #include <ctype.h>
 #include <tic.h>
 
 #include <ctype.h>
 #include <tic.h>
 
-MODULE_ID("$Id: lib_tparm.c,v 1.88 2013/01/26 17:07:05 tom Exp $")
+MODULE_ID("$Id: lib_tparm.c,v 1.89 2013/09/28 20:46:56 tom Exp $")
 
 /*
  *     char *
 
 /*
  *     char *
@@ -107,6 +107,7 @@ MODULE_ID("$Id: lib_tparm.c,v 1.88 2013/01/26 17:07:05 tom Exp $")
 NCURSES_EXPORT_VAR(int) _nc_tparm_err = 0;
 
 #define TPS(var) _nc_prescreen.tparm_state.var
 NCURSES_EXPORT_VAR(int) _nc_tparm_err = 0;
 
 #define TPS(var) _nc_prescreen.tparm_state.var
+#define popcount _nc_popcount  /* workaround for NetBSD 6.0 defect */
 
 #if NO_LEAKS
 NCURSES_EXPORT(void)
 
 #if NO_LEAKS
 NCURSES_EXPORT(void)
index 31f21005f4187c639084c3edc4e65e1cb66581bf..37ac7651424c779a8bd0586ca3aa25c02e488ce6 100644 (file)
@@ -44,7 +44,7 @@
 
 #include <ctype.h>
 
 
 #include <ctype.h>
 
-MODULE_ID("$Id: make_hash.c,v 1.12 2013/02/16 21:27:50 tom Exp $")
+MODULE_ID("$Id: make_hash.c,v 1.13 2013/09/28 20:55:47 tom Exp $")
 
 /*
  *     _nc_make_hash_table()
 
 /*
  *     _nc_make_hash_table()
@@ -69,10 +69,11 @@ failed(const char *s)
 static char *
 strmalloc(char *s)
 {
 static char *
 strmalloc(char *s)
 {
-    char *result = malloc(strlen(s) + 1);
+    size_t need = strlen(s) + 1;
+    char *result = malloc(need);
     if (result == 0)
     if (result == 0)
-       failed("strmalloc");
-    strcpy(result, s);
+       failed("strmalloc");
+    _nc_STRCPY(result, s, need);
     return result;
 }
 
     return result;
 }
 
index f7ae96fb584f5ee7305c7a2904b7c795080717a6..931a0b6addb08e92561c345c0521fb6a7446d302 100644 (file)
@@ -47,7 +47,7 @@
 #define TRACE_OUT(p)           /*nothing */
 #endif
 
 #define TRACE_OUT(p)           /*nothing */
 #endif
 
-MODULE_ID("$Id: write_entry.c,v 1.88 2013/07/27 15:52:18 tom Exp $")
+MODULE_ID("$Id: write_entry.c,v 1.89 2013/09/28 20:20:30 tom Exp $")
 
 static int total_written;
 
 
 static int total_written;
 
@@ -273,7 +273,7 @@ _nc_write_entry(TERMTYPE *const tp)
     char name_list[MAX_TERMINFO_LENGTH];
     char *first_name, *other_names;
     char *ptr;
     char name_list[MAX_TERMINFO_LENGTH];
     char *first_name, *other_names;
     char *ptr;
-    const char *term_names = tp->term_names;
+    char *term_names = tp->term_names;
     size_t name_size = strlen(term_names);
 
     if (name_size == 0) {
     size_t name_size = strlen(term_names);
 
     if (name_size == 0) {
index 7fffcb81ee4a4ce289f050c05bc1f3958477c42f..558ebdda06c8d33329d2e2b372ad0fe7ac202899 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20130921) unstable; urgency=low
+ncurses6 (5.9-20130928) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 21 Sep 2013 11:25:41 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 28 Sep 2013 13:24:42 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index a663f722b8d47cb4f81ecad1fe6a71a3df9bdfc9..06ec84006b6cfa42eab188202fa0430b6aa79dd1 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Release: 5.9
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Release: 5.9
-Version: 20130921
+Version: 20130928
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{release}-%{version}.tgz
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{release}-%{version}.tgz
index 6e7865f6d82e8a50c708a701c1cc0ec4f9406498..1c8c2c71f3bf31fc459a9bfee72b240ce7151936 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Release: 5.9
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Release: 5.9
-Version: 20130921
+Version: 20130928
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{release}-%{version}.tgz
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{release}-%{version}.tgz
index d29ed0a72e45726c37335b9fa3e3f19e52c21c18..6652d3450a2d40b7dc32a013fca6c864b33232b4 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2010,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2012,2013 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            *
  *                                                                          *
  * 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 @@
 #endif
 #include <transform.h>
 
 #endif
 #include <transform.h>
 
-MODULE_ID("$Id: tput.c,v 1.48 2012/02/18 21:51:17 tom Exp $")
+MODULE_ID("$Id: tput.c,v 1.49 2013/09/28 20:57:25 tom Exp $")
 
 #define PUTS(s)                fputs(s, stdout)
 #define PUTCHAR(c)     putchar(c)
 
 #define PUTS(s)                fputs(s, stdout)
 #define PUTCHAR(c)     putchar(c)
@@ -303,7 +303,7 @@ tput(int argc, char *argv[])
     } else if (s != ABSENT_STRING) {
        if (argc > 1) {
            int k;
     } else if (s != ABSENT_STRING) {
        if (argc > 1) {
            int k;
-           int popcount;
+           int ignored;
            long numbers[1 + NUM_PARM];
            char *strings[1 + NUM_PARM];
            char *p_is_s[NUM_PARM];
            long numbers[1 + NUM_PARM];
            char *strings[1 + NUM_PARM];
            char *p_is_s[NUM_PARM];
@@ -334,7 +334,7 @@ tput(int argc, char *argv[])
                break;
            case Numbers:
            default:
                break;
            case Numbers:
            default:
-               (void) _nc_tparm_analyze(s, p_is_s, &popcount);
+               (void) _nc_tparm_analyze(s, p_is_s, &ignored);
 #define myParam(n) (p_is_s[n - 1] != 0 ? ((TPARM_ARG) strings[n]) : numbers[n])
                s = TPARM_9(s,
                            myParam(1),
 #define myParam(n) (p_is_s[n - 1] != 0 ? ((TPARM_ARG) strings[n]) : numbers[n])
                s = TPARM_9(s,
                            myParam(1),
index ef224c9b9006e82418ac53a92cee0ea759d968be..b75024143c6e090fcb3be2e2a364647218b0302f 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1999-2010,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1999-2012,2013 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey
  *
 /*
  * Author: Thomas E. Dickey
  *
- * $Id: cardfile.c,v 1.41 2012/11/03 19:26:50 tom Exp $
+ * $Id: cardfile.c,v 1.42 2013/09/28 22:02:17 tom Exp $
  *
  * File format: text beginning in column 1 is a title; other text is content.
  */
  *
  * File format: text beginning in column 1 is a title; other text is content.
  */
@@ -107,7 +107,7 @@ add_title(const char *title)
            break;
     }
 
            break;
     }
 
-    card = typeCalloc(CARD, 1);
+    card = typeCalloc(CARD, (size_t) 1);
     card->title = strdup(title);
     card->content = strdup("");
 
     card->title = strdup(title);
     card->content = strdup("");
 
@@ -335,7 +335,7 @@ form_virtualize(WINDOW *w)
 static FIELD **
 make_fields(CARD * p, int form_high, int form_wide)
 {
 static FIELD **
 make_fields(CARD * p, int form_high, int form_wide)
 {
-    FIELD **f = typeCalloc(FIELD *, 3);
+    FIELD **f = typeCalloc(FIELD *, (size_t) 3);
 
     f[0] = new_field(1, form_wide, 0, 0, 0, 0);
     set_field_back(f[0], A_REVERSE);
 
     f[0] = new_field(1, form_wide, 0, 0, 0, 0);
     set_field_back(f[0], A_REVERSE);
index 03c4d622576710ec95023085b0ff7e847a2c654b..045c2c7bd3e86d9e519437c7ee15a6506d704c0c 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 2002-2008,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 2002-2012,2013 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: demo_defkey.c,v 1.21 2012/12/29 22:55:39 tom Exp $
+ * $Id: demo_defkey.c,v 1.22 2013/09/28 22:02:17 tom Exp $
  *
  * Demonstrate the define_key() function.
  * Thomas Dickey - 2002/11/23
  *
  * Demonstrate the define_key() function.
  * Thomas Dickey - 2002/11/23
@@ -116,7 +116,7 @@ visible(const char *string)
                result = typeCalloc(char, need);
        }
     } else {
                result = typeCalloc(char, need);
        }
     } else {
-       result = typeCalloc(char, 1);
+       result = typeCalloc(char, (size_t) 1);
     }
     return result;
 }
     }
     return result;
 }
@@ -186,9 +186,9 @@ duplicate(WINDOW *win, NCURSES_CONST char *name, int code)
        const char *prefix = 0;
        char temp[BUFSIZ];
 
        const char *prefix = 0;
        char temp[BUFSIZ];
 
-       if (!strncmp(value, "\033[", 2)) {
+       if (!strncmp(value, "\033[", (size_t) 2)) {
            prefix = "\033O";
            prefix = "\033O";
-       } else if (!strncmp(value, "\033O", 2)) {
+       } else if (!strncmp(value, "\033O", (size_t) 2)) {
            prefix = "\033[";
        }
        if (prefix != 0) {
            prefix = "\033[";
        }
        if (prefix != 0) {
index 585ddb90275b176693eb71f5888ed54c6f7a3fec..1e6806d2e52392926b9ad6ded2cc11ee58933113 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: demo_forms.c,v 1.45 2013/09/21 22:51:50 tom Exp $
+ * $Id: demo_forms.c,v 1.46 2013/09/28 21:55:54 tom Exp $
  *
  * Demonstrate a variety of functions from the form library.
  * Thomas Dickey - 2003/4/26
  *
  * Demonstrate a variety of functions from the form library.
  * Thomas Dickey - 2003/4/26
@@ -139,7 +139,7 @@ read_data(const char *filename)
        int more = 0;
        int item = 0;
 
        int more = 0;
        int item = 0;
 
-       my_data = typeCalloc(MY_DATA, 100);     /* FIXME */
+       my_data = typeCalloc(MY_DATA, (size_t) 100);    /* FIXME */
        while (fgets(buffer, sizeof(buffer), fp) != 0) {
            chomp(buffer);
            if (more) {
        while (fgets(buffer, sizeof(buffer), fp) != 0) {
            chomp(buffer);
            if (more) {
index b225e33d8c60ccf053ad242411f4667d535cfe39..c742223f0375d313114e7ae03409317cec761539 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: demo_menus.c,v 1.51 2013/09/07 16:20:08 tom Exp $
+ * $Id: demo_menus.c,v 1.52 2013/09/28 21:55:02 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
@@ -407,7 +407,7 @@ build_select_menu(MenuNo number, char *filename)
     MENU_DATA *ap = 0;
     MENU_DATA *myList = 0;
     int i;
     MENU_DATA *ap = 0;
     MENU_DATA *myList = 0;
     int i;
-    unsigned count = 0;
+    size_t count = 0;
 
     if (filename != 0) {
        struct stat sb;
 
     if (filename != 0) {
        struct stat sb;
index aea3289891855f698514d9010229bce1038540dc..239739a47a8f36ac5fedf05d932d257677070df2 100644 (file)
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey
  *
 /*
  * Author: Thomas E. Dickey
  *
- * $Id: demo_terminfo.c,v 1.18 2013/09/07 17:37:20 tom Exp $
+ * $Id: demo_terminfo.c,v 1.19 2013/09/28 21:50:01 tom Exp $
  *
  * A simple demo of the terminfo interface.
  */
  *
  * A simple demo of the terminfo interface.
  */
 #include <test.priv.h>
 
 #if NCURSES_XNAMES
 #include <test.priv.h>
 
 #if NCURSES_XNAMES
+#if HAVE_TERM_ENTRY_H
 #include <term_entry.h>
 #include <term_entry.h>
+#else
+#undef NCURSES_XNAMES
+#define NCURSES_XNAMES 0
+#endif
 #endif
 
 #if HAVE_TIGETSTR
 #endif
 
 #if HAVE_TIGETSTR
index 22d81713854f0d29b5dab64ea8f518f4f27cc809..474d8805179efbc69225a08bc515fe9fbc401d22 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1999-2009,2010 Free Software Foundation, Inc.              *
+ * Copyright (c) 1999-2011,2013 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey <dickey@clark.net> 1999
  *
 /*
  * Author: Thomas E. Dickey <dickey@clark.net> 1999
  *
- * $Id: dots.c,v 1.23 2011/04/23 19:15:04 tom Exp $
+ * $Id: dots.c,v 1.25 2013/09/28 22:12:09 tom Exp $
  *
  * A simple demo of the terminfo interface.
  */
  *
  * A simple demo of the terminfo interface.
  */
@@ -53,7 +53,7 @@ TPUTS_PROTO(outc, c)
 
     if (interrupted) {
        char tmp = (char) c;
 
     if (interrupted) {
        char tmp = (char) c;
-       if (write(STDOUT_FILENO, &tmp, 1) == -1)
+       if (write(STDOUT_FILENO, &tmp, (size_t) 1) == -1)
            rc = EOF;
     } else {
        rc = putc(c, stdout);
            rc = EOF;
     } else {
        rc = putc(c, stdout);
@@ -62,7 +62,7 @@ TPUTS_PROTO(outc, c)
 }
 
 static bool
 }
 
 static bool
-outs(char *s)
+outs(const char *s)
 {
     if (valid(s)) {
        tputs(s, 1, outc);
 {
     if (valid(s)) {
        tputs(s, 1, outc);
@@ -105,6 +105,7 @@ main(int argc GCC_UNUSED,
     int x, y, z, p;
     double r;
     double c;
     int x, y, z, p;
     double r;
     double c;
+    int my_colors;
 
     CATCHALL(onsig);
 
 
     CATCHALL(onsig);
 
@@ -112,11 +113,12 @@ main(int argc GCC_UNUSED,
     setupterm((char *) 0, 1, (int *) 0);
     outs(clear_screen);
     outs(cursor_invisible);
     setupterm((char *) 0, 1, (int *) 0);
     outs(clear_screen);
     outs(cursor_invisible);
-    if (max_colors > 1) {
+    my_colors = max_colors;
+    if (my_colors > 1) {
        if (!valid(set_a_foreground)
            || !valid(set_a_background)
            || (!valid(orig_colors) && !valid(orig_pair)))
        if (!valid(set_a_foreground)
            || !valid(set_a_background)
            || (!valid(orig_colors) && !valid(orig_pair)))
-           max_colors = -1;
+           my_colors = -1;
     }
 
     r = (double) (lines - 4);
     }
 
     r = (double) (lines - 4);
@@ -129,8 +131,8 @@ main(int argc GCC_UNUSED,
        p = (ranf() > 0.9) ? '*' : ' ';
 
        tputs(tparm3(cursor_address, y, x), 1, outc);
        p = (ranf() > 0.9) ? '*' : ' ';
 
        tputs(tparm3(cursor_address, y, x), 1, outc);
-       if (max_colors > 0) {
-           z = (int) (ranf() * max_colors);
+       if (my_colors > 0) {
+           z = (int) (ranf() * my_colors);
            if (ranf() > 0.01) {
                tputs(tparm2(set_a_foreground, z), 1, outc);
            } else {
            if (ranf() > 0.01) {
                tputs(tparm2(set_a_foreground, z), 1, outc);
            } else {
index 752422727d1a57c1e35fa56891ed21399972fbd1..90b9c4e5b17b7582ebffc6a823bfe3d396a8cbe7 100644 (file)
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey - 2007
  *
 /*
  * Author: Thomas E. Dickey - 2007
  *
- * $Id: dots_mvcur.c,v 1.8 2013/05/25 22:58:22 tom Exp $
+ * $Id: dots_mvcur.c,v 1.10 2013/09/28 22:44:18 tom Exp $
  *
  * A simple demo of the terminfo interface, and mvcur.
  */
  *
  * A simple demo of the terminfo interface, and mvcur.
  */
@@ -53,7 +53,7 @@ TPUTS_PROTO(outc, c)
 
     if (interrupted) {
        char tmp = (char) c;
 
     if (interrupted) {
        char tmp = (char) c;
-       if (write(STDOUT_FILENO, &tmp, 1) == -1)
+       if (write(STDOUT_FILENO, &tmp, (size_t) 1) == -1)
            rc = EOF;
     } else {
        if (putc(c, stdout) == EOF)
            rc = EOF;
     } else {
        if (putc(c, stdout) == EOF)
@@ -63,7 +63,7 @@ TPUTS_PROTO(outc, c)
 }
 
 static bool
 }
 
 static bool
-outs(char *s)
+outs(const char *s)
 {
     if (valid(s)) {
        tputs(s, 1, outc);
 {
     if (valid(s)) {
        tputs(s, 1, outc);
@@ -108,6 +108,7 @@ main(int argc GCC_UNUSED,
     double r;
     double c;
     SCREEN *sp;
     double r;
     double c;
     SCREEN *sp;
+    int my_colors;
 
     CATCHALL(onsig);
 
 
     CATCHALL(onsig);
 
@@ -116,11 +117,12 @@ main(int argc GCC_UNUSED,
     outs(clear_screen);
     outs(cursor_home);
     outs(cursor_invisible);
     outs(clear_screen);
     outs(cursor_home);
     outs(cursor_invisible);
-    if (max_colors > 1) {
+    my_colors = max_colors;
+    if (my_colors > 1) {
        if (!valid(set_a_foreground)
            || !valid(set_a_background)
            || (!valid(orig_colors) && !valid(orig_pair)))
        if (!valid(set_a_foreground)
            || !valid(set_a_background)
            || (!valid(orig_colors) && !valid(orig_pair)))
-           max_colors = -1;
+           my_colors = -1;
     }
 
     r = (double) (lines - 4);
     }
 
     r = (double) (lines - 4);
@@ -137,8 +139,8 @@ main(int argc GCC_UNUSED,
            y0 = y;
        }
 
            y0 = y;
        }
 
-       if (max_colors > 0) {
-           z = (int) (ranf() * max_colors);
+       if (my_colors > 0) {
+           z = (int) (ranf() * my_colors);
            if (ranf() > 0.01) {
                tputs(tparm2(set_a_foreground, z), 1, outc);
            } else {
            if (ranf() > 0.01) {
                tputs(tparm2(set_a_foreground, z), 1, outc);
            } else {
index c8cbf7681792ebbf5713355e0e1dcd8749632416..4c1d62d9f9ff3af39efae6d875a512777dc94987 100644 (file)
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey
  *
 /*
  * Author: Thomas E. Dickey
  *
- * $Id: dots_termcap.c,v 1.6 2013/09/07 23:12:30 Ray.Donnelly Exp $
+ * $Id: dots_termcap.c,v 1.7 2013/09/28 21:50:35 tom Exp $
  *
  * A simple demo of the termcap interface.
  */
  *
  * A simple demo of the termcap interface.
  */
@@ -105,7 +105,7 @@ TPUTS_PROTO(outc, c)
 
     if (interrupted) {
        char tmp = (char) c;
 
     if (interrupted) {
        char tmp = (char) c;
-       if (write(STDOUT_FILENO, &tmp, 1) == -1)
+       if (write(STDOUT_FILENO, &tmp, (size_t) 1) == -1)
            rc = EOF;
     } else {
        rc = putc(c, stdout);
            rc = EOF;
     } else {
        rc = putc(c, stdout);
index 7b83bd2ae864e65cbd45905c398ffd8b95c57e66..506d08ae0396ae4fa2cc9cf568e7cf067b200b84 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 2003-2008,2011 Free Software Foundation, Inc.              *
+ * Copyright (c) 2003-2011,2013 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: edit_field.c,v 1.21 2013/06/08 21:38:12 tom Exp $
+ * $Id: edit_field.c,v 1.22 2013/09/28 22:02:17 tom Exp $
  *
  * A wrapper for form_driver() which keeps track of the user's editing changes
  * for each field, and makes the resulting length available as a
  *
  * A wrapper for form_driver() which keeps track of the user's editing changes
  * for each field, and makes the resulting length available as a
@@ -329,7 +329,7 @@ init_edit_field(FIELD * f, char *value)
     if (ptr == 0) {
        int rows, cols, frow, fcol, nrow, nbuf;
 
     if (ptr == 0) {
        int rows, cols, frow, fcol, nrow, nbuf;
 
-       ptr = typeCalloc(FieldAttrs, 1);
+       ptr = typeCalloc(FieldAttrs, (size_t) 1);
        ptr->background = field_back(f);
        if (field_info(f, &rows, &cols, &frow, &fcol, &nrow, &nbuf) == E_OK) {
            ptr->row_count = nrow;
        ptr->background = field_back(f);
        if (field_info(f, &rows, &cols, &frow, &fcol, &nrow, &nbuf) == E_OK) {
            ptr->row_count = nrow;
index 9d88f5eb02ae574c7271f88995f4f3514d9ac0ed..a74cd0df76b8d0224fb4714a7e95c012014b2e6e 100644 (file)
@@ -33,7 +33,7 @@
  * modified 10-18-89 for curses (jrl)
  * 10-18-89 added signal handling
  *
  * modified 10-18-89 for curses (jrl)
  * 10-18-89 added signal handling
  *
- * $Id: gdc.c,v 1.37 2013/04/27 19:50:17 tom Exp $
+ * $Id: gdc.c,v 1.38 2013/09/28 21:58:32 tom Exp $
  */
 
 #include <test.priv.h>
  */
 
 #include <test.priv.h>
@@ -293,7 +293,7 @@ main(int argc, char *argv[])
        }
 
        /* this depends on the detailed format of ctime(3) */
        }
 
        /* this depends on the detailed format of ctime(3) */
-       (void) strncpy(buf, ctime(&now), 30);
+       (void) strncpy(buf, ctime(&now), (size_t) 30);
        (void) strcpy(buf + 10, buf + 19);
        MvAddStr(16, 30, buf);
 
        (void) strcpy(buf + 10, buf + 19);
        MvAddStr(16, 30, buf);
 
index 4e4e7051148a1947390c7e3413af080d71a6caff..2262a5203bd073638cab1558266f80a660c5896d 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2010,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2012,2013 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -41,7 +41,7 @@
  *
  *     Date: 05.Nov.90
  *
  *
  *     Date: 05.Nov.90
  *
- * $Id: hanoi.c,v 1.34 2012/12/08 16:41:56 tom Exp $
+ * $Id: hanoi.c,v 1.35 2013/09/28 22:02:17 tom Exp $
  */
 
 #include <test.priv.h>
  */
 
 #include <test.priv.h>
@@ -231,7 +231,7 @@ DisplayTiles(void)
     erase();
     MvAddStr(1, 24, "T O W E R S   O F   H A N O I");
     MvAddStr(3, 34, "SJR 1990");
     erase();
     MvAddStr(1, 24, "T O W E R S   O F   H A N O I");
     MvAddStr(3, 34, "SJR 1990");
-    MvPrintw(19, 5, "Moves : %d of %.0f", NMoves, pow(2.0, NTiles) - 1);
+    MvPrintw(19, 5, "Moves : %d of %.0f", NMoves, pow(2.0, (float) NTiles) - 1);
     (void) attrset(A_REVERSE);
     MvAddStr(BASELINE, 8,
             "                                                               ");
     (void) attrset(A_REVERSE);
     MvAddStr(BASELINE, 8,
             "                                                               ");
index 78afb459f2308537fd950a7d58e3411d331d6691..403cad1b7537d503b9f6d9b30740ce96743d0e58 100644 (file)
@@ -40,7 +40,7 @@ AUTHOR
    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.393 2013/09/07 19:17:48 tom Exp $
+$Id: ncurses.c,v 1.394 2013/09/28 21:58:37 tom Exp $
 
 ***************************************************************************/
 
 
 ***************************************************************************/
 
@@ -2851,7 +2851,7 @@ slk_test(void)
            MvAddStr(SLK_WORK, 0, "Please enter the label value: ");
            strcpy(buf, "");
            if ((s = slk_label(c - '0')) != 0) {
            MvAddStr(SLK_WORK, 0, "Please enter the label value: ");
            strcpy(buf, "");
            if ((s = slk_label(c - '0')) != 0) {
-               strncpy(buf, s, 8);
+               strncpy(buf, s, (size_t) 8);
            }
            wGetstring(stdscr, buf, 8);
            slk_set((c - '0'), buf, fmt);
            }
            wGetstring(stdscr, buf, 8);
            slk_set((c - '0'), buf, fmt);
@@ -4348,7 +4348,7 @@ acs_and_scroll(void)
        transient((FRAME *) 0, (char *) 0);
        switch (c) {
        case CTRL('C'):
        transient((FRAME *) 0, (char *) 0);
        switch (c) {
        case CTRL('C'):
-           if ((neww = typeCalloc(FRAME, 1)) == 0) {
+           if ((neww = typeCalloc(FRAME, (size_t) 1)) == 0) {
                failed("acs_and_scroll");
                goto breakout;
            }
                failed("acs_and_scroll");
                goto breakout;
            }
@@ -4430,7 +4430,7 @@ acs_and_scroll(void)
            if ((fp = fopen(DUMPFILE, "r")) == (FILE *) 0) {
                transient(current, "Can't open screen dump file");
            } else {
            if ((fp = fopen(DUMPFILE, "r")) == (FILE *) 0) {
                transient(current, "Can't open screen dump file");
            } else {
-               if ((neww = typeCalloc(FRAME, 1)) != 0) {
+               if ((neww = typeCalloc(FRAME, (size_t) 1)) != 0) {
 
                    neww->next = current ? current->next : 0;
                    neww->last = current;
 
                    neww->next = current ? current->next : 0;
                    neww->last = current;
@@ -6792,7 +6792,7 @@ main_menu(bool top)
        command = 0;
        for (;;) {
            char ch = '\0';
        command = 0;
        for (;;) {
            char ch = '\0';
-           if (read(fileno(stdin), &ch, 1) <= 0) {
+           if (read(fileno(stdin), &ch, (size_t) 1) <= 0) {
                if (command == 0)
                    command = 'q';
                break;
                if (command == 0)
                    command = 'q';
                break;
index dca2f9144b5b03d8a8da5aff22c0734662c8d2b0..33dc46f1dd1cb907d71cff3e892267b46c74dbd5 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 2000-2008,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 2000-2011,2013 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey - 2000
  *
 /*
  * Author: Thomas E. Dickey - 2000
  *
- * $Id: railroad.c,v 1.20 2011/04/23 19:15:04 tom Exp $
+ * $Id: railroad.c,v 1.21 2013/09/28 22:02:17 tom Exp $
  *
  * A simple demo of the termcap interface.
  */
  *
  * A simple demo of the termcap interface.
  */
@@ -62,7 +62,7 @@ TPUTS_PROTO(outc, c)
 
     if (interrupted) {
        char tmp = (char) c;
 
     if (interrupted) {
        char tmp = (char) c;
-       if (write(STDOUT_FILENO, &tmp, 1) == -1)
+       if (write(STDOUT_FILENO, &tmp, (size_t) 1) == -1)
            rc = ERR;
     } else {
        if (putc(c, stdout) == EOF)
            rc = ERR;
     } else {
        if (putc(c, stdout) == EOF)
index 1c047090d22a470ba518bf3f21dd3803dd445112..24f33827b449a98692bac627214b9130fd6830aa 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: tclock.c,v 1.32 2013/09/07 23:12:30 Ray.Donnelly Exp $ */
+/* $Id: tclock.c,v 1.33 2013/09/28 21:52:34 tom Exp $ */
 
 #include <test.priv.h>
 
 
 #include <test.priv.h>
 
 
 /* Plot a point */
 static void
 
 /* Plot a point */
 static void
-plot(int x, int y, char col)
+plot(int x, int y, int col)
 {
     MvAddCh(y, x, (chtype) col);
 }
 
 /* Draw a diagonal(arbitrary) line using Bresenham's alogrithm. */
 static void
 {
     MvAddCh(y, x, (chtype) col);
 }
 
 /* Draw a diagonal(arbitrary) line using Bresenham's alogrithm. */
 static void
-dline(int pair, int from_x, int from_y, int x2, int y2, char ch)
+dline(int pair, int from_x, int from_y, int x2, int y2, int ch)
 {
     int dx, dy;
     int ax, ay;
 {
     int dx, dy;
     int ax, ay;
index ee3aced074100d328c8c704c6c728dbceceaaf71..9640f6cc2fff765aa1173d5d1c47e00158e87805 100644 (file)
@@ -29,7 +29,7 @@
 /****************************************************************************
  *  Author: Thomas E. Dickey                    1996-on                     *
  ****************************************************************************/
 /****************************************************************************
  *  Author: Thomas E. Dickey                    1996-on                     *
  ****************************************************************************/
-/* $Id: test.priv.h,v 1.119 2013/09/07 18:49:43 tom Exp $ */
+/* $Id: test.priv.h,v 1.121 2013/09/28 22:43:22 tom Exp $ */
 
 #ifndef __TEST_PRIV_H
 #define __TEST_PRIV_H 1
 
 #ifndef __TEST_PRIV_H
 #define __TEST_PRIV_H 1
 #define HAVE_RIPOFFLINE 0
 #endif
 
 #define HAVE_RIPOFFLINE 0
 #endif
 
+#ifndef HAVE_SCR_DUMP
+#define HAVE_SCR_DUMP 0
+#endif
+
 #ifndef HAVE_SETUPTERM
 #define HAVE_SETUPTERM 0
 #endif
 #ifndef HAVE_SETUPTERM
 #define HAVE_SETUPTERM 0
 #endif
 #define HAVE_TERMNAME 0
 #endif
 
 #define HAVE_TERMNAME 0
 #endif
 
+#ifndef HAVE_TERM_ENTRY_H
+#define HAVE_TERM_ENTRY_H 0
+#endif
+
 #ifndef HAVE_TGETENT
 #define HAVE_TGETENT 0
 #endif
 #ifndef HAVE_TGETENT
 #define HAVE_TGETENT 0
 #endif
@@ -611,7 +619,8 @@ extern char *strnames[], *strcodes[], *strfnames[];
  * So far (2013 - more than ten years), only ncurses implements
  * use_extended_names().
  */
  * So far (2013 - more than ten years), only ncurses implements
  * use_extended_names().
  */
-#if defined(NCURSES_VERSION) && defined(HAVE_TERM_ENTRY_H) && HAVE_TERM_ENTRY_H
+#if defined(NCURSES_XNAMES)
+#elif defined(NCURSES_VERSION) && defined(HAVE_TERM_ENTRY_H) && HAVE_TERM_ENTRY_H
 #define NCURSES_XNAMES 1
 #else
 #define NCURSES_XNAMES 0
 #define NCURSES_XNAMES 1
 #else
 #define NCURSES_XNAMES 0
index 3a2bc82fa6bb29693b4465fdb52045b98c6f936b..6c8bc36a7886aec739694d21f0573823a87425de 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: test_vid_puts.c,v 1.4 2013/01/13 01:04:14 tom Exp $
+ * $Id: test_vid_puts.c,v 1.5 2013/09/28 22:42:29 tom Exp $
  *
  * Demonstrate the vid_puts and vid_attr functions.
  * Thomas Dickey - 2013/01/12
  *
  * Demonstrate the vid_puts and vid_attr functions.
  * Thomas Dickey - 2013/01/12
@@ -52,7 +52,7 @@ TPUTS_PROTO(outc, c)
 }
 
 static bool
 }
 
 static bool
-outs(char *s)
+outs(const char *s)
 {
     if (valid(s)) {
        tputs(s, 1, outc);
 {
     if (valid(s)) {
        tputs(s, 1, outc);
index c32f50b7812c9b13eb92f3b3319d144642b978ce..2215fa91a38f2e847e4b312692a7734d85350b9c 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: test_vidputs.c,v 1.3 2013/01/13 00:58:54 tom Exp $
+ * $Id: test_vidputs.c,v 1.4 2013/09/28 22:45:21 tom Exp $
  *
  * Demonstrate the vidputs and vidattr functions.
  * Thomas Dickey - 2013/01/12
  *
  * Demonstrate the vidputs and vidattr functions.
  * Thomas Dickey - 2013/01/12
@@ -52,7 +52,7 @@ TPUTS_PROTO(outc, c)
 }
 
 static bool
 }
 
 static bool
-outs(char *s)
+outs(const char *s)
 {
     if (valid(s)) {
        tputs(s, 1, outc);
 {
     if (valid(s)) {
        tputs(s, 1, outc);
index 8dcb0380ee34c848f3d88d60ddfa6eb7c13d8d30..4782d8509748a42e6728b70826b5bc7fd62d5200 100644 (file)
@@ -50,7 +50,7 @@
  * 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.93 2013/04/27 19:46:53 tom Exp $
+ * $Id: view.c,v 1.94 2013/09/28 21:58:42 tom Exp $
  */
 
 #include <test.priv.h>
  */
 
 #include <test.priv.h>
@@ -577,7 +577,7 @@ show_all(const char *tag)
     printw("%.*s", COLS, temp);
     clrtoeol();
     this_time = time((time_t *) 0);
     printw("%.*s", COLS, temp);
     clrtoeol();
     this_time = time((time_t *) 0);
-    strncpy(temp, ctime(&this_time), 30);
+    strncpy(temp, ctime(&this_time), (size_t) 30);
     if ((i = (int) strlen(temp)) != 0) {
        temp[--i] = 0;
        if (move(0, COLS - i - 2) != ERR)
     if ((i = (int) strlen(temp)) != 0) {
        temp[--i] = 0;
        if (move(0, COLS - i - 2) != ERR)