aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/libgnat/a-locale.ads
diff options
context:
space:
mode:
authorPierre-Marie de Rodat <derodat@adacore.com>2019-08-19 08:37:03 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-08-19 08:37:03 +0000
commit27ebda1930cef2ac484abcca124a4d6230feee08 (patch)
treeb74f29c0a4f8dd122424679dfd36b50f73d59b2a /gcc/ada/libgnat/a-locale.ads
parentbd0feb3c614d33141062a5d5c7a4966a3b64d7bd (diff)
downloadgcc-27ebda1930cef2ac484abcca124a4d6230feee08.zip
gcc-27ebda1930cef2ac484abcca124a4d6230feee08.tar.gz
gcc-27ebda1930cef2ac484abcca124a4d6230feee08.tar.bz2
[Ada] Import documentation from the RM for various runtime units
2019-08-19 Pierre-Marie de Rodat <derodat@adacore.com> gcc/ada/ * libgnat/a-cgaaso.ads, libgnat/a-cgarso.ads, libgnat/a-cogeso.ads, libgnat/a-contai.ads, libgnat/a-locale.ads: Import documentation from the RM. From-SVN: r274659
Diffstat (limited to 'gcc/ada/libgnat/a-locale.ads')
-rw-r--r--gcc/ada/libgnat/a-locale.ads16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ada/libgnat/a-locale.ads b/gcc/ada/libgnat/a-locale.ads
index 43ba5bf..314001a 100644
--- a/gcc/ada/libgnat/a-locale.ads
+++ b/gcc/ada/libgnat/a-locale.ads
@@ -19,18 +19,34 @@ package Ada.Locales is
pragma Preelaborate (Locales);
pragma Remote_Types (Locales);
+ -- A locale identifies a geopolitical place or region and its associated
+ -- language, which can be used to determine other
+ -- internationalization-related characteristics. The active locale is the
+ -- locale associated with the partition of the current task.
+
type Language_Code is new String (1 .. 3)
with Dynamic_Predicate =>
(for all E of Language_Code => E in 'a' .. 'z');
+ -- Lower-case string representation of an ISO 639-3 alpha-3 code that
+ -- identifies a language.
type Country_Code is new String (1 .. 2)
with Dynamic_Predicate =>
(for all E of Country_Code => E in 'A' .. 'Z');
+ -- Upper-case string representation of an ISO 3166-1 alpha-2 code that
+ -- identifies a country.
Language_Unknown : constant Language_Code := "und";
Country_Unknown : constant Country_Code := "ZZ";
function Language return Language_Code;
+ -- Returns the code of the language associated with the active locale. If
+ -- the Language_Code associated with the active locale cannot be determined
+ -- from the environment, then Language returns Language_Unknown.
+
function Country return Country_Code;
+ -- Returns the code of the country associated with the active locale. If
+ -- the Country_Code associated with the active locale cannot be determined
+ -- from the environment, then Country returns Country_Unknown.
end Ada.Locales;