annotate gcc/ada/libgnat/a-locale.ads @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
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 -- A D A . L O C A L E S --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- S p e c --
kono
parents:
diff changeset
8 -- --
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
9 -- Copyright (C) 2010-2019, Free Software Foundation, Inc. --
111
kono
parents:
diff changeset
10 -- --
kono
parents:
diff changeset
11 -- This specification is derived from the Ada Reference Manual for use with --
kono
parents:
diff changeset
12 -- GNAT. In accordance with the copyright of that document, you can freely --
kono
parents:
diff changeset
13 -- copy and modify this specification, provided that if you redistribute a --
kono
parents:
diff changeset
14 -- modified version, any changes that you have made are clearly indicated. --
kono
parents:
diff changeset
15 -- --
kono
parents:
diff changeset
16 ------------------------------------------------------------------------------
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 package Ada.Locales is
kono
parents:
diff changeset
19 pragma Preelaborate (Locales);
kono
parents:
diff changeset
20 pragma Remote_Types (Locales);
kono
parents:
diff changeset
21
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
22 -- A locale identifies a geopolitical place or region and its associated
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
23 -- language, which can be used to determine other internationalization-
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
24 -- related characteristics. The active locale is the locale associated with
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
25 -- the partition of the current task.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
26
111
kono
parents:
diff changeset
27 type Language_Code is new String (1 .. 3)
kono
parents:
diff changeset
28 with Dynamic_Predicate =>
kono
parents:
diff changeset
29 (for all E of Language_Code => E in 'a' .. 'z');
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
30 -- Lower-case string representation of an ISO 639-3 alpha-3 code that
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
31 -- identifies a language.
111
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 type Country_Code is new String (1 .. 2)
kono
parents:
diff changeset
34 with Dynamic_Predicate =>
kono
parents:
diff changeset
35 (for all E of Country_Code => E in 'A' .. 'Z');
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
36 -- Upper-case string representation of an ISO 3166-1 alpha-2 code that
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
37 -- identifies a country.
111
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 Language_Unknown : constant Language_Code := "und";
kono
parents:
diff changeset
40 Country_Unknown : constant Country_Code := "ZZ";
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 function Language return Language_Code;
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
43 -- Returns the code of the language associated with the active locale. If
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
44 -- the Language_Code associated with the active locale cannot be determined
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
45 -- from the environment, then Language returns Language_Unknown.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
46
111
kono
parents:
diff changeset
47 function Country return Country_Code;
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
48 -- Returns the code of the country associated with the active locale. If
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
49 -- the Country_Code associated with the active locale cannot be determined
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
50 -- from the environment, then Country returns Country_Unknown.
111
kono
parents:
diff changeset
51
kono
parents:
diff changeset
52 end Ada.Locales;