[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tyndur-devel] [PATCH] libc: setlocale() Stub zum Auslesen
+ libc: setlocale() Stub, der nur das aktuelle Locale ausliest
Signed-off-by: Antoine Kaufmann <toni@xxxxxxxxxx>
---
src/modules/include/locale.h | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/src/modules/include/locale.h b/src/modules/include/locale.h
index 3850fd0..13af482 100644
--- a/src/modules/include/locale.h
+++ b/src/modules/include/locale.h
@@ -66,6 +66,17 @@ struct lconv {
};
+/** Moegliche Werte fuer setlocale */
+enum {
+ LC_ALL,
+ LC_COLLATE,
+ LC_CTYPE,
+ LC_MESSAGES,
+ LC_MONETARY,
+ LC_NUMERIC,
+ LC_TIME,
+};
+
#ifndef CONFIG_LIBC_NO_STUBS
/**
* Gibt Informationen zur aktiven Locale zurueck
@@ -87,6 +98,17 @@ static inline struct lconv* localeconv(void)
return &lconv;
};
+
+/**
+ * Aktuelles Locale anpassen. Ist locale == NULL wird nichts gemacht.
+ *
+ * @return Nach dem Aufruf aktives locale
+ */
+static inline char* setlocale(int category, const char* locale)
+{
+ return "de_DE.UTF-8";
+}
+
#endif
#endif
--
1.6.0.6