X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=doc%2Fhtml%2Fada%2Fterminal_interface-curses-forms-field_types-regexp__adb.htm;h=fc3ec333caf7644a8215e78a1dc0f4a30a2a1bab;hp=b5ed92283092721bce1bd08736599cdd376610ad;hb=34d602f272c394e9a980438e636e1ce4d355f83b;hpb=c9c32236e27689a61c794b714c6b86c460866e35 diff --git a/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__adb.htm b/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__adb.htm index b5ed9228..fc3ec333 100644 --- a/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__adb.htm +++ b/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__adb.htm @@ -24,7 +24,7 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2011,2014 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 -- @@ -52,34 +52,25 @@ ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control: --- @Revision: 1.10 @ +-- @Revision: 1.12 @ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Interfaces.C; use Interfaces.C; -with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; +with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -package body Terminal_Interface.Curses.Forms.Field_Types.RegExp is +package body Terminal_Interface.Curses.Forms.Field_Types.RegExp is - procedure Set_Field_Type (Fld : Field; + procedure Set_Field_Type (Fld : Field; Typ : Regular_Expression_Field) is - type Char_Ptr is access all Interfaces.C.char; - - function Set_Ftyp (F : Field := Fld; - Arg1 : Char_Ptr) return C_Int; + function Set_Ftyp (F : Field := Fld; + Arg1 : char_array) return Eti_Error; pragma Import (C, Set_Ftyp, "set_field_type_regexp"); - Txt : char_array (0 .. Typ.Regular_Expression.all'Length); - Len : size_t; - Res : Eti_Error; begin - To_C (Typ.Regular_Expression.all, Txt, Len); - Res := Set_Ftyp (Arg1 => Txt (Txt'First)'Access); - if Res /= E_Ok then - Eti_Exception (Res); - end if; - Wrap_Builtin (Fld, Typ); + Eti_Exception (Set_Ftyp (Arg1 => To_C (Typ.Regular_Expression.all))); + Wrap_Builtin (Fld, Typ); end Set_Field_Type; -end Terminal_Interface.Curses.Forms.Field_Types.RegExp; +end Terminal_Interface.Curses.Forms.Field_Types.RegExp;