1------------------------------------------------------------------------------
2--                                                                          --
3--                         GNAT RUN-TIME COMPONENTS                         --
4--                                                                          --
5--         A D A . W I D E _ T E X T _ I O . D E C I M A L _ A U X          --
6--                                                                          --
7--                                 S p e c                                  --
8--                                                                          --
9--          Copyright (C) 1992-2020, 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.Wide_Text_IO.Decimal_IO.
33--  Routines in this package are identical semantically to those in Decimal_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 is an
36--  additional Scale parameter giving the value of Num'Scale. In addition the
37--  Get routines return the value rather than store it in an Out parameter.
38
39private generic
40   type Int is range <>;
41
42   with function Scan
43     (Str   : String;
44      Ptr   : not null access Integer;
45      Max   : Integer;
46      Scale : Integer) return Int;
47
48   with procedure Set_Image
49     (V     : Int;
50      S     : in out String;
51      P     : in out Natural;
52      Scale : Integer;
53      Fore  : Natural;
54      Aft   : Natural;
55      Exp   : Natural);
56
57package Ada.Wide_Text_IO.Decimal_Aux is
58
59   function Get
60     (File  : File_Type;
61      Width : Field;
62      Scale : Integer) return Int;
63
64   procedure Put
65     (File  : File_Type;
66      Item  : Int;
67      Fore  : Field;
68      Aft   : Field;
69      Exp   : Field;
70      Scale : Integer);
71
72   function Gets
73     (From  : String;
74      Last  : out Positive;
75      Scale : Integer) return Int;
76
77   procedure Puts
78     (To    : out String;
79      Item  : Int;
80      Aft   : Field;
81      Exp   : Field;
82      Scale : Integer);
83
84end Ada.Wide_Text_IO.Decimal_Aux;
85