]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.9 - patch 20140809
authorThomas E. Dickey <dickey@invisible-island.net>
Sat, 9 Aug 2014 23:40:51 +0000 (23:40 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sat, 9 Aug 2014 23:40:51 +0000 (23:40 +0000)
+ modify declarations for user-data pointers in C++ binding to use
  reinterpret_cast to facilitate converting typed pointers to void*
  in user's application (patch by Adam Jiang).
+ regenerated html manpages.
+ add note regarding cause and effect for TERM in ncurses manpage,
  having noted clueless verbiage in Terminal.app's "help" file
  which reverses cause/effect.
+ remove special fallback definition for NCURSES_ATTR_T, since macros
  have resolved type-mismatches using casts (cf: 970412).
+ fixes for win_driver.c:
  + handle repainting on endwin/refresh combination.
  + implement beep().
  + minor cleanup.

38 files changed:
NEWS
c++/cursesf.h
c++/cursesm.h
c++/cursesp.h
dist.mk
doc/html/man/adacurses-config.1.html
doc/html/man/captoinfo.1m.html
doc/html/man/clear.1.html
doc/html/man/form.3x.html
doc/html/man/form_field_opts.3x.html
doc/html/man/infocmp.1m.html
doc/html/man/infotocap.1m.html
doc/html/man/menu.3x.html
doc/html/man/ncurses.3x.html
doc/html/man/ncurses5-config.1.html
doc/html/man/panel.3x.html
doc/html/man/tabs.1.html
doc/html/man/terminfo.5.html
doc/html/man/tic.1m.html
doc/html/man/toe.1m.html
doc/html/man/tput.1.html
doc/html/man/tset.1.html
include/curses.h.in
man/ncurses.3x
ncurses/win32con/win_driver.c
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec
test/background.c
test/bs.c
test/dots_curses.c
test/echochar.c
test/filter.c
test/gdc.c
test/ncurses.c

diff --git a/NEWS b/NEWS
index f8cfaf2fbbfcde7fd7278f8b3c9243aad8c60f01..bdd262a0551319363b8e23a1c72775683a5e3ae4 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2250 2014/08/02 20:51:48 tom Exp $
+-- $Id: NEWS,v 1.2257 2014/08/09 22:05:47 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,21 @@ See the AUTHORS file for the corresponding full names.
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20140809
+       + modify declarations for user-data pointers in C++ binding to use
+         reinterpret_cast to facilitate converting typed pointers to void*
+         in user's application (patch by Adam Jiang).
+       + regenerated html manpages.
+       + add note regarding cause and effect for TERM in ncurses manpage,
+         having noted clueless verbiage in Terminal.app's "help" file
+         which reverses cause/effect.
+       + remove special fallback definition for NCURSES_ATTR_T, since macros
+         have resolved type-mismatches using casts (cf: 970412).
+       + fixes for win_driver.c:
+         + handle repainting on endwin/refresh combination.
+         + implement beep().
+         + minor cleanup.
+
 20140802
        + minor portability fixes for MinGW:
          + ensure WINVER is defined in makefiles rather than using headers
 20140802
        + minor portability fixes for MinGW:
          + ensure WINVER is defined in makefiles rather than using headers
index ef705413720519e185ea6b6f30d6fb8d98dd3408..fe1f1aa90a18876fb7739e61faab4ac53a766547 100644 (file)
@@ -1,6 +1,6 @@
 // * This makes emacs happy -*-Mode: C++;-*-
 /****************************************************************************
 // * This makes emacs happy -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2012,2014 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -31,7 +31,7 @@
  *   Author: Juergen Pfeifer, 1997                                          *
  ****************************************************************************/
 
  *   Author: Juergen Pfeifer, 1997                                          *
  ****************************************************************************/
 
-// $Id: cursesf.h,v 1.31 2012/12/29 21:49:58 tom Exp $
+// $Id: cursesf.h,v 1.32 2014/08/09 22:06:11 Adam.Jiang Exp $
 
 #ifndef NCURSES_CURSESF_H_incl
 #define NCURSES_CURSESF_H_incl 1
 
 #ifndef NCURSES_CURSESF_H_incl
 #define NCURSES_CURSESF_H_incl 1
@@ -673,7 +673,8 @@ protected:
                   const T* p_UserData = STATIC_CAST(T*)(0))
     : NCursesForm(nlines,ncols,begin_y,begin_x) {
       if (form)
                   const T* p_UserData = STATIC_CAST(T*)(0))
     : NCursesForm(nlines,ncols,begin_y,begin_x) {
       if (form)
-       set_user (const_cast<void *>(p_UserData));
+       set_user (const_cast<void *>(reinterpret_cast<const void*>
+                                    (p_UserData)));
   }
 
 public:
   }
 
 public:
@@ -683,7 +684,7 @@ public:
                   bool autoDelete_Fields=FALSE)
     : NCursesForm (Fields, with_frame, autoDelete_Fields) {
       if (form)
                   bool autoDelete_Fields=FALSE)
     : NCursesForm (Fields, with_frame, autoDelete_Fields) {
       if (form)
-       set_user (const_cast<void *>(p_UserData));
+       set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
   };
 
   NCursesUserForm (NCursesFormField* Fields[],
   };
 
   NCursesUserForm (NCursesFormField* Fields[],
@@ -697,19 +698,20 @@ public:
     : NCursesForm (Fields, nlines, ncols, begin_y, begin_x,
                   with_frame, autoDelete_Fields) {
       if (form)
     : NCursesForm (Fields, nlines, ncols, begin_y, begin_x,
                   with_frame, autoDelete_Fields) {
       if (form)
-       set_user (const_cast<void *>(p_UserData));
+       set_user (const_cast<void *>(reinterpret_cast<const void*>
+                                    (p_UserData)));
   };
 
   virtual ~NCursesUserForm() {
   };
 
   };
 
   virtual ~NCursesUserForm() {
   };
 
-  inline T* UserData (void) const {
+  inline T* UserData (void) {
     return reinterpret_cast<T*>(get_user ());
   };
 
   inline virtual void setUserData (const T* p_UserData) {
     if (form)
     return reinterpret_cast<T*>(get_user ());
   };
 
   inline virtual void setUserData (const T* p_UserData) {
     if (form)
-      set_user (const_cast<void *>(p_UserData));
+      set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
   }
 
 };
   }
 
 };
index 259d107fb447728bedf4b7b6d273266fad57ed8f..f8f9665d9d247e8eacb0101758c3d23020b90d9c 100644 (file)
@@ -1,6 +1,6 @@
 // * This makes emacs happy -*-Mode: C++;-*-
 /****************************************************************************
 // * This makes emacs happy -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2012,2014 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -31,7 +31,7 @@
  *   Author: Juergen Pfeifer, 1997                                          *
  ****************************************************************************/
 
  *   Author: Juergen Pfeifer, 1997                                          *
  ****************************************************************************/
 
-// $Id: cursesm.h,v 1.29 2012/12/29 21:48:33 tom Exp $
+// $Id: cursesm.h,v 1.30 2014/08/09 22:06:18 Adam.Jiang Exp $
 
 #ifndef NCURSES_CURSESM_H_incl
 #define NCURSES_CURSESM_H_incl 1
 
 #ifndef NCURSES_CURSESM_H_incl
 #define NCURSES_CURSESM_H_incl 1
@@ -632,7 +632,7 @@ protected:
                   const T* p_UserData = STATIC_CAST(T*)(0))
     : NCursesMenu(nlines,ncols,begin_y,begin_x) {
       if (menu)
                   const T* p_UserData = STATIC_CAST(T*)(0))
     : NCursesMenu(nlines,ncols,begin_y,begin_x) {
       if (menu)
-       set_user (const_cast<void *>(p_UserData));
+       set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
   }
 
 public:
   }
 
 public:
@@ -642,7 +642,7 @@ public:
                   bool autoDelete_Items=FALSE)
     : NCursesMenu (Items, with_frame, autoDelete_Items) {
       if (menu)
                   bool autoDelete_Items=FALSE)
     : NCursesMenu (Items, with_frame, autoDelete_Items) {
       if (menu)
-       set_user (const_cast<void *>(p_UserData));
+       set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
   };
 
   NCursesUserMenu (NCursesMenuItem* Items[],
   };
 
   NCursesUserMenu (NCursesMenuItem* Items[],
@@ -654,19 +654,19 @@ public:
                   bool with_frame=FALSE)
     : NCursesMenu (Items, nlines, ncols, begin_y, begin_x, with_frame) {
       if (menu)
                   bool with_frame=FALSE)
     : NCursesMenu (Items, nlines, ncols, begin_y, begin_x, with_frame) {
       if (menu)
-       set_user (const_cast<void *>(p_UserData));
+       set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
   };
 
   virtual ~NCursesUserMenu() {
   };
 
   };
 
   virtual ~NCursesUserMenu() {
   };
 
