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-imgllu.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-imgllu.ads')
-rw-r--r-- | gcc/ada/s-imgllu.ads | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/gcc/ada/s-imgllu.ads b/gcc/ada/s-imgllu.ads index 5c17399ba5c..1aa2b3b17c3 100644 --- a/gcc/ada/s-imgllu.ads +++ b/gcc/ada/s-imgllu.ads @@ -40,20 +40,24 @@ with System.Unsigned_Types; package System.Img_LLU is pragma Pure; - function Image_Long_Long_Unsigned - (V : System.Unsigned_Types.Long_Long_Unsigned) - return String; - -- Computes Long_Long_Unsigned'Image (V) and returns the result + procedure Image_Long_Long_Unsigned + (V : System.Unsigned_Types.Long_Long_Unsigned; + S : in out String; + P : out Natural); + pragma Inline (Image_Long_Long_Unsigned); + + -- Computes Long_Long_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_Long_Long_Unsigned (V : System.Unsigned_Types.Long_Long_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 Long_Long_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_LLU; |