summaryrefslogtreecommitdiff
path: root/gcc/ada/locales.c
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-22 10:00:18 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-22 10:00:18 +0000
commit75ef962565fe3f763a5e087399b6dd69fa200ced (patch)
tree012fdf002a8460dafcfb42b7a4799ec65a6268f9 /gcc/ada/locales.c
parentf37e6e70431d6cb6c018921b3b39814e3a250752 (diff)
downloadgcc-75ef962565fe3f763a5e087399b6dd69fa200ced.tar.gz
2010-10-22 Thomas Quinot <quinot@adacore.com>
* exp_ch5.adb, sem_ch5.adb, sinfo.ads, snames.ads-tmpl, par-ch5.adb: Minor reformatting. 2010-10-22 Geert Bosch <bosch@adacore.com> * stand.ads: Fix typo in comment. 2010-10-22 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb: Enable in-out parameter for functions. 2010-10-22 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Analyze_Quantified_Expression): Handle properly loop iterators that are transformed into container iterators after analysis. * exp_ch4.adb (Expand_N_Quantified_Expression): Handle properly both iterator forms before rewriting as a loop. 2010-10-22 Brett Porter <porter@adacore.com> * a-locale.adb, a-locale.ads, locales.c: New files. * Makefile.rtl: Add a-locale * gcc-interface/Makefile.in: Add locales.c git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165812 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/locales.c')
-rw-r--r--gcc/ada/locales.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/gcc/ada/locales.c b/gcc/ada/locales.c
new file mode 100644
index 00000000000..ba649e2b08b
--- /dev/null
+++ b/gcc/ada/locales.c
@@ -0,0 +1,56 @@
+/****************************************************************************
+ * *
+ * GNAT COMPILER COMPONENTS *
+ * *
+ * L O C A L E S *
+ * *
+ * C Implementation File *
+ * *
+ * Copyright (C) 2010, Free Software Foundation, Inc. *
+ * *
+ * GNAT is free software; you can redistribute it and/or modify it under *
+ * terms of the GNU General Public License as published by the Free Soft- *
+ * ware Foundation; either version 3, or (at your option) any later ver- *
+ * sion. GNAT is distributed in the hope that it will be useful, but WITH- *
+ * OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+ * or FITNESS FOR A PARTICULAR PURPOSE. *
+ * *
+ * As a special exception under Section 7 of GPL version 3, you are granted *
+ * additional permissions described in the GCC Runtime Library Exception, *
+ * version 3.1, as published by the Free Software Foundation. *
+ * *
+ * You should have received a copy of the GNU General Public License and *
+ * a copy of the GCC Runtime Library Exception along with this program; *
+ * see the files COPYING3 and COPYING.RUNTIME respectively. If not, see *
+ * <http://www.gnu.org/licenses/>. *
+ * *
+ * GNAT was originally developed by the GNAT team at New York University. *
+ * Extensive contributions were provided by Ada Core Technologies Inc. *
+ * *
+ ****************************************************************************/
+
+/* This file provides OS-dependent support for the Ada.Locales package. */
+
+typedef char char4 [4];
+
+/*
+ c_get_language_code needs to fill in the Alpha-3 encoding of the
+ language code (3 lowercase letters). That shoud be "und" if the
+ language is unknown. [see Ada.Locales]
+*/
+void c_get_language_code (char4 p) {
+ char *r = "und";
+ for (; *r != '\0'; p++, r++)
+ *p = *r;
+}
+
+/*
+ c_get_country_code needs to fill in the Alpha-2 encoding of the
+ country code (2 uppercase letters). That shoud be "ZZ" if the
+ country is unknown. [see Ada.Locales]
+*/
+void c_get_country_code (char4 p) {
+ char *r = "ZZ";
+ for (; *r != '\0'; p++, r++)
+ *p = *r;
+}