-- {{Ada/Sourceforge|numeric_8-get_line.adb}}
separate (Numeric_8)
function Get_Line return Str.Unbounded_String is
use type Str.Unbounded_String;
BufferSize : constant Natural := 2000;
Retval : Str.Unbounded_String :=
Str.Null_Unbounded_String;
Item : String (1 .. BufferSize);
Last : Natural;
begin
Get_Whole_Line : loop
T_IO.Get_Line (Item => Item, Last => Last);
Str.Append
(Source => Retval,
New_Item => Item (1 .. Last));
exit Get_Whole_Line when Last < Item'Last;
end loop Get_Whole_Line;
return Retval;
end Get_Line;
----------------------------------------------------------------------------
-- $Author$
--
-- $Revision$
-- $Date$
--
-- $Id$
-- $HeadURL$
----------------------------------------------------------------------------
-- vim: textwidth=0 nowrap tabstop=8 shiftwidth=3 softtabstop=3 expandtab
-- vim: filetype=ada encoding=utf-8 fileformat=unix foldmethod=indent