-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
return Times (Left, Right, Max_Length);
end "*";
+ -----------------
+ -- From_String --
+ -----------------
+
+ function From_String (Source : String) return Bounded_String is
+ begin
+ return To_Super_String (Source, Max_Length, Error);
+ end From_String;
+
---------------
-- Replicate --
---------------
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- the generic instantiation is compatible with the Super_String
-- type declared in the Superbounded package.
+ function From_String (Source : String) return Bounded_String;
+ -- Private routine used only by Stream_Convert
+
+ pragma Stream_Convert (Bounded_String, From_String, To_String);
+ -- Provide stream routines without dragging in Ada.Streams
+
Null_Bounded_String : constant Bounded_String :=
(Max_Length => Max_Length,
Current_Length => 0,
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- stream attributes, which, although certainly not subtype related
-- attributes, clearly should not be subject to the para 10 restrictions
-- (see AI95-00137). Similarly, we also skip the para 10 restrictions for
- -- the Storage_Size case where they also clearly do not apply.
+ -- the Storage_Size case where they also clearly do not apply, and for
+ -- Stream_Convert which is in the same category as the strem attributes.
--
-- If the rep item is too late, an appropriate message is output and
-- True is returned, which is a signal that the caller should abandon