diff options
author | Robert Dewar <dewar@adacore.com> | 2007-12-13 11:30:04 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-12-13 11:30:04 +0100 |
commit | 01b18343996b7145c23191fb574b3fae3e845d8d (patch) | |
tree | 723bf7b7f6c79be9da7af8b7b5180dc8dc0f63f7 /gcc/ada/s-imguns.adb | |
parent | 859fd598cb7a5f449fa3ce9aaafb65ade064b2ed (diff) | |
download | gcc-01b18343996b7145c23191fb574b3fae3e845d8d.zip gcc-01b18343996b7145c23191fb574b3fae3e845d8d.tar.gz gcc-01b18343996b7145c23191fb574b3fae3e845d8d.tar.bz2 |
s-imenne.adb, [...]: New files.
2007-12-06 Robert Dewar <dewar@adacore.com>
* s-imenne.adb, s-imenne.ads: New files.
* s-imgboo.adb, s-imgboo.ads, s-imgcha.adb, s-imgcha.ads, s-imgdec.adb,
s-imgdec.ads, s-imgenu.ads, s-imgint.adb, s-imgint.ads, s-imglld.adb,
s-imglld.ads, s-imglli.adb, s-imglli.ads, s-imgllu.adb, s-imgllu.ads,
s-imgrea.adb, s-imgrea.ads, s-imguns.adb, s-imguns.ads, s-imgwch.adb,
s-imgwch.ads: New calling sequence for Image routines to avoid sec
stack usage.
From-SVN: r130852
Diffstat (limited to 'gcc/ada/s-imguns.adb')
-rw-r--r-- | gcc/ada/s-imguns.adb | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/gcc/ada/s-imguns.adb b/gcc/ada/s-imguns.adb index 9a026aa..0630af1 100644 --- a/gcc/ada/s-imguns.adb +++ b/gcc/ada/s-imguns.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2007, 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- -- @@ -39,18 +39,16 @@ package body System.Img_Uns is -- Image_Unsigned -- -------------------- - function Image_Unsigned - (V : Unsigned) - return String + procedure Image_Unsigned + (V : System.Unsigned_Types.Unsigned; + S : in out String; + P : out Natural) is - P : Natural; - S : String (1 .. Unsigned'Width); - + pragma Assert (S'First = 1); begin + S (1) := ' '; P := 1; - S (P) := ' '; Set_Image_Unsigned (V, S, P); - return S (1 .. P); end Image_Unsigned; ------------------------ @@ -59,12 +57,16 @@ package body System.Img_Uns is procedure Set_Image_Unsigned (V : Unsigned; - S : out String; + S : in out String; P : in out Natural) is procedure Set_Digits (T : Unsigned); -- Set decimal digits of value of T + ---------------- + -- Set_Digits -- + ---------------- + procedure Set_Digits (T : Unsigned) is begin if T >= 10 then @@ -82,7 +84,6 @@ package body System.Img_Uns is begin Set_Digits (V); - end Set_Image_Unsigned; end System.Img_Uns; |