fixed some bugs, added LIST, Makefile & .distr
This commit is contained in:
parent
d43142d811
commit
8a409311da
5 changed files with 26 additions and 5 deletions
4
lang/cem/libcc.ansi/locale/.distr
Normal file
4
lang/cem/libcc.ansi/locale/.distr
Normal file
|
@ -0,0 +1,4 @@
|
|||
LIST
|
||||
Makefile
|
||||
localeconv.c
|
||||
setlocale.c
|
2
lang/cem/libcc.ansi/locale/LIST
Normal file
2
lang/cem/libcc.ansi/locale/LIST
Normal file
|
@ -0,0 +1,2 @@
|
|||
localeconv.c
|
||||
setlocale.c
|
12
lang/cem/libcc.ansi/locale/Makefile
Normal file
12
lang/cem/libcc.ansi/locale/Makefile
Normal file
|
@ -0,0 +1,12 @@
|
|||
CFLAGS=-L -LIB
|
||||
|
||||
.SUFFIXES: .o .e .c
|
||||
|
||||
.e.o:
|
||||
$(CC) $(CFLAGS) -c -o $@ $*.e
|
||||
|
||||
clean:
|
||||
rm -rf localeconv.o setlocale.o OLIST
|
||||
|
||||
localeconv.o:
|
||||
setlocale.o:
|
|
@ -23,6 +23,7 @@ localeconv(void)
|
|||
lcp->mon_grouping = "";
|
||||
lcp->positive_sign = "";
|
||||
lcp->negative_sign = "";
|
||||
lcp->int_frac_digits = CHAR_MAX;
|
||||
lcp->frac_digits = CHAR_MAX;
|
||||
lcp->p_cs_precedes = CHAR_MAX;
|
||||
lcp->p_sep_by_space = CHAR_MAX;
|
||||
|
|
|
@ -4,22 +4,24 @@
|
|||
/* $Header$ */
|
||||
|
||||
#include <locale.h>
|
||||
#include <string.h>
|
||||
|
||||
struct lconv _lc;
|
||||
|
||||
char *
|
||||
setlocale(int category, const char *locale)
|
||||
{
|
||||
if (strcmp(locale, "C")) return (char *)NULL;
|
||||
if (!locale) return "C";
|
||||
if (*locale && 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_COLLATE:
|
||||
case LC_TIME:
|
||||
return locale;
|
||||
case LC_NUMERIC:
|
||||
case LC_MONETARY:
|
||||
return *locale ? (char *)locale : "C";
|
||||
default:
|
||||
return (char *)NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue