1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2023, Free Software Foundation, Inc. --
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. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 ------------------------------------------------------------------------------
26 package body Gnatvsn
is
28 ----------------------
29 -- Copyright_Holder --
30 ----------------------
32 function Copyright_Holder
return String is
34 return "Free Software Foundation, Inc.";
37 ------------------------
38 -- Gnat_Free_Software --
39 ------------------------
41 function Gnat_Free_Software
return String is
44 "This is free software; see the source for copying conditions." &
46 "There is NO warranty; not even for MERCHANTABILITY or FITNESS" &
47 " FOR A PARTICULAR PURPOSE.";
48 end Gnat_Free_Software
;
50 type char_array
is array (Natural range <>) of aliased Character;
51 C_Version_String
: char_array
(0 .. Ver_Len_Max
- 1);
52 pragma Import
(C
, C_Version_String
, "gnat_version_string");
53 -- Import the C string defined in the source file version.c using the
54 -- zero-based convention of the C language. The size is not the real
55 -- one, which does not matter since we will check for the nul character.
57 -------------------------
58 -- Gnat_Version_String --
59 -------------------------
61 function Gnat_Version_String
return String is
62 S
: String (1 .. Ver_Len_Max
);
66 exit when C_Version_String
(Pos
) = ASCII
.NUL
;
68 S
(Pos
+ 1) := C_Version_String
(Pos
);
71 exit when Pos
= Ver_Len_Max
;
75 end Gnat_Version_String
;