| 1 |
------------------------------------------------------------------------------ |
| 2 |
-- -- |
| 3 |
-- GNAT RUN-TIME COMPONENTS -- |
| 4 |
-- -- |
| 5 |
-- A D A . T E X T _ I O . F I X E D _ A U X -- |
| 6 |
-- -- |
| 7 |
-- S p e c -- |
| 8 |
-- -- |
| 9 |
-- Copyright (C) 2020-2025, Free Software Foundation, Inc. -- |
| 10 |
-- -- |
| 11 |
-- GNAT is free software; you can redistribute it and/or modify it under -- |
| 12 |
-- terms of the GNU General Public License as published by the Free Soft- -- |
| 13 |
-- ware Foundation; either version 3, or (at your option) any later ver- -- |
| 14 |
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- |
| 15 |
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- |
| 16 |
-- or FITNESS FOR A PARTICULAR PURPOSE. -- |
| 17 |
-- -- |
| 18 |
-- As a special exception under Section 7 of GPL version 3, you are granted -- |
| 19 |
-- additional permissions described in the GCC Runtime Library Exception, -- |
| 20 |
-- version 3.1, as published by the Free Software Foundation. -- |
| 21 |
-- -- |
| 22 |
-- You should have received a copy of the GNU General Public License and -- |
| 23 |
-- a copy of the GCC Runtime Library Exception along with this program; -- |
| 24 |
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- |
| 25 |
-- <http://www.gnu.org/licenses/>. -- |
| 26 |
-- -- |
| 27 |
-- GNAT was originally developed by the GNAT team at New York University. -- |
| 28 |
-- Extensive contributions were provided by Ada Core Technologies Inc. -- |
| 29 |
-- -- |
| 30 |
------------------------------------------------------------------------------ |
| 31 |
|
| 32 |
-- This package contains the implementation for Ada.Text_IO.Fixed_IO. The |
| 33 |
-- routines in this package are identical semantically to those in Fixed_IO, |
| 34 |
-- except that the default parameters have been removed because they are |
| 35 |
-- supplied explicitly by the calls from within these units, and there are |
| 36 |
-- additional Num and Den parameters giving the value of Num'Small, as well |
| 37 |
-- as For0 and Aft0 giving some properties of Num'Small. In addition the Get |
| 38 |
-- routines return the value rather than store it in an Out parameter. |
| 39 |
|
| 40 |
private generic |
| 41 |
type Int is range <>; |
| 42 |
|
| 43 |
with function Scan |
| 44 |
(Str : String; |
| 45 |
Ptr : not null access Integer; |
| 46 |
Max : Integer; |
| 47 |
Num : Int; |
| 48 |
Den : Int) return Int; |
| 49 |
|
| 50 |
with procedure Set_Image |
| 51 |
(V : Int; |
| 52 |
S : in out String; |
| 53 |
P : in out Natural; |
| 54 |
Num : Int; |
| 55 |
Den : Int; |
| 56 |
For0 : Natural; |
| 57 |
Aft0 : Natural; |
| 58 |
Fore : Natural; |
| 59 |
Aft : Natural; |
| 60 |
Exp : Natural); |
| 61 |
|
| 62 |
package Ada.Text_IO.Fixed_Aux is |
| 63 |
|
| 64 |
function Get |
| 65 |
(File : File_Type; |
| 66 |
Width : Field; |
| 67 |
Num : Int; |
| 68 |
Den : Int) return Int; |
| 69 |
|
| 70 |
procedure Put |
| 71 |
(File : File_Type; |
| 72 |
Item : Int; |
| 73 |
Fore : Field; |
| 74 |
Aft : Field; |
| 75 |
Exp : Natural; |
| 76 |
Num : Int; |
| 77 |
Den : Int; |
| 78 |
For0 : Natural; |
| 79 |
Aft0 : Natural); |
| 80 |
|
| 81 |
function Gets |
| 82 |
(From : String; |
| 83 |
Last : out Positive; |
| 84 |
Num : Int; |
| 85 |
Den : Int) return Int; |
| 86 |
|
| 87 |
procedure Puts |
| 88 |
(To : out String; |
| 89 |
Item : Int; |
| 90 |
Aft : Field; |
| 91 |
Exp : Natural; |
| 92 |
Num : Int; |
| 93 |
Den : Int; |
| 94 |
For0 : Natural; |
| 95 |
Aft0 : Natural); |
| 96 |
|
| 97 |
end Ada.Text_IO.Fixed_Aux; |