diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-12-13 10:30:04 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-12-13 10:30:04 +0000 |
commit | 830a3f424d271773b4efa216a3006b108d48d04f (patch) | |
tree | 723bf7b7f6c79be9da7af8b7b5180dc8dc0f63f7 /gcc/ada/s-imguns.ads | |
parent | 587185fc9008481f0b72ec5dcf732420b1a92288 (diff) | |
download | gcc-830a3f424d271773b4efa216a3006b108d48d04f.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130852 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-imguns.ads')
-rw-r--r-- | gcc/ada/s-imguns.ads | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/gcc/ada/s-imguns.ads b/gcc/ada/s-imguns.ads index 6ec636b4fe1..6ed50e22b73 100644 --- a/gcc/ada/s-imguns.ads +++ b/gcc/ada/s-imguns.ads @@ -40,20 +40,23 @@ with System.Unsigned_Types; package System.Img_Uns is pragma Pure; - function Image_Unsigned - (V : System.Unsigned_Types.Unsigned) - return String; - -- Computes Unsigned'Image (V) and returns the result + procedure Image_Unsigned + (V : System.Unsigned_Types.Unsigned; + S : in out String; + P : out Natural); + pragma Inline (Image_Unsigned); + -- Computes Unsigned'Image (V) and stores the result in S (1 .. P) + -- setting the resulting value of P. The caller guarantees that S + -- is long enough to hold the result, and that S'First is 1. procedure Set_Image_Unsigned (V : System.Unsigned_Types.Unsigned; - S : out String; + S : in out String; P : in out Natural); - -- Sets the image of V starting at S (P + 1) with no leading spaces (i.e. - -- Text_IO format where Width = 0), starting at S (P + 1), updating P - -- to point to the last character stored. The caller promises that the - -- buffer is large enough and no check is made for this (Constraint_Error - -- will not be necessarily raised if this is violated since it is perfectly - -- valid to compile this unit with checks off). + -- Stores the image of V in S starting at S (P + 1), P is updated to point + -- to the last character stored. The value stored is identical to the value + -- of Unsigned'Image (V) except that no leading space is stored. The caller + -- guarantees that S is long enough to hold the result. S need not have a + -- lower bound of 1. end System.Img_Uns; |