]> pd.if.org Git - pdclib/blobdiff - functions/locale.c
Merged PDPCLIB and Therx code.
[pdclib] / functions / locale.c
index 4dfe663dd5c79d0c53efcf674dd79985fad23aa9..757bf8ee85050df7e09b23a3cdda64c5e6004186 100644 (file)
@@ -5,5 +5,54 @@
 // This code is Public Domain. Use, modify, and redistribute at will.
 // ----------------------------------------------------------------------------
 
-struct lconv * localeconv( void ) { /* TODO */ };
+/* PDPC code - unreviewed
+static struct lconv thislocale = {
+    ".",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "",
+    CHAR_MAX,
+    CHAR_MAX,
+    CHAR_MAX,
+    CHAR_MAX,
+    CHAR_MAX,
+    CHAR_MAX,
+    CHAR_MAX,
+    CHAR_MAX
+};
+*/
+
 char * setlocale( int categories, const char * locale_name ) { /* TODO */ };
+
+/* PDPC code - unreviewed
+{
+    (void)category;
+    if (locale == NULL)
+    {
+        return ("C");
+    }
+    else if ((strcmp(locale, "C") == 0)
+             || (strcmp(locale, "") == 0))
+    {
+        return ("C");
+    }
+    else
+    {
+        return (NULL);
+    }
+}
+*/
+
+struct lconv * localeconv( void ) { /* TODO */ };
+
+/* PDPC code - unreviewed
+{
+    return (&thislocale);
+}
+*/