-- 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 --
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.15 $
+-- $Revision: 1.16 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Interfaces.C;
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);
-- +----------------------------------------------------------------------
-- |
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;
-- 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
-- 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
-- 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
-- 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
------------------------------------------------------------------------------
-- 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
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;
-- 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 --
------------------------------------------------------------------------------
-- 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;
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 :=
(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 :=
(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;
-- -----------------------------------------------------------------------
-- 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 --
------------------------------------------------------------------------------
-- 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;
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
-- 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 --
------------------------------------------------------------------------------
-- 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;
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;
-- -----------------------------------------------------------------------
-- 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 --
------------------------------------------------------------------------------
-- 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;
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
-- 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 --
------------------------------------------------------------------------------
-- 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;
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
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
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
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
-- 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
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
# 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
# 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)
#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)
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)
/*
* 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)