]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.7 - patch 20101225
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 26 Dec 2010 01:22:11 +0000 (01:22 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 26 Dec 2010 01:22:11 +0000 (01:22 +0000)
+ modify nc_tparm.h, adding guards against repeated inclusion, and
  allowing TPARM_ARG to be overridden.
+ fix some strict compiler warnings in ncurses library.

63 files changed:
NEWS
README.MinGW
dist.mk
include/curses.h.in
include/nc_tparm.h
man/curs_color.3x
mk-dlls.sh.in
ncurses/base/MKkeyname.awk
ncurses/base/MKlib_gen.sh
ncurses/base/lib_addstr.c
ncurses/base/lib_driver.c
ncurses/base/lib_getch.c
ncurses/base/lib_hline.c
ncurses/base/lib_inchstr.c
ncurses/base/lib_mvwin.c
ncurses/base/lib_redrawln.c
ncurses/base/lib_refresh.c
ncurses/base/lib_scroll.c
ncurses/base/lib_set_term.c
ncurses/base/lib_slk.c
ncurses/base/lib_slkattr.c
ncurses/base/lib_slkset.c
ncurses/base/lib_touch.c
ncurses/base/lib_vline.c
ncurses/base/lib_winch.c
ncurses/base/lib_window.c
ncurses/curses.priv.h
ncurses/tinfo/MKcaptab.sh
ncurses/tinfo/add_tries.c
ncurses/tinfo/alloc_entry.c
ncurses/tinfo/alloc_ttype.c
ncurses/tinfo/comp_parse.c
ncurses/tinfo/comp_scan.c
ncurses/tinfo/db_iterator.c
ncurses/tinfo/home_terminfo.c
ncurses/tinfo/lib_acs.c
ncurses/tinfo/lib_baudrate.c
ncurses/tinfo/lib_cur_term.c
ncurses/tinfo/lib_kernel.c
ncurses/tinfo/lib_longname.c
ncurses/tinfo/lib_setup.c
ncurses/tinfo/lib_termcap.c
ncurses/tinfo/lib_tparm.c
ncurses/tinfo/lib_tputs.c
ncurses/tinfo/lib_ttyflags.c
ncurses/tinfo/tinfo_driver.c
ncurses/tinfo/trim_sgr0.c
ncurses/tinfo/write_entry.c
ncurses/trace/lib_trace.c
ncurses/trace/lib_traceatr.c
ncurses/tty/lib_mvcur.c
ncurses/tty/lib_twait.c
ncurses/tty/tty_update.c
ncurses/widechar/lib_add_wch.c
ncurses/widechar/lib_cchar.c
ncurses/widechar/lib_hline_set.c
ncurses/widechar/lib_ins_wch.c
ncurses/widechar/lib_vid_attr.c
ncurses/widechar/lib_vline_set.c
ncurses/widechar/lib_wacs.c
ncurses/widechar/lib_wunctrl.c
ncurses/win32con/win_driver.c
test/test_add_wchstr.c

diff --git a/NEWS b/NEWS
index 0dacd15ce9850950a0b0f542dfd5b63d92cc624f..2842dafb01c3eebd34504e173fbe3efb6fe7969d 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.1621 2010/12/11 23:42:36 tom Exp $
+-- $Id: NEWS,v 1.1624 2010/12/25 23:56:36 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.
 
+20101225
+       + modify nc_tparm.h, adding guards against repeated inclusion, and
+         allowing TPARM_ARG to be overridden.
+       + fix some strict compiler warnings in ncurses library.
+
 20101211
        + suppress ncv in screen entry, allowing underline (patch by Alejandro
          R Sedeno).
index 2d405da6a5319b67448d8542c670738ec5826a61..8bc5dad8c0e82d948216cbb12afbd66a268466a4 100644 (file)
@@ -1,5 +1,5 @@
 -------------------------------------------------------------------------------
--- Copyright (c) 2008           Free Software Foundation, Inc.               --
+-- Copyright (c) 2008,2010 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             --
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: README.MinGW,v 1.3 2010/10/02 16:32:41 juergen Exp $
+-- $Id: README.MinGW,v 1.4 2010/12/18 21:07:03 tom Exp $
 -- Author: Juergen Pfeifer
 -------------------------------------------------------------------------------
 
 This is work in progress, but it's in an state where one can see it
 works at least on the Windows Console.
 
-You should install the MSYS package, so that you've a shell environment
-that allows you to run the scripts, especially configure etc. You can get
-that from http://www.mingw.org
-
-To build ncurses for native Windows, you need the MinGW toolchain. The
-original MinGW toolchain from above site is only for 32-Bit Windows. As
-Windows Server - and even more and more regular workstations - are moving
-to 64-Bit, it seems to be reasonable to have a toolchain that supports
-both architectures. I recommend to use the TDM gcc toolchain which you
-can find at http://tdm-gcc.tdragon.net/download. Go to the download section
-and select the bundle installer for tdm64 (MinGW-w64). This installs a
-multilib version of the gcc toolchain that can compile for native 32- and
-64-Bit Windows versions. It also comes with a working pthread implementation.
-
-The latest config and build scripts we use for MinGW have only be tested
+You should install the MSYS package, so that you've a shell environment that
+allows you to run the scripts, especially configure etc.  You can get that
+from http://www.mingw.org
+
+To build ncurses for native Windows, you need the MinGW toolchain.  The
+original MinGW toolchain from the above site is only for 32-Bit Windows.  As
+Windows Server - and also regular workstations - are moving to 64-Bit, it
+seems to be reasonable to have a toolchain that supports both architectures. 
+I recommend to use the TDM gcc toolchain which you can find at
+http://tdm-gcc.tdragon.net/download.  Go to the download section and select
+the bundle installer for tdm64 (MinGW-w64).  This installs a multilib version
+of the gcc toolchain that can compile for native 32- and 64-Bit Windows
+versions.  It also comes with a working pthread implementation.
+
+The latest config and build scripts we use for MinGW have only been tested
 for the gcc-4.4 compiler toolchain (or better).
 
 Using MinGW is a pragmatic decision, it's the easiest way to port this
@@ -65,8 +65,8 @@ It contains the LIB.EXE tool. You may also use this compiler to test
 writing native Windows programs using the ncurses DLLs without using 
 MinGW then for writing apps.
 
-Please unset the TERM environment variable, so that the Console driver
-gets activated.
+It is necessary to unset the TERM environment variable, to activate the
+Windows console-driver.
 
 Please also make sure that MSYS links to the correct directory containing
 your MinGW toolchain. For TDM this is usually C:\MinGW64. In your Windows
@@ -91,13 +91,39 @@ recommend to use these options with configure
 
 This is the configuration commandline as I'm using it at the moment:
 
-./configure --prefix=/mingw --without-cxx-binding --without-ada --enable-warnings --enable-assertions --enable-reentrant --with-debug --with-normal --disable-home-terminfo --enable-sp-funcs --enable-term-driver --enable-interop --with-pthread
+./configure \
+       --prefix=/mingw \
+       --without-cxx-binding \
+       --without-ada \
+       --enable-warnings \
+       --enable-assertions \
+       --enable-reentrant \
+       --with-debug \
+       --with-normal \
+       --disable-home-terminfo \
+       --enable-sp-funcs \
+       --enable-term-driver \
+       --enable-interop \
+       --with-pthread
 
 If you are on a 64-Bit Windows system and want to build a 32-Bit version
 of ncurses, you may use this commandline for configuration (when using
 the TDM toolchain):
 
-CC="gcc -m32" LD="ld -m32" ./configure --prefix=/mingw --without-cxx-binding --without-ada --enable-warnings --enable-assertions --enable-reentrant --with-debug --with-normal --disable-home-terminfo --enable-sp-funcs --enable-term-driver --enable-interop --with-pthread
+CC="gcc -m32" LD="ld -m32" ./configure \
+       --prefix=/mingw \
+       --without-cxx-binding \
+       --without-ada \
+       --enable-warnings \
+       --enable-assertions \
+       --enable-reentrant \
+       --with-debug \
+       --with-normal \
+       --disable-home-terminfo \
+       --enable-sp-funcs \
+       --enable-term-driver \
+       --enable-interop \
+       --with-pthread
 
 All the options above are - like the whole Windows support -
 experimental.
@@ -106,10 +132,8 @@ In order to build the DLLs, after your regular make you must call
 
    make dlls
 
-
 A lot is still TODO, e.g.:
 
-  - Mouse support for the Console
   - Wide Character support
     The Win32Con driver should actually only use Unicode in the
     future.
diff --git a/dist.mk b/dist.mk
index 5e004ee7a9136172220aa6bc09c2a0e514efac9e..dc6fe0802f6716a98a8a47c101d7838f9a9e054a 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.785 2010/12/11 17:04:22 tom Exp $
+# $Id: dist.mk,v 1.787 2010/12/25 23:56:22 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 = 7
-NCURSES_PATCH = 20101211
+NCURSES_PATCH = 20101225
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 2ad68f1fee78aa47218645fd8f21d54a039409e1..fc714f6777c9206d0e5f82a72806bff175e952a3 100644 (file)
@@ -32,7 +32,7 @@
  *     and: Thomas E. Dickey                        1996-on                 *
  ****************************************************************************/
 
-/* $Id: curses.h.in,v 1.215 2010/04/29 09:46:38 tom Exp $ */
+/* $Id: curses.h.in,v 1.218 2010/12/25 23:39:07 tom Exp $ */
 
 #ifndef __NCURSES_H
 #define __NCURSES_H
@@ -1097,7 +1097,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int);     /*
 
 /* It seems older SYSV curses versions define these */
 #if !NCURSES_OPAQUE
-#define getattrs(win)          ((win) ? (win)->_attrs : A_NORMAL)
+#define getattrs(win)          NCURSES_CAST(int, (win) ? (win)->_attrs : A_NORMAL)
 #define getcurx(win)           ((win) ? (win)->_curx : ERR)
 #define getcury(win)           ((win) ? (win)->_cury : ERR)
 #define getbegx(win)           ((win) ? (win)->_begx : ERR)
@@ -1118,12 +1118,12 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int);   /*
 #if defined(NCURSES_WIDECHAR) && @NCURSES_EXT_COLORS@
 #define wattrset(win,at)       ((win) \
                                  ? ((win)->_color = PAIR_NUMBER(at), \
-                                     (win)->_attrs = (at), \
+                                     (win)->_attrs = NCURSES_CAST(attr_t, at), \
                                      OK) \
                                  : ERR)
 #else
 #define wattrset(win,at)        ((win) \
-                                 ? ((win)->_attrs = (at), \
+                                 ? ((win)->_attrs = NCURSES_CAST(attr_t, at), \
                                     OK) \
                                  : ERR)
 #endif
@@ -1155,7 +1155,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int);     /*
  * These apply to the first 256 color pairs.
  */
 #define COLOR_PAIR(n)  NCURSES_BITS(n, 0)
-#define PAIR_NUMBER(a) (NCURSES_CAST(int,(((a) & A_COLOR) >> NCURSES_ATTR_SHIFT)))
+#define PAIR_NUMBER(a) (NCURSES_CAST(int,((NCURSES_CAST(unsigned long,a) & A_COLOR) >> NCURSES_ATTR_SHIFT)))
 
 /*
  * pseudo functions for standard screen
index d1d769be9a278183ce0228e618bf5892827acf37..a8dbcacb1e3146e2299b02ebcffd505a1db78adc 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2006 Free Software Foundation, Inc.                        *
+ * Copyright (c) 2006,2010 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                        2006                    *
  ****************************************************************************/
 
-/* $Id: nc_tparm.h,v 1.4 2006/11/26 00:49:25 tom Exp $ */
+/* $Id: nc_tparm.h,v 1.5 2010/12/25 20:27:22 tom Exp $ */
+
+#ifndef NC_TPARM_included
+#define NC_TPARM_included 1
 
 /*
  * Cast parameters past the formatting-string for tparm() to match the
  * assumption of the varargs code.
  */
+#ifndef TPARM_ARG
 #define TPARM_ARG long
+#endif
+
 #define TPARM_N(n) (TPARM_ARG)(n)
 
 #define TPARM_9(a,b,c,d,e,f,g,h,i,j) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g),TPARM_N(h),TPARM_N(i),TPARM_N(j))
@@ -63,3 +69,5 @@
 #define TPARM_1(a,b) TPARM_2(a,b,0)
 #define TPARM_0(a) TPARM_1(a,0)
 #endif
