1------------------------------------------------------------------------------
2--                                                                          --
3--                         GNAT RUN-TIME COMPONENTS                         --
4--                                                                          --
5--           A D A . T E X T _ I O . E N U M E R A T I O N _ I O            --
6--                                                                          --
7--                                 S p e c                                  --
8--                                                                          --
9-- This specification is derived from the Ada Reference Manual for use with --
10-- GNAT.  In accordance with the copyright of that document, you can freely --
11-- copy and modify this specification,  provided that if you redistribute a --
12-- modified version,  any changes that you have made are clearly indicated. --
13--                                                                          --
14------------------------------------------------------------------------------
15
16--  In Ada 95, the package Ada.Text_IO.Enumeration_IO is a subpackage of
17--  Text_IO. This is for compatibility with Ada 83. In GNAT we make it a
18--  child package to avoid loading the necessary code if Enumeration_IO is
19--  not instantiated. See routine Rtsfind.Check_Text_IO_Special_Unit for a
20--  description of how we patch up the difference in semantics so that it
21--  is invisible to the Ada programmer.
22
23private generic
24   type Enum is (<>);
25
26package Ada.Text_IO.Enumeration_IO is
27
28   Default_Width : Field := 0;
29   Default_Setting : Type_Set := Upper_Case;
30
31   procedure Get (File : File_Type; Item : out Enum) with
32     Pre    => Is_Open (File) and then Mode (File) = In_File,
33     Global => (In_Out => File_System);
34   procedure Get (Item : out Enum) with
35     Post   =>
36       Line_Length'Old = Line_Length
37       and Page_Length'Old = Page_Length,
38     Global => (In_Out => File_System);
39
40   procedure Put
41     (File  : File_Type;
42      Item  : Enum;
43      Width : Field := Default_Width;
44      Set   : Type_Set := Default_Setting)
45   with
46     Pre    => Is_Open (File) and then Mode (File) /= In_File,
47     Post   =>
48       Line_Length (File)'Old = Line_Length (File)
49       and Page_Length (File)'Old = Page_Length (File),
50     Global => (In_Out => File_System);
51
52   procedure Put
53     (Item  : Enum;
54      Width : Field := Default_Width;
55      Set   : Type_Set := Default_Setting)
56   with
57     Post   =>
58       Line_Length'Old = Line_Length
59       and Page_Length'Old = Page_Length,
60     Global => (In_Out => File_System);
61
62   procedure Get
63     (From : String;
64      Item : out Enum;
65      Last : out Positive)
66   with
67     Global => null;
68
69   procedure Put
70     (To   : out String;
71      Item : Enum;
72      Set  : Type_Set := Default_Setting)
73   with
74     Global => null;
75
76end Ada.Text_IO.Enumeration_IO;
77