annotate gcc/ada/lib-util.ads @ 118:fd00160c1b76

ifdef TARGET_64BIT
author mir3636
date Tue, 27 Feb 2018 15:01:35 +0900
parents 04ced10e8804
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 COMPILER COMPONENTS --
kono
parents:
diff changeset
4 -- --
kono
parents:
diff changeset
5 -- L I B . U T I L --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- B o d y --
kono
parents:
diff changeset
8 -- --
kono
parents:
diff changeset
9 -- Copyright (C) 1992-2013, 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. See the GNU General Public License --
kono
parents:
diff changeset
17 -- for more details. You should have received a copy of the GNU General --
kono
parents:
diff changeset
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
kono
parents:
diff changeset
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
kono
parents:
diff changeset
20 -- --
kono
parents:
diff changeset
21 -- GNAT was originally developed by the GNAT team at New York University. --
kono
parents:
diff changeset
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
kono
parents:
diff changeset
23 -- --
kono
parents:
diff changeset
24 ------------------------------------------------------------------------------
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 with Uintp; use Uintp;
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 package Lib.Util is
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 -- This package implements a buffered write of library information
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 procedure Write_Info_Char (C : Character);
kono
parents:
diff changeset
33 pragma Inline (Write_Info_Char);
kono
parents:
diff changeset
34 -- Adds one character to the info
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 procedure Write_Info_Char_Code (Code : Char_Code);
kono
parents:
diff changeset
37 -- Write a single character code. Upper half values in the range
kono
parents:
diff changeset
38 -- 16#80..16#FF are written as Uhh (hh = 2 hex digits), and values
kono
parents:
diff changeset
39 -- greater than 16#FF are written as Whhhh (hhhh = 4 hex digits).
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 function Write_Info_Col return Positive;
kono
parents:
diff changeset
42 -- Returns the column in which the next character will be written
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 procedure Write_Info_EOL;
kono
parents:
diff changeset
45 -- Terminate current info line. This only flushes the buffer
kono
parents:
diff changeset
46 -- if there is not enough room for another complete line or
kono
parents:
diff changeset
47 -- if the host system needs a write for each line.
kono
parents:
diff changeset
48
kono
parents:
diff changeset
49 procedure Write_Info_Initiate (Key : Character);
kono
parents:
diff changeset
50 -- Initiates write of new line to info file, the parameter is the keyword
kono
parents:
diff changeset
51 -- character for the line. The caller is responsible for writing the
kono
parents:
diff changeset
52 -- required blank after the key character if needed.
kono
parents:
diff changeset
53
kono
parents:
diff changeset
54 procedure Write_Info_Nat (N : Nat);
kono
parents:
diff changeset
55 -- Adds image of N to Info_Buffer with no leading or trailing blanks
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 procedure Write_Info_Int (N : Int);
kono
parents:
diff changeset
58 -- Adds image of N to Info_Buffer with no leading or trailing blanks. A
kono
parents:
diff changeset
59 -- minus sign is prepended for negative values.
kono
parents:
diff changeset
60
kono
parents:
diff changeset
61 procedure Write_Info_Name (Name : Name_Id);
kono
parents:
diff changeset
62 procedure Write_Info_Name (Name : File_Name_Type);
kono
parents:
diff changeset
63 procedure Write_Info_Name (Name : Unit_Name_Type);
kono
parents:
diff changeset
64 -- Adds characters of Name to Info_Buffer. Note that in all cases, the
kono
parents:
diff changeset
65 -- name is written literally from the names table entry without modifying
kono
parents:
diff changeset
66 -- the case, using simply Get_Name_String.
kono
parents:
diff changeset
67
kono
parents:
diff changeset
68 procedure Write_Info_Name_May_Be_Quoted (Name : File_Name_Type);
kono
parents:
diff changeset
69 -- Similar to Write_Info_Name, but if Name includes spaces, then it is
kono
parents:
diff changeset
70 -- quoted and the '"' are doubled.
kono
parents:
diff changeset
71
kono
parents:
diff changeset
72 procedure Write_Info_Slit (S : String_Id);
kono
parents:
diff changeset
73 -- Write string literal value in format required for L/N lines in ali file
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 procedure Write_Info_Str (Val : String);
kono
parents:
diff changeset
76 -- Adds characters of Val to Info_Buffer surrounded by quotes
kono
parents:
diff changeset
77
kono
parents:
diff changeset
78 procedure Write_Info_Tab (Col : Positive);
kono
parents:
diff changeset
79 -- Tab out with blanks and HT's to column Col. If already at or past
kono
parents:
diff changeset
80 -- Col, writes a single blank, so that we do get a required field
kono
parents:
diff changeset
81 -- separation.
kono
parents:
diff changeset
82
kono
parents:
diff changeset
83 procedure Write_Info_Terminate;
kono
parents:
diff changeset
84 -- Terminate current info line and output lines built in Info_Buffer
kono
parents:
diff changeset
85
kono
parents:
diff changeset
86 procedure Write_Info_Uint (N : Uint);
kono
parents:
diff changeset
87 -- Adds decimal image of N to Info_Buffer with no leading or trailing
kono
parents:
diff changeset
88 -- blanks. A minus sign is prepended for negative values.
kono
parents:
diff changeset
89
kono
parents:
diff changeset
90 end Lib.Util;