summaryrefslogtreecommitdiff
path: root/src/locale
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-02-06 21:51:02 -0500
committerRich Felker <dalias@aerifal.cx>2012-02-06 21:51:02 -0500
commit36bf56940af90baa478dd1258884291d5d213d10 (patch)
treef959d61ee79470575a2921e568442ec9c0b11b6e /src/locale
parentc09b6f8ab6edefba52183f8c5ecf6520a8b7ad8f (diff)
downloadmusl-36bf56940af90baa478dd1258884291d5d213d10.tar.gz
musl-36bf56940af90baa478dd1258884291d5d213d10.tar.bz2
musl-36bf56940af90baa478dd1258884291d5d213d10.tar.xz
musl-36bf56940af90baa478dd1258884291d5d213d10.zip
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).
Diffstat (limited to 'src/locale')
-rw-r--r--src/locale/nl_langinfo_l.c7
-rw-r--r--src/locale/strcasecmp_l.c7
-rw-r--r--src/locale/strcoll_l.c7
-rw-r--r--src/locale/strerror_l.c7
-rw-r--r--src/locale/strftime_l.c7
-rw-r--r--src/locale/strncasecmp_l.c7
-rw-r--r--src/locale/strxfrm_l.c6
7 files changed, 48 insertions, 0 deletions
diff --git a/src/locale/nl_langinfo_l.c b/src/locale/nl_langinfo_l.c
new file mode 100644
index 00000000..b54db95c
--- /dev/null
+++ b/src/locale/nl_langinfo_l.c
@@ -0,0 +1,7 @@
+#include <locale.h>
+#include <langinfo.h>
+
+char *nl_langinfo_l(nl_item item, locale_t l)
+{
+ return nl_langinfo(item);
+}
diff --git a/src/locale/strcasecmp_l.c b/src/locale/strcasecmp_l.c
new file mode 100644
index 00000000..eea2f80b
--- /dev/null
+++ b/src/locale/strcasecmp_l.c
@@ -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);
+}
diff --git a/src/locale/strcoll_l.c b/src/locale/strcoll_l.c
new file mode 100644
index 00000000..7948b0d1
--- /dev/null
+++ b/src/locale/strcoll_l.c
@@ -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);
+}
diff --git a/src/locale/strerror_l.c b/src/locale/strerror_l.c
new file mode 100644
index 00000000..765f5c69
--- /dev/null
+++ b/src/locale/strerror_l.c
@@ -0,0 +1,7 @@
+#include <string.h>
+#include <locale.h>
+
+char *strerror_l(int err, locale_t l)
+{
+ return strerror(err);
+}
diff --git a/src/locale/strftime_l.c b/src/locale/strftime_l.c
new file mode 100644
index 00000000..70b2f151
--- /dev/null
+++ b/src/locale/strftime_l.c
@@ -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);
+}
diff --git a/src/locale/strncasecmp_l.c b/src/locale/strncasecmp_l.c
new file mode 100644
index 00000000..af33ada6
--- /dev/null
+++ b/src/locale/strncasecmp_l.c
@@ -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);
+}
diff --git a/src/locale/strxfrm_l.c b/src/locale/strxfrm_l.c
new file mode 100644
index 00000000..78e56554
--- /dev/null
+++ b/src/locale/strxfrm_l.c
@@ -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);
+}