X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=doc%2Fhtml%2Fada%2Fterminal_interface-curses-forms-field_types-enumeration__adb.htm;h=17b64c5655a712bd499091d7e1a354940b390617;hp=a5c44bb47b7f53b54e3445701b21cb6aba714f42;hb=bca50d0d8592defee6c584fdedd25f4b1a31345b;hpb=761e4f0825b330e970558e82a4bd638383914429
diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__adb.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__adb.htm
index a5c44bb4..17b64c56 100644
--- a/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__adb.htm
+++ b/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__adb.htm
@@ -24,7 +24,7 @@
-
+
@@ -52,15 +52,15 @@
-
+
with Ada.Unchecked_Deallocation;
-with Interfaces.C; use Interfaces.C;
-with Interfaces.C.Strings; use Interfaces.C.Strings;
-with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
+with Interfaces.C; use Interfaces.C;
+with Interfaces.C.Strings; use Interfaces.C.Strings;
+with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
-package body Terminal_Interface.Curses.Forms.Field_Types.Enumeration is
+package body Terminal_Interface.Curses.Forms.Field_Types.Enumeration is
function Create (Info : Enumeration_Info;
Auto_Release_Names : Boolean := False)
@@ -78,7 +78,7 @@
E.Arr := new chars_ptr_array (size_t (1) .. L);
for I in 1 .. Positive (L - 1) loop
if Info.Names (I) = null then
- raise Form_Exception;
+ raise Form_Exception;
end if;
E.Arr.all (size_t (I)) := New_String (Info.Names (I).all);
if Auto_Release_Names then
@@ -105,29 +105,26 @@
Enum.Arr := null;
end Release;
- procedure Set_Field_Type (Fld : Field;
+ procedure Set_Field_Type (Fld : Field;
Typ : Enumeration_Field)
is
- function Set_Fld_Type (F : Field := Fld;
+ function Set_Fld_Type (F : Field := Fld;
Arg1 : chars_ptr_array;
- Arg2 : C_Int;
- Arg3 : C_Int) return C_Int;
+ Arg2 : C_Int;
+ Arg3 : C_Int) return Eti_Error;
pragma Import (C, Set_Fld_Type, "set_field_type_enum");
- Res : Eti_Error;
begin
if Typ.Arr = null then
- raise Form_Exception;
+ raise Form_Exception;
end if;
- Res := Set_Fld_Type (Arg1 => Typ.Arr.all,
- Arg2 => C_Int (Boolean'Pos (Typ.Case_Sensitive)),
- Arg3 => C_Int (Boolean'Pos
- (Typ.Match_Must_Be_Unique)));
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
- Wrap_Builtin (Fld, Typ, C_Choice_Router);
+ Eti_Exception
+ (Set_Fld_Type
+ (Arg1 => Typ.Arr.all,
+ Arg2 => C_Int (Boolean'Pos (Typ.Case_Sensitive)),
+ Arg3 => C_Int (Boolean'Pos (Typ.Match_Must_Be_Unique))));
+ Wrap_Builtin (Fld, Typ, C_Choice_Router);
end Set_Field_Type;
-end Terminal_Interface.Curses.Forms.Field_Types.Enumeration;
+end Terminal_Interface.Curses.Forms.Field_Types.Enumeration;