annotate gcc/ada/libgnat/s-imgenu.ads @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ------------------------------------------------------------------------------
kono
parents:
diff changeset
2 -- --
kono
parents:
diff changeset
3 -- GNAT RUN-TIME COMPONENTS --
kono
parents:
diff changeset
4 -- --
kono
parents:
diff changeset
5 -- S Y S T E M . I M G _ E N U M --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- S p e c --
kono
parents:
diff changeset
8 -- --
kono
parents:
diff changeset
9 -- Copyright (C) 2000-2017, Free Software Foundation, Inc. --
kono
parents:
diff changeset
10 -- --
kono
parents:
diff changeset
11 -- GNAT is free software; you can redistribute it and/or modify it under --
kono
parents:
diff changeset
12 -- terms of the GNU General Public License as published by the Free Soft- --
kono
parents:
diff changeset
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
kono
parents:
diff changeset
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
kono
parents:
diff changeset
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
kono
parents:
diff changeset
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
kono
parents:
diff changeset
17 -- --
kono
parents:
diff changeset
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
kono
parents:
diff changeset
19 -- additional permissions described in the GCC Runtime Library Exception, --
kono
parents:
diff changeset
20 -- version 3.1, as published by the Free Software Foundation. --
kono
parents:
diff changeset
21 -- --
kono
parents:
diff changeset
22 -- You should have received a copy of the GNU General Public License and --
kono
parents:
diff changeset
23 -- a copy of the GCC Runtime Library Exception along with this program; --
kono
parents:
diff changeset
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
kono
parents:
diff changeset
25 -- <http://www.gnu.org/licenses/>. --
kono
parents:
diff changeset
26 -- --
kono
parents:
diff changeset
27 -- GNAT was originally developed by the GNAT team at New York University. --
kono
parents:
diff changeset
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
kono
parents:
diff changeset
29 -- --
kono
parents:
diff changeset
30 ------------------------------------------------------------------------------
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 -- Enumeration_Type'Image for all enumeration types except those in package
kono
parents:
diff changeset
33 -- Standard (where we have no opportunity to build image tables), and in
kono
parents:
diff changeset
34 -- package System (where it is too early to start building image tables).
kono
parents:
diff changeset
35 -- Special routines exist for the enumeration types in these packages.
kono
parents:
diff changeset
36
kono
parents:
diff changeset
37 -- Note: this is an obsolete package, replaced by System.Img_Enum_New, which
kono
parents:
diff changeset
38 -- provides procedures instead of functions for these enumeration image calls.
kono
parents:
diff changeset
39 -- The reason we maintain this package is that when bootstrapping with old
kono
parents:
diff changeset
40 -- compilers, the old compiler will search for this unit, expecting to find
kono
parents:
diff changeset
41 -- these functions. The new compiler will search for procedures in the new
kono
parents:
diff changeset
42 -- version of the unit.
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 pragma Compiler_Unit_Warning;
kono
parents:
diff changeset
45
kono
parents:
diff changeset
46 package System.Img_Enum is
kono
parents:
diff changeset
47 pragma Pure;
kono
parents:
diff changeset
48
kono
parents:
diff changeset
49 function Image_Enumeration_8
kono
parents:
diff changeset
50 (Pos : Natural;
kono
parents:
diff changeset
51 Names : String;
kono
parents:
diff changeset
52 Indexes : System.Address) return String;
kono
parents:
diff changeset
53 -- Used to compute Enum'Image (Str) where Enum is some enumeration type
kono
parents:
diff changeset
54 -- other than those defined in package Standard. Names is a string with a
kono
parents:
diff changeset
55 -- lower bound of 1 containing the characters of all the enumeration
kono
parents:
diff changeset
56 -- literals concatenated together in sequence. Indexes is the address of an
kono
parents:
diff changeset
57 -- array of type array (0 .. N) of Natural_8, where N is the number of
kono
parents:
diff changeset
58 -- enumeration literals in the type. The Indexes values are the starting
kono
parents:
diff changeset
59 -- subscript of each enumeration literal, indexed by Pos values, with an
kono
parents:
diff changeset
60 -- extra entry at the end containing Names'Length + 1. The reason that
kono
parents:
diff changeset
61 -- Indexes is passed by address is that the actual type is created on the
kono
parents:
diff changeset
62 -- fly by the expander. The value returned is the desired 'Image value.
kono
parents:
diff changeset
63
kono
parents:
diff changeset
64 function Image_Enumeration_16
kono
parents:
diff changeset
65 (Pos : Natural;
kono
parents:
diff changeset
66 Names : String;
kono
parents:
diff changeset
67 Indexes : System.Address) return String;
kono
parents:
diff changeset
68 -- Identical to Image_Enumeration_8 except that it handles types
kono
parents:
diff changeset
69 -- using array (0 .. Num) of Natural_16 for the Indexes table.
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71 function Image_Enumeration_32
kono
parents:
diff changeset
72 (Pos : Natural;
kono
parents:
diff changeset
73 Names : String;
kono
parents:
diff changeset
74 Indexes : System.Address) return String;
kono
parents:
diff changeset
75 -- Identical to Image_Enumeration_8 except that it handles types
kono
parents:
diff changeset
76 -- using array (0 .. Num) of Natural_32 for the Indexes table.
kono
parents:
diff changeset
77
kono
parents:
diff changeset
78 end System.Img_Enum;