-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2007,2008 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.4 $
--- $Date: 2007/05/05 20:09:10 $
+-- $Revision: 1.5 $
+-- $Date: 2008/07/26 18:46:32 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with System;
raise Constraint_Error;
end if;
if Integer (Fore) >= Number_Of_Colors or else
- Integer (Back) >= Number_Of_Colors then raise Constraint_Error;
+ Integer (Back) >= Number_Of_Colors then
+ raise Constraint_Error;
end if;
if Initpair (C_Short (Pair), C_Short (Fore), C_Short (Back))
= Curses_Err then
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2006,2008 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: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.7 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.8 $
+-- $Date: 2008/07/26 18:47:42 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-- Windows and scrolling tester.
current := current.last;
end if;
when Character'Pos ('F') mod 16#20# => -- Ctrl('F')
- if current /= null and HaveScroll (current.wind) then
+ if current /= null and then HaveScroll (current.wind) then
Scroll (current.wind, 1);
end if;
when Character'Pos ('B') mod 16#20# => -- Ctrl('B')
- if current /= null and HaveScroll (current.wind) then
+ if current /= null and then HaveScroll (current.wind) then
-- The C version of Scroll may return ERR which is ignored
-- we need to avoid the exception
-- with the 'and HaveScroll(current.wind)'
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2006,2008 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: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.5 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.6 $
+-- $Date: 2008/07/26 18:47:34 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
n := show_1_acs (n, "ACS_Not_Equal", ACS_Map (ACS_Not_Equal));
n := show_1_acs (n, "ACS_Sterling", ACS_Map (ACS_Sterling));
+ if n = 0 then
+ raise Constraint_Error;
+ end if;
end show_acs_chars;
c1 : Key_Code;
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2006,2007 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2007,2008 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: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.8 $
--- $Date: 2007/05/05 21:28:18 $
+-- $Revision: 1.9 $
+-- $Date: 2008/07/26 18:47:26 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
end if;
m := rest mod 2;
rest := rest / 2;
--- if 1 = m then
--- a.Protected_Character := True;
--- end if;
+ if 1 = m then
+ a.Protected_Character := True;
+ end if;
m := rest mod 2;
rest := rest / 2;
if 1 = m then
begin
-- row := 2; -- weird, row is set to 0 without this.
-- TODO delete the above line, it was a gdb quirk that confused me
- if Has_Colors then declare
- pair : constant Color_Pair :=
+ if Has_Colors then
+ declare pair : constant Color_Pair :=
Color_Pair (fg * Color_Number (Number_Of_Colors) + bg);
- begin
- -- Go though each color pair. Assume that the number of
- -- Redefinable_Color_Pairs is 8*8 with predefined Colors 0..7
- if not pairs (pair) then
- Init_Pair (pair, fg, bg);
- pairs (pair) := True;
- end if;
- normal.Color := pair;
- end;
+ begin
+ -- Go though each color pair. Assume that the number of
+ -- Redefinable_Color_Pairs is 8*8 with predefined Colors 0..7
+ if not pairs (pair) then
+ Init_Pair (pair, fg, bg);
+ pairs (pair) := True;
+ end if;
+ normal.Color := pair;
+ end;
end if;
Set_Background (Ch => normal);
Erase;
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2006,2008 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: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.2 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.3 $
+-- $Date: 2008/07/26 18:47:17 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
color_names : constant array (0 .. 15) of String (1 .. 7) :=
(
- "black",
- "red",
- "green",
- "yellow",
- "blue",
+ "black ",
+ "red ",
+ "green ",
+ "yellow ",
+ "blue ",
"magenta",
- "cyan",
- "white",
- "BLACK",
- "RED",
- "GREEN",
- "YELLOW",
- "BLUE",
+ "cyan ",
+ "white ",
+ "BLACK ",
+ "RED ",
+ "GREEN ",
+ "YELLOW ",
+ "BLUE ",
"MAGENTA",
- "CYAN",
- "WHITE"
+ "CYAN ",
+ "WHITE "
);
procedure show_color_name (y, x : Integer; color : Integer) is
end if;
if Number_Of_Colors > 8 then
- hello := "Test";
+ hello := "Test ";
else
hello := "Hello";
end if;
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2006,2008 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: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.6 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.7 $
+-- $Date: 2008/07/26 18:47:06 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
Update_Screen;
- if timing then declare
- s : String (1 .. 7);
- elapsed : Long_Float;
- begin
- after := gettime;
- elapsed := (Long_Float (after.seconds - before.seconds) +
- Long_Float (after.microseconds - before.microseconds)
- / 1.0e6);
- Move_Cursor (Line => Lines - 1, Column => Columns - 20);
- floatio.Put (s, elapsed, Aft => 3, Exp => 0);
- Add (Str => s);
- Refresh;
- end;
+ if timing then
+ declare
+ s : String (1 .. 7);
+ elapsed : Long_Float;
+ begin
+ after := gettime;
+ elapsed := (Long_Float (after.seconds - before.seconds) +
+ Long_Float (after.microseconds
+ - before.microseconds)
+ / 1.0e6);
+ Move_Cursor (Line => Lines - 1, Column => Columns - 20);
+ floatio.Put (s, elapsed, Aft => 3, Exp => 0);
+ Add (Str => s);
+ Refresh;
+ end;
end if;
c := pgetc (pad);
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2006,2008 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: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.2 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.3 $
+-- $Date: 2008/07/26 18:46:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-with Ada.Text_IO;
-with Ada.Strings.Bounded;
-
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
-with Interfaces.C;
-with Interfaces.C.Strings;
-
package body ncurses2.genericPuts is
procedure myGet (Win : in Window := Standard_Window;
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2006,2008 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: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.6 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.7 $
+-- $Date: 2008/07/26 18:46:58 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-- Character input test
Put (tmp6, Integer (c), 8);
Add (Str => tmp6);
Add (Ch => ' ');
- if c = Key_Mouse then declare
- event : Mouse_Event;
- begin
- event := Get_Mouse;
- Add (Str => "KEY_MOUSE, ");
- Add (Str => mouse_decode (event));
- Add (Ch => newl);
- end;
+ if c = Key_Mouse then
+ declare
+ event : Mouse_Event;
+ begin
+ event := Get_Mouse;
+ Add (Str => "KEY_MOUSE, ");
+ Add (Str => mouse_decode (event));
+ Add (Ch => newl);
+ end;
elsif c >= Key_Min then
Key_Name (c, tmp20);
Add (Str => tmp20);
Add (Str => " (high-half character)");
Add (Ch => newl);
end;
- else declare
- c2 : constant Character := Character'Val (c mod 16#80#);
- begin
- if Ada.Characters.Handling.Is_Graphic (c2) then
- Add (Ch => c2);
- Add (Str => " (ASCII printable character)");
- Add (Ch => newl);
- else
- Add (Str => Un_Control ((Ch => c2,
- Color => Color_Pair'First,
- Attr => Normal_Video)));
- Add (Str => " (ASCII control character)");
- Add (Ch => newl);
- end if;
- end;
+ else
+ declare
+ c2 : constant Character := Character'Val (c mod 16#80#);
+ begin
+ if Ada.Characters.Handling.Is_Graphic (c2) then
+ Add (Ch => c2);
+ Add (Str => " (ASCII printable character)");
+ Add (Ch => newl);
+ else
+ Add (Str => Un_Control ((Ch => c2,
+ Color => Color_Pair'First,
+ Attr => Normal_Video)));
+ Add (Str => " (ASCII control character)");
+ Add (Ch => newl);
+ end if;
+ end;
end if;
-- TODO I am not sure why this was in the C version
-- the delay statement scroll anyway.
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000,2004 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2004,2008 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: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.6 $
--- $Date: 2004/08/21 21:37:00 $
+-- $Revision: 1.7 $
+-- $Date: 2008/07/26 18:46:44 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-- A simplified version of the GNU getopt function
Put_Line (Standard_Error,
argv (optind) &
": option requires an argument -- " & c);
- if optstring (1) = ':' then
+ if optstring (optstring'First) = ':' then
c := ':';
else
c := '?';
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2006,2008 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: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.7 $
--- $Date: 2007/05/05 18:02:40 $
+-- $Revision: 1.8 $
+-- $Date: 2008/07/26 18:47:50 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-- TODO use Default_Character where appropriate
with ncurses2.color_edit;
with ncurses2.slk_test;
with ncurses2.acs_display;
-with ncurses2.color_edit;
with ncurses2.acs_and_scroll;
with ncurses2.flushinp_test;
with ncurses2.test_sgr_attributes;
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2006,2008 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: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.2 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.3 $
+-- $Date: 2008/07/26 18:46:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
function trace_or (a, b : Trace_Attribute_Set) return Trace_Attribute_Set;
function trace_num (tlevel : Trace_Attribute_Set) return String;
function tracetrace (tlevel : Trace_Attribute_Set) return String;
- function run_trace_menu (m : Menu) return Boolean;
+ function run_trace_menu (m : Menu; count : Integer) return Boolean;
function menu_virtualize (c : Key_Code) return Menu_Request_Code is
begin
return To_String (buf);
end tracetrace;
- function run_trace_menu (m : Menu) return Boolean is
+ function run_trace_menu (m : Menu; count : Integer) return Boolean is
i, p : Item;
changed : Boolean;
c, v : Key_Code;
begin
loop
- changed := False;
+ changed := (count /= 0);
c := Getchar (Get_Window (m));
v := menu_virtualize (c);
case Driver (m, v) is
menu_x : constant Column_Position := 8;
ip : Item;
m : Menu;
+ count : Integer;
newtrace : Trace_Attribute_Set;
begin
Add (Line => 0, Column => 0, Str => "Interactively set trace level:");
end if;
end loop;
- while run_trace_menu (m) loop
- null;
+ count := 1;
+ while run_trace_menu (m, count) loop
+ count := count + 1;
end loop;
newtrace := Trace_Disable;
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2006,2008 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: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.6 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.7 $
+-- $Date: 2008/07/26 18:51:20 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-with Terminal_Interface.Curses;
-
-with Ada.Text_IO;
+with Ada.Text_IO; use Ada.Text_IO;
pragma Warnings (Off);
with Terminal_Interface.Curses.Aux;
with Terminal_Interface.Curses.Trace; use Terminal_Interface.Curses.Trace;
-with Ada.Text_IO; use Ada.Text_IO;
-
with Interfaces.C;
with Interfaces.C.Strings;
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2006,2008 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: 2006/06/25 14:30:22 $
+-- $Revision: 1.16 $
+-- $Date: 2008/07/26 18:48:19 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
if Enclosed_In_Window (W, Evt) then
Transform_Coordinates (W, Y, X, From_Screen);
Put (Msg, ",Box(");
- Put (Msg, Integer (I), 1); Put (Msg, ",");
+ Put (Msg, (I), 1); Put (Msg, ",");
Put (Msg, Integer (Y), 1); Put (Msg, ",");
Put (Msg, Integer (X), 1); Put (Msg, ")");
end if;
W : Window;
begin
for I in Ctl'Range loop
- Position := (Integer (I) - Integer (Middle_Index)) *
+ Position := ((I) - Integer (Middle_Index)) *
Integer (Half + Space + Width) + Middle_Column;
W := Create (Height,
Width,
Ctl (I) := Create (W);
Box (W);
Move_Cursor (W, 1, Half);
- Put (W, Integer (I), 1);
+ Put (W, (I), 1);
Refresh_Without_Update (W);
end loop;
end;
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2006,2008 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.11 $
--- $Date: 2006/06/25 14:30:22 $
+-- $Revision: 1.12 $
+-- $Date: 2008/07/26 18:48:08 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-with Terminal_Interface.Curses;
-
with Sample.Explanation; use Sample.Explanation;
-- This package contains some conveniant helper routines used throughout
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2004 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2004,2008 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.17 $
--- $Date: 2004/08/21 21:37:00 $
+-- $Revision: 1.18 $
+-- $Date: 2008/07/26 18:48:30 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
end if;
end loop;
Set_Spacing (M);
- Flip_State := True;
Pop_Environment;
pragma Assert (Get_Index (Items (M, 1)) = Get_Index (I (1)));
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2006,2008 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: 2006/06/25 14:30:22 $
+-- $Revision: 1.16 $
+-- $Date: 2008/07/26 18:47:58 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-with Terminal_Interface.Curses.Forms;
-- This is a very simple user defined field type. It accepts only a
-- defined character as input into the field.
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998,2008 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: 2007/05/05 18:46:21 $
+-- $Revision: 1.16 $
+-- $Date: 2008/07/26 18:48:46 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Text_IO;
if K = QUIT then
return True;
elsif K = SELECT_ITEM then
- if Idx in 1 .. 4 then
+ if Idx <= 4 then
Hide (Pan);
Update_Panels;
end if;
when 4 => Sample.Text_IO_Demo.Demo;
when others => null;
end case;
- if Idx in 1 .. 4 then
+ if Idx <= 4 then
Top (Pan);
Show (Pan);
Update_Panels;
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998,2008 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.8 $
+-- $Revision: 1.9 $
+-- $Date: 2008/07/26 18:50:25 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-with Interfaces.C;
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
package body Terminal_Interface.Curses.Forms.Field_Types.Alpha is
- use type Interfaces.C.int;
-
procedure Set_Field_Type (Fld : in Field;
Typ : in Alpha_Field)
is
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998,2008 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.8 $
+-- $Revision: 1.9 $
+-- $Date: 2008/07/26 18:50:15 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-with Interfaces.C;
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
package body Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric is
- use type Interfaces.C.int;
-
procedure Set_Field_Type (Fld : in Field;
Typ : in AlphaNumeric_Field)
is
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998,2008 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.8 $
+-- $Revision: 1.9 $
+-- $Date: 2008/07/26 18:50:06 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-with Interfaces.C;
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
package body Terminal_Interface.Curses.Forms.Field_Types.IntField is
- use type Interfaces.C.int;
-
procedure Set_Field_Type (Fld : in Field;
Typ : in Integer_Field)
is
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998,2008 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.8 $
+-- $Revision: 1.9 $
+-- $Date: 2008/07/26 18:49:47 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-with Interfaces.C;
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
package body Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address is
- use type Interfaces.C.int;
-
procedure Set_Field_Type (Fld : in Field;
Typ : in Internet_V4_Address_Field)
is
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998,2008 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.9 $
+-- $Revision: 1.10 $
+-- $Date: 2008/07/26 18:49:57 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Interfaces.C;
package body Terminal_Interface.Curses.Forms.Field_Types.Numeric is
- use type Interfaces.C.int;
-
procedure Set_Field_Type (Fld : in Field;
Typ : in Numeric_Field)
is
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2006,2008 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.14 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.15 $
+-- $Date: 2008/07/26 18:48:58 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Unchecked_Conversion;
-with Interfaces.C;
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
package body Terminal_Interface.Curses.Forms.Field_Types.User.Choice is
- use type Interfaces.C.int;
-
pragma Warnings (Off);
function To_Argument_Access is new Ada.Unchecked_Conversion
(System.Address, Argument_Access);
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998,2008 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.11 $
+-- $Revision: 1.12 $
+-- $Date: 2008/07/26 18:49:20 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Interfaces.C;
pragma Preelaborate
(Terminal_Interface.Curses.Forms.Field_Types.User.Choice);
- use type Interfaces.C.int;
subtype C_Int is Interfaces.C.int;
type User_Defined_Field_Type_With_Choice is abstract new
-- | Private Part.
-- |
private
- use type Interfaces.C.int;
-
function C_Generic_Choice return C_Field_Type;
function Generic_Next (Fld : Field;
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2006,2008 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.14 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.15 $
+-- $Date: 2008/07/26 18:49:28 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Unchecked_Conversion;
-with Interfaces.C;
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
package body Terminal_Interface.Curses.Forms.Field_Types.User is
- use type Interfaces.C.int;
-
procedure Set_Field_Type (Fld : in Field;
Typ : in User_Defined_Field_Type)
is
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998,2008 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.11 $
+-- $Revision: 1.12 $
+-- $Date: 2008/07/26 18:49:38 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Interfaces.C;
package Terminal_Interface.Curses.Forms.Field_Types.User is
pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types.User);
- use type Interfaces.C.int;
subtype C_Int is Interfaces.C.int;
type User_Defined_Field_Type is abstract new Field_Type with null record;
-- | Private Part.
-- | Used by the Choice child package.
private
- use type Interfaces.C.int;
-
function C_Generic_Type return C_Field_Type;
function Generic_Field_Check (Fld : Field;
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2006,2008 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.19 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.20 $
+-- $Date: 2008/07/26 18:50:33 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-with Interfaces.C;
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
with Ada.Unchecked_Deallocation;
with Ada.Unchecked_Conversion;
-- |
package body Terminal_Interface.Curses.Forms.Field_Types is
- use type Interfaces.C.int;
use type System.Address;
pragma Warnings (Off);
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2004 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2004,2008 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.25 $
--- $Date: 2004/08/21 21:37:00 $
+-- $Revision: 1.26 $
+-- $Date: 2008/07/26 18:50:44 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
P : Pointer := C_Fields (Frm);
begin
- if P = null or else Index not in 1 .. Field_Count (Frm) then
+ if P = null or else Index > Field_Count (Frm) then
raise Form_Exception;
else
P := P + ptrdiff_t (C_Int (Index) - 1);
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2004 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2004,2008 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.25 $
--- $Date: 2004/08/21 21:37:00 $
+-- $Revision: 1.26 $
+-- $Date: 2008/07/26 18:50:58 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
P : Pointer := C_Mitems (Men);
begin
- if P = null or else Index not in 1 .. Item_Count (Men) then
+ if P = null or else Index > Item_Count (Men) then
raise Menu_Exception;
else
P := P + ptrdiff_t (C_Int (Index) - 1);
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2004 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2004,2008 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: 2004/08/21 21:37:00 $
+-- $Revision: 1.22 $
+-- $Date: 2008/07/26 18:51:11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-with System;
-
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
with Interfaces.C; use Interfaces.C;
use Interfaces;
package body Terminal_Interface.Curses.Mouse is
use type System.Bit_Order;
- use type Interfaces.C.int;
function Has_Mouse return Boolean
is
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1255 2008/07/13 11:07:42 tom Exp $
+-- $Id: NEWS,v 1.1256 2008/07/26 19:33:40 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.
+20080726
+ + build-fixes for gcc 4.3.1 (changes to gnat "warnings", and C inlining
+ thresholds).
+
20080713
+ build-fix (reports by Christian Ebert, Funda Wang).
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
-dnl $Id: aclocal.m4,v 1.449 2008/07/05 18:19:39 tom Exp $
+dnl $Id: aclocal.m4,v 1.450 2008/07/26 21:57:19 tom Exp $
dnl Macros used in NCURSES auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_GCC_WARNINGS version: 22 updated: 2007/07/29 09:55:12
+dnl CF_GCC_WARNINGS version: 23 updated: 2008/07/26 17:54:02
dnl ---------------
dnl Check if the compiler supports useful warning options. There's a few that
dnl we don't use, simply because they're too noisy:
;;
Winline) #(vi
case $GCC_VERSION in
- 3.3*)
+ [[34]].*)
CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
continue;;
esac
;;
Winline) #(vi
case $GCC_VERSION in
- 3.3*)
+ [34].*)
test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
echo "${as_me-configure}:9589: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.651 2008/07/13 11:01:58 tom Exp $
+# $Id: dist.mk,v 1.652 2008/07/26 17:36:20 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 = 6
-NCURSES_PATCH = 20080713
+NCURSES_PATCH = 20080726
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)