X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Flocale.c;h=a0eec0223f04d73a798e7132ab955d7e8d054a8c;hb=c8f799d852e3698468a78954d82588e841cc0b70;hp=4dfe663dd5c79d0c53efcf674dd79985fad23aa9;hpb=dcc8a8e99f69e090a03b7b868443addbc0817820;p=pdclib.old diff --git a/functions/locale.c b/functions/locale.c index 4dfe663..a0eec02 100644 --- a/functions/locale.c +++ b/functions/locale.c @@ -1,9 +1,58 @@ -// ---------------------------------------------------------------------------- -// $Id$ -// ---------------------------------------------------------------------------- -// Public Domain C Library - http://pdclib.sourceforge.net -// This code is Public Domain. Use, modify, and redistribute at will. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------------- + * Public Domain C Library - http://pdclib.sourceforge.net + * This code is Public Domain. Use, modify, and redistribute at will. + * --------------------------------------------------------------------------*/ + +/* PDPC code - unreviewed +static struct lconv thislocale = { + ".", + "", + "", + "", + "", + "", + "", + "", + "", + "", + CHAR_MAX, + CHAR_MAX, + CHAR_MAX, + CHAR_MAX, + CHAR_MAX, + CHAR_MAX, + CHAR_MAX, + CHAR_MAX +}; +*/ -struct lconv * localeconv( void ) { /* TODO */ }; 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); +} +*/