more locale_t interfaces (string stuff) and header updates
this should be everything except for some functions where the non-_l version isn't even implemented yet (mainly some non-ISO-C wcs* functions).
This commit is contained in:
parent
c09b6f8ab6
commit
36bf56940a
10 changed files with 63 additions and 0 deletions
7
src/locale/nl_langinfo_l.c
Normal file
7
src/locale/nl_langinfo_l.c
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#include <locale.h>
|
||||
#include <langinfo.h>
|
||||
|
||||
char *nl_langinfo_l(nl_item item, locale_t l)
|
||||
{
|
||||
return nl_langinfo(item);
|
||||
}
|
||||
7
src/locale/strcasecmp_l.c
Normal file
7
src/locale/strcasecmp_l.c
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#include <strings.h>
|
||||
#include <ctype.h>
|
||||
|
||||
int strcasecmp_l(const char *l, const char *r, locale_t loc)
|
||||
{
|
||||
return strcasecmp(l, r);
|
||||
}
|
||||
7
src/locale/strcoll_l.c
Normal file
7
src/locale/strcoll_l.c
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#include <string.h>
|
||||
#include <locale.h>
|
||||
|
||||
int strcoll_l(const char *l, const char *r, locale_t loc)
|
||||
{
|
||||
return strcoll(l, r);
|
||||
}
|
||||
7
src/locale/strerror_l.c
Normal file
7
src/locale/strerror_l.c
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#include <string.h>
|
||||
#include <locale.h>
|
||||
|
||||
char *strerror_l(int err, locale_t l)
|
||||
{
|
||||
return strerror(err);
|
||||
}
|
||||
7
src/locale/strftime_l.c
Normal file
7
src/locale/strftime_l.c
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#include <locale.h>
|
||||
#include <time.h>
|
||||
|
||||
size_t strftime_l(char *s, size_t n, const char *f, const struct tm *tm, locale_t l)
|
||||
{
|
||||
return strftime(s, n, f, tm);
|
||||
}
|
||||
7
src/locale/strncasecmp_l.c
Normal file
7
src/locale/strncasecmp_l.c
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#include <strings.h>
|
||||
#include <locale.h>
|
||||
|
||||
int strncasecmp_l(const char *l, const char *r, size_t n, locale_t loc)
|
||||
{
|
||||
return strncasecmp(l, r, n);
|
||||
}
|
||||
6
src/locale/strxfrm_l.c
Normal file
6
src/locale/strxfrm_l.c
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#include <string.h>
|
||||
|
||||
size_t strxfrm_l(char *dest, const char *src, size_t n, locale_t l)
|
||||
{
|
||||
return strxfrm(dest, src, n);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue