]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.8 - patch 20110307
authorThomas E. Dickey <dickey@invisible-island.net>
Tue, 8 Mar 2011 02:01:18 +0000 (02:01 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Tue, 8 Mar 2011 02:01:18 +0000 (02:01 +0000)
+ revert changes to limit-checks from 20110122 (Debian #616711).
> minor type-cleanup of Ada95 binding (Nicolas Boulenguez):
+ corrected a minor sign error in a field of Low_Level_Field_Type, to
  conform to form.h.
+ replaced C_Int by Curses_Bool as return type for some callbacks, see
  fieldtype(3FORM).
+ modify samples/sample-explain.adb to provide explicit message when
  explain.txt is not found.

Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4
Ada95/samples/sample-explanation.adb
Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb
Ada95/src/terminal_interface-curses-forms-field_types-user-choice.ads
Ada95/src/terminal_interface-curses-forms-field_types-user.adb
Ada95/src/terminal_interface-curses-forms-field_types-user.ads
Ada95/src/terminal_interface-curses-forms-field_types.adb
NEWS
dist.mk
ncurses/base/lib_newwin.c

index 36314012ed9b4d075464abfd0f3baf1f2cbbad5d..c7082b42eddaa47f3bfb076842cfd7115098c995 100644 (file)
@@ -10,7 +10,7 @@ include(M4MACRO)dnl
 --                                 S P E C                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc.              --
+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc.              --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -38,7 +38,7 @@ include(M4MACRO)dnl
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.15 $
+--  $Revision: 1.16 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Interfaces.C;
@@ -101,15 +101,15 @@ private
    pragma Convention (C, Freearg_Function);
 
    type Field_Check_Function is access
-     function (Fld : Field; Usr : System.Address) return C_Int;
+     function (Fld : Field; Usr : System.Address) return Curses_Bool;
    pragma Convention (C, Field_Check_Function);
 
    type Char_Check_Function is access
-     function (Ch : C_Int; Usr : System.Address) return C_Int;
+     function (Ch : C_Int; Usr : System.Address) return Curses_Bool;
    pragma Convention (C, Char_Check_Function);
 
    type Choice_Function is access
-     function (Fld : Field; Usr : System.Address) return C_Int;
+     function (Fld : Field; Usr : System.Address) return Curses_Bool;
    pragma Convention (C, Choice_Function);
 
    --  +----------------------------------------------------------------------
@@ -117,7 +117,7 @@ private
    --  |
    type Low_Level_Field_Type is
       record
-         Status :              Interfaces.C.short;
+         Status :              Interfaces.C.unsigned_short;
          Ref_Count :           Interfaces.C.long;
          Left, Right :         System.Address;
          Makearg :             Makearg_Function;
@@ -174,7 +174,7 @@ private
    --  introduced by this binding.
 
    function Field_Check_Router (Fld : Field;
-                                Usr : System.Address) return C_Int;
+                                Usr : System.Address) return Curses_Bool;
    pragma Convention (C, Field_Check_Router);
    --  This is the Field_Check_Function for the internal low-level types
    --  introduced to wrap the low-level types by a Field_Type derived
@@ -182,7 +182,7 @@ private
    --  function.
 
    function Char_Check_Router (Ch : C_Int;
-                               Usr : System.Address) return C_Int;
+                               Usr : System.Address) return Curses_Bool;
    pragma Convention (C, Char_Check_Router);
    --  This is the Char_Check_Function for the internal low-level types
    --  introduced to wrap the low-level types by a Field_Type derived
@@ -190,7 +190,7 @@ private
    --  function.
 
    function Next_Router (Fld : Field;
-                         Usr : System.Address) return C_Int;
+                         Usr : System.Address) return Curses_Bool;
    pragma Convention (C, Next_Router);
    --  This is the Choice_Function for the internal low-level types
    --  introduced to wrap the low-level types by a Field_Type derived
@@ -198,7 +198,7 @@ private
    --  function.
 
    function Prev_Router (Fld : Field;
-                         Usr : System.Address) return C_Int;
+                         Usr : System.Address) return Curses_Bool;
    pragma Convention (C, Prev_Router);
    --  This is the Choice_Function for the internal low-level types
    --  introduced to wrap the low-level types by a Field_Type derived
index 93c497c39b80fb74f69787abcf00853576eff722..09f882c32ed4718fd7529a70ce2e4681c804fa5b 100644 (file)
@@ -35,8 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control
---  $Revision: 1.22 $
---  $Date: 2011/03/06 01:22:23 $
+--  $Revision: 1.23 $
+--  $Date: 2011/03/08 00:44:36 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 --  Poor mans help system. This scans a sequential file for key lines and
@@ -405,4 +405,10 @@ package body Sample.Explanation is
 
 begin
    Open (F, In_File, File_Name);
+exception
+   when Name_Error =>
+      Put_Line (Standard_Error,
+                "The file explain.txt was not found in the current directory."
+                );
+      raise;
 end Sample.Explanation;
index f26a42cdca123380d1cebd2b5ddd2084ac44c0e3..2a3ae47744ad8876c7df1e660251f4103736072f 100644 (file)
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998-2006,2008 Free Software Foundation, Inc.              --
+-- Copyright (c) 1998-2008,2011 Free Software Foundation, Inc.              --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,8 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.15 $
---  $Date: 2008/07/26 18:48:58 $
+--  $Revision: 1.16 $
+--  $Date: 2011/03/08 01:16:49 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Ada.Unchecked_Conversion;
@@ -50,7 +50,7 @@ package body Terminal_Interface.Curses.Forms.Field_Types.User.Choice is
    pragma Warnings (On);
 
    function Generic_Next (Fld : Field;
-                          Usr : System.Address) return C_Int
+                          Usr : System.Address) return Curses_Bool
    is
       Result : Boolean;
       Udf    : constant User_Defined_Field_Type_With_Choice_Access :=
@@ -58,11 +58,11 @@ package body Terminal_Interface.Curses.Forms.Field_Types.User.Choice is
         (To_Argument_Access (Usr).Typ);
    begin
       Result := Next (Fld, Udf.all);
-      return C_Int (Boolean'Pos (Result));
+      return Curses_Bool (Boolean'Pos (Result));
    end Generic_Next;
 
    function Generic_Prev (Fld : Field;
-                          Usr : System.Address) return C_Int
+                          Usr : System.Address) return Curses_Bool
    is
       Result : Boolean;
       Udf    : constant User_Defined_Field_Type_With_Choice_Access :=
@@ -70,7 +70,7 @@ package body Terminal_Interface.Curses.Forms.Field_Types.User.Choice is
         (To_Argument_Access (Usr).Typ);
    begin
       Result := Previous (Fld, Udf.all);
-      return C_Int (Boolean'Pos (Result));
+      return Curses_Bool (Boolean'Pos (Result));
    end Generic_Prev;
 
    --  -----------------------------------------------------------------------
index 1e69f43a915fdb92bd6a04166b70b62c98bb1d2e..0707ddcaa18e2ca3130038e5beff02e4f7622221 100644 (file)
@@ -7,7 +7,7 @@
 --                                 S P E C                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998,2008 Free Software Foundation, Inc.                   --
+-- Copyright (c) 1998-2008,2011 Free Software Foundation, Inc.              --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,8 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.12 $
---  $Date: 2008/07/26 18:49:20 $
+--  $Revision: 1.13 $
+--  $Date: 2011/03/08 01:16:49 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Interfaces.C;
@@ -78,14 +78,14 @@ private
    function C_Generic_Choice return C_Field_Type;
 
    function Generic_Next (Fld : Field;
-                          Usr : System.Address) return C_Int;
+                          Usr : System.Address) return Curses_Bool;
    pragma Convention (C, Generic_Next);
    --  This is the generic next Choice_Function for the low-level fieldtype
    --  representing all the User_Defined_Field_Type derivates. It routes
    --  the call to the Next implementation for the type.
 
    function Generic_Prev (Fld : Field;
-                          Usr : System.Address) return C_Int;
+                          Usr : System.Address) return Curses_Bool;
    pragma Convention (C, Generic_Prev);
    --  This is the generic prev Choice_Function for the low-level fieldtype
    --  representing all the User_Defined_Field_Type derivates. It routes
index 695f919719326e635332cff14d4dad845746e361..31874a5d4f6421fc787232b9f88166ffd0ac9ef7 100644 (file)
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              --
+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc.              --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,8 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.16 $
---  $Date: 2009/12/26 17:38:58 $
+--  $Revision: 1.17 $
+--  $Date: 2011/03/08 01:16:49 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Ada.Unchecked_Conversion;
@@ -82,25 +82,25 @@ package body Terminal_Interface.Curses.Forms.Field_Types.User is
    pragma Warnings (On);
 
    function Generic_Field_Check (Fld : Field;
-                                 Usr : System.Address) return C_Int
+                                 Usr : System.Address) return Curses_Bool
    is
       Result : Boolean;
       Udf    : constant User_Defined_Field_Type_Access :=
         User_Defined_Field_Type_Access (To_Argument_Access (Usr).Typ);
    begin
       Result := Field_Check (Fld, Udf.all);
-      return C_Int (Boolean'Pos (Result));
+      return Curses_Bool (Boolean'Pos (Result));
    end Generic_Field_Check;
 
    function Generic_Char_Check (Ch  : C_Int;
-                                Usr : System.Address) return C_Int
+                                Usr : System.Address) return Curses_Bool
    is
       Result : Boolean;
       Udf    : constant User_Defined_Field_Type_Access :=
         User_Defined_Field_Type_Access (To_Argument_Access (Usr).Typ);
    begin
       Result := Character_Check (Character'Val (Ch), Udf.all);
-      return C_Int (Boolean'Pos (Result));
+      return Curses_Bool (Boolean'Pos (Result));
    end Generic_Char_Check;
 
    --  -----------------------------------------------------------------------
index af45fab492288a0d864dc61dd327f3aeedd702c1..d7ae8943c9b50ff62d3e8e35812c887434e4d246 100644 (file)
@@ -7,7 +7,7 @@
 --                                 S P E C                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              --
+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc.              --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,8 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.13 $
---  $Date: 2009/12/26 17:38:58 $
+--  $Revision: 1.14 $
+--  $Date: 2011/03/08 01:16:49 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Interfaces.C;
@@ -79,14 +79,14 @@ private
    function C_Generic_Type   return C_Field_Type;
 
    function Generic_Field_Check (Fld : Field;
-                                 Usr : System.Address) return C_Int;
+                                 Usr : System.Address) return Curses_Bool;
    pragma Convention (C, Generic_Field_Check);
    --  This is the generic Field_Check_Function for the low-level fieldtype
    --  representing all the User_Defined_Field_Type derivates. It routes
    --  the call to the Field_Check implementation for the type.
 
    function Generic_Char_Check (Ch  : C_Int;
-                                Usr : System.Address) return C_Int;
+                                Usr : System.Address) return Curses_Bool;
    pragma Convention (C, Generic_Char_Check);
    --  This is the generic Char_Check_Function for the low-level fieldtype
    --  representing all the User_Defined_Field_Type derivates. It routes
index aef5d3c8a389b259a4f1af235b17472ef1339d4a..117f1a5a13e13d0866559ebd6c504b5a18691d13 100644 (file)
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              --
+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc.              --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
@@ -35,8 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.21 $
---  $Date: 2009/12/26 17:38:58 $
+--  $Revision: 1.22 $
+--  $Date: 2011/03/08 01:16:49 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
@@ -177,7 +177,7 @@ package body Terminal_Interface.Curses.Forms.Field_Types is
    end Wrap_Builtin;
 
    function Field_Check_Router (Fld : Field;
-                                Usr : System.Address) return C_Int
+                                Usr : System.Address) return Curses_Bool
    is
       Arg  : constant Argument_Access := To_Argument_Access (Usr);
    begin
@@ -191,7 +191,7 @@ package body Terminal_Interface.Curses.Forms.Field_Types is
    end Field_Check_Router;
 
    function Char_Check_Router (Ch  : C_Int;
-                               Usr : System.Address) return C_Int
+                               Usr : System.Address) return Curses_Bool
    is
       Arg  : constant Argument_Access := To_Argument_Access (Usr);
    begin
@@ -205,7 +205,7 @@ package body Terminal_Interface.Curses.Forms.Field_Types is
    end Char_Check_Router;
 
    function Next_Router (Fld : Field;
-                         Usr : System.Address) return C_Int
+                         Usr : System.Address) return Curses_Bool
    is
       Arg  : constant Argument_Access := To_Argument_Access (Usr);
    begin
@@ -219,7 +219,7 @@ package body Terminal_Interface.Curses.Forms.Field_Types is
    end Next_Router;
 
    function Prev_Router (Fld : Field;
-                         Usr : System.Address) return C_Int
+                         Usr : System.Address) return Curses_Bool
    is
       Arg  : constant Argument_Access := To_Argument_Access (Usr);
    begin
diff --git a/NEWS b/NEWS
index 18a5c2d3fe2fc26ca43429e583e2a71b28dc8db0..c211ade2f1d376261ccd2df5f021b8d92425c08e 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.1654 2011/03/06 01:25:25 tom Exp $
+-- $Id: NEWS,v 1.1656 2011/03/08 01:14:45 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,16 @@ 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.
 
+20110307
+       + revert changes to limit-checks from 20110122 (Debian #616711).
+       > minor type-cleanup of Ada95 binding (Nicolas Boulenguez):
+       + corrected a minor sign error in a field of Low_Level_Field_Type, to
+         conform to form.h.
+       + replaced C_Int by Curses_Bool as return type for some callbacks, see
+         fieldtype(3FORM).
+       + modify samples/sample-explain.adb to provide explicit message when
+         explain.txt is not found.
+
 20110305
        + improve makefiles for Ada95 tree (patch by Nicolas Boulenguez).
        + fix an off-by-one error in _nc_slk_initialize() from 20100605 fixes
diff --git a/dist.mk b/dist.mk
index 7dc34c1bff65ba21202138f3db1c34d977aa6ed2..527c4e1f87c1ae1dd04881d099651f472c66c631 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.801 2011/03/05 15:31:36 tom Exp $
+# $Id: dist.mk,v 1.802 2011/03/07 21:54:44 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 = 8
-NCURSES_PATCH = 20110305
+NCURSES_PATCH = 20110307
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 2b120eac10c79c3adc303c2039040470f7a41c36..72d8af84b70314d67a20e146bf1c3fc65c688bfd 100644 (file)
@@ -43,7 +43,7 @@
 #include <curses.priv.h>
 #include <stddef.h>
 
-MODULE_ID("$Id: lib_newwin.c,v 1.68 2011/01/22 20:34:15 tom Exp $")
+MODULE_ID("$Id: lib_newwin.c,v 1.69 2011/03/07 21:58:17 tom Exp $")
 
 #define window_is(name) ((sp)->_##name == win)
 
@@ -141,7 +141,7 @@ NCURSES_SP_NAME(newwin) (NCURSES_SP_DCLx
     T((T_CALLED("newwin(%p, %d,%d,%d,%d)"), (void *) SP_PARM, num_lines, num_columns,
        begy, begx));
 
-    if (begy < 0 || begx < 0 || num_lines <= 0 || num_columns <= 0)
+    if (begy < 0 || begx < 0 || num_lines < 0 || num_columns < 0)
        returnWin(0);
 
     if (num_lines == 0)
@@ -198,7 +198,7 @@ derwin(WINDOW *orig, int num_lines, int num_columns, int begy, int begx)
     /*
      * make sure window fits inside the original one
      */
-    if (begy < 0 || begx < 0 || orig == 0 || num_lines <= 0 || num_columns <= 0)
+    if (begy < 0 || begx < 0 || orig == 0 || num_lines < 0 || num_columns < 0)
        returnWin(0);
     if (begy + num_lines > orig->_maxy + 1
        || begx + num_columns > orig->_maxx + 1)