-  inline T* UserData (void) const {
+  inline T* UserData (void) {
     return reinterpret_cast<T*>(get_user ());
   };
 
   inline virtual void setUserData (const T* p_UserData) {
     if (menu)
     return reinterpret_cast<T*>(get_user ());
   };
 
   inline virtual void setUserData (const T* p_UserData) {
     if (menu)
-      set_user (const_cast<void *>(p_UserData));
+      set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
   }
 };
 
   }
 };
 
index 699ec284fcfd29906e98cab0b3c7271387bc3fec..54b0d58899ecda6f380b553ec977add8c3f03087 100644 (file)
@@ -1,6 +1,6 @@
 // * This makes emacs happy -*-Mode: C++;-*-
 /****************************************************************************
 // * This makes emacs happy -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2008,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2012,2014 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -34,7 +34,7 @@
 #ifndef NCURSES_CURSESP_H_incl
 #define NCURSES_CURSESP_H_incl 1
 
 #ifndef NCURSES_CURSESP_H_incl
 #define NCURSES_CURSESP_H_incl 1
 
-// $Id: cursesp.h,v 1.30 2012/12/29 21:50:55 tom Exp $
+// $Id: cursesp.h,v 1.31 2014/08/09 22:06:26 Adam.Jiang Exp $
 
 #include <cursesw.h>
 
 
 #include <cursesw.h>
 
@@ -236,7 +236,8 @@ public:
     : NCursesPanel (nlines, ncols, begin_y, begin_x)
   {
       if (p)
     : NCursesPanel (nlines, ncols, begin_y, begin_x)
   {
       if (p)
-       set_user (const_cast<void *>(p_UserData));
+       set_user (const_cast<void *>(reinterpret_cast<const void*>
+                                    (p_UserData)));
   };
   // This creates an user panel of the requested size with associated
   // user data pointed to by p_UserData.
   };
   // This creates an user panel of the requested size with associated
   // user data pointed to by p_UserData.
@@ -244,14 +245,14 @@ public:
   NCursesUserPanel(const T* p_UserData = STATIC_CAST(T*)(0)) : NCursesPanel()
   {
     if (p)
   NCursesUserPanel(const T* p_UserData = STATIC_CAST(T*)(0)) : NCursesPanel()
   {
     if (p)
-      set_user(const_cast<void *>(p_UserData));
+      set_user(const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
   };
   // This creates an user panel associated with the ::stdscr and user data
   // pointed to by p_UserData.
 
   virtual ~NCursesUserPanel() {};
 
   };
   // This creates an user panel associated with the ::stdscr and user data
   // pointed to by p_UserData.
 
   virtual ~NCursesUserPanel() {};
 
-  T* UserData (void) const
+  T* UserData (void)
   {
     return reinterpret_cast<T*>(get_user ());
   };
   {
     return reinterpret_cast<T*>(get_user ());
   };
@@ -260,7 +261,7 @@ public:
   virtual void setUserData (const T* p_UserData)
   {
     if (p)
   virtual void setUserData (const T* p_UserData)
   {
     if (p)
-      set_user (const_cast<void *>(p_UserData));
+      set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
   }
   // Associate the user panel with the user data pointed to by p_UserData.
 };
   }
   // Associate the user panel with the user data pointed to by p_UserData.
 };
diff --git a/dist.mk b/dist.mk
index f6067371d6e9be2a93182288cc34f132fdf837b1..9ace815810187f9bc3c76a27ed0632fb1a87a462 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.999 2014/08/01 23:41:10 tom Exp $
+# $Id: dist.mk,v 1.1000 2014/08/09 00:33:11 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -37,7 +37,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 9
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
 NCURSES_MINOR = 9
-NCURSES_PATCH = 20140802
+NCURSES_PATCH = 20140809
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 69aaf29439046122317e3c789bffdd15cbf4a750..72399e265c39ba7de2bc28ddf66a60d070749ec1 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <!-- 
   ****************************************************************************
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <!-- 
   ****************************************************************************
-  * Copyright (c) 2010,2011 Free Software Foundation, Inc.                   *
+  * Copyright (c) 2010-2011,2014 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: MKada_config.in,v 1.5 2011/03/26 14:44:51 tom Exp @
+  * @Id: MKada_config.in,v 1.8 2014/06/07 19:32:52 tom Exp @
 -->
 <HTML>
 <HEAD>
 -->
 <HTML>
 <HEAD>
        <STRONG>--help</STRONG> prints a  list  of  the  <STRONG>adacurses-config</STRONG>  script's
               options.
 
        <STRONG>--help</STRONG> prints a  list  of  the  <STRONG>adacurses-config</STRONG>  script's
               options.
 
+       If  no options are given, <STRONG>adacurses-config</STRONG> prints the com-
+       bination of <STRONG>--cflags</STRONG> and <STRONG>--libs</STRONG> that <STRONG>gnatmake</STRONG> expects (see
+       example).
+
+
+</PRE>
+<H2>EXAMPLE</H2><PRE>
+       For example, supposing that you want to compile the "Hello
+       World!"   program  for  AdaCurses.   Make  a  file   named
+       "hello.adb":
+              with Terminal_Interface.Curses; use Terminal_Interface.Curses;
+
+              procedure Hello is
+
+                 Visibility : Cursor_Visibility := Invisible;
+                 done : Boolean := False;
+                 c : Key_Code;
+
+              begin
+
+                 Init_Screen;
+                 Set_Echo_Mode (False);
+
+                 Set_Cursor_Visibility (Visibility);
+                 Set_Timeout_Mode (Standard_Window, Non_Blocking, 0);
+
+                 Move_Cursor (Line =&gt; Lines / 2, Column =&gt; (Columns - 12) / 2);
+                 Add (Str =&gt; "Hello World!");
+
+                 while not done loop
+
+                    c := Get_Keystroke (Standard_Window);
+                    case c is
+                    when Character'Pos ('q') =&gt; done := True;
+                    when others =&gt; null;
+                    end case;
+
+                    Nap_Milli_Seconds (50);
+
+                 end loop;
+
+                 End_Windows;
+
+              end Hello;
+
+       Then, using
+              gnatmake  `adacurses-config  --cflags` hello -largs
+              `adacurses-config --libs`
+
+       or (simpler):
+              gnatmake hello `adacurses-config`
+
+       you will compile and link the program.
+
 
 </PRE>
 <H2>SEE ALSO</H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
 
 
 </PRE>
 <H2>SEE ALSO</H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
 
 
 
 
 
 
index b9ca9363feccfb51d2189559b20327d74fa6656f..eec8372ff0032f7c2847b08abf457775cbeb99dd 100644 (file)
 <H2>SEE ALSO</H2><PRE>
        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
 <H2>SEE ALSO</H2><PRE>
        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
 
 
 </PRE>
 
 
 </PRE>
index 9b2ae01c8b90a6a95781eb07127d2d96dfbc7455..4eb0ef630f45932416f78e4e8af5631fb1739f15 100644 (file)
@@ -71,7 +71,7 @@
 <H2>SEE ALSO</H2><PRE>
        <STRONG><A HREF="tput.1.html">tput(1)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
 <H2>SEE ALSO</H2><PRE>
        <STRONG><A HREF="tput.1.html">tput(1)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
 
 
 
 
 
 
index 6c620aecc47c68643632ee2ebbbebf025d01b159..c95854dd706c5848a2940d74f269880503198e55 100644 (file)
 
 </PRE>
 <H2>SEE ALSO</H2><PRE>
 
 </PRE>
 <H2>SEE ALSO</H2><PRE>
-       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
 
 
 
 
 
 
index 1cdfe7038ae56b293fce987e8ba82505f3319b14..11318a6e2a37926c31820bdaa54938c583dfdafb 100644 (file)
@@ -2,7 +2,7 @@
 <!-- 
   * t
   ****************************************************************************
 <!-- 
   * t
   ****************************************************************************
-  * Copyright (c) 1998-2007,2010 Free Software Foundation, Inc.              *
+  * Copyright (c) 1998-2010,2014 Free Software Foundation, Inc.              *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * copy of this software and associated documentation files (the            *
@@ -28,7 +28,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: form_field_opts.3x,v 1.16 2010/12/04 18:41:07 tom Exp @
+  * @Id: form_field_opts.3x,v 1.17 2014/07/26 21:21:57 tom Exp @
 -->
 <HTML>
 <HEAD>
 -->
 <HTML>
 <HEAD>
        The function <STRONG>field_opts</STRONG> returns the field's current option
        bits.
 
        The function <STRONG>field_opts</STRONG> returns the field's current option
        bits.
 
-       The following options are defined (all are on by default):
-
-       O_VISIBLE
-            The field is displayed.  If this option is off,  dis-
-            play of the field is suppressed.
+       The following standard options are defined (all are on  by
+       default):
 
        O_ACTIVE
             The  field  is  visited  during  processing.  If this
 
        O_ACTIVE
             The  field  is  visited  during  processing.  If this
             navigation  keys.  Please  notice  that  an invisible
             field appears to be inactive also.
 
             navigation  keys.  Please  notice  that  an invisible
             field appears to be inactive also.
 
-       O_PUBLIC
-            The field contents are displayed as data is entered.
-
-       O_EDIT
-            The field can be edited.
-
-       O_WRAP
-            Words that do not fit on a line are  wrapped  to  the
-            next line.  Words are blank-separated.
+       O_AUTOSKIP
+            Skip to the next field when this one fills.
 
        O_BLANK
 
        O_BLANK
-            The  field is cleared whenever a character is entered
+            The field is cleared whenever a character is  entered
             at the first position.
 
             at the first position.
 
-       O_AUTOSKIP
-            Skip to the next field when this one fills.
+       O_EDIT
+            The field can be edited.
 
        O_NULLOK
             Allow a blank field.
 
 
        O_NULLOK
             Allow a blank field.
 
+       O_PASSOK
+            Validate field only if modified by user.
+
+       O_PUBLIC
+            The field contents are displayed as data is entered.
+
        O_STATIC
        O_STATIC
-            Field buffers are fixed  to  field's  original  size.
+            Field  buffers  are  fixed  to field's original size.
             Turn this option off to create a dynamic field.
 
             Turn this option off to create a dynamic field.
 
-       O_PASSOK
-            Validate field only if modified by user.
+       O_VISIBLE
+            The field is displayed.  If this option is off,  dis-
+            play of the field is suppressed.
+
+       O_WRAP
+            Words  that  do  not fit on a line are wrapped to the
+            next line.  Words are blank-separated.
+
+       One extension option is defined  (extensions  are  off  by
+       default):
+
+       O_DYNAMIC_JUSTIFY
+            Permit  dynamic  fields  to be justified, like static
+            fields.
 
 
 </PRE>
 <H2>RETURN VALUE</H2><PRE>
 
 
 </PRE>
 <H2>RETURN VALUE</H2><PRE>
-       Except  for  <STRONG>field_opts</STRONG>,  each  routine returns one of the
+       Except for <STRONG>field_opts</STRONG>, each routine  returns  one  of  the
        following:
 
        <STRONG>E_OK</STRONG> The routine succeeded.
 
        <STRONG>E_BAD_ARGUMENT</STRONG>
        following:
 
        <STRONG>E_OK</STRONG> The routine succeeded.
 
        <STRONG>E_BAD_ARGUMENT</STRONG>
-            Routine detected an incorrect or  out-of-range  argu-
+            Routine  detected  an incorrect or out-of-range argu-
             ment.
 
        <STRONG>E_CURRENT</STRONG>
             ment.
 
        <STRONG>E_CURRENT</STRONG>
 
 </PRE>
 <H2>SEE ALSO</H2><PRE>
 
 </PRE>
 <H2>SEE ALSO</H2><PRE>
-       <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="form.3x.html">form(3x)</A></STRONG>.
+       <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="form.3x.html">form(3x)</A></STRONG>.  <STRONG><A HREF="form_field_just.3x.html">form_field_just(3x)</A></STRONG>.
 
 
 </PRE>
 
 
 </PRE>
 
 </PRE>
 <H2>PORTABILITY</H2><PRE>
 
 </PRE>
 <H2>PORTABILITY</H2><PRE>
-       These routines emulate the System V forms  library.   They
+       These  routines  emulate the System V forms library.  They
        were not supported on Version 7 or BSD versions.
 
 
 </PRE>
 <H2>AUTHORS</H2><PRE>
        were not supported on Version 7 or BSD versions.
 
 
 </PRE>
 <H2>AUTHORS</H2><PRE>
-       Juergen  Pfeifer.   Manual  pages  and  adaptation for new
+       Juergen Pfeifer.  Manual  pages  and  adaptation  for  new
        curses by Eric S. Raymond.
 
 
        curses by Eric S. Raymond.
 
 
index 4d814961e8e8949b8df54ff5f7228176274ed279..9bb33e916c124707511f4af3c2204bdbc91cfbd0 100644 (file)
 
        http://invisible-island.net/ncurses/tctest.html
 
 
        http://invisible-island.net/ncurses/tctest.html
 
-       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
 
 
 </PRE>
 
 
 </PRE>
index 37c069387b1cac2cc7753f52b54299c97a70c5e3..a22c12f8f7457b873d247ebafb8dc8be23b99316 100644 (file)
@@ -94,7 +94,7 @@
 <H2>SEE ALSO</H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
 <H2>SEE ALSO</H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
 
 
 </PRE>
 
 
 </PRE>
index 822b44a61260c215efb99af7a5601ca8b6134bbe..5511ecd2bd698e9da6c909c380df28e748762f46 100644 (file)
 
 </PRE>
 <H2>SEE ALSO</H2><PRE>
 
 </PRE>
 <H2>SEE ALSO</H2><PRE>
-       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
 
 
 
 
 
 
index c4153e2ecd1a8ec7ffd10596f9216b4367e4d223..ec387334457c6964b1ce584e67b15876a359c5d8 100644 (file)
@@ -28,7 +28,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: ncurses.3x,v 1.117 2014/05/24 20:29:27 tom Exp @
+  * @Id: ncurses.3x,v 1.119 2014/08/09 20:54:30 tom Exp @
 -->
 <HTML>
 <HEAD>
 -->
 <HTML>
 <HEAD>
@@ -63,7 +63,7 @@
        sonable optimization.  This implementation is "new curses"
        (ncurses) and is the approved replacement for 4.4BSD clas-
        sic  curses,  which has been discontinued.  This describes
        sonable optimization.  This implementation is "new curses"
        (ncurses) and is the approved replacement for 4.4BSD clas-
        sic  curses,  which has been discontinued.  This describes
-       <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+       <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
 
        The <STRONG>ncurses</STRONG> library emulates the curses library of  System
        V  Release  4  UNIX,  and  XPG4 (X/Open Portability Guide)
 
        The <STRONG>ncurses</STRONG> library emulates the curses library of  System
        V  Release  4  UNIX,  and  XPG4 (X/Open Portability Guide)
        TERM Denotes  your  terminal  type.  Each terminal type is
             distinct, though many are similar.
 
        TERM Denotes  your  terminal  type.  Each terminal type is
             distinct, though many are similar.
 
+            <STRONG>TERM</STRONG> is commonly set by terminal  emulators  to  help
+            applications  find  a  workable terminal description.
+            Some of those choose a popular  approximation,  e.g.,
+            "ansi",  "vt100",  "xterm"  rather than an exact fit.
+            Not infrequently, your application will have problems
+            with that approach, e.g., incorrect function-key def-
+            initions.
+
+            If you set <STRONG>TERM</STRONG> in your environment, it has no effect
+            on  the  operation of the terminal emulator.  It only
+            affects the way applications work within  the  termi-
+            nal.  Likewise, as a general rule (<STRONG>xterm</STRONG> being a rare
+            exception), terminal emulators  which  allow  you  to
+            specify <STRONG>TERM</STRONG> as a parameter or configuration value do
+            not change their behavior to match that setting.
+
        TERMCAP
             If the <STRONG>ncurses</STRONG> library has been configured with <EM>term-</EM>
             <EM>cap</EM>  support,  <STRONG>ncurses</STRONG>  will  check  for a terminal's
        TERMCAP
             If the <STRONG>ncurses</STRONG> library has been configured with <EM>term-</EM>
             <EM>cap</EM>  support,  <STRONG>ncurses</STRONG>  will  check  for a terminal's
index 37b3d7dbc7b48bce472b24f3cb7c0c1e2f910667..22c239955b63b7234594c1ef5411159ce518b147 100644 (file)
 <H2>SEE ALSO</H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
 
 <H2>SEE ALSO</H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
 
 
 
 
 
 
index 00496bb72384fcc3e3a67aea37cb3b99d0cabe31..7ffd60c35fcb69e535fdfcd6b5a19efffe204b27 100644 (file)
 <H2>SEE ALSO</H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>,
 
 <H2>SEE ALSO</H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>,
 
-       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
 
 
 </PRE>
 
 
 </PRE>
index 9f8e2b9712567694349f04bd4eb0f4336500619d..028a9533c612cd8ec153bf442267342fcbf26e7a 100644 (file)
 <H2>SEE ALSO</H2><PRE>
        <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
 <H2>SEE ALSO</H2><PRE>
        <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
 
 
 
 
 
 
index 757120b95a86b1461a4bbaa4dbd4e78a540f8745..be06a7044aa5c80aa0704ba97899b2c415dba80a 100644 (file)
@@ -78,7 +78,7 @@
        nals by giving a set of capabilities which they  have,  by
        specifying how to perform screen operations, and by speci-
        fying padding requirements and  initialization  sequences.
        nals by giving a set of capabilities which they  have,  by
        specifying how to perform screen operations, and by speci-
        fying padding requirements and  initialization  sequences.
-       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
 
        Entries in <EM>terminfo</EM> consist of a sequence of `,' separated
        fields (embedded commas may be escaped with a backslash or
 
        Entries in <EM>terminfo</EM> consist of a sequence of `,' separated
        fields (embedded commas may be escaped with a backslash or
index 5e5433982c19acab65e58cbc9ec02cad9c3ddf40..ea620b21bc057a72dc97b67ed0c173db080000f1 100644 (file)
        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>,   <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>,   <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>,    <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG>,
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="term.5.html">term(5)</A></STRONG>.  <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>,   <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>,   <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>,    <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG>,
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="term.5.html">term(5)</A></STRONG>.  <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
 
 
 </PRE>
 
 
 </PRE>
index bb72413735c49ed629048ebf13afdb0558e609d8..6d0700f52e53ad724e21a3b0fa7941780273f3ee 100644 (file)
        <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>,    <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>,   <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>,   <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>,
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
        <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>,    <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>,   <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>,   <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>,
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
 
 
 
 
 
 
index 95d873b9b0070a5db98f67136f78adeb717ebb0b..e77d38a4d67858128e6a6733c2f8ab33c091ccb4 100644 (file)
 <H2>SEE ALSO</H2><PRE>
        <STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>, <STRONG>stty(1)</STRONG>, <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>, <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>.
 
 <H2>SEE ALSO</H2><PRE>
        <STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>, <STRONG>stty(1)</STRONG>, <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>, <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
 
 
 
 
 
 
index f12cf7e3c31248b48146b385c508719d2dba3c24..821e13c0f851b32a1039bca939d322020f28b172 100644 (file)
        <STRONG>csh(1)</STRONG>,   <STRONG>sh(1)</STRONG>,   <STRONG>stty(1)</STRONG>,   <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>,   <STRONG>tty(4)</STRONG>,
        <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>, <STRONG>ttys(5)</STRONG>, <STRONG>environ(7)</STRONG>
 
        <STRONG>csh(1)</STRONG>,   <STRONG>sh(1)</STRONG>,   <STRONG>stty(1)</STRONG>,   <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>,   <STRONG>tty(4)</STRONG>,
        <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>, <STRONG>ttys(5)</STRONG>, <STRONG>environ(7)</STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
 
 
 
 
 
 
index 26983aa150447601e992bc54381bd8c2304f0c11..65eedaa886700940e9ff55da2e56b84085f154ef 100644 (file)
@@ -32,7 +32,7 @@
  *     and: Thomas E. Dickey                        1996-on                 *
  ****************************************************************************/
 
  *     and: Thomas E. Dickey                        1996-on                 *
  ****************************************************************************/
 
