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=ac0bb27073ffa162fb9095621f7476e70e2e2106;hp=b5ed92283092721bce1bd08736599cdd376610ad;hb=02c4e383be9337e73a0e75844dfd1047745adb28;hpb=761e4f0825b330e970558e82a4bd638383914429 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..ac0bb270 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 Interfaces.C; use Interfaces.C; +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;