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-imgdec.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-imgdec.ads')
-rw-r--r-- | gcc/ada/s-imgdec.ads | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/gcc/ada/s-imgdec.ads b/gcc/ada/s-imgdec.ads index 41762e1a387..16a821c5f4c 100644 --- a/gcc/ada/s-imgdec.ads +++ b/gcc/ada/s-imgdec.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2006, 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- -- @@ -35,18 +35,23 @@ -- type does not exceed Integer'Size (also used for Text_IO.Decimal_IO output) package System.Img_Dec is - pragma Preelaborate; + pragma Pure; - function Image_Decimal + procedure Image_Decimal (V : Integer; - Scale : Integer) return String; - -- Compute 'Image of V, the integer value (in units of delta) of a decimal - -- type whose Scale is as given and return the result. THe image is given - -- by the rules in RM 3.5(34) for fixed-point type image functions. + S : in out String; + P : out Natural; + Scale : Integer); + -- Computes fixed_type'Image (V), where V is the integer value (in units of + -- delta) of a decimal type whose Scale is as given and stores the result + -- S (1 .. P), updating P to the value of L. The image is given by the + -- rules in RM 3.5(34) for fixed-point type image functions. The caller + -- guarantees that S is long enough to hold the result. S need not have a + -- lower bound of 1. procedure Set_Image_Decimal (V : Integer; - S : out String; + S : in out String; P : in out Natural; Scale : Integer; Fore : Natural; @@ -59,7 +64,7 @@ package System.Img_Dec is -- will not necessarily be raised if this requirement is violated, since -- it is perfectly valid to compile this unit with checks off. The Fore, -- Aft and Exp values can be set to any valid values for the case of use - -- by Text_IO.Decimal_IO. + -- by Text_IO.Decimal_IO. Note that there is no leading space stored. procedure Set_Decimal_Digits (Digs : in out String; |