-/* $Id: curses.h.in,v 1.240 2014/08/02 16:01:30 tom Exp $ */
+/* $Id: curses.h.in,v 1.241 2014/08/09 20:39:44 tom Exp $ */
 
 #ifndef __NCURSES_H
 #define __NCURSES_H
 
 #ifndef __NCURSES_H
 #define __NCURSES_H
  * NCURSES_ATTR_T is used to quiet compiler warnings when building ncurses
  * configured using --disable-macros.
  */
  * NCURSES_ATTR_T is used to quiet compiler warnings when building ncurses
  * configured using --disable-macros.
  */
-#ifdef NCURSES_NOMACROS
-#ifndef NCURSES_ATTR_T
-#define NCURSES_ATTR_T attr_t
-#endif
-#endif /* NCURSES_NOMACROS */
-
 #ifndef NCURSES_ATTR_T
 #define NCURSES_ATTR_T int
 #endif
 #ifndef NCURSES_ATTR_T
 #define NCURSES_ATTR_T int
 #endif
index 73154b037b5fb01583cdd48b911a68f6093a93a1..df709418e64e3aeaa5f7cfd45bc208652a53b550 100644 (file)
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: ncurses.3x,v 1.117 2014/05/24 20:29:27 tom Exp $
+.\" $Id: ncurses.3x,v 1.119 2014/08/09 20:54:30 tom Exp $
 .hy 0
 .TH ncurses 3X ""
 .ie \n(.g .ds `` \(lq
 .hy 0
 .TH ncurses 3X ""
 .ie \n(.g .ds `` \(lq
@@ -1021,6 +1021,21 @@ file \fBtrace\fR to the current directory.
 TERM
 Denotes your terminal type.
 Each terminal type is distinct, though many are similar.
 TERM
 Denotes your terminal type.
 Each terminal type is distinct, though many are similar.
+.IP
+\fBTERM\fP is commonly set by terminal emulators to help
+applications find a workable terminal description.
+Some of those choose a popular approximation, e.g.,
+\*(``ansi\*('', \*(``vt100\*('', \*(``xterm\*('' rather than an exact fit.
+Not infrequently, your application will have problems with that approach,
+e.g., incorrect function-key definitions.
+.IP
+If you set \fBTERM\fP in your environment,
+it has no effect on the operation of the terminal emulator.
+It only affects the way applications work within the terminal.
+Likewise, as a general rule (\fBxterm\fP being a rare exception),
+terminal emulators which allow you to
+specify \fBTERM\fP as a parameter or configuration value do
+not change their behavior to match that setting.
 .TP 5
 TERMCAP
 If the \fBncurses\fR library has been configured with \fItermcap\fR
 .TP 5
 TERMCAP
 If the \fBncurses\fR library has been configured with \fItermcap\fR
index 0cb27e81b3f8a0c43466185e6c3bd3d591367efd..bc8830049c7d82d6a4471df7744d38d90ba43bc9 100644 (file)
@@ -34,6 +34,9 @@
 /*
  * TODO - GetMousePos(POINT * result) from ntconio.c
  * TODO - implement nodelay
 /*
  * TODO - GetMousePos(POINT * result) from ntconio.c
  * TODO - implement nodelay
+ * TODO - implement flash
+ * TODO - improve screen-repainting, using implied wraparound
+ * TODO - if non-buffered, change buffer size (temporarily) to window-size - SetConsoleScreenBufferSize
  */
 
 #include <curses.priv.h>
  */
 
 #include <curses.priv.h>
@@ -45,7 +48,7 @@
 
 #define CUR my_term.type.
 
 
 #define CUR my_term.type.
 
-MODULE_ID("$Id: win_driver.c,v 1.39 2014/06/29 22:48:17 tom Exp $")
+MODULE_ID("$Id: win_driver.c,v 1.43 2014/08/09 20:31:40 tom Exp $")
 
 #ifndef __GNUC__
 #  error We need GCC to compile for MinGW
 
 #ifndef __GNUC__
 #  error We need GCC to compile for MinGW
@@ -105,6 +108,8 @@ static struct {
     WORD pairs[NUMPAIRS];
     COORD origin;
     CHAR_INFO *save_screen;
     WORD pairs[NUMPAIRS];
     COORD origin;
     CHAR_INFO *save_screen;
+    COORD save_size;
+    SMALL_RECT save_region;
     CONSOLE_SCREEN_BUFFER_INFO SBI;
 } CON;
 
     CONSOLE_SCREEN_BUFFER_INFO SBI;
 } CON;
 
@@ -161,12 +166,64 @@ MapAttr(WORD res, attr_t ch)
     return res;
 }
 
     return res;
 }
 
+#if 0                          /* def TRACE */
+static void
+dump_screen(const char *fn, int ln)
+{
+    int max_cells = (CON.SBI.dwSize.Y * (1 + CON.SBI.dwSize.X)) + 1;
+    char output[max_cells];
+    CHAR_INFO save_screen[max_cells];
+    COORD save_size;
+    SMALL_RECT save_region;
+    COORD bufferCoord;
+
+    T(("dump_screen %s@%d", fn, ln));
+
+    save_region.Top = CON.SBI.srWindow.Top;
+    save_region.Left = CON.SBI.srWindow.Left;
+    save_region.Bottom = CON.SBI.srWindow.Bottom;
+    save_region.Right = CON.SBI.srWindow.Right;
+
+    save_size.X = (SHORT) (save_region.Right - save_region.Left + 1);
+    save_size.Y = (SHORT) (save_region.Bottom - save_region.Top + 1);
+
+    bufferCoord.X = bufferCoord.Y = 0;
+
+    if (ReadConsoleOutput(CON.hdl,
+                         save_screen,
+                         save_size,
+                         bufferCoord,
+                         &save_region)) {
+       int i, j;
+       int ij = 0;
+       int k = 0;
+
+       for (i = save_region.Top; i <= save_region.Bottom; ++i) {
+           for (j = save_region.Left; j <= save_region.Right; ++j) {
+               output[k++] = save_screen[ij++].Char.AsciiChar;
+           }
+           output[k++] = '\n';
+       }
+       output[k] = 0;
+
+       T(("DUMP: %d,%d - %d,%d",
+          save_region.Top,
+          save_region.Left,
+          save_region.Bottom,
+          save_region.Right));
+       T(("%s", output));
+    }
+}
+
+#else
+#define dump_screen(fn,ln)     /* nothing */
+#endif
+
 #if USE_WIDEC_SUPPORT
 /*
  * TODO: support surrogate pairs
  * TODO: support combining characters
  * TODO: support acsc
 #if USE_WIDEC_SUPPORT
 /*
  * TODO: support surrogate pairs
  * TODO: support combining characters
  * TODO: support acsc
- * TODO: check wcwidth of base character, fill if needed for double-width
  * TODO: _nc_wacs should be part of sp.
  */
 static BOOL
  * TODO: _nc_wacs should be part of sp.
  */
 static BOOL
@@ -205,14 +262,14 @@ con_write16(TERMINAL_CONTROL_BLOCK * TCB, int y, int x, cchar_t *str, int limit)
        ++actual;
     }
 
        ++actual;
     }
 
-    loc.X = (short) 0;
-    loc.Y = (short) 0;
-    siz.X = (short) actual;
+    loc.X = (SHORT) 0;
+    loc.Y = (SHORT) 0;
+    siz.X = (SHORT) actual;
     siz.Y = 1;
 
     siz.Y = 1;
 
-    rec.Left = (short) x;
+    rec.Left = (SHORT) x;
     rec.Top = (SHORT) (y + AdjustY());
     rec.Top = (SHORT) (y + AdjustY());
-    rec.Right = (short) (x + limit - 1);
+    rec.Right = (SHORT) (x + limit - 1);
     rec.Bottom = rec.Top;
 
     return WriteConsoleOutputW(CON.hdl, ci, siz, loc, &rec);
     rec.Bottom = rec.Top;
 
     return WriteConsoleOutputW(CON.hdl, ci, siz, loc, &rec);
@@ -351,34 +408,30 @@ static bool
 restore_original_screen(void)
 {
     COORD bufferCoord;
 restore_original_screen(void)
 {
     COORD bufferCoord;
-    SMALL_RECT writeRegion;
     bool result = FALSE;
     bool result = FALSE;
+    SMALL_RECT save_region = CON.save_region;
 
 
-    if (CON.window_only) {
-       writeRegion.Top = CON.SBI.srWindow.Top;
-       writeRegion.Left = CON.SBI.srWindow.Left;
-       writeRegion.Bottom = CON.SBI.srWindow.Bottom;
-       writeRegion.Right = CON.SBI.srWindow.Right;
-       T(("... restoring window"));
-    } else {
-       writeRegion.Top = 0;
-       writeRegion.Left = 0;
-       writeRegion.Bottom = (SHORT) (CON.SBI.dwSize.Y - 1);
-       writeRegion.Right = (SHORT) (CON.SBI.dwSize.X - 1);
-       T(("... restoring entire buffer"));
-    }
+    T(("... restoring %s", CON.window_only ? "window" : "entire buffer"));
 
     bufferCoord.X = bufferCoord.Y = 0;
 
     if (WriteConsoleOutput(CON.hdl,
                           CON.save_screen,
 
     bufferCoord.X = bufferCoord.Y = 0;
 
     if (WriteConsoleOutput(CON.hdl,
                           CON.save_screen,
-                          CON.SBI.dwSize,
+                          CON.save_size,
                           bufferCoord,
                           bufferCoord,
-                          &writeRegion)) {
+                          &save_region)) {
        result = TRUE;
        mvcur(-1, -1, LINES - 2, 0);
        result = TRUE;
        mvcur(-1, -1, LINES - 2, 0);
+       T(("... restore original screen contents ok %dx%d (%d,%d - %d,%d)",
+          CON.save_size.Y,
+          CON.save_size.X,
+          save_region.Top,
+          save_region.Left,
+          save_region.Bottom,
+          save_region.Right));
+    } else {
+       T(("... restore original screen contents err"));
     }
     }
-    T(("... restore original screen contents %s", result ? "ok" : "err"));
     return result;
 }
 
     return result;
 }
 
@@ -406,6 +459,23 @@ wcon_doupdate(TERMINAL_CONTROL_BLOCK * TCB)
        Height = screen_lines(sp);
        nonempty = min(Height, NewScreen(sp)->_maxy + 1);
 
        Height = screen_lines(sp);
        nonempty = min(Height, NewScreen(sp)->_maxy + 1);
 
+       T(("... %dx%d clear cur:%d new:%d",
+          Height, Width,
+          CurScreen(sp)->_clear,
+          NewScreen(sp)->_clear));
+
+       if (SP_PARM->_endwin) {
+
+           T(("coming back from shell mode"));
+           NCURSES_SP_NAME(reset_prog_mode) (NCURSES_SP_ARG);
+
+           NCURSES_SP_NAME(_nc_mvcur_resume) (NCURSES_SP_ARG);
+           NCURSES_SP_NAME(_nc_screen_resume) (NCURSES_SP_ARG);
+           SP_PARM->_mouse_resume(SP_PARM);
+
+           SP_PARM->_endwin = FALSE;
+       }
+
        if ((CurScreen(sp)->_clear || NewScreen(sp)->_clear)) {
            int x;
 #if USE_WIDEC_SUPPORT
        if ((CurScreen(sp)->_clear || NewScreen(sp)->_clear)) {
            int x;
 #if USE_WIDEC_SUPPORT
@@ -433,6 +503,8 @@ wcon_doupdate(TERMINAL_CONTROL_BLOCK * TCB)
            CurScreen(sp)->_clear = FALSE;
            NewScreen(sp)->_clear = FALSE;
            touchwin(NewScreen(sp));
            CurScreen(sp)->_clear = FALSE;
            NewScreen(sp)->_clear = FALSE;
            touchwin(NewScreen(sp));
+           T(("... cleared %dx%d lines @%d of screen", nonempty, Width,
+              AdjustY()));
        }
 
        for (y = 0; y < nonempty; y++) {
        }
 
        for (y = 0; y < nonempty; y++) {
@@ -562,11 +634,12 @@ wcon_dobeepflash(TERMINAL_CONTROL_BLOCK * TCB,
                 int beepFlag GCC_UNUSED)
 {
     SCREEN *sp;
                 int beepFlag GCC_UNUSED)
 {
     SCREEN *sp;
-    int res = ERR;
+    int res = OK;
 
     AssertTCB();
     SetSP();
 
 
     AssertTCB();
     SetSP();
 
+    MessageBeep(MB_ICONWARNING);       /* MB_OK might be better */
     return res;
 }
 
     return res;
 }
 
@@ -807,6 +880,7 @@ wcon_mode(TERMINAL_CONTROL_BLOCK * TCB, int progFlag, int defFlag)
                code = OK;
            }
        }
                code = OK;
            }
        }
+       T(("... buffered:%d, clear:%d", CON.buffered, CurScreen(sp)->_clear));
     } else {                   /* shell mode */
        if (defFlag) {
            /* def_shell_mode */
     } else {                   /* shell mode */
        if (defFlag) {
            /* def_shell_mode */
@@ -827,7 +901,7 @@ wcon_mode(TERMINAL_CONTROL_BLOCK * TCB, int progFlag, int defFlag)
        }
     }
 
        }
     }
 
