implement locale file loading and state for remaining locale categories
there is still no code which actually uses the loaded locale files, so the main observable effect of this commit is that calls to setlocale store and give back the names of the selected locales for the remaining categories (LC_TIME, LC_COLLATE, LC_MONETARY) if a locale file by the requested name could be loaded.
This commit is contained in:
@@ -5,9 +5,12 @@
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
|
||||
struct __locale_map;
|
||||
|
||||
struct __locale_struct {
|
||||
int ctype_utf8;
|
||||
char *messages_name;
|
||||
struct __locale_map *cat[4];
|
||||
};
|
||||
|
||||
struct __libc {
|
||||
|
||||
@@ -5,6 +5,13 @@
|
||||
|
||||
#define LOCALE_NAME_MAX 15
|
||||
|
||||
struct __locale_map {
|
||||
const void *map;
|
||||
size_t map_size;
|
||||
char name[LOCALE_NAME_MAX+1];
|
||||
struct __locale_map *next;
|
||||
};
|
||||
|
||||
int __setlocalecat(locale_t, int, const char *);
|
||||
|
||||
#define CURRENT_LOCALE \
|
||||
|
||||
Reference in New Issue
Block a user