Initial revision

This commit is contained in:
eck 1989-06-14 16:11:19 +00:00
parent 8c9800d8fe
commit cd367c7940
2 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,35 @@
/*
* localeconv - set components of a struct according to current locale
*/
/* $Header$ */
#include <limits.h>
#include <locale.h>
extern struct lconv _lc;
struct lconv *
localeconv(void)
{
register struct lconv *lcp = &_lc;
lcp->decimal_point = ".";
lcp->thousands_sep = "";
lcp->grouping = "";
lcp->int_curr_symbol = "";
lcp->currency_symbol = "";
lcp->mon_decimal_point = "";
lcp->mon_thousands_sep = "";
lcp->mon_grouping = "";
lcp->positive_sign = "";
lcp->negative_sign = "";
lcp->frac_digits = CHAR_MAX;
lcp->p_cs_precedes = CHAR_MAX;
lcp->p_sep_by_space = CHAR_MAX;
lcp->n_cs_precedes = CHAR_MAX;
lcp->n_sep_by_space = CHAR_MAX;
lcp->p_sign_posn = CHAR_MAX;
lcp->n_sign_posn = CHAR_MAX;
return lcp;
}

View file

@ -0,0 +1,26 @@
/*
* setlocale - set the programs locale
*/
/* $Header$ */
#include <locale.h>
struct lconv _lc;
char *
setlocale(int category, const char *locale)
{
if (strcmp(locale, "C")) return (char *)NULL;
switch(category) {
case LC_ALL:
case LC_COLLATE:
case LC_CTYPE:
case LC_MONETARY:
case LC_NUMERIC:
case LC_TIME:
return locale;
default:
return (char *)NULL;
}
}