LibC: Start work on locales
This patch adds 2 locales, POSIX locale and UTF8 locale. functions `mbstowcs()` and `strcoll()` use locales to do convertions and comparison respectively.
This commit is contained in:
@@ -9,7 +9,7 @@ __BEGIN_DECLS
|
||||
|
||||
#ifndef __locale_t_defined
|
||||
#define __locale_t_defined 1
|
||||
typedef int locale_t;
|
||||
typedef enum { LOCALE_INVALID, LOCALE_POSIX, LOCALE_UTF8 } locale_t;
|
||||
#endif
|
||||
|
||||
__END_DECLS
|
||||
|
||||
@@ -68,6 +68,8 @@ locale_t newlocale(int category_mask, const char* locale, locale_t base);
|
||||
char* setlocale(int category, const char* locale);
|
||||
locale_t uselocale(locale_t newloc);
|
||||
|
||||
locale_t __getlocale(int category);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user