Commit dc1f64ac by Arnaud Charlet

a-stzunb.adb, [...]: (Insert): Use 'Length instead of 'Size.

2007-04-20  Arnaud Charlet  <charlet@adacore.com>

	* a-stzunb.adb, a-stwiun.adb, a-strunb.adb: (Insert): Use 'Length
	instead of 'Size.

	* a-stwifi.ads, a-stzfix.ads: Minor reformatting

From-SVN: r125378
parent 39f4e199
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -690,7 +690,7 @@ package body Ada.Strings.Unbounded is ...@@ -690,7 +690,7 @@ package body Ada.Strings.Unbounded is
raise Index_Error; raise Index_Error;
end if; end if;
Realloc_For_Chunk (Source, New_Item'Size); Realloc_For_Chunk (Source, New_Item'Length);
Source.Reference Source.Reference
(Before + New_Item'Length .. Source.Last + New_Item'Length) := (Before + New_Item'Length .. Source.Last + New_Item'Length) :=
......
...@@ -225,10 +225,10 @@ package Ada.Strings.Wide_Fixed is ...@@ -225,10 +225,10 @@ package Ada.Strings.Wide_Fixed is
Pad : Wide_Character := Ada.Strings.Wide_Space) return Wide_String; Pad : Wide_Character := Ada.Strings.Wide_Space) return Wide_String;
procedure Tail procedure Tail
(Source : in out Wide_String; (Source : in out Wide_String;
Count : Natural; Count : Natural;
Justify : Alignment := Left; Justify : Alignment := Left;
Pad : Wide_Character := Ada.Strings.Wide_Space); Pad : Wide_Character := Ada.Strings.Wide_Space);
--------------------------------------- ---------------------------------------
-- Wide_String Constructor Functions -- -- Wide_String Constructor Functions --
......
...@@ -706,7 +706,7 @@ package body Ada.Strings.Wide_Unbounded is ...@@ -706,7 +706,7 @@ package body Ada.Strings.Wide_Unbounded is
raise Index_Error; raise Index_Error;
end if; end if;
Realloc_For_Chunk (Source, New_Item'Size); Realloc_For_Chunk (Source, New_Item'Length);
Source.Reference Source.Reference
(Before + New_Item'Length .. Source.Last + New_Item'Length) := (Before + New_Item'Length .. Source.Last + New_Item'Length) :=
......
...@@ -235,10 +235,10 @@ package Ada.Strings.Wide_Wide_Fixed is ...@@ -235,10 +235,10 @@ package Ada.Strings.Wide_Wide_Fixed is
return Wide_Wide_String; return Wide_Wide_String;
procedure Tail procedure Tail
(Source : in out Wide_Wide_String; (Source : in out Wide_Wide_String;
Count : Natural; Count : Natural;
Justify : Alignment := Left; Justify : Alignment := Left;
Pad : Wide_Wide_Character := Ada.Strings.Wide_Wide_Space); Pad : Wide_Wide_Character := Ada.Strings.Wide_Wide_Space);
-------------------------------------------- --------------------------------------------
-- Wide_Wide_String Constructor Functions -- -- Wide_Wide_String Constructor Functions --
......
...@@ -717,7 +717,7 @@ package body Ada.Strings.Wide_Wide_Unbounded is ...@@ -717,7 +717,7 @@ package body Ada.Strings.Wide_Wide_Unbounded is
raise Index_Error; raise Index_Error;
end if; end if;
Realloc_For_Chunk (Source, New_Item'Size); Realloc_For_Chunk (Source, New_Item'Length);
Source.Reference Source.Reference
(Before + New_Item'Length .. Source.Last + New_Item'Length) := (Before + New_Item'Length .. Source.Last + New_Item'Length) :=
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment