Merge pull request #4003 from ntherning/ignore-disconnected-interfaces-in-HttpListene...
[mono.git] / mono / metadata / culture-info.h
1
2 #ifndef _MONO_METADATA_CULTURE_INFO_H_
3 #define _MONO_METADATA_CULTURE_INFO_H_ 1
4
5 #include <glib.h>
6 #include <mono/metadata/object.h>
7
8 #define NUM_DAYS 7
9 #define NUM_MONTHS 13
10 #define GROUP_SIZE 2
11 #define NUM_CALENDARS 4
12
13 #define NUM_SHORT_DATE_PATTERNS 14
14 #define NUM_LONG_DATE_PATTERNS 10
15 #define NUM_SHORT_TIME_PATTERNS 12
16 #define NUM_LONG_TIME_PATTERNS 9
17 #define NUM_YEAR_MONTH_PATTERNS 8
18
19 #define idx2string(idx) (locale_strings + (idx))
20 #define pattern2string(idx) (patterns + (idx))
21 #define dtidx2string(idx) (datetime_strings + (idx))
22
23 /* need to change this if the string data ends up to not fit in a 64KB array. */
24 typedef guint16 stridx_t;
25
26 typedef struct {
27         const stridx_t month_day_pattern;
28         const stridx_t am_designator;
29         const stridx_t pm_designator;
30
31         const stridx_t day_names [NUM_DAYS]; 
32         const stridx_t abbreviated_day_names [NUM_DAYS];
33         const stridx_t shortest_day_names [NUM_DAYS];
34         const stridx_t month_names [NUM_MONTHS];
35         const stridx_t month_genitive_names [NUM_MONTHS];
36         const stridx_t abbreviated_month_names [NUM_MONTHS];
37         const stridx_t abbreviated_month_genitive_names [NUM_MONTHS];
38
39         const gint8 calendar_week_rule;
40         const gint8 first_day_of_week;
41
42         const stridx_t date_separator;
43         const stridx_t time_separator;  
44
45         const stridx_t short_date_patterns [NUM_SHORT_DATE_PATTERNS];
46         const stridx_t long_date_patterns [NUM_LONG_DATE_PATTERNS];
47         const stridx_t short_time_patterns [NUM_SHORT_TIME_PATTERNS];
48         const stridx_t long_time_patterns [NUM_LONG_TIME_PATTERNS];
49         const stridx_t year_month_patterns [NUM_YEAR_MONTH_PATTERNS];
50 } DateTimeFormatEntry;
51
52 typedef struct {
53         const stridx_t currency_decimal_separator;
54         const stridx_t currency_group_separator;
55         const stridx_t number_decimal_separator;
56         const stridx_t number_group_separator;
57
58         const stridx_t currency_symbol;
59         const stridx_t percent_symbol;
60         const stridx_t nan_symbol;
61         const stridx_t per_mille_symbol;
62         const stridx_t negative_infinity_symbol;
63         const stridx_t positive_infinity_symbol;
64
65         const stridx_t negative_sign;
66         const stridx_t positive_sign;
67
68         const gint8 currency_negative_pattern;
69         const gint8 currency_positive_pattern;
70         const gint8 percent_negative_pattern;
71         const gint8 percent_positive_pattern;
72         const gint8 number_negative_pattern;
73
74         const gint8 currency_decimal_digits;
75         const gint8 number_decimal_digits;
76
77         const gint currency_group_sizes [GROUP_SIZE];
78         const gint number_group_sizes [GROUP_SIZE];     
79 } NumberFormatEntry;
80
81 typedef struct {
82         const gint ansi;
83         const gint ebcdic;
84         const gint mac;
85         const gint oem;
86         const MonoBoolean is_right_to_left;
87         const char list_sep;
88 } TextInfoEntry;
89
90 typedef struct {
91         const gint16 lcid;
92         const gint16 parent_lcid;
93         const gint16 calendar_type;
94         const gint16 region_entry_index;
95         const stridx_t name;
96         const stridx_t englishname;
97         const stridx_t nativename;
98         const stridx_t win3lang;
99         const stridx_t iso3lang;
100         const stridx_t iso2lang;
101         const stridx_t territory;
102         const stridx_t native_calendar_names [NUM_CALENDARS];
103
104         const gint16 datetime_format_index;
105         const gint16 number_format_index;
106         
107         const TextInfoEntry text_info;
108 } CultureInfoEntry;
109
110 typedef struct {
111         const stridx_t name;
112         const gint16 culture_entry_index;
113 } CultureInfoNameEntry;
114
115 typedef struct {
116         const gint16 geo_id;
117         const stridx_t iso2name;
118         const stridx_t iso3name;
119         const stridx_t win3name;
120         const stridx_t english_name;
121         const stridx_t native_name;
122         const stridx_t currency_symbol;
123         const stridx_t iso_currency_symbol;
124         const stridx_t currency_english_name;
125         const stridx_t currency_native_name;
126 } RegionInfoEntry;
127
128 typedef struct {
129         const stridx_t name;
130         const gint16 region_entry_index;
131 } RegionInfoNameEntry;
132
133 #endif
134