-    return (code);
+    returnCode(code);
 }
 
 static void
 }
 
 static void
@@ -893,85 +967,78 @@ wcon_release(TERMINAL_CONTROL_BLOCK * TCB)
     returnVoid;
 }
 
     returnVoid;
 }
 
-/*
- * Attempt to save the screen contents.  PDCurses does this if
- * PDC_RESTORE_SCREEN is set, giving the same visual appearance on restoration
- * as if the library had allocated a console buffer.
- */
 static bool
 static bool
-save_original_screen(void)
+read_screen_data(void)
 {
     bool result = FALSE;
 {
     bool result = FALSE;
-    COORD bufferSize;
     COORD bufferCoord;
     COORD bufferCoord;
-    SMALL_RECT readRegion;
     size_t want;
 
     size_t want;
 
-    bufferSize.X = CON.SBI.dwSize.X;
-    bufferSize.Y = CON.SBI.dwSize.Y;
-    want = (size_t) (bufferSize.X * bufferSize.Y);
+    CON.save_size.X = (SHORT) (CON.save_region.Right
+                              - CON.save_region.Left + 1);
+    CON.save_size.Y = (SHORT) (CON.save_region.Bottom
+                              - CON.save_region.Top + 1);
+
+    want = (size_t) (CON.save_size.X * CON.save_size.Y);
 
     if ((CON.save_screen = malloc(want * sizeof(CHAR_INFO))) != 0) {
        bufferCoord.X = bufferCoord.Y = 0;
 
 
     if ((CON.save_screen = malloc(want * sizeof(CHAR_INFO))) != 0) {
        bufferCoord.X = bufferCoord.Y = 0;
 
-       readRegion.Top = 0;
-       readRegion.Left = 0;
-       readRegion.Bottom = (SHORT) (bufferSize.Y - 1);
-       readRegion.Right = (SHORT) (bufferSize.X - 1);
-
-       T(("... reading console buffer %dx%d into %d,%d - %d,%d at %d,%d",
-          bufferSize.Y, bufferSize.X,
-          readRegion.Top,
-          readRegion.Left,
-          readRegion.Bottom,
-          readRegion.Right,
+       T(("... reading console %s %dx%d into %d,%d - %d,%d at %d,%d",
+          CON.window_only ? "window" : "buffer",
+          CON.save_size.Y, CON.save_size.X,
+          CON.save_region.Top,
+          CON.save_region.Left,
+          CON.save_region.Bottom,
+          CON.save_region.Right,
           bufferCoord.Y,
           bufferCoord.X));
 
        if (ReadConsoleOutput(CON.hdl,
                              CON.save_screen,
           bufferCoord.Y,
           bufferCoord.X));
 
        if (ReadConsoleOutput(CON.hdl,
                              CON.save_screen,
-                             bufferSize,
+                             CON.save_size,
                              bufferCoord,
                              bufferCoord,
-                             &readRegion)) {
+                             &CON.save_region)) {
            result = TRUE;
        } else {
            T((" error %#lx", (unsigned long) GetLastError()));
            FreeAndNull(CON.save_screen);
            result = TRUE;
        } else {
            T((" error %#lx", (unsigned long) GetLastError()));
            FreeAndNull(CON.save_screen);
+       }
+    }
 
 
-           bufferSize.X = (SHORT) (CON.SBI.srWindow.Right
-                                   - CON.SBI.srWindow.Left + 1);
-           bufferSize.Y = (SHORT) (CON.SBI.srWindow.Bottom
-                                   - CON.SBI.srWindow.Top + 1);
-           want = (size_t) (bufferSize.X * bufferSize.Y);
-
-           if ((CON.save_screen = malloc(want * sizeof(CHAR_INFO))) != 0) {
-               bufferCoord.X = bufferCoord.Y = 0;
-
-               readRegion.Top = CON.SBI.srWindow.Top;
-               readRegion.Left = CON.SBI.srWindow.Left;
-               readRegion.Bottom = CON.SBI.srWindow.Bottom;
-               readRegion.Right = CON.SBI.srWindow.Right;
-
-               T(("... reading console window %dx%d into %d,%d - %d,%d at %d,%d",
-                  bufferSize.Y, bufferSize.X,
-                  readRegion.Top,
-                  readRegion.Left,
-                  readRegion.Bottom,
-                  readRegion.Right,
-                  bufferCoord.Y,
-                  bufferCoord.X));
-
-               if (ReadConsoleOutput(CON.hdl,
-                                     CON.save_screen,
-                                     bufferSize,
-                                     bufferCoord,
-                                     &readRegion)) {
-                   result = TRUE;
-                   CON.window_only = TRUE;
-               } else {
-                   T((" error %#lx", (unsigned long) GetLastError()));
-               }
-           }
+    return result;
+}
+
+/*
+ * Attempt to save the screen contents.  PDCurses does this if
+ * PDC_RESTORE_SCREEN is set, giving the same visual appearance on
+ * restoration as if the library had allocated a console buffer.  MSDN
+ * says that the data which can be read is limited to 64Kb (and may be
+ * less).
+ */
+static bool
+save_original_screen(void)
+{
+    bool result = FALSE;
+
+    CON.save_region.Top = 0;
+    CON.save_region.Left = 0;
+    CON.save_region.Bottom = (SHORT) (CON.SBI.dwSize.Y - 1);
+    CON.save_region.Right = (SHORT) (CON.SBI.dwSize.X - 1);
+
+    if (read_screen_data()) {
+       result = TRUE;
+    } else {
+
+       CON.save_region.Top = CON.SBI.srWindow.Top;
+       CON.save_region.Left = CON.SBI.srWindow.Left;
+       CON.save_region.Bottom = CON.SBI.srWindow.Bottom;
+       CON.save_region.Right = CON.SBI.srWindow.Right;
+
+       CON.window_only = TRUE;
+
+       if (read_screen_data()) {
+           result = TRUE;
        }
     }
 
        }
     }
 
@@ -1208,11 +1275,11 @@ tdiff(FILETIME fstart, FILETIME fend)
 static int
 Adjust(int milliseconds, int diff)
 {
 static int
 Adjust(int milliseconds, int diff)
 {
-    if (milliseconds == INFINITY)
-       return milliseconds;
-    milliseconds -= diff;
-    if (milliseconds < 0)
-       milliseconds = 0;
+    if (milliseconds != INFINITY) {
+       milliseconds -= diff;
+       if (milliseconds < 0)
+           milliseconds = 0;
+    }
     return milliseconds;
 }
 
     return milliseconds;
 }
 
@@ -1641,17 +1708,21 @@ _ismintty(int fd, LPHANDLE pMinTTY)
 #endif
 
 /*   Borrowed from ansicon project.
 #endif
 
 /*   Borrowed from ansicon project.
-     Check wether or not a I/O handle is associated with
+     Check whether or not an I/O handle is associated with
      a Windows console.
 */
 static BOOL
 IsConsoleHandle(HANDLE hdl)
 {
     DWORD dwFlag = 0;
      a Windows console.
 */
 static BOOL
 IsConsoleHandle(HANDLE hdl)
 {
     DWORD dwFlag = 0;
+    BOOL result;
+
     if (!GetConsoleMode(hdl, &dwFlag)) {
     if (!GetConsoleMode(hdl, &dwFlag)) {
-       return (int) WriteConsoleA(hdl, NULL, 0, &dwFlag, NULL);
+       result = (int) WriteConsoleA(hdl, NULL, 0, &dwFlag, NULL);
+    } else {
+       result = (int) (dwFlag & ENABLE_PROCESSED_OUTPUT);
     }
     }
-    return (int) (dwFlag & ENABLE_PROCESSED_OUTPUT);
+    return result;
 }
 
 /*   Our replacement for the systems _isatty to include also
 }
 
 /*   Our replacement for the systems _isatty to include also
@@ -1661,13 +1732,16 @@ IsConsoleHandle(HANDLE hdl)
 int
 _nc_mingw_isatty(int fd)
 {
 int
 _nc_mingw_isatty(int fd)
 {
-    if (_isatty(fd))
-       return 1;
-#if WINVER < 0x0600
-    return 0;
-#else
-    return _ismintty(fd, NULL);
+    int result = 0;
+
+    if (_isatty(fd)) {
+       result = 1;
+    } else {
+#if WINVER >= 0x0600
+       result = _ismintty(fd, NULL);
 #endif
 #endif
+    }
+    return result;
 }
 
 /*   This is used when running in terminfo mode to discover,
 }
 
 /*   This is used when running in terminfo mode to discover,
@@ -1693,15 +1767,15 @@ _nc_mingw_isconsole(int fd)
     SCREEN *sp;                                               \
     TERMINAL *term = 0;                                       \
     int code = ERR;                                           \
     SCREEN *sp;                                               \
     TERMINAL *term = 0;                                       \
     int code = ERR;                                           \
-    if (_nc_screen_chain==0)                                  \
-      return 0;                                               \
+    if (_nc_screen_chain == 0)                                \
+        return 0;                                             \
     for (each_screen(sp)) {                                   \
     for (each_screen(sp)) {                                   \
-        if (sp->_term && sp->_term->Filedes==fd) {            \
-           term = sp->_term;                                 \
-           break;                                            \
+        if (sp->_term && (sp->_term->Filedes == fd)) {        \
+            term = sp->_term;                                 \
+            break;                                            \
         }                                                     \
     }                                                         \
         }                                                     \
     }                                                         \
-    assert(term!=0)
+    assert(term != 0)
 
 int
 _nc_mingw_tcsetattr(
 
 int
 _nc_mingw_tcsetattr(
@@ -1855,6 +1929,7 @@ __attribute__((constructor))
        BOOL buffered = TRUE;
        BOOL b;
 
        BOOL buffered = TRUE;
        BOOL b;
 
+       START_TRACE();
        if (_nc_mingw_isatty(0)) {
            CON.isMinTTY = TRUE;
        }
        if (_nc_mingw_isatty(0)) {
            CON.isMinTTY = TRUE;
        }
@@ -1896,9 +1971,11 @@ __attribute__((constructor))
            b = AttachConsole(ATTACH_PARENT_PROCESS);
 
        if (getenv("NCGDB") || getenv("NCURSES_CONSOLE2")) {
            b = AttachConsole(ATTACH_PARENT_PROCESS);
 
        if (getenv("NCGDB") || getenv("NCURSES_CONSOLE2")) {
-           CON.hdl = CON.out;
+           T(("... will not buffer console"));
            buffered = FALSE;
            buffered = FALSE;
+           CON.hdl = CON.out;
        } else {
        } else {
+           T(("... creating console buffer"));
            CON.hdl = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE,
                                                0,
                                                NULL,
            CON.hdl = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE,
                                                0,
                                                NULL,
index 5760a3caec1475b6d795492bfc91ab8f90386779..ba55c0a356973e065c974b70cb04884d8999563a 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20140802) unstable; urgency=low
+ncurses6 (5.9-20140809) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Fri, 01 Aug 2014 19:41:10 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Fri, 08 Aug 2014 20:33:11 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 5760a3caec1475b6d795492bfc91ab8f90386779..ba55c0a356973e065c974b70cb04884d8999563a 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20140802) unstable; urgency=low
+ncurses6 (5.9-20140809) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Fri, 01 Aug 2014 19:41:10 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Fri, 08 Aug 2014 20:33:11 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index fe73e7a9137b34013c31d5281f1b7102ab78e78d..90472eb2f393939a6ffe8c8d0459689364fae37c 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20140802) unstable; urgency=low
+ncurses6 (5.9-20140809) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Fri, 01 Aug 2014 19:41:10 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Fri, 08 Aug 2014 20:33:11 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index c5eb435dd88af29b31f3398662c0e8e3fe39b013..57ff6be04190711bc48ac45c87bbb729c022a549 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.54 2014/08/01 23:41:10 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.55 2014/08/09 00:33:11 tom Exp $\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "5"\r
 !define VERSION_MINOR "9"\r
 !define VERSION_YYYY  "2014"\r
 !define VERSION_MAJOR "5"\r
 !define VERSION_MINOR "9"\r
 !define VERSION_YYYY  "2014"\r
-!define VERSION_MMDD  "0802"\r
+!define VERSION_MMDD  "0809"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index e85e214033ec050495c7e42a1e3e912b31eac556..fbfee71a61e06d239068ec5b1190be3e3bf2f3ac 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 5.9
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 5.9
-Release: 20140802
+Release: 20140809
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 580b96c995e94a8579ba1260b9b237bf19ecdb31..44df9a70f720a9cfe4e7a43c16877d4734f7f418 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 5.9
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 5.9
-Release: 20140802
+Release: 20140809
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 6c5ad996c5ba74821bf25211921cd95dd15902ec..291851b80e8b595841d382f280d5f0206d0e2e47 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: background.c,v 1.14 2014/02/01 22:10:42 tom Exp $
+ * $Id: background.c,v 1.15 2014/08/09 22:31:23 tom Exp $
  */
 
 #define NEED_COLOR_CODE 1
  */
 
 #define NEED_COLOR_CODE 1
@@ -65,7 +65,7 @@ test_background(void)
     printw("Initializing pair 3 to %s/cyan (ACS_HLINE)\n", color_name(default_fg));
     init_pair(3, (NCURSES_COLOR_T) default_fg, COLOR_CYAN);
     printw("...and drawing a box which should be followed by lines\n");
     printw("Initializing pair 3 to %s/cyan (ACS_HLINE)\n", color_name(default_fg));
     init_pair(3, (NCURSES_COLOR_T) default_fg, COLOR_CYAN);
     printw("...and drawing a box which should be followed by lines\n");
-    bkgdset(ACS_HLINE | COLOR_PAIR(3));
+    bkgdset(ACS_HLINE | (attr_t) COLOR_PAIR(3));
     /*
      * Characters from vt100 line-drawing should be mapped to line-drawing,
      * since A_ALTCHARSET is set in the background, and the character part
     /*
      * Characters from vt100 line-drawing should be mapped to line-drawing,
      * since A_ALTCHARSET is set in the background, and the character part
index c158cbb07251847f3b10bf155f943d5a102f8210..a74f64300ad27daf8888bea0919e2df68ab2b65d 100644 (file)
--- a/test/bs.c
+++ b/test/bs.c
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -34,7 +34,7 @@
  * v2.0 featuring strict ANSI/POSIX conformance, November 1993.
  * v2.1 with ncurses mouse support, September 1995
  *
  * v2.0 featuring strict ANSI/POSIX conformance, November 1993.
  * v2.1 with ncurses mouse support, September 1995
  *
- * $Id: bs.c,v 1.62 2013/11/16 19:57:56 tom Exp $
+ * $Id: bs.c,v 1.63 2014/08/09 22:27:12 tom Exp $
  */
 
 #include <test.priv.h>
  */
 
 #include <test.priv.h>
@@ -369,7 +369,7 @@ initgame(void)
        MvAddCh(PYBASE + i, PXBASE - 3, (chtype) (i + 'A'));
 #ifdef A_COLOR
        if (has_colors())
        MvAddCh(PYBASE + i, PXBASE - 3, (chtype) (i + 'A'));
 #ifdef A_COLOR
        if (has_colors())
-           attron((attr_t) COLOR_PAIR(COLOR_BLUE));
+           attron(COLOR_PAIR(COLOR_BLUE));
 #endif /* A_COLOR */
        (void) addch(' ');
        for (j = 0; j < BWIDTH; j++)
 #endif /* A_COLOR */
        (void) addch(' ');
        for (j = 0; j < BWIDTH; j++)
@@ -387,7 +387,7 @@ initgame(void)
        MvAddCh(CYBASE + i, CXBASE - 3, (chtype) (i + 'A'));
 #ifdef A_COLOR
        if (has_colors())
        MvAddCh(CYBASE + i, CXBASE - 3, (chtype) (i + 'A'));
 #ifdef A_COLOR
        if (has_colors())
-           attron((attr_t) COLOR_PAIR(COLOR_BLUE));
+           attron(COLOR_PAIR(COLOR_BLUE));
 #endif /* A_COLOR */
        (void) addch(' ');
        for (j = 0; j < BWIDTH; j++)
 #endif /* A_COLOR */
        (void) addch(' ');
        for (j = 0; j < BWIDTH; j++)
@@ -771,7 +771,7 @@ hitship(int x, int y)
                                    cgoto(y1, x1);
 #ifdef A_COLOR
                                    if (has_colors())
                                    cgoto(y1, x1);
 #ifdef A_COLOR
                                    if (has_colors())
-                                       attron((attr_t) COLOR_PAIR(COLOR_GREEN));
+                                       attron(COLOR_PAIR(COLOR_GREEN));
 #endif /* A_COLOR */
                                    (void) addch(MARK_MISS);
 #ifdef A_COLOR
 #endif /* A_COLOR */
                                    (void) addch(MARK_MISS);
 #ifdef A_COLOR
@@ -797,7 +797,7 @@ hitship(int x, int y)
                        pgoto(y1, x1);
 #ifdef A_COLOR
                        if (has_colors())
                        pgoto(y1, x1);
 #ifdef A_COLOR
                        if (has_colors())
-                           attron((attr_t) COLOR_PAIR(COLOR_RED));
+                           attron(COLOR_PAIR(COLOR_RED));
 #endif /* A_COLOR */
                        (void) addch(SHOWHIT);
 #ifdef A_COLOR
 #endif /* A_COLOR */
                        (void) addch(SHOWHIT);
 #ifdef A_COLOR
@@ -836,9 +836,9 @@ plyturn(void)
 #ifdef A_COLOR
     if (has_colors()) {
        if (hit)
 #ifdef A_COLOR
     if (has_colors()) {
        if (hit)
-           attron((attr_t) COLOR_PAIR(COLOR_RED));
+           attron(COLOR_PAIR(COLOR_RED));
        else
        else
-           attron((attr_t) COLOR_PAIR(COLOR_GREEN));
+           attron(COLOR_PAIR(COLOR_GREEN));
     }
 #endif /* A_COLOR */
     (void) addch((chtype) hits[PLAYER][curx][cury]);
     }
 #endif /* A_COLOR */
     (void) addch((chtype) hits[PLAYER][curx][cury]);
@@ -969,9 +969,9 @@ cpufire(int x, int y)
 #ifdef A_COLOR
     if (has_colors()) {
        if (hit)
 #ifdef A_COLOR
     if (has_colors()) {
        if (hit)
-           attron((attr_t) COLOR_PAIR(COLOR_RED));
+           attron(COLOR_PAIR(COLOR_RED));
        else
        else
-           attron((attr_t) COLOR_PAIR(COLOR_GREEN));
+           attron(COLOR_PAIR(COLOR_GREEN));
     }
 #endif /* A_COLOR */
     (void) addch((chtype) (hit ? SHOWHIT : SHOWSPLASH));
     }
 #endif /* A_COLOR */
     (void) addch((chtype) (hit ? SHOWHIT : SHOWSPLASH));
index dc767116d33055666d859559f55c406ee815c09d..c344280a9c51fa8cccdf1a8db491975bba8307ae 100644 (file)
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey
  *
 /*
  * Author: Thomas E. Dickey
  *
- * $Id: dots_curses.c,v 1.2 2014/06/28 20:33:24 tom Exp $
+ * $Id: dots_curses.c,v 1.3 2014/08/09 22:28:42 tom Exp $
  *
  * A simple demo of the curses interface used for comparison with termcap.
  */
  *
  * A simple demo of the curses interface used for comparison with termcap.
  */
@@ -82,7 +82,7 @@ set_colors(int fg, int bg)
 {
     int pair = mypair(fg, bg);
     if (pair > 0) {
 {
     int pair = mypair(fg, bg);
     if (pair > 0) {
-       attron((attr_t) COLOR_PAIR(mypair(fg, bg)));
+       attron(COLOR_PAIR(mypair(fg, bg)));
     }
 }
 
     }
 }
 
@@ -127,7 +127,7 @@ main(int argc GCC_UNUSED,
            z = (int) (ranf() * COLORS);
            if (ranf() > 0.01) {
                set_colors(fg = z, bg);
            z = (int) (ranf() * COLORS);
            if (ranf() > 0.01) {
                set_colors(fg = z, bg);
-               attron((attr_t) COLOR_PAIR(mypair(fg, bg)));
+               attron(COLOR_PAIR(mypair(fg, bg)));
            } else {
                set_colors(fg, bg = z);
                napms(1);
            } else {
                set_colors(fg, bg = z);
                napms(1);
index 8cb0833aa023b1e158dfb41b62ea2d5e143489e5..c9ac29ade8ce2e99d074dbd7faf5260838993f45 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 2006-2010,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 2006-2012,2014 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: echochar.c,v 1.9 2012/06/09 20:30:32 tom Exp $
+ * $Id: echochar.c,v 1.10 2014/08/09 22:35:51 tom Exp $
  *
  * Demonstrate the echochar function (compare to dots.c).
  * Thomas Dickey - 2006/11/4
  *
  * Demonstrate the echochar function (compare to dots.c).
  * Thomas Dickey - 2006/11/4
@@ -74,7 +74,7 @@ set_color(char *my_pairs, int fg, int bg)
                  (short) fg,
                  (short) bg);
     }
                  (short) fg,
                  (short) bg);
     }
-    attron((attr_t) COLOR_PAIR(pair));
+    attron(COLOR_PAIR(pair));
 }
 
 int
 }
 
 int
