Merge pull request #1132 from mattleibow/bugfix-20925
[mono.git] / mono / metadata / culture-info.h
index 49516a79560810f44124c1b86c14a082bc352df2..5ee2eaf03f3a840e974db2f53d8c0e4fe078f85a 100644 (file)
@@ -3,16 +3,17 @@
 #define _MONO_METADATA_CULTURE_INFO_H_ 1
 
 #include <glib.h>
+#include <mono/metadata/object.h>
 
 #define NUM_DAYS 7
 #define NUM_MONTHS 13
-#define GROUP_SIZE 5
-#define NUM_OPT_CALS 5
+#define GROUP_SIZE 2
+#define NUM_CALENDARS 4
 
 #define NUM_SHORT_DATE_PATTERNS 14
 #define NUM_LONG_DATE_PATTERNS 8
-#define NUM_SHORT_TIME_PATTERNS 5
-#define NUM_LONG_TIME_PATTERNS 10
+#define NUM_SHORT_TIME_PATTERNS 12
+#define NUM_LONG_TIME_PATTERNS 9
 
 #define idx2string(idx) (locale_strings + (idx))
 
@@ -20,7 +21,6 @@
 typedef guint16 stridx_t;
 
 typedef struct {
-       const stridx_t full_date_time_pattern;
        const stridx_t long_date_pattern;
        const stridx_t short_date_pattern;
        const stridx_t long_time_pattern;
@@ -33,11 +33,14 @@ typedef struct {
 
        const stridx_t day_names [NUM_DAYS]; 
        const stridx_t abbreviated_day_names [NUM_DAYS];
+       const stridx_t shortest_day_names [NUM_DAYS];
        const stridx_t month_names [NUM_MONTHS];
+       const stridx_t month_genitive_names [NUM_MONTHS];
        const stridx_t abbreviated_month_names [NUM_MONTHS];
+       const stridx_t abbreviated_month_genitive_names [NUM_MONTHS];
 
-       gint calendar_week_rule;
-       gint first_day_of_week;
+       const gint8 calendar_week_rule;
+       const gint8 first_day_of_week;
 
        const stridx_t date_separator;
        const stridx_t time_separator;  
@@ -66,15 +69,15 @@ typedef struct {
        const stridx_t negative_sign;
        const stridx_t positive_sign;
 
-       gint currency_negative_pattern;
-       gint currency_positive_pattern;
-       gint percent_negative_pattern;
-       gint percent_positive_pattern;
-       gint number_negative_pattern;
+       const gint8 currency_negative_pattern;
+       const gint8 currency_positive_pattern;
+       const gint8 percent_negative_pattern;
+       const gint8 percent_positive_pattern;
+       const gint8 number_negative_pattern;
 
-       gint currency_decimal_digits;
-       gint percent_decimal_digits;
-       gint number_decimal_digits;
+       const gint8 currency_decimal_digits;
+       const gint8 percent_decimal_digits;
+       const gint8 number_decimal_digits;
 
        const gint currency_group_sizes [GROUP_SIZE];
        const gint percent_group_sizes [GROUP_SIZE];
@@ -86,34 +89,52 @@ typedef struct {
        const gint ebcdic;
        const gint mac;
        const gint oem;
+       const MonoBoolean is_right_to_left;
        const char list_sep;
 } TextInfoEntry;
 
 typedef struct {
-       gint lcid;
-       gint parent_lcid;
-       gint specific_lcid;
+       const gint16 lcid;
+       const gint16 parent_lcid;
+       const gint16 calendar_type;
+       const gint16 region_entry_index;
        const stridx_t name;
-       const stridx_t icu_name;
        const stridx_t englishname;
-       const stridx_t displayname;
        const stridx_t nativename;
        const stridx_t win3lang;
        const stridx_t iso3lang;
        const stridx_t iso2lang;
+       const stridx_t territory;
+       const stridx_t native_calendar_names [NUM_CALENDARS];
 
-       gint calendar_data [NUM_OPT_CALS];
-
-       gint16 datetime_format_index;
-       gint16 number_format_index;
+       const gint16 datetime_format_index;
+       const gint16 number_format_index;
        
-       TextInfoEntry text_info;
+       const TextInfoEntry text_info;
 } CultureInfoEntry;
 
 typedef struct {
        const stridx_t name;
-       gint16 culture_entry_index;
+       const gint16 culture_entry_index;
 } CultureInfoNameEntry;
 
+typedef struct {
+       const gint16 geo_id;
+       const stridx_t iso2name;
+       const stridx_t iso3name;
+       const stridx_t win3name;
+       const stridx_t english_name;
+       const stridx_t native_name;
+       const stridx_t currency_symbol;
+       const stridx_t iso_currency_symbol;
+       const stridx_t currency_english_name;
+       const stridx_t currency_native_name;
+} RegionInfoEntry;
+
+typedef struct {
+       const stridx_t name;
+       const gint16 region_entry_index;
+} RegionInfoNameEntry;
+
 #endif