aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-imgint.ads
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2007-12-13 11:30:04 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2007-12-13 11:30:04 +0100
commit01b18343996b7145c23191fb574b3fae3e845d8d (patch)
tree723bf7b7f6c79be9da7af8b7b5180dc8dc0f63f7 /gcc/ada/s-imgint.ads
parent859fd598cb7a5f449fa3ce9aaafb65ade064b2ed (diff)
downloadgcc-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-imgint.ads')
-rw-r--r--gcc/ada/s-imgint.ads24
1 files changed, 14 insertions, 10 deletions
diff --git a/gcc/ada/s-imgint.ads b/gcc/ada/s-imgint.ads
index a9e3521..7fe2318 100644
--- a/gcc/ada/s-imgint.ads
+++ b/gcc/ada/s-imgint.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- 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- --
@@ -38,18 +38,22 @@
package System.Img_Int is
pragma Pure;
- function Image_Integer (V : Integer) return String;
- -- Computes Integer'Image (V) and returns the result
+ procedure Image_Integer
+ (V : Integer;
+ S : in out String;
+ P : out Natural);
+ -- Computes Integer'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_Integer
(V : Integer;
- 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 Integer'Image (V) except that no leading space is stored when V is
+ -- non-negative. The caller guarantees that S is long enough to hold the
+ -- result. S need not have a lower bound of 1.
end System.Img_Int;