index b90012fe6b340b16316d27a14fcfda91e4716cd0..ab2d8562d996bf66799db66e717d9c3dbd4bdc78 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2012,2014 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -29,7 +29,7 @@
 /*
  * Author:  Thomas E. Dickey <dickey@clark.net> 1998
  *
 /*
  * Author:  Thomas E. Dickey <dickey@clark.net> 1998
  *
- * $Id: filter.c,v 1.15 2012/06/09 20:30:32 tom Exp $
+ * $Id: filter.c,v 1.16 2014/08/09 22:35:51 tom Exp $
  */
 #include <test.priv.h>
 
  */
 #include <test.priv.h>
 
@@ -48,7 +48,7 @@
  */
 
 static int
  */
 
 static int
-new_command(char *buffer, int length, attr_t underline)
+new_command(char *buffer, int length, int underline)
 {
     int code;
 
 {
     int code;
 
@@ -99,7 +99,7 @@ main(int argc, char *argv[])
 {
     int ch;
     char buffer[80];
 {
     int ch;
     char buffer[80];
-    attr_t underline;
+    int underline;
     bool i_option = FALSE;
 
     setlocale(LC_ALL, "");
     bool i_option = FALSE;
 
     setlocale(LC_ALL, "");
@@ -133,7 +133,7 @@ main(int argc, char *argv[])
            background = -1;
 #endif
        init_pair(1, COLOR_CYAN, (short) background);
            background = -1;
 #endif
        init_pair(1, COLOR_CYAN, (short) background);
-       underline = (attr_t) COLOR_PAIR(1);
+       underline = COLOR_PAIR(1);
     } else {
        underline = A_UNDERLINE;
     }
     } else {
        underline = A_UNDERLINE;
     }
index 45eb39f4514a02f7a74a109cdada0acdb5bdd56a..04ea1b6b4c460154bb582c223bf3664b356caa1d 100644 (file)
@@ -33,7 +33,7 @@
  * modified 10-18-89 for curses (jrl)
  * 10-18-89 added signal handling
  *
  * modified 10-18-89 for curses (jrl)
  * 10-18-89 added signal handling
  *
- * $Id: gdc.c,v 1.41 2014/08/02 16:36:20 tom Exp $
+ * $Id: gdc.c,v 1.42 2014/08/09 22:28:42 tom Exp $
  */
 
 #include <test.priv.h>
  */
 
 #include <test.priv.h>
@@ -121,13 +121,13 @@ standt(int on)
 {
     if (on) {
        if (hascolor) {
 {
     if (on) {
        if (hascolor) {
-           attron((attr_t) COLOR_PAIR(PAIR_DIGITS));
+           attron(COLOR_PAIR(PAIR_DIGITS));
        } else {
            attron(A_STANDOUT);
        }
     } else {
        if (hascolor) {
        } else {
            attron(A_STANDOUT);
        }
     } else {
        if (hascolor) {
-           attron((attr_t) COLOR_PAIR(PAIR_OTHERS));
+           attron(COLOR_PAIR(PAIR_OTHERS));
        } else {
            attroff(A_STANDOUT);
        }
        } else {
            attroff(A_STANDOUT);
        }
index a6a87d7f79d21c4fe62a4729a99b1d91f405c7c4..345eadebfdbca6ff922cadcfc61a79d637a976e7 100644 (file)
@@ -40,7 +40,7 @@ AUTHOR
    Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
            Thomas E. Dickey (beginning revision 1.27 in 1996).
 
    Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
            Thomas E. Dickey (beginning revision 1.27 in 1996).
 
-$Id: ncurses.c,v 1.414 2014/08/02 23:10:26 tom Exp $
+$Id: ncurses.c,v 1.415 2014/08/09 22:28:42 tom Exp $
 
 ***************************************************************************/
 
 
 ***************************************************************************/
 
@@ -2235,13 +2235,13 @@ color_test(void)
                NCURSES_COLOR_T bg = InxToBG(i);
 
                init_pair(pair, fg, bg);
                NCURSES_COLOR_T bg = InxToBG(i);
 
                init_pair(pair, fg, bg);
-               attron((attr_t) COLOR_PAIR(pair));
+               attron(COLOR_PAIR(pair));
                if (opt_acsc)
                if (opt_acsc)
-                   attron((attr_t) A_ALTCHARSET);
+                   attron(A_ALTCHARSET);
                if (opt_bold)
                if (opt_bold)
-                   attron((attr_t) A_BOLD);
+                   attron(A_BOLD);
                if (opt_revs)
                if (opt_revs)
-                   attron((attr_t) A_REVERSE);
+                   attron(A_REVERSE);
 
                if (opt_nums) {
                    sprintf(numbered, "{%02X}", (int) i);
 
                if (opt_nums) {
                    sprintf(numbered, "{%02X}", (int) i);
@@ -2446,11 +2446,11 @@ wide_color_test(void)
                init_pair(pair, InxToFG(i), InxToBG(i));
                (void) color_set(pair, NULL);
                if (opt_acsc)
                init_pair(pair, InxToFG(i), InxToBG(i));
                (void) color_set(pair, NULL);
                if (opt_acsc)
-                   attr_on((attr_t) A_ALTCHARSET, NULL);
+                   attr_on(A_ALTCHARSET, NULL);
                if (opt_bold)
                if (opt_bold)
-                   attr_on((attr_t) A_BOLD, NULL);
+                   attr_on(A_BOLD, NULL);
                if (opt_revs)
                if (opt_revs)
-                   attr_on((attr_t) A_REVERSE, NULL);
+                   attr_on(A_REVERSE, NULL);
 
                if (opt_nums) {
                    sprintf(numbered, "{%02X}", i);
 
                if (opt_nums) {
                    sprintf(numbered, "{%02X}", i);