X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=doc%2Fhtml%2Fada%2Fterminal_interface-curses-menus__adb.htm;fp=doc%2Fhtml%2Fada%2Fterminal_interface-curses-menus__adb.htm;h=216210aca1765a2614ce15eac79eb17374b0cef5;hb=f6718d80c998008de6cfe8e6296bee3958ff86d7;hp=5f8f5ea2a96062a0e8213138401662b8421166c2;hpb=205f120bce7a338464e79ef846e4f07eff365d6c;p=ncurses.git diff --git a/doc/html/ada/terminal_interface-curses-menus__adb.htm b/doc/html/ada/terminal_interface-curses-menus__adb.htm index 5f8f5ea2..216210ac 100644 --- a/doc/html/ada/terminal_interface-curses-menus__adb.htm +++ b/doc/html/ada/terminal_interface-curses-menus__adb.htm @@ -12,7 +12,7 @@ -- 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 -- @@ -40,8 +40,8 @@ ------------------------------------------------------------------------------ -- 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; @@ -55,9 +55,9 @@ package body Terminal_Interface.Curses.Menus is - type C_Item_Array is array (Natural range <>) of aliased Item; + type C_Item_Array is array (Natural range <>) of aliased Item; package I_Array is new - Interfaces.C.Pointers (Natural, Item, C_Item_Array, Null_Item); + Interfaces.C.Pointers (Natural, Item, C_Item_Array, Null_Item); use type System.Bit_Order; subtype chars_ptr is Interfaces.C.Strings.chars_ptr; @@ -103,16 +103,16 @@ function Newitem (Name, Desc : Char_Ptr) return Item; pragma Import (C, Newitem, "new_item"); - type Name_String is new char_array (0 .. Name'Length); - type Name_String_Ptr is access Name_String; + type Name_String is new char_array (0 .. Name'Length); + type Name_String_Ptr is access Name_String; pragma Controlled (Name_String_Ptr); - type Desc_String is new char_array (0 .. Description'Length); - type Desc_String_Ptr is access Desc_String; + type Desc_String is new char_array (0 .. Description'Length); + type Desc_String_Ptr is access Desc_String; pragma Controlled (Desc_String_Ptr); - Name_Str : constant Name_String_Ptr := new Name_String; - Desc_Str : constant Desc_String_Ptr := new Desc_String; + Name_Str : constant Name_String_Ptr := new Name_String; + Desc_Str : constant Desc_String_Ptr := new Desc_String; Name_Len, Desc_Len : size_t; Result : Item; begin @@ -930,7 +930,7 @@ 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); @@ -998,7 +998,7 @@ Free_Items : in Boolean := False) is procedure Release is new Ada.Unchecked_Deallocation - (Item_Array, Item_Array_Access); + (Item_Array, Item_Array_Access); begin if IA /= null and then Free_Items then for I in IA'First .. (IA'Last - 1) loop