+
+#endif /* NC_TPARM_included */
index 9df4c9a9632b0a70e9a9c53205ff6a2c40bf0c68..2f63c848bc1a92ea288a9e8d8d26186ca1be2168 100644 (file)
@@ -26,7 +26,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_color.3x,v 1.34 2010/12/04 18:36:44 tom Exp $
+.\" $Id: curs_color.3x,v 1.35 2010/12/20 00:50:58 tom Exp $
 .TH curs_color 3X ""
 .de bP
 .IP \(bu 4
@@ -180,7 +180,7 @@ X/Open defines no error conditions.
 This implementation will return \fBERR\fR on attempts to
 use color values outside the range 0 to COLORS\-1
 (except for the default colors extension),
-or use color pairs outside the range 0 to COLOR_PAIR\-1.
+or use color pairs outside the range 0 to COLOR_PAIRS\-1.
 Color values used in \fBinit_color\fP must be in the range 0 to 1000.
 An error is returned from all functions
 if the terminal has not been initialized.
index 35a02baa4499839c5641e91e6aad3be076623fce..05c646ae294a08d9ad7068ef52f2f763cd172a9e 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: mk-dlls.sh.in,v 1.2 2010/10/02 16:34:01 juergen Exp $
+# $Id: mk-dlls.sh.in,v 1.3 2010/12/25 22:25:41 tom Exp $
 ##############################################################################
 # Copyright (c) 2008,2010 Free Software Foundation, Inc.                     #
 #                                                                            #
@@ -52,7 +52,7 @@ EOF
     rm -rf tmp-dll
   popd
   echo $ARCH > mingw_arch
-  echo Building DLLs and Import Librarie for Win${ARCH}
+  echo Building DLLs and Import Libraries for Win${ARCH}
 
   if [ -d lib ]; then
     cf="-shared"
index abceeea8883eeca8433ee14ae73c568cb3beff34..bb2599acb558c26d29407bb220a27ddb3168f70e 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: MKkeyname.awk,v 1.44 2010/01/23 17:57:43 tom Exp $
+# $Id: MKkeyname.awk,v 1.45 2010/12/19 01:36:14 tom Exp $
 ##############################################################################
 # Copyright (c) 1999-2009,2010 Free Software Foundation, Inc.                #
 #                                                                            #
@@ -120,7 +120,7 @@ END {
        print "                 int j, k;"
        print "                 char * bound;"
        print "                 TERMTYPE *tp = &(TerminalOf(sp)->type);"
-       print "                 int save_trace = _nc_tracing;"
+       print "                 unsigned save_trace = _nc_tracing;"
        print ""
        print "                 _nc_tracing = 0;        /* prevent recursion via keybound() */"
        print "                 for (j = 0; (bound = NCURSES_SP_NAME(keybound)(NCURSES_SP_ARGx c, j)) != 0; ++j) {"
index 12a83e049680d88cd9a3e964ef082076c695c0db..decf3c6a5ffc6ad75d38c79e5f1e317cc68e8690 100755 (executable)
@@ -2,7 +2,7 @@
 #
 # MKlib_gen.sh -- generate sources from curses.h macro definitions
 #
-# ($Id: MKlib_gen.sh,v 1.40 2010/03/30 22:42:16 tom Exp $)
+# ($Id: MKlib_gen.sh,v 1.41 2010/12/19 00:39:24 tom Exp $)
 #
 ##############################################################################
 # Copyright (c) 1998-2009,2010 Free Software Foundation, Inc.                #
@@ -264,22 +264,23 @@ $0 !~ /^P_/ {
        argtype = ""
        for (i = myfunc; i <= NF; i++) {
                ch = $i;
-               if ( ch == "*" )
+               if ( ch == "*" ) {
                        pointer = 1;
-               else if ( ch == "va_list" )
+               } else if ( ch == "va_list" ) {
                        va_list = 1;
-               else if ( ch == "..." )
+               } else if ( ch == "..." ) {
                        varargs = 1;
-               else if ( ch == "char" )
+               } else if ( ch == "char" ) {
                        argtype = "char";
-               else if ( ch == "int" )
+               } else if ( ch == "int" ) {
                        argtype = "int";
-               else if ( ch == "short" )
+               } else if ( ch == "short" ) {
                        argtype = "short";
-               else if ( ch == "chtype" )
+               } else if ( ch == "chtype" ) {
                        argtype = "chtype";
-               else if ( ch == "attr_t" || ch == "NCURSES_ATTR_T" )
+               } else if ( ch == "attr_t" || ch == "NCURSES_ATTR_T" ) {
                        argtype = "attr";
+               }
 
                if ( ch == "," || ch == ")" ) {
                        if (va_list) {
index d8190e45652e0fa592caa2c392fd1d790b809945..d73ce00a4519a979853408412e30e76e94d142de 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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            *
@@ -44,7 +44,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_addstr.c,v 1.50 2009/10/24 23:24:03 tom Exp $")
+MODULE_ID("$Id: lib_addstr.c,v 1.51 2010/12/19 01:22:58 tom Exp $")
 
 NCURSES_EXPORT(int)
 waddnstr(WINDOW *win, const char *astr, int n)
@@ -107,7 +107,7 @@ waddchnstr(WINDOW *win, const chtype *astr, int n)
     for (i = 0; i < n && ChCharOf(astr[i]) != '\0'; ++i) {
        SetChar2(line->text[i + x], astr[i]);
     }
-    CHANGED_RANGE(line, x, x + n - 1);
+    CHANGED_RANGE(line, x, (NCURSES_SIZE_T) (x + n - 1));
 
     _nc_synchook(win);
     returnCode(code);
@@ -193,7 +193,7 @@ wadd_wchnstr(WINDOW *win, const cchar_t *astr, int n)
                    SetWidecExt(line->text[x + j], j);
                }
            }
-           x += len;
+           x = (NCURSES_SIZE_T) (x + len);
            end += len - 1;
        } else {
            break;
index 215fb0caa57495421d8f279845375bcd2a3aca6f..40487609be4d4c2e70ceb8ebaa4f0971f21bb8d7 100644 (file)
@@ -33,7 +33,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_driver.c,v 1.2 2010/01/16 21:26:09 tom Exp $")
+MODULE_ID("$Id: lib_driver.c,v 1.3 2010/12/20 00:29:17 tom Exp $")
 
 typedef struct DriverEntry {
     const char *name;
@@ -56,7 +56,8 @@ _nc_get_driver(TERMINAL_CONTROL_BLOCK * TCB, const char *name, int *errret)
     TERM_DRIVER *res = (TERM_DRIVER *) 0;
     TERM_DRIVER *use = 0;
 
-    T((T_CALLED("_nc_get_driver(%p, %s, %p)"), TCB, NonNull(name), errret));
+    T((T_CALLED("_nc_get_driver(%p, %s, %p)"),
+       (void *) TCB, NonNull(name), (void *) errret));
 
     assert(TCB != 0);
 
@@ -77,7 +78,7 @@ _nc_get_driver(TERMINAL_CONTROL_BLOCK * TCB, const char *name, int *errret)
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(has_key) (SCREEN *sp, int keycode)
 {
-    T((T_CALLED("has_key(%p, %d)"), sp, keycode));
+    T((T_CALLED("has_key(%p, %d)"), (void *) sp, keycode));
     returnCode(IsValidTIScreen(sp) ? CallDriver_1(sp, kyExist, keycode) : FALSE);
 }
 
@@ -108,7 +109,7 @@ NCURSES_SP_NAME(doupdate) (SCREEN *sp)
 {
     int code = ERR;
 
-    T((T_CALLED("doupdate(%p)"), sp));
+    T((T_CALLED("doupdate(%p)"), (void *) sp));
 
     if (IsValidScreen(sp))
        code = CallDriver(sp, update);
@@ -127,7 +128,7 @@ NCURSES_SP_NAME(mvcur) (SCREEN *sp, int yold, int xold, int ynew, int xnew)
 {
     int code = ERR;
     TR(TRACE_CALLS | TRACE_MOVE, (T_CALLED("mvcur(%p,%d,%d,%d,%d)"),
-                                 sp, yold, xold, ynew, xnew));
+                                 (void *) sp, yold, xold, ynew, xnew));
     if (HasTerminal(sp)) {
        code = CallDriver_4(sp, hwcur, yold, xold, ynew, xnew);
     }
index e0d1803faea280095a922f73652754983c832849..130c502431b3d2d74044f114ff465df2cbbf8df5 100644 (file)
@@ -42,7 +42,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_getch.c,v 1.120 2010/08/28 20:58:29 tom Exp $")
+MODULE_ID("$Id: lib_getch.c,v 1.121 2010/12/25 23:24:04 tom Exp $")
 
 #include <fifo_defs.h>
 
@@ -270,7 +270,7 @@ fifo_push(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl))
 #  endif
            _nc_globals.read_thread = pthread_self();
 # endif
-       n = read(sp->_ifd, &c2, 1);
+       n = (int) read(sp->_ifd, &c2, 1);
 #if USE_PTHREADS_EINTR
        _nc_globals.read_thread = 0;
 #endif
index 0ff2d5bdb6df7d9ce1586a9a2f94f4e38dc71737..1f0380830ddc7497dd36a5b8579d2150e990e0f0 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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: lib_hline.c,v 1.12 2009/10/24 22:31:53 tom Exp $")
+MODULE_ID("$Id: lib_hline.c,v 1.13 2010/12/19 01:48:39 tom Exp $")
 
 NCURSES_EXPORT(int)
 whline(WINDOW *win, chtype ch, int n)
 {
     int code = ERR;
-    NCURSES_SIZE_T start;
-    NCURSES_SIZE_T end;
+    int start;
+    int end;
 
     T((T_CALLED("whline(%p,%s,%d)"), (void *) win, _tracechtype(ch), n));
 
index 884ea51fdb3bc8f0d4a21e825b464b6041b657d8..aebb6d625d5c86705bae81061865203916c3966d 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2001,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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            *
@@ -29,6 +29,7 @@
 /****************************************************************************
  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
+ *     and: Thomas E. Dickey                        1996-on                 *
  ****************************************************************************/
 
 /*
@@ -40,7 +41,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_inchstr.c,v 1.11 2009/10/24 22:49:33 tom Exp $")
+MODULE_ID("$Id: lib_inchstr.c,v 1.12 2010/12/20 01:37:41 tom Exp $")
 
 NCURSES_EXPORT(int)
 winchnstr(WINDOW *win, chtype *str, int n)
@@ -55,7 +56,7 @@ winchnstr(WINDOW *win, chtype *str, int n)
     if (win) {
        for (; (n < 0 || (i < n)) && (win->_curx + i <= win->_maxx); i++)
            str[i] =
-               CharOf(win->_line[win->_cury].text[win->_curx + i]) |
+               (chtype) CharOf(win->_line[win->_cury].text[win->_curx + i]) |
                AttrOf(win->_line[win->_cury].text[win->_curx + i]);
     }
     str[i] = (chtype) 0;
index 37963e40be76ca2ab256cd48fb174572081dadee..18d31c13319b4c43d755e6a8a17f7a2f9b89251f 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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            *
@@ -42,7 +42,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_mvwin.c,v 1.17 2009/10/24 22:05:03 tom Exp $")
+MODULE_ID("$Id: lib_mvwin.c,v 1.18 2010/12/19 01:22:58 tom Exp $")
 
 NCURSES_EXPORT(int)
 mvwin(WINDOW *win, int by, int bx)
@@ -114,7 +114,7 @@ mvwin(WINDOW *win, int by, int bx)
      * new location.  This ensures that if the caller has refreshed another
      * window at the same location, that this one will be displayed.
      */
-    win->_begy = by;
-    win->_begx = bx;
+    win->_begy = (NCURSES_SIZE_T) by;
+    win->_begx = (NCURSES_SIZE_T) bx;
     returnCode(touchwin(win));
 }
index ad54044142ade2cb3db896df34faeeb6c6710147..72905f84d656c6580c431641df2858a76eb568ce 100644 (file)
@@ -39,7 +39,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_redrawln.c,v 1.16 2010/05/01 22:10:55 David.Benjamin Exp $")
+MODULE_ID("$Id: lib_redrawln.c,v 1.17 2010/12/19 00:03:23 tom Exp $")
 
 NCURSES_EXPORT(int)
 wredrawln(WINDOW *win, int beg, int num)
@@ -71,7 +71,7 @@ wredrawln(WINDOW *win, int beg, int num)
     if (end > win->_maxy + 1)
        end = win->_maxy + 1;
 
-    len = (win->_maxx + 1);
+    len = (size_t) (win->_maxx + 1);
     if (len > (size_t) (CurScreen(sp)->_maxx + 1 - win->_begx))
        len = (size_t) (CurScreen(sp)->_maxx + 1 - win->_begx);
     len *= sizeof(CurScreen(sp)->_line[0].text[0]);
index 01d363f43fde63cccdcfd128589e0ba0b0459857..8c02086a707d34302e3d96182974436ba7b1859c 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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            *
@@ -42,7 +42,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_refresh.c,v 1.43 2009/10/24 22:08:32 tom Exp $")
+MODULE_ID("$Id: lib_refresh.c,v 1.44 2010/12/19 01:22:58 tom Exp $")
 
 NCURSES_EXPORT(int)
 wrefresh(WINDOW *win)
@@ -77,11 +77,11 @@ wrefresh(WINDOW *win)
 NCURSES_EXPORT(int)
 wnoutrefresh(WINDOW *win)
 {
-    NCURSES_SIZE_T limit_x;
-    NCURSES_SIZE_T src_row, src_col;
-    NCURSES_SIZE_T begx;
-    NCURSES_SIZE_T begy;
-    NCURSES_SIZE_T dst_row, dst_col;
+    int limit_x;
+    int src_row, src_col;
+    int begx;
+    int begy;
+    int dst_row, dst_col;
 #if USE_SCROLL_HINTS
     bool wide;
 #endif
@@ -150,8 +150,8 @@ wnoutrefresh(WINDOW *win)
     for (src_row = 0, dst_row = begy + win->_yoffset;
         src_row <= win->_maxy && dst_row <= NewScreen(SP_PARM)->_maxy;
         src_row++, dst_row++) {
-       register struct ldat *nline = &(NewScreen(SP_PARM)->_line[dst_row]);
-       register struct ldat *oline = &win->_line[src_row];
+       struct ldat *nline = &(NewScreen(SP_PARM)->_line[dst_row]);
+       struct ldat *oline = &win->_line[src_row];
 
        if (oline->firstchar != _NOCHANGE) {
            int last_src = oline->lastchar;
@@ -163,7 +163,7 @@ wnoutrefresh(WINDOW *win)
            dst_col = src_col + begx;
 
            if_WIDEC({
-               register int j;
+               int j;
 
                /*
                 * Ensure that we will copy complete multi-column characters
@@ -204,7 +204,7 @@ wnoutrefresh(WINDOW *win)
                                       : win->_maxx);
                int fix_left = dst_col;
                int fix_right = last_dst;
-               register int j;
+               int j;
 
                /*
                 * Check for boundary cases where we may overwrite part of a
@@ -281,8 +281,9 @@ wnoutrefresh(WINDOW *win)
     }
 
     if (!win->_leaveok) {
-       NewScreen(SP_PARM)->_cury = win->_cury + win->_begy + win->_yoffset;
-       NewScreen(SP_PARM)->_curx = win->_curx + win->_begx;
+       NewScreen(SP_PARM)->_cury = (NCURSES_SIZE_T) (win->_cury +
+                                                     win->_begy + win->_yoffset);
+       NewScreen(SP_PARM)->_curx = (NCURSES_SIZE_T) (win->_curx + win->_begx);
     }
     NewScreen(SP_PARM)->_leaveok = win->_leaveok;
 
index 454ad5b0c9628ab76568b3d30c17425ffa678476..fe4e80804daef3de444430a3418cb7c587708ec3 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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 <curses.priv.h>
 
-MODULE_ID("$Id: lib_scroll.c,v 1.27 2009/10/24 22:35:45 tom Exp $")
+MODULE_ID("$Id: lib_scroll.c,v 1.28 2010/12/19 01:48:09 tom Exp $")
 
 NCURSES_EXPORT(void)
 _nc_scroll_window(WINDOW *win,
@@ -55,7 +55,7 @@ _nc_scroll_window(WINDOW *win,
     int limit;
     int line;
     int j;
-    size_t to_copy = (size_t) (sizeof(NCURSES_CH_T) * (win->_maxx + 1));
+    size_t to_copy = (sizeof(NCURSES_CH_T) * (size_t) (win->_maxx + 1));
 
     TR(TRACE_MOVE, ("_nc_scroll_window(%p, %d, %ld, %ld)",
                    (void *) win, n, (long) top, (long) bottom));
index 92b2f14e99aa9927c285affaa9e14317eef98822..df0a276aef8a3a61f749226e5eb7216244b5b43d 100644 (file)
@@ -47,7 +47,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_set_term.c,v 1.137 2010/05/01 19:47:51 tom Exp $")
+MODULE_ID("$Id: lib_set_term.c,v 1.138 2010/12/20 00:42:20 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define MaxColors      InfoOf(sp).maxcolors
@@ -314,7 +314,7 @@ NCURSES_SP_NAME(_nc_setupscreen) (
        ReturnScreenError();
     }
 
-    T(("created SP %p", sp));
+    T(("created SP %p", (void *) sp));
     sp->_next_screen = _nc_screen_chain;
     _nc_screen_chain = sp;
 
@@ -723,7 +723,7 @@ NCURSES_SP_NAME(_nc_ripoffline) (NCURSES_SP_DCLx
     int code = ERR;
 
     START_TRACE();
-    T((T_CALLED("ripoffline(%p,%d,%p)"), (void *) SP_PARM, line, (void *) init));
+    T((T_CALLED("ripoffline(%p,%d,%p)"), (void *) SP_PARM, line, init));
 
 #if NCURSES_SP_FUNCS
     if (SP_PARM != 0 && SP_PARM->_prescreen)
index 118db945d78dfe88a74eb9d4f0809d3431f90299..7a2eecd9e56dd14df926304c52e9a815696840f3 100644 (file)
@@ -47,7 +47,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_slk.c,v 1.46 2010/06/05 22:37:05 tom Exp $")
+MODULE_ID("$Id: lib_slk.c,v 1.47 2010/12/25 22:58:58 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define NumLabels    InfoOf(SP_PARM).numlabels
@@ -185,7 +185,7 @@ _nc_slk_initialize(WINDOW *stwin, int cols)
     if (SP_PARM->_slk->maxlen <= 0
        || SP_PARM->_slk->labcnt <= 0
        || (SP_PARM->_slk->ent = typeCalloc(slk_ent,
-                                           (unsigned) SP_PARM->_slk->labcnt))
+                                           (size_t) SP_PARM->_slk->labcnt))
        == NULL)
        returnCode(slk_failed(NCURSES_SP_ARG));
 
index 9dd2ec8cc983b5dfcbcbf8cca633a2db27ab50ac..bec11e84c6675fbc3ea686175ee5c89f435550be 100644 (file)
@@ -38,7 +38,7 @@
  */
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_slkattr.c,v 1.10 2010/03/31 23:38:02 tom Exp $")
+MODULE_ID("$Id: lib_slkattr.c,v 1.11 2010/12/20 01:41:25 tom Exp $")
 
 NCURSES_EXPORT(attr_t)
 NCURSES_SP_NAME(slk_attr) (NCURSES_SP_DCL0)
@@ -49,7 +49,7 @@ NCURSES_SP_NAME(slk_attr) (NCURSES_SP_DCL0)
        attr_t result = AttrOf(SP_PARM->_slk->attr) & ALL_BUT_COLOR;
        int pair = GetPair(SP_PARM->_slk->attr);
 
-       result |= ColorPair(pair);
+       result |= (attr_t) ColorPair(pair);
        returnAttr(result);
     } else
        returnAttr(0);
index eba9f8166731fdb9ad7173dd11997e7a742e2483..91483f103b23c687410b068cdc2d8a46ea1b3a3a 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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            *
@@ -44,7 +44,7 @@
 #endif
 #endif
 
-MODULE_ID("$Id: lib_slkset.c,v 1.20 2009/10/24 22:12:21 tom Exp $")
+MODULE_ID("$Id: lib_slkset.c,v 1.21 2010/12/25 23:43:58 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(slk_set) (NCURSES_SP_DCLx int i, const char *astr, int format)
@@ -94,12 +94,12 @@ NCURSES_SP_NAME(slk_set) (NCURSES_SP_DCLx int i, const char *astr, int format)
        numcols += wcwidth(wc);
        p += need;
     }
-    numchrs = (p - str);
+    numchrs = (int) (p - str);
 #else
     while (isprint(UChar(*p)))
        p++;                    /* The first non-print stops */
 
-    numcols = (p - str);
+    numcols = (int) (p - str);
     if (numcols > limit)
        numcols = limit;
     numchrs = numcols;
index 3f8771a839fd3e2e1706251a18a3c0e256d0322a..8023c705802766c40ebd7090c759de12b97d0c6b 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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 <curses.priv.h>
 
-MODULE_ID("$Id: lib_touch.c,v 1.10 2009/10/24 22:36:29 tom Exp $")
+MODULE_ID("$Id: lib_touch.c,v 1.11 2010/12/19 01:22:58 tom Exp $")
 
 NCURSES_EXPORT(bool)
 is_linetouched(WINDOW *win, int line)
@@ -85,7 +85,9 @@ wtouchln(WINDOW *win, int y, int n, int changed)
        if (i > win->_maxy)
            break;
        win->_line[i].firstchar = changed ? 0 : _NOCHANGE;
-       win->_line[i].lastchar = changed ? win->_maxx : _NOCHANGE;
+       win->_line[i].lastchar = (NCURSES_SIZE_T) (changed
+                                                  ? win->_maxx
+                                                  : _NOCHANGE);
     }
     returnCode(OK);
 }
index a396e082457c298500053af824fd33ce5d54abc5..2f3148eca77c6161fdbae5aea0a46e93c1ae2d2b 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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: lib_vline.c,v 1.11 2009/10/24 22:36:15 tom Exp $")
+MODULE_ID("$Id: lib_vline.c,v 1.12 2010/12/19 01:22:58 tom Exp $")
 
 NCURSES_EXPORT(int)
 wvline(WINDOW *win, chtype ch, int n)
 {
     int code = ERR;
-    NCURSES_SIZE_T row, col;
-    NCURSES_SIZE_T end;
+    int row, col;
+    int end;
 
     T((T_CALLED("wvline(%p,%s,%d)"), (void *) win, _tracechtype(ch), n));
 
index 43c614593100433c70861ab696ff2f46ed1aff1e..7e75f85bf390740bcced907b3633485faaf1400f 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2001,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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: lib_winch.c,v 1.7 2009/10/24 22:35:54 tom Exp $")
+MODULE_ID("$Id: lib_winch.c,v 1.8 2010/12/19 01:22:58 tom Exp $")
 
 NCURSES_EXPORT(chtype)
 winch(WINDOW *win)
 {
     T((T_CALLED("winch(%p)"), (void *) win));
     if (win != 0) {
-       returnChtype(CharOf(win->_line[win->_cury].text[win->_curx]) |
-                    AttrOf(win->_line[win->_cury].text[win->_curx]));
+       returnChtype((chtype) CharOf(win->_line[win->_cury].text[win->_curx])
+                    AttrOf(win->_line[win->_cury].text[win->_curx]));
     } else {
        returnChtype(0);
     }
index 5c1171b5450ff9da512abf7ad0b44357c7c57391..4baa36943c44a5156cd8348e2ceb4bb172cd8c1d 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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            *
@@ -39,7 +39,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_window.c,v 1.28 2009/12/19 22:01:07 tom Exp $")
+MODULE_ID("$Id: lib_window.c,v 1.29 2010/12/19 01:47:22 tom Exp $")
 
 NCURSES_EXPORT(void)
 _nc_synchook(WINDOW *win)
@@ -239,7 +239,7 @@ dupwin(WINDOW *win)
            if (win->_flags & _ISPAD)
                nwin->_pad = win->_pad;
 
-           linesize = (win->_maxx + 1) * sizeof(NCURSES_CH_T);
+           linesize = (unsigned) (win->_maxx + 1) * sizeof(NCURSES_CH_T);
            for (i = 0; i <= nwin->_maxy; i++) {
                memcpy(nwin->_line[i].text, win->_line[i].text, linesize);
                nwin->_line[i].firstchar = win->_line[i].firstchar;
index 2f54f5f1cea36f7e8b52f49a6c0315a3af6b3de1..3d357777acebd6da65bd9555a362d80f16acbb1b 100644 (file)
@@ -33,9 +33,8 @@
  *     and: Juergen Pfeifer                                                 *
  ****************************************************************************/
 
-
 /*
- * $Id: curses.priv.h,v 1.465 2010/08/28 20:56:48 tom Exp $
+ * $Id: curses.priv.h,v 1.470 2010/12/25 23:45:09 tom Exp $
  *
  *     curses.priv.h
  *
@@ -46,6 +45,7 @@
 
 #ifndef CURSES_PRIV_H
 #define CURSES_PRIV_H 1
+/* *INDENT-OFF* */
 
 #include <ncurses_dll.h>
 
@@ -346,7 +346,7 @@ color_t;
  */
 #if 1
 #define ColorPair(n)           NCURSES_BITS(n, 0)
-#define PairNumber(a)          (NCURSES_CAST(int,(((a) & A_COLOR) >> NCURSES_ATTR_SHIFT)))
+#define PairNumber(a)          (NCURSES_CAST(int,(((unsigned long)(a) & A_COLOR) >> NCURSES_ATTR_SHIFT)))
 #else
 #define ColorPair(pair)                COLOR_PAIR(pair)
 #define PairNumber(attr)       PAIR_NUMBER(attr)
@@ -383,11 +383,11 @@ color_t;
 
 #define if_EXT_COLORS(stmt)    /* nothing */
 #define SetPair(value,p)       RemAttr(value, A_COLOR), \
-                               SetAttr(value, AttrOf(value) | (A_COLOR & ColorPair(p)))
+                               SetAttr(value, AttrOf(value) | (A_COLOR & (attr_t) ColorPair(p)))
 #define GetPair(value)         PairNumber(AttrOf(value))
 #define GET_WINDOW_PAIR(w)     PairNumber(WINDOW_ATTRS(w))
 #define SET_WINDOW_PAIR(w,p)   WINDOW_ATTRS(w) &= ALL_BUT_COLOR, \
-                               WINDOW_ATTRS(w) |= (A_COLOR & ColorPair(p))
+                               WINDOW_ATTRS(w) |= (A_COLOR & (attr_t) ColorPair(p))
 #define SameAttrOf(a,b)                (AttrOf(a) == AttrOf(b))
 
 #if NCURSES_SP_FUNCS
@@ -1175,7 +1175,7 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
 #endif
 };
 
-#define WINDOW_EXT(w,m) (((WINDOWLIST *)((char *)(w) - offsetof(WINDOWLIST, win)))->m)
+#define WINDOW_EXT(w,m) (((WINDOWLIST *)((void *)((char *)(w) - offsetof(WINDOWLIST, win))))->m)
 
 #define SP_PRE_INIT(sp)                         \
     sp->_cursrow = -1;                          \
@@ -1310,7 +1310,7 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
 #define SetChar(ch,c,a) do {                                                       \
                            NCURSES_CH_T *_cp = &ch;                                \
                            memset(_cp, 0, sizeof(ch));                             \
-                           _cp->chars[0] = (c);                                            \
+                           _cp->chars[0] = (wchar_t) (c);                          \
                            _cp->attr = (a);                                        \
                            if_EXT_COLORS(SetPair(ch, PairNumber(a)));              \
                        } while (0)
@@ -1331,8 +1331,8 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
                                PUTC_ch = (ch).chars[PUTC_i];                       \
                                if (PUTC_ch == L'\0')                               \
                                    break;                                          \
-                               PUTC_n = wcrtomb(PUTC_buf,                          \
-                                                (ch).chars[PUTC_i], &PUT_st);      \
+                               PUTC_n = (int) wcrtomb(PUTC_buf,                    \
+                                                      (ch).chars[PUTC_i], &PUT_st); \
                                if (PUTC_n <= 0) {                                  \
                                    if (PUTC_ch && is8bits(PUTC_ch) && PUTC_i == 0) \
                                        putc(PUTC_ch,b);                            \
@@ -1354,7 +1354,7 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
         * zero.  Otherwise we can use those bits to tell if a cell is the
         * first or extension part of a wide character.
         */
-#define WidecExt(ch)   (AttrOf(ch) & A_CHARTEXT)
+#define WidecExt(ch)   (int) (AttrOf(ch) & A_CHARTEXT)
 #define isWidecBase(ch)        (WidecExt(ch) == 1)
 #define isWidecExt(ch) (WidecExt(ch) > 1 && WidecExt(ch) < 32)
 #define SetWidecExt(dst, ext)  AttrOf(dst) &= ~A_CHARTEXT,             \
@@ -1420,16 +1420,16 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
 #define CHANGED_RANGE(line,start,end) \
        if (line->firstchar == _NOCHANGE \
         || line->firstchar > (start)) \
-               line->firstchar = start; \
+               line->firstchar = (NCURSES_SIZE_T) start; \
        if (line->lastchar == _NOCHANGE \
         || line->lastchar < (end)) \
-               line->lastchar = end
+               line->lastchar = (NCURSES_SIZE_T) end
 
 #define CHANGED_TO_EOL(line,start,end) \
        if (line->firstchar == _NOCHANGE \
         || line->firstchar > (start)) \
-               line->firstchar = start; \
-       line->lastchar = end
+               line->firstchar = (NCURSES_SIZE_T) start; \
+       line->lastchar = (NCURSES_SIZE_T) end
 
 #define SIZEOF(v) (sizeof(v)/sizeof(v[0]))
 
@@ -1590,7 +1590,7 @@ extern NCURSES_EXPORT(const char *) _nc_viscbuf (const NCURSES_CH_T *, int);
  * Workaround for defective implementation of gcc attribute warn_unused_result
  */
 #if defined(__GNUC__) && defined(_FORTIFY_SOURCE)
-#define IGNORE_RC(func) errno = func
+#define IGNORE_RC(func) errno = (int) func
 #else
 #define IGNORE_RC(func) (void) func
 #endif /* gcc workarounds */
@@ -1615,9 +1615,9 @@ extern    NCURSES_EXPORT(void) name (void); \
 
 #define toggle_attr_on(S,at) {\
    if (PairNumber(at) > 0) {\
-      (S) = ((S) & ALL_BUT_COLOR) | (at);\
+      (S) = ((S) & ALL_BUT_COLOR) | (attr_t) (at);\
    } else {\
-      (S) |= (at);\
+      (S) |= (attr_t) (at);\
    }\
    TR(TRACE_ATTRS, ("new attribute is %s", _traceattr((S))));}
 
@@ -2298,4 +2298,6 @@ extern NCURSES_EXPORT(NCURSES_CONST char *) _nc_unctrl (SCREEN *, chtype);
 }
 #endif
 
+/* *INDENT-ON* */
+
 #endif /* CURSES_PRIV_H */
index 5b8c4bcd0075e6e96964e0885ea1d5882416eabf..4d1b53a5bd9a12252f422fda43ff5f655dadb916 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 ##############################################################################
-# Copyright (c) 2007,2009 Free Software Foundation, Inc.                     #
+# Copyright (c) 2007-2009,2010 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 "Software"), #
@@ -26,7 +26,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: MKcaptab.sh,v 1.12 2009/11/14 22:09:55 tom Exp $
+# $Id: MKcaptab.sh,v 1.13 2010/12/25 23:43:58 tom Exp $
 AWK=${1-awk}
 OPT1=${2-0}
 OPT2=${3-tinfo/MKcaptab.awk}
@@ -65,7 +65,7 @@ cat <<EOF
 static void
 next_string(const char *strings, unsigned *offset)
 {
-    *offset += strlen(strings + *offset) + 1;
+    *offset += (unsigned) strlen(strings + *offset) + 1;
 }
 
 static const struct name_table_entry *
index fb6dd5c53befb68d311d4ebccd01dd63e5d41424..29a1a60045b537411ef6642d6b724a72e4eb8a7c 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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            *
@@ -39,7 +39,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: add_tries.c,v 1.9 2009/10/24 22:41:36 tom Exp $")
+MODULE_ID("$Id: add_tries.c,v 1.10 2010/12/19 01:31:14 tom Exp $")
 
 #define SET_TRY(dst,src) if ((dst->ch = *src++) == 128) dst->ch = '\0'
 #define CMP_TRY(a,b) ((a)? (a == b) : (b == 128))
@@ -67,7 +67,7 @@ _nc_add_to_try(TRIES ** tree, const char *str, unsigned code)
 
            if (CMP_TRY(ptr->ch, cmp)) {
                if (*(++txt) == '\0') {
-                   ptr->value = code;
+                   ptr->value = (unsigned short) code;
                    returnCode(OK);
                }
                if (ptr->child != 0)
@@ -116,6 +116,6 @@ _nc_add_to_try(TRIES ** tree, const char *str, unsigned code)
        ptr->value = 0;
     }
 
-    ptr->value = code;
+    ptr->value = (unsigned short) code;
     returnCode(OK);
 }
index a54f9ef3e75b219bd1a34d58fd9ab55030f0af62..506fb386d208d914fca43142019317f593285693 100644 (file)
@@ -47,7 +47,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: alloc_entry.c,v 1.50 2010/05/01 19:55:48 tom Exp $")
+MODULE_ID("$Id: alloc_entry.c,v 1.51 2010/12/25 23:06:01 tom Exp $")
 
 #define ABSENT_OFFSET    -1
 #define CANCELLED_OFFSET -2
@@ -182,7 +182,7 @@ _nc_wrap_entry(ENTRY * const ep, bool copy_strings)
            } else if (tp->Strings[i] == CANCELLED_STRING) {
                offsets[i] = CANCELLED_OFFSET;
            } else {
-               offsets[i] = tp->Strings[i] - stringbuf;
+               offsets[i] = (int) (tp->Strings[i] - stringbuf);
            }
        }
     }
@@ -191,7 +191,7 @@ _nc_wrap_entry(ENTRY * const ep, bool copy_strings)
        if (ep->uses[i].name == 0)
            useoffsets[i] = ABSENT_OFFSET;
        else
-           useoffsets[i] = ep->uses[i].name - stringbuf;
+           useoffsets[i] = (int) (ep->uses[i].name - stringbuf);
     }
 
     if ((tp->str_table = typeMalloc(char, next_free)) == (char *) 0)
@@ -215,10 +215,10 @@ _nc_wrap_entry(ENTRY * const ep, bool copy_strings)
     if (!copy_strings) {
        if ((n = (unsigned) NUM_EXT_NAMES(tp)) != 0) {
            if (n < SIZEOF(offsets)) {
-               unsigned length = 0;
+               size_t length = 0;
                for (i = 0; i < n; i++) {
                    length += strlen(tp->ext_Names[i]) + 1;
-                   offsets[i] = tp->ext_Names[i] - stringbuf;
+                   offsets[i] = (int) (tp->ext_Names[i] - stringbuf);
                }
                if ((tp->ext_str_table = typeMalloc(char, length)) == 0)
                      _nc_err_abort(MSG_NO_MEMORY);
index 116245e4dd8be17eafadfe4e85cad4f82cbb8449..b02cb9c6010e0c26015d7cc2cded446bd9ba4ef4 100644 (file)
@@ -42,7 +42,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: alloc_ttype.c,v 1.21 2010/05/01 19:32:33 tom Exp $")
+MODULE_ID("$Id: alloc_ttype.c,v 1.22 2010/12/19 00:24:09 tom Exp $")
 
 #if NCURSES_XNAMES
 /*
@@ -90,6 +90,9 @@ find_name(char **table, int length, char *name)
     return FALSE;
 }
 
+#define EXTEND_NUM(num, ext) \
+       to->num = (unsigned short) (to->num + (ext - to->ext))
+
 static void
 realign_data(TERMTYPE *to, char **ext_Names,
             int ext_Booleans,
@@ -100,7 +103,7 @@ realign_data(TERMTYPE *to, char **ext_Names,
     int limit = (to->ext_Booleans + to->ext_Numbers + to->ext_Strings);
 
     if (to->ext_Booleans != ext_Booleans) {
-       to->num_Booleans += (ext_Booleans - to->ext_Booleans);
+       EXTEND_NUM(num_Booleans, ext_Booleans);
        to->Booleans = typeRealloc(NCURSES_SBOOL, to->num_Booleans, to->Booleans);
        for (n = to->ext_Booleans - 1,
             m = ext_Booleans - 1,
@@ -114,7 +117,7 @@ realign_data(TERMTYPE *to, char **ext_Names,
        to->ext_Booleans = UShort(ext_Booleans);
     }
     if (to->ext_Numbers != ext_Numbers) {
-       to->num_Numbers += (ext_Numbers - to->ext_Numbers);
+       EXTEND_NUM(num_Numbers, ext_Numbers);
        to->Numbers = typeRealloc(short, to->num_Numbers, to->Numbers);
        for (n = to->ext_Numbers - 1,
             m = ext_Numbers - 1,
@@ -128,7 +131,7 @@ realign_data(TERMTYPE *to, char **ext_Names,
        to->ext_Numbers = UShort(ext_Numbers);
     }
     if (to->ext_Strings != ext_Strings) {
-       to->num_Strings += (ext_Strings - to->ext_Strings);
+       EXTEND_NUM(num_Strings, ext_Strings);
        to->Strings = typeRealloc(char *, to->num_Strings, to->Strings);
        for (n = to->ext_Strings - 1,
             m = ext_Strings - 1,
index eda581b9fc70d272538173cee0659bd2046b54c3..8204d75a819368ac77d29bd645165c13f03ec1a6 100644 (file)
@@ -52,7 +52,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: comp_parse.c,v 1.72 2010/01/23 17:57:43 tom Exp $")
+MODULE_ID("$Id: comp_parse.c,v 1.73 2010/12/25 23:06:37 tom Exp $")
 
 static void sanity_check2(TERMTYPE *, bool);
 NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype2) (TERMTYPE *, bool) = sanity_check2;
@@ -274,7 +274,7 @@ _nc_resolve_uses2(bool fullresolve, bool literal)
                unresolved++;
                total_unresolved++;
 
-               _nc_curr_line = lookline;
+               _nc_curr_line = (int) lookline;
                _nc_warning("resolution of use=%s failed", lookfor);
                qp->uses[i].link = 0;
            }
@@ -376,7 +376,7 @@ _nc_resolve_uses2(bool fullresolve, bool literal)
        if (_nc_check_termtype != 0) {
            _nc_curr_col = -1;
            for_entry_list(qp) {
-               _nc_curr_line = qp->startline;
+               _nc_curr_line = (int) qp->startline;
                _nc_set_type(_nc_first_name(qp->tterm.term_names));
                _nc_check_termtype2(&qp->tterm, literal);
            }
index 48d3300287cfce8a9be1c17ae4be9c46966dc161..8725b2edb7ebcd73a974d0c452f55a20077dcc56 100644 (file)
@@ -50,7 +50,7 @@
 #include <ctype.h>
 #include <tic.h>
 
-MODULE_ID("$Id: comp_scan.c,v 1.88 2010/08/28 19:26:09 tom Exp $")
+MODULE_ID("$Id: comp_scan.c,v 1.89 2010/12/25 23:06:37 tom Exp $")
 
 /*
  * Maximum length of string capability we'll accept before raising an error.
@@ -612,7 +612,7 @@ _nc_get_token(bool silent)
                        _nc_warning("Missing separator");
                }
                _nc_curr_token.tk_name = tok_buf;
-               _nc_curr_token.tk_valnumber = number;
+               _nc_curr_token.tk_valnumber = (int) number;
                type = NUMBER;
                break;
 
index 911223c6754a13709ea74eb7caa1ed68867cbff2..82665cb54be6989e402dfd4f191f64ae3ef33fcd 100644 (file)
@@ -38,7 +38,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: db_iterator.c,v 1.8 2010/06/05 22:20:04 tom Exp $")
+MODULE_ID("$Id: db_iterator.c,v 1.9 2010/12/25 23:00:25 tom Exp $")
 
 #define HaveTicDirectory _nc_globals.have_tic_directory
 #define KeepTicDirectory _nc_globals.keep_tic_directory
@@ -121,7 +121,7 @@ next_list_item(const char *source, int *offset)
            *offset += (int) strlen(result);
        } else {
            *marker++ = 0;
-           *offset = marker - ThisDbList;
+           *offset = (int) (marker - ThisDbList);
        }
        if (*result == 0 && result != (ThisDbList + ThisDbSize))
            result = system_db;
index 4521c4a8da685295fd04338a1841daa88f806630..69d69f95bf7ca817413c1badbe5df656fab78c9b 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2008,2010 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            *
@@ -37,7 +37,7 @@
 #include <curses.priv.h>
 #include <tic.h>
 
-MODULE_ID("$Id: home_terminfo.c,v 1.11 2008/08/03 23:43:11 tom Exp $")
+MODULE_ID("$Id: home_terminfo.c,v 1.12 2010/12/25 23:43:58 tom Exp $")
 
 /* ncurses extension...fall back on user's private directory */
 
@@ -53,7 +53,7 @@ _nc_home_terminfo(void)
     if (use_terminfo_vars()) {
        if (MyBuffer == 0) {
            if ((home = getenv("HOME")) != 0) {
-               unsigned want = (strlen(home) + sizeof(PRIVATE_INFO));
+               size_t want = (strlen(home) + sizeof(PRIVATE_INFO));
                MyBuffer = typeMalloc(char, want);
                if (MyBuffer == 0)
                    _nc_err_abort(MSG_NO_MEMORY);
index 5be3659f021f2f8f4728ed148fa01e5296a10ee9..d8fdedca843f182569c0eb7e96d13ae633ae66b4 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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            *
@@ -39,7 +39,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_acs.c,v 1.41 2009/10/04 00:26:54 tom Exp $")
+MODULE_ID("$Id: lib_acs.c,v 1.43 2010/12/25 23:00:45 tom Exp $")
 
 #if BROKEN_LINKER || USE_REENTRANT
 #define MyBuffer _nc_prescreen.real_acs_map
@@ -93,7 +93,7 @@ NCURSES_SP_NAME(_nc_init_acs) (NCURSES_SP_DCL0)
     if (real_map != fake_map) {
        for (j = 1; j < ACS_LEN; ++j) {
            real_map[j] = 0;
-           fake_map[j] = A_ALTCHARSET | j;
+           fake_map[j] = A_ALTCHARSET | (chtype) j;
            if (SP_PARM)
                SP_PARM->_screen_acs_map[j] = FALSE;
        }
@@ -189,7 +189,7 @@ NCURSES_SP_NAME(_nc_init_acs) (NCURSES_SP_DCL0)
        size_t i;
        for (i = 1; i < ACS_LEN; ++i) {
            if (real_map[i] == 0) {
-               real_map[i] = i;
+               real_map[i] = (chtype) i;
                if (real_map != fake_map) {
                    if (SP != 0)
                        SP->_screen_acs_map[i] = TRUE;
index 854442a943a3bc8745274fc37deb6acf4c4b22a2..9302f022b89cdf584075cc50eb7aa3c4a13b1ef0 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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            *
@@ -79,7 +79,7 @@
 #undef USE_OLD_TTY
 #endif /* USE_OLD_TTY */
 
-MODULE_ID("$Id: lib_baudrate.c,v 1.30 2009/10/24 22:15:00 tom Exp $")
+MODULE_ID("$Id: lib_baudrate.c,v 1.31 2010/12/19 01:50:50 tom Exp $")
 
 /*
  *     int
@@ -212,7 +212,7 @@ NCURSES_SP_NAME(baudrate) (NCURSES_SP_DCL0)
        int ret;
        if ((ret = _nc_getenv_num("BAUDRATE")) <= 0)
            ret = 9600;
-       ospeed = _nc_ospeed(ret);
+       ospeed = (NCURSES_OSPEED) _nc_ospeed(ret);
        returnCode(ret);
     }
 #endif
@@ -223,9 +223,9 @@ NCURSES_SP_NAME(baudrate) (NCURSES_SP_DCL0)
        ospeed = _nc_ospeed(result);
 #else /* !USE_OLD_TTY */
 #ifdef TERMIOS
-       ospeed = cfgetospeed(&(TerminalOf(SP_PARM)->Nttyb));
+       ospeed = (NCURSES_OSPEED) cfgetospeed(&(TerminalOf(SP_PARM)->Nttyb));
 #else
-       ospeed = TerminalOf(SP_PARM)->Nttyb.sg_ospeed;
+       ospeed = (NCURSES_OSPEED) TerminalOf(SP_PARM)->Nttyb.sg_ospeed;
 #endif
        result = _nc_baudrate(ospeed);
 #endif
index f9f7b9cdc1a160a2f7157c22d553f88dd1d6eda3..86e130e78527b77aa6b8e81301fb0efbbd8186b8 100644 (file)
@@ -39,7 +39,7 @@
 #include <curses.priv.h>
 #include <termcap.h>           /* ospeed */
 
-MODULE_ID("$Id: lib_cur_term.c,v 1.29 2010/01/23 17:57:43 tom Exp $")
+MODULE_ID("$Id: lib_cur_term.c,v 1.30 2010/12/19 01:38:45 tom Exp $")
 
 #undef CUR
 #define CUR termp->type.
@@ -95,13 +95,13 @@ NCURSES_SP_NAME(set_curterm) (NCURSES_SP_DCLx TERMINAL * termp)
     if (termp != 0) {
 #ifdef USE_TERM_DRIVER
        TERMINAL_CONTROL_BLOCK *TCB = (TERMINAL_CONTROL_BLOCK *) termp;
-       ospeed = _nc_ospeed(termp->_baudrate);
+       ospeed = (NCURSES_OSPEED) _nc_ospeed(termp->_baudrate);
        if (TCB->drv->isTerminfo && termp->type.Strings) {
            PC = (char) ((pad_char != NULL) ? pad_char[0] : 0);
        }
        TCB->csp = SP_PARM;
 #else
-       ospeed = _nc_ospeed(termp->_baudrate);
+       ospeed = (NCURSES_OSPEED) _nc_ospeed(termp->_baudrate);
        if (termp->type.Strings) {
            PC = (char) ((pad_char != NULL) ? pad_char[0] : 0);
        }
index 0cd095f17ca9caafaa19d4cdf7551a567c789327..37f70842907d755b5f53e2138b95b10aeb39b158 100644 (file)
@@ -48,7 +48,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_kernel.c,v 1.30 2010/04/24 23:12:25 tom Exp $")
+MODULE_ID("$Id: lib_kernel.c,v 1.31 2010/12/19 01:21:19 tom Exp $")
 
 static int
 _nc_vdisable(void)
@@ -95,7 +95,7 @@ NCURSES_SP_NAME(erasechar) (NCURSES_SP_DCL0)
        result = termp->Ottyb.sg_erase;
 #endif
     }
-    returnChar(result);
+    returnChar((char) result);
 }
 
 #if NCURSES_SP_FUNCS
@@ -130,7 +130,7 @@ NCURSES_SP_NAME(killchar) (NCURSES_SP_DCL0)
        result = termp->Ottyb.sg_kill;
 #endif
     }
-    returnChar(result);
+    returnChar((char) result);
 }
 
 #if NCURSES_SP_FUNCS
index 2164a126ca8b95a3395db56f2e2e6cfb81595205..14903175b322ee6354bfa7ecd3832d865cdc39fb 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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            *
@@ -42,7 +42,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_longname.c,v 1.11 2009/02/21 17:18:02 tom Exp $")
+MODULE_ID("$Id: lib_longname.c,v 1.12 2010/12/20 00:31:26 tom Exp $")
 
 #if USE_REENTRANT
 NCURSES_EXPORT(char *)
@@ -52,7 +52,7 @@ NCURSES_SP_NAME(longname) (NCURSES_SP_DCL0)
     {'\0'};
     char *ptr;
 
-    T((T_CALLED("longname(%p)"), SP_PARM));
+    T((T_CALLED("longname(%p)"), (void *) SP_PARM));
 
     if (SP_PARM) {
        for (ptr = SP_PARM->_ttytype + strlen(SP_PARM->_ttytype);
index 9101200536b002fb1591153a4995679d814d0219..378fd940d04fcf7fdecfe5bcd83c655993a830a0 100644 (file)
@@ -51,7 +51,7 @@
 #include <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.130 2010/07/31 22:16:26 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.132 2010/12/20 00:26:35 tom Exp $")
 
 /****************************************************************************
  *
@@ -587,7 +587,7 @@ TINFO_SETUP_TERM(TERMINAL ** tp,
 
 #ifdef USE_TERM_DRIVER
     T((T_CALLED("_nc_setupterm_ex(%p,%s,%d,%p)"),
-       tp, _nc_visbuf(tname), Filedes, errret));
+       (void *) tp, _nc_visbuf(tname), Filedes, (void *) errret));
 
     if (tp == 0) {
        ret_error0(TGETENT_ERR,
@@ -660,7 +660,7 @@ TINFO_SETUP_TERM(TERMINAL ** tp,
        TCB = (TERMINAL_CONTROL_BLOCK *) termp;
        code = _nc_globals.term_driver(TCB, tname, errret);
        if (code == OK) {
-           termp->Filedes = Filedes;
+           termp->Filedes = (short) Filedes;
            termp->_termname = strdup(tname);
        } else {
            ret_error0(TGETENT_ERR,
@@ -696,7 +696,7 @@ TINFO_SETUP_TERM(TERMINAL ** tp,
        ttytype[NAMESIZE - 1] = '\0';
 #endif
 
-       termp->Filedes = Filedes;
+       termp->Filedes = (short) Filedes;
        termp->_termname = strdup(tname);
 
        set_curterm(termp);
index bd84a094fb66583317964dd358f3b3ebc7d9d735..e9dae85bdd9780ee8d406f6027ac56bb242f22f9 100644 (file)
@@ -48,7 +48,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_termcap.c,v 1.72 2010/01/23 17:57:43 tom Exp $")
+MODULE_ID("$Id: lib_termcap.c,v 1.73 2010/12/25 19:27:12 tom Exp $")
 
 NCURSES_EXPORT_VAR(char *) UP = 0;
 NCURSES_EXPORT_VAR(char *) BC = 0;
@@ -81,7 +81,7 @@ NCURSES_EXPORT_VAR(char *) BC = 0;
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(tgetent) (NCURSES_SP_DCLx char *bufp, const char *name)
 {
-    int errcode = ERR;
+    int rc = ERR;
     int n;
     bool found_cache = FALSE;
 #ifdef USE_TERM_DRIVER
@@ -92,12 +92,12 @@ NCURSES_SP_NAME(tgetent) (NCURSES_SP_DCLx char *bufp, const char *name)
     T((T_CALLED("tgetent()")));
 
     TINFO_SETUP_TERM(&termp, (NCURSES_CONST char *) name,
-                    STDOUT_FILENO, &errcode, TRUE);
+                    STDOUT_FILENO, &rc, TRUE);
 
 #ifdef USE_TERM_DRIVER
     if (termp == 0 ||
        !((TERMINAL_CONTROL_BLOCK *) termp)->drv->isTerminfo)
-       return (errcode);
+       return (rc);
 #endif
 
     /*
@@ -152,7 +152,7 @@ NCURSES_SP_NAME(tgetent) (NCURSES_SP_DCLx char *bufp, const char *name)
     BC = 0;
     FIX_SGR0 = 0;              /* don't free it - application may still use */
 
-    if (errcode == 1) {
+    if (rc == 1) {
 
        if (cursor_left)
            if ((backspaces_with_bs = (char) !strcmp(cursor_left, "\b")) == 0)
@@ -187,7 +187,7 @@ NCURSES_SP_NAME(tgetent) (NCURSES_SP_DCLx char *bufp, const char *name)
 #endif*/
 
     }
-    returnCode(errcode);
+    returnCode(rc);
 }
 
 #if NCURSES_SP_FUNCS
index 0fda5f2e43a92ec26797206984bc1cb17f5fa92f..44f410e7fb00e8f47b7e586c8a3106ecbd39d03d 100644 (file)
@@ -42,7 +42,7 @@
 #include <ctype.h>
 #include <tic.h>
 
-MODULE_ID("$Id: lib_tparm.c,v 1.79 2010/01/16 16:47:46 tom Exp $")
+MODULE_ID("$Id: lib_tparm.c,v 1.80 2010/12/25 23:01:29 tom Exp $")
 
 /*
  *     char *
@@ -509,7 +509,7 @@ tparam_internal(bool use_TPARM_ARG, const char *string, va_list ap)
            if (p_is_s[i])
                spush(p_is_s[i]);
            else
-               npush(param[i]);
+               npush((int) param[i]);
        }
     }
 #ifdef TRACE
@@ -518,7 +518,7 @@ tparam_internal(bool use_TPARM_ARG, const char *string, va_list ap)
            if (p_is_s[i] != 0)
                save_text(", %s", _nc_visbuf(p_is_s[i]), 0);
            else
-               save_number(", %d", param[i], 0);
+               save_number(", %d", (int) param[i], 0);
        }
        _tracef(T_CALLED("%s(%s%s)"), TPS(tname), _nc_visbuf(cp), TPS(out_buff));
        TPS(out_used) = 0;
@@ -565,7 +565,7 @@ tparam_internal(bool use_TPARM_ARG, const char *string, va_list ap)
                    if (p_is_s[i])
                        spush(p_is_s[i]);
                    else
-                       npush(param[i]);
+                       npush((int) param[i]);
                }
                break;
 
index f90f3554de12819695765254d40aa25e1c444627..dc70f3e0b0b8226a0cf93eda39fccd9651a2cbf5 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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            *
@@ -51,7 +51,7 @@
 #include <termcap.h>           /* ospeed */
 #include <tic.h>
 
-MODULE_ID("$Id: lib_tputs.c,v 1.80 2009/11/21 23:09:31 tom Exp $")
+MODULE_ID("$Id: lib_tputs.c,v 1.81 2010/12/20 00:42:50 tom Exp $")
 
 NCURSES_EXPORT_VAR(char) PC = 0;              /* used by termcap library */
 NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0;        /* used by termcap library */
@@ -218,7 +218,7 @@ NCURSES_SP_NAME(tputs) (NCURSES_SP_DCLx
        if (outc == NCURSES_SP_NAME(_nc_outch))
            (void) strcpy(addrbuf, "_nc_outch");
        else
-           (void) sprintf(addrbuf, "%p", (void *) outc);
+           (void) sprintf(addrbuf, "%p", outc);
        if (_nc_tputs_trace) {
            _tracef("tputs(%s = %s, %d, %s) called", _nc_tputs_trace,
                    _nc_visbuf(string), affcnt, addrbuf);
index d0d582513806dd9deb6fa9a59a403504df84ad6f..663a0689809001ae35372d453d0afd04650faa2d 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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            *
@@ -41,7 +41,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_ttyflags.c,v 1.26 2009/10/24 22:15:47 tom Exp $")
+MODULE_ID("$Id: lib_ttyflags.c,v 1.27 2010/12/25 23:43:58 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(_nc_get_tty_mode) (NCURSES_SP_DCLx TTY * buf)
@@ -186,9 +186,9 @@ NCURSES_SP_NAME(def_prog_mode) (NCURSES_SP_DCL0)
         */
        if (_nc_get_tty_mode(&termp->Nttyb) == OK) {
 #ifdef TERMIOS
-           termp->Nttyb.c_oflag &= ~OFLAGS_TABS;
+           termp->Nttyb.c_oflag &= (unsigned) (~OFLAGS_TABS);
 #else
-           termp->Nttyb.sg_flags &= ~XTABS;
+           termp->Nttyb.sg_flags &= (unsigned) (~XTABS);
 #endif
            rc = OK;
        }
index 9fa5b4ed734a41fc729ae5ff5ed953f9c40e1658..5b3b55a4519e23e789da88fa23d856d17867f177 100644 (file)
@@ -50,7 +50,7 @@
 # endif
 #endif
 
-MODULE_ID("$Id: tinfo_driver.c,v 1.12 2010/07/31 22:16:38 tom Exp $")
+MODULE_ID("$Id: tinfo_driver.c,v 1.13 2010/12/20 01:47:09 tom Exp $")
 
 /*
  * SCO defines TIOCGSIZE and the corresponding struct.  Other systems (SunOS,
@@ -515,9 +515,9 @@ drv_mode(TERMINAL_CONTROL_BLOCK * TCB, bool progFlag, bool defFlag)
             */
            if ((drv_sgmode(TCB, FALSE, &(_term->Nttyb)) == OK)) {
 #ifdef TERMIOS
-               _term->Nttyb.c_oflag &= ~OFLAGS_TABS;
+               _term->Nttyb.c_oflag &= (unsigned) ~OFLAGS_TABS;
 #else
-               _term->Nttyb.sg_flags &= ~XTABS;
+               _term->Nttyb.sg_flags &= (unsigned) ~XTABS;
 #endif
                code = OK;
            }
index 5f7b9b3383fec76e46e80f6f798100367787c343..1f99208667ec62320de07524ed373677a8475ceb 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: trim_sgr0.c,v 1.11 2010/05/01 19:33:31 tom Exp $")
+MODULE_ID("$Id: trim_sgr0.c,v 1.12 2010/12/25 23:03:57 tom Exp $")
 
 #undef CUR
 #define CUR tp->
@@ -99,8 +99,8 @@ rewrite_sgr(char *s, char *attr)
 {
     if (PRESENT(s)) {
        if (PRESENT(attr)) {
-           unsigned len_s = strlen(s);
-           unsigned len_a = strlen(attr);
+           size_t len_s = strlen(s);
+           size_t len_a = strlen(attr);
 
            if (len_s > len_a && !strncmp(attr, s, len_a)) {
                unsigned n;
@@ -123,8 +123,8 @@ similar_sgr(char *a, char *b)
     bool result = FALSE;
     int csi_a = is_csi(a);
     int csi_b = is_csi(b);
-    unsigned len_a;
-    unsigned len_b;
+    size_t len_a;
+    size_t len_b;
 
     TR(TRACE_DATABASE, ("similar_sgr:\n\t%s\n\t%s",
                        _nc_visbuf2(1, a),
@@ -264,7 +264,7 @@ _nc_trim_sgr0(TERMTYPE *tp)
                                                   off + i);
                        if (k2 != 0) {
                            found = TRUE;
-                           chop_out(off, i, i + k2);
+                           chop_out(off, (unsigned) i, (unsigned) (i + k2));
                            break;
                        }
                    }
@@ -285,7 +285,7 @@ _nc_trim_sgr0(TERMTYPE *tp)
                        if (off[i - 1] == ';')
                            i--;
                        j = (size_t) (skip_zero(tmp + 1) - off);
-                       (void) chop_out(off, i, j);
+                       (void) chop_out(off, (unsigned) i, (unsigned) j);
                        found = TRUE;
                    }
                }
@@ -296,7 +296,7 @@ _nc_trim_sgr0(TERMTYPE *tp)
                i = (size_t) (tmp - end);
                j = strlen(off);
                tmp = strdup(end);
-               chop_out(tmp, i, j);
+               chop_out(tmp, (unsigned) i, (unsigned) j);
                free(off);
                result = tmp;
            }
index 97fa06ab591dd38fdf58fc27a61244c26920488d..a86c11267e931376f12c4c30fd270bfe3d191ee8 100644 (file)
@@ -53,7 +53,7 @@
 #define TRACE_OUT(p)           /*nothing */
 #endif
 
-MODULE_ID("$Id: write_entry.c,v 1.77 2010/08/28 21:04:05 tom Exp $")
+MODULE_ID("$Id: write_entry.c,v 1.78 2010/12/25 23:23:08 tom Exp $")
 
 static int total_written;
 
@@ -469,22 +469,22 @@ _nc_write_entry(TERMTYPE *const tp)
 #endif /* USE_HASHED_DB */
 }
 
-static unsigned
+static size_t
 fake_write(char *dst,
           unsigned *offset,
-          unsigned limit,
+          size_t limit,
           char *src,
-          unsigned want,
-          unsigned size)
+          size_t want,
+          size_t size)
 {
-    unsigned have = (limit - *offset);
+    size_t have = (limit - *offset);
 
     want *= size;
     if (have > 0) {
        if (want > have)
            want = have;
        memcpy(dst + *offset, src, want);
-       *offset += want;
+       *offset += (unsigned) want;
     } else {
        want = 0;
     }
@@ -502,10 +502,10 @@ fake_write(char *dst,
 #define WRITE_STRING(str) (Write(str, sizeof(char), strlen(str) + 1) == strlen(str) + 1)
 
 static int
-compute_offsets(char **Strings, unsigned strmax, short *offsets)
+compute_offsets(char **Strings, size_t strmax, short *offsets)
 {
     int nextfree = 0;
-    unsigned i;
+    size_t i;
 
     for (i = 0; i < strmax; i++) {
        if (Strings[i] == ABSENT_STRING) {
@@ -523,9 +523,9 @@ compute_offsets(char **Strings, unsigned strmax, short *offsets)
 }
 
 static void
-convert_shorts(unsigned char *buf, short *Numbers, unsigned count)
+convert_shorts(unsigned char *buf, short *Numbers, size_t count)
 {
-    unsigned i;
+    size_t i;
     for (i = 0; i < count; i++) {
        if (Numbers[i] == ABSENT_NUMERIC) {     /* HI/LO won't work */
            buf[2 * i] = buf[2 * i + 1] = 0377;
@@ -534,7 +534,7 @@ convert_shorts(unsigned char *buf, short *Numbers, unsigned count)
            buf[2 * i + 1] = 0377;
        } else {
            LITTLE_ENDIAN(buf + 2 * i, Numbers[i]);
-           TRACE_OUT(("put Numbers[%d]=%d", i, Numbers[i]));
+           TRACE_OUT(("put Numbers[%u]=%d", (unsigned) i, Numbers[i]));
        }
     }
 }
index c1859b2ab7a161c51f45e8fca229f9d4b7b81be3..a726901d4a3a746a30ea4d3cb741a02a16c08ce3 100644 (file)
@@ -47,7 +47,7 @@
 
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_trace.c,v 1.75 2010/09/25 22:16:12 juergen Exp $")
+MODULE_ID("$Id: lib_trace.c,v 1.76 2010/12/19 01:21:19 tom Exp $")
 
 NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */
 
@@ -96,7 +96,7 @@ trace(const unsigned int tracelevel)
        const char *mode = _nc_globals.init_trace ? "ab" : "wb";
 
        if (TracePath[0] == '\0') {
-           int size = sizeof(TracePath) - 12;
+           size_t size = sizeof(TracePath) - 12;
            if (getcwd(TracePath, size) == 0) {
                perror("curses: Can't get working directory");
                exit(EXIT_FAILURE);
@@ -122,7 +122,7 @@ trace(const unsigned int tracelevel)
         */
 #if HAVE_SETVBUF               /* ANSI */
        (void) setvbuf(TraceFP, (char *) 0, _IOLBF, 0);
-#elif HAVE_SETBUF              /* POSIX */
+#elif HAVE_SETBUF /* POSIX */
        (void) setbuffer(TraceFP, (char *) 0);
 #endif
        _tracef("TRACING NCURSES version %s.%d (tracelevel=%#x)",
index 1eaeff8cb569dcd29437a3f95814bf2bbf3140e7..0f2c681e7b8f007e4a150f342223da99667183ce 100644 (file)
@@ -43,7 +43,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_traceatr.c,v 1.71 2010/08/28 21:05:25 tom Exp $")
+MODULE_ID("$Id: lib_traceatr.c,v 1.72 2010/12/19 00:51:35 tom Exp $")
 
 #define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name))
 
@@ -241,14 +241,14 @@ _nc_altcharset_name(attr_t attr, chtype ch)
        const ALT_NAMES *strp;
 
        for (cp = acs_chars; cp[0] && cp[1]; cp += 2) {
-           if (ChCharOf(cp[1]) == ChCharOf(ch)) {
+           if (ChCharOf(UChar(cp[1])) == ChCharOf(ch)) {
                found = cp;
                /* don't exit from loop - there may be redefinitions */
            }
        }
 
        if (found != 0) {
-           ch = ChCharOf(*found);
+           ch = ChCharOf(UChar(*found));
            for (strp = names; strp->val; strp++)
                if (strp->val == ch) {
                    result = strp->name;
@@ -330,7 +330,7 @@ _tracecchar_t2(int bufnum, const cchar_t *ch)
                            (void) _nc_trace_bufcat(bufnum, "\\000");
                        break;
                    }
-                   PUTC_n = wcrtomb(PUTC_buf, ch->chars[PUTC_i], &PUT_st);
+                   PUTC_n = (int) wcrtomb(PUTC_buf, ch->chars[PUTC_i], &PUT_st);
                    if (PUTC_n <= 0) {
                        if (PUTC_ch != L'\0') {
                            /* it could not be a multibyte sequence */
index 24cfa83ca9ee766f74163bdbd68f964df7722df3..5e29c62ff175ef0924c11fec0e00525398404603 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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            *
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_mvcur.c,v 1.123 2009/11/07 16:07:55 tom Exp $")
+MODULE_ID("$Id: lib_mvcur.c,v 1.124 2010/12/19 01:22:58 tom Exp $")
 
 #define WANT_CHAR(sp, y, x) NewScreen(sp)->_line[y].text[x]    /* desired state */
 
@@ -231,11 +231,11 @@ NCURSES_SP_NAME(_nc_msec_cost) (NCURSES_SP_DCLx const char *const cap, int affcn
 
                for (cp += 2; *cp != '>'; cp++) {
                    if (isdigit(UChar(*cp)))
-                       number = number * 10 + (*cp - '0');
+                       number = number * 10 + (float) (*cp - '0');
                    else if (*cp == '*')
-                       number *= affcnt;
+                       number *= (float) affcnt;
                    else if (*cp == '.' && (*++cp != '>') && isdigit(UChar(*cp)))
-                       number += (*cp - '0') / 10.0;
+                       number += (float) ((*cp - '0') / 10.0);
                }
 
 #if NCURSES_NO_PADDING
@@ -243,7 +243,7 @@ NCURSES_SP_NAME(_nc_msec_cost) (NCURSES_SP_DCLx const char *const cap, int affcn
 #endif
                    cum_cost += number * 10;
            } else
-               cum_cost += SP_PARM->_char_padding;
+               cum_cost += (float) SP_PARM->_char_padding;
        }
 
        return ((int) cum_cost);
@@ -515,7 +515,7 @@ _nc_mvcur_wrap(void)
 static NCURSES_INLINE int
 repeated_append(string_desc * target, int total, int num, int repeat, const char *src)
 {
-    size_t need = repeat * strlen(src);
+    size_t need = (size_t) repeat * strlen(src);
 
     if (need < target->s_size) {
        while (repeat-- > 0) {
@@ -695,7 +695,7 @@ relative_move(NCURSES_SP_DCLx
                        *check.s_tail++ = (char) CharOf(WANT_CHAR(SP_PARM, to_y,
                                                                  from_x + i));
                    *check.s_tail = '\0';
-                   check.s_size -= n;
+                   check.s_size -= (size_t) n;
                    lhcost += n * SP_PARM->_char_padding;
                } else {
                    lhcost = repeated_append(&check, lhcost, SP_PARM->_cuf1_cost,
index 3091719cd79ca126f1201b8decc000bab24a647a..329ec29a019ffdfaecc9118f956176793e6c961b 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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            *
@@ -70,7 +70,7 @@
 #endif
 #undef CUR
 
-MODULE_ID("$Id: lib_twait.c,v 1.60 2009/04/18 21:01:13 tom Exp $")
+MODULE_ID("$Id: lib_twait.c,v 1.61 2010/12/25 23:43:58 tom Exp $")
 
 static long
 _nc_gettime(TimeType * t0, bool first)
@@ -386,7 +386,7 @@ _nc_timed_wait(SCREEN *sp MAYBE_UNUSED,
     returntime = _nc_gettime(&t0, FALSE);
 
     if (milliseconds >= 0)
-       milliseconds -= (returntime - starttime);
+       milliseconds -= (int) (returntime - starttime);
 
 #ifdef NCURSES_WGETCH_EVENTS
     if (evl) {
index dd6c3b670597c3cafd95860d7b32fd30de05636d..f0d2369c18d6e65fedf3f817d5dfddded575f268 100644 (file)
@@ -82,7 +82,7 @@
 
 #include <ctype.h>
 
-MODULE_ID("$Id: tty_update.c,v 1.263 2010/05/01 20:44:34 tom Exp $")
+MODULE_ID("$Id: tty_update.c,v 1.264 2010/12/19 01:21:02 tom Exp $")
 
 /*
  * This define controls the line-breakout optimization.  Every once in a
@@ -497,7 +497,9 @@ can_clear_with(NCURSES_SP_DCLx ARG_CH_T ch)
            return FALSE;
        if ((pair = GetPair(CHDEREF(ch))) != 0) {
            short fg, bg;
-           NCURSES_SP_NAME(pair_content) (NCURSES_SP_ARGx pair, &fg, &bg);
+           NCURSES_SP_NAME(pair_content) (NCURSES_SP_ARGx
+                                          (short) pair,
+                                          &fg, &bg);
            if (fg != C_MASK || bg != C_MASK)
                return FALSE;
        }
@@ -1413,7 +1415,7 @@ TransformLine(NCURSES_SP_DCLx int const lineno)
                         nLastChar);
                memcpy(oldLine + firstChar,
                       newLine + firstChar,
-                      (nLastChar - firstChar + 1) * sizeof(NCURSES_CH_T));
+                      (unsigned) (nLastChar - firstChar + 1) * sizeof(NCURSES_CH_T));
            }
            TR(TRACE_UPDATE, (T_RETURN("")));
            return;
@@ -1535,7 +1537,7 @@ TransformLine(NCURSES_SP_DCLx int const lineno)
     if (screen_columns(SP_PARM) > firstChar)
        memcpy(oldLine + firstChar,
               newLine + firstChar,
-              (screen_columns(SP_PARM) - firstChar) * sizeof(NCURSES_CH_T));
+              (unsigned) (screen_columns(SP_PARM) - firstChar) * sizeof(NCURSES_CH_T));
     TR(TRACE_UPDATE, (T_RETURN("")));
     return;
 }
@@ -1559,7 +1561,7 @@ ClearScreen(NCURSES_SP_DCLx NCURSES_CH_T blank)
     if (SP_PARM->_coloron
        && !SP_PARM->_default_color) {
        NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_ARGx
-                                      GET_SCREEN_PAIR(SP_PARM),
+                                      (short) GET_SCREEN_PAIR(SP_PARM),
                                       0,
                                       FALSE,
                                       NCURSES_SP_NAME(_nc_outch));
@@ -2064,7 +2066,10 @@ NCURSES_SP_NAME(_nc_scrolln) (NCURSES_SP_DCLx
     if (res == ERR)
        return (ERR);
 
-    _nc_scroll_window(CurScreen(SP_PARM), n, top, bot, blank);
+    _nc_scroll_window(CurScreen(SP_PARM), n,
+                     (NCURSES_SIZE_T) top,
+                     (NCURSES_SIZE_T) bot,
+                     blank);
 
     /* shift hash values too - they can be reused */
     NCURSES_SP_NAME(_nc_scroll_oldhash) (NCURSES_SP_ARGx n, top, bot);
@@ -2099,7 +2104,8 @@ NCURSES_SP_NAME(_nc_screen_resume) (NCURSES_SP_DCL0)
        SP_PARM->_color_defs = -(SP_PARM->_color_defs);
        for (n = 0; n < SP_PARM->_color_defs; ++n) {
            if (SP_PARM->_color_table[n].init) {
-               NCURSES_SP_NAME(init_color) (NCURSES_SP_ARGx n,
+               NCURSES_SP_NAME(init_color) (NCURSES_SP_ARGx
+                                            (short) n,
                                             SP_PARM->_color_table[n].r,
                                             SP_PARM->_color_table[n].g,
                                             SP_PARM->_color_table[n].b);
index eada2f19c4f3add534e325f6ae82ef9e58ba99f7..a8491fcbf57f9ec00168343582447687f7fee1d6 100644 (file)
@@ -39,7 +39,7 @@
 #include <wctype.h>
 #endif
 
-MODULE_ID("$Id: lib_add_wch.c,v 1.10 2010/03/31 23:38:02 tom Exp $")
+MODULE_ID("$Id: lib_add_wch.c,v 1.11 2010/12/19 01:32:55 tom Exp $")
 
 /* clone/adapt lib_addch.c */
 static const cchar_t blankchar = NewChar(BLANK_TEXT);
@@ -122,7 +122,7 @@ newline_forces_scroll(WINDOW *win, NCURSES_SIZE_T * ypos)
        *ypos = win->_regbottom;
        result = TRUE;
     } else {
-       *ypos += 1;
+       *ypos = (NCURSES_SIZE_T) (*ypos + 1);
     }
     return result;
 }
@@ -166,8 +166,8 @@ fill_cells(WINDOW *win, int count)
        if (wadd_wch_literal(win, blank) == ERR)
            break;
     }
-    win->_curx = save_x;
-    win->_cury = save_y;
+    win->_curx = (NCURSES_SIZE_T) save_x;
+    win->_cury = (NCURSES_SIZE_T) save_y;
 }
 
 static int
@@ -291,7 +291,7 @@ wadd_wch_literal(WINDOW *win, cchar_t ch)
     if (x > win->_maxx) {
        return wrap_to_next_line(win);
     }
-    win->_curx = x;
+    win->_curx = (NCURSES_SIZE_T) x;
     return OK;
 }
 
@@ -312,7 +312,7 @@ wadd_wch_nosync(WINDOW *win, cchar_t ch)
      * way.
      */
     if ((AttrOf(ch) & A_ALTCHARSET)
-       || iswprint(CharOf(ch)))
+       || iswprint((wint_t) CharOf(ch)))
        return wadd_wch_literal(win, ch);
 
     /*
@@ -329,7 +329,7 @@ wadd_wch_nosync(WINDOW *win, cchar_t ch)
 #else
        tabsize = TABSIZE;
 #endif
-       x += (tabsize - (x % tabsize));
+       x = (NCURSES_SIZE_T) (x + (tabsize - (x % tabsize)));
        /*
         * Space-fill the tab on the bottom line so that we'll get the
         * "correct" cursor position.
index 38268a7e54cac325c8de99ec9e410489f7e70659..c61c79529db706ffb3f03605c67de08d3aa4b814 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_cchar.c,v 1.17 2010/03/31 23:38:02 tom Exp $")
+MODULE_ID("$Id: lib_cchar.c,v 1.20 2010/12/25 23:46:26 tom Exp $")
 
 /* 
  * The SuSv2 description leaves some room for interpretation.  We'll assume wch
@@ -58,7 +58,7 @@ setcchar(cchar_t *wcval,
                      (void *) wcval, _nc_viswbuf(wch),
                      (unsigned long) attrs, color_pair, opts));
 
-    len = wcslen(wch);
+    len = (unsigned) wcslen(wch);
     if (opts != NULL
        || (len > 1 && wcwidth(wch[0]) < 0)) {
        code = ERR;
@@ -80,7 +80,7 @@ setcchar(cchar_t *wcval,
        memset(wcval, 0, sizeof(*wcval));
 
        if (len != 0) {
-           SetAttr(*wcval, attrs | ColorPair(color_pair));
+           SetAttr(*wcval, attrs | (attr_t) ColorPair(color_pair));
            SetPair(CHDEREF(wcval), color_pair);
            memcpy(&wcval->chars, wch, len * sizeof(wchar_t));
            TR(TRACE_CCALLS, ("copy %d wchars, first is %s", len,
@@ -111,9 +111,9 @@ getcchar(const cchar_t *wcval,
                      opts));
 
     if (opts == NULL) {
-       len = (wp = wmemchr(wcval->chars, L'\0', CCHARW_MAX))
-           ? wp - wcval->chars
-           : CCHARW_MAX;
+       len = ((wp = wmemchr(wcval->chars, L'\0', CCHARW_MAX))
+              ? (int) (wp - wcval->chars)
+              : CCHARW_MAX);
 
        if (wch == NULL) {
            /*
@@ -125,7 +125,7 @@ getcchar(const cchar_t *wcval,
            code = ERR;
        } else if (len >= 0) {
            *attrs = AttrOf(*wcval) & A_ATTRIBUTES;
-           *color_pair = GetPair(*wcval);
+           *color_pair = (short) GetPair(*wcval);
            wmemcpy(wch, wcval->chars, (unsigned) len);
            wch[len] = L'\0';
            code = OK;
index 4bd77fa4face6fb508f9579f4c4b2be3deb184df..da92b834f1c3eda5ed64f695b6c1f1773156c246 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2002,2009 Free Software Foundation, Inc.                   *
+ * Copyright (c) 2002-2009,2010 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: lib_hline_set.c,v 1.3 2009/10/24 22:42:50 tom Exp $")
+MODULE_ID("$Id: lib_hline_set.c,v 1.4 2010/12/19 01:45:03 tom Exp $")
 
 NCURSES_EXPORT(int)
 whline_set(WINDOW *win, const cchar_t *ch, int n)
 {
     int code = ERR;
-    NCURSES_SIZE_T start;
-    NCURSES_SIZE_T end;
+    int start;
+    int end;
 
     T((T_CALLED("whline_set(%p,%s,%d)"), (void *) win, _tracecchar_t(ch), n));
 
index 4f62d365314ade52c623ebc28e773b9f3e732f72..1eee8a3ec016b01981783d7cdcc976f9e52cf17c 100644 (file)
@@ -39,7 +39,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_ins_wch.c,v 1.15 2010/12/11 19:58:39 tom Exp $")
+MODULE_ID("$Id: lib_ins_wch.c,v 1.16 2010/12/19 01:34:04 tom Exp $")
 
 /*
  * Insert the given character, updating the current location to simplify
@@ -53,7 +53,7 @@ _nc_insert_wch(WINDOW *win, const cchar_t *wch)
     int code = OK;
 
     if (cells < 0) {
-       code = winsch(win, CharOf(CHDEREF(wch)));
+       code = winsch(win, (chtype) CharOf(CHDEREF(wch)));
     } else {
        if (cells == 0)
            cells = 1;
@@ -115,7 +115,7 @@ wins_nwstr(WINDOW *win, const wchar_t *wstr, int n)
     if (win != 0
        && wstr != 0) {
        if (n < 1)
-           n = wcslen(wstr);
+           n = (int) wcslen(wstr);
        code = OK;
        if (n > 0) {
            SCREEN *sp = _nc_screen_of(win);
index ef64c72398dcd10dc7788d48e8a44078ac5a5daa..e4cf093a1f6b13e9749b40aee1284fe1c96a44b9 100644 (file)
@@ -36,7 +36,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_vid_attr.c,v 1.13 2010/03/31 23:22:35 tom Exp $")
+MODULE_ID("$Id: lib_vid_attr.c,v 1.14 2010/12/19 01:44:24 tom Exp $")
 
 #define doPut(mode) TPUTS_TRACE(#mode); NCURSES_SP_NAME(tputs)(NCURSES_SP_ARGx mode, 1, outc)
 
@@ -59,7 +59,9 @@ MODULE_ID("$Id: lib_vid_attr.c,v 1.13 2010/03/31 23:22:35 tom Exp $")
                } \
        }
 
-#define set_color(mode, pair) mode &= ALL_BUT_COLOR; mode |= ColorPair(pair)
+#define set_color(mode, pair) \
+       mode &= ALL_BUT_COLOR; \
+       mode |= (attr_t) ColorPair(pair)
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(vid_puts) (NCURSES_SP_DCLx
index aacc00e33be975f08b1b007690a7ec253c54b099..917caac44b44bb7e093251f4008efbbdc30c64f5 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2002,2009 Free Software Foundation, Inc.                   *
+ * Copyright (c) 2002-2009,2010 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: lib_vline_set.c,v 1.3 2009/10/24 22:43:43 tom Exp $")
+MODULE_ID("$Id: lib_vline_set.c,v 1.4 2010/12/19 01:50:50 tom Exp $")
 
 NCURSES_EXPORT(int)
 wvline_set(WINDOW *win, const cchar_t *ch, int n)
 {
     int code = ERR;
-    NCURSES_SIZE_T row, col;
-    NCURSES_SIZE_T end;
+    int row, col;
+    int end;
 
     T((T_CALLED("wvline(%p,%s,%d)"), (void *) win, _tracecchar_t(ch), n));
 
index 7c1ce02127774b2c222c4740618ab7435bc14047..5a16e457e091b94f52445e8a131254dcbd93c7e2 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2002-2008,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 2002-2009,2010 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 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_wacs.c,v 1.9 2009/10/03 20:18:21 tom Exp $")
+MODULE_ID("$Id: lib_wacs.c,v 1.10 2010/12/19 01:43:19 tom Exp $")
 
 NCURSES_EXPORT_VAR(cchar_t) * _nc_wacs = 0;
 
@@ -41,7 +41,7 @@ _nc_init_wacs(void)
 {
     /* *INDENT-OFF* */
     static const struct {
-       int     map;
+       unsigned map;
        int     value[2];
     } table[] = {
        /* VT100 symbols */
index b9f8d6a5e0f180cfefca5bcbebee5ff228167253..50958e44c7bb835780fe12c81aee48753801c39c 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2001-2007,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 2001-2009,2010 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            *
@@ -35,7 +35,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_wunctrl.c,v 1.13 2009/04/18 19:06:55 tom Exp $")
+MODULE_ID("$Id: lib_wunctrl.c,v 1.14 2010/12/19 01:42:15 tom Exp $")
 
 NCURSES_EXPORT(wchar_t *)
 NCURSES_SP_NAME(wunctrl) (NCURSES_SP_DCLx cchar_t *wc)
@@ -48,7 +48,7 @@ NCURSES_SP_NAME(wunctrl) (NCURSES_SP_DCLx cchar_t *wc)
                                 (unsigned) _nc_to_char((wint_t)CharOf(*wc)));
 
        for (wsp = str; *p; ++p) {
-           *wsp++ = _nc_to_widechar(*p);
+           *wsp++ = (wchar_t) _nc_to_widechar(*p);
        }
        *wsp = 0;
        return str;
index 05118890abd7fca6905b238b32ba8c4b217382d0..c214639cd4df29e8025646f9af44a276a54ee39b 100644 (file)
@@ -39,7 +39,7 @@
 #include <curses.priv.h>
 #define CUR my_term.type.
 
-MODULE_ID("$Id: win_driver.c,v 1.9 2010/07/31 23:43:21 tom Exp $")
+MODULE_ID("$Id: win_driver.c,v 1.10 2010/12/25 19:28:21 tom Exp $")
 
 #define WINMAGIC NCDRV_MAGIC(NCDRV_WINCONSOLE)
 
@@ -929,7 +929,7 @@ drv_twait(TERMINAL_CONTROL_BLOCK * TCB,
          EVENTLIST_2nd(_nc_eventlist * evl))
 {
     SCREEN *sp;
-    INPUT_RECORD inp;
+    INPUT_RECORD inp_rec;
     BOOL b;
     DWORD nRead = 0, rc = -1;
     int code = 0;
@@ -938,7 +938,7 @@ drv_twait(TERMINAL_CONTROL_BLOCK * TCB,
     int diff;
     bool isImmed = (milliseconds == 0);
 
-#define CONSUME() ReadConsoleInput(TCB->inp,&inp,1,&nRead)
+#define CONSUME() ReadConsoleInput(TCB->inp,&inp_rec,1,&nRead)
 
     AssertTCB();
     SetSP();
@@ -949,7 +949,7 @@ drv_twait(TERMINAL_CONTROL_BLOCK * TCB,
     if (milliseconds < 0)
        milliseconds = INFINITY;
 
-    memset(&inp, 0, sizeof(inp));
+    memset(&inp_rec, 0, sizeof(inp_rec));
 
     while (true) {
        GetSystemTimeAsFileTime(&fstart);
@@ -965,15 +965,15 @@ drv_twait(TERMINAL_CONTROL_BLOCK * TCB,
            if (mode) {
                b = GetNumberOfConsoleInputEvents(TCB->inp, &nRead);
                if (b && nRead > 0) {
-                   b = PeekConsoleInput(TCB->inp, &inp, 1, &nRead);
+                   b = PeekConsoleInput(TCB->inp, &inp_rec, 1, &nRead);
                    if (b && nRead > 0) {
-                       switch (inp.EventType) {
+                       switch (inp_rec.EventType) {
                        case KEY_EVENT:
                            if (mode & TW_INPUT) {
-                               WORD vk = inp.Event.KeyEvent.wVirtualKeyCode;
-                               char ch = inp.Event.KeyEvent.uChar.AsciiChar;
+                               WORD vk = inp_rec.Event.KeyEvent.wVirtualKeyCode;
+                               char ch = inp_rec.Event.KeyEvent.uChar.AsciiChar;
 
-                               if (inp.Event.KeyEvent.bKeyDown) {
+                               if (inp_rec.Event.KeyEvent.bKeyDown) {
                                    if (0 == ch) {
                                        int nKey = MapKey(TCB, vk);
                                        if ((nKey < 0) || FALSE == sp->_keypad_on) {
@@ -990,7 +990,7 @@ drv_twait(TERMINAL_CONTROL_BLOCK * TCB,
                            continue;
                        case MOUSE_EVENT:
                            if (decode_mouse(TCB,
-                                            (inp.Event.MouseEvent.dwButtonState
+                                            (inp_rec.Event.MouseEvent.dwButtonState
                                              & BUTTON_MASK)) == 0) {
                                CONSUME();
                            } else if (mode & TW_MOUSE) {
@@ -1076,7 +1076,7 @@ drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf)
 {
     SCREEN *sp;
     int n = 1;
-    INPUT_RECORD inp;
+    INPUT_RECORD inp_rec;
     BOOL b;
     DWORD nRead;
     WORD vk;
@@ -1086,17 +1086,17 @@ drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf)
     assert(buf);
     SetSP();
 
-    memset(&inp, 0, sizeof(inp));
+    memset(&inp_rec, 0, sizeof(inp_rec));
 
     T((T_CALLED("win32con::drv_read(%p)"), TCB));
-    while ((b = ReadConsoleInput(TCB->inp, &inp, 1, &nRead))) {
+    while ((b = ReadConsoleInput(TCB->inp, &inp_rec, 1, &nRead))) {
        if (b && nRead > 0) {
-           if (inp.EventType == KEY_EVENT) {
-               if (!inp.Event.KeyEvent.bKeyDown)
+           if (inp_rec.EventType == KEY_EVENT) {
+               if (!inp_rec.Event.KeyEvent.bKeyDown)
                    continue;
-               *buf = (int) inp.Event.KeyEvent.uChar.AsciiChar;
-               vk = inp.Event.KeyEvent.wVirtualKeyCode;
-               sc = inp.Event.KeyEvent.wVirtualScanCode;
+               *buf = (int) inp_rec.Event.KeyEvent.uChar.AsciiChar;
+               vk = inp_rec.Event.KeyEvent.wVirtualKeyCode;
+               sc = inp_rec.Event.KeyEvent.wVirtualScanCode;
                if (*buf == 0) {
                    if (sp->_keypad_on) {
                        *buf = MapKey(TCB, vk);
@@ -1109,8 +1109,8 @@ drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf)
                } else {        /* *buf != 0 */
                    break;
                }
-           } else if (inp.EventType == MOUSE_EVENT) {
-               if (handle_mouse(TCB, inp.Event.MouseEvent)) {
+           } else if (inp_rec.EventType == MOUSE_EVENT) {
+               if (handle_mouse(TCB, inp_rec.Event.MouseEvent)) {
                    *buf = KEY_MOUSE;
                    break;
                }
index 08ff6ee06f1c80b186df0efb4b9e57d6fcb70a41..78c8f37141a22e7328d16f843b1d17a07880b362 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: test_add_wchstr.c,v 1.12 2010/12/12 00:17:13 tom Exp $
+ * $Id: test_add_wchstr.c,v 1.13 2010/12/25 22:49:28 tom Exp $
  *
  * Demonstrate the waddwchstr() and wadd_wch functions.
  * Thomas Dickey - 2009/9/12
@@ -123,7 +123,7 @@ ChWLen(const wchar_t *source)
     if (!pass_ctls) {
        size_t adjust = 0;
        size_t n;
-       char *s;
+       NCURSES_CONST char *s;
 
        for (n = 0; n < result; ++n) {
            if (source[n] < 256 && (s = unctrl((chtype) source[n])) != 0) {