patch-quiet now works in systems with 'gsed'
[mono.git] / mono / metadata / culture-info.h
index c539802305211891e1f92ab83997b00dab111861..2392e750e60591fa1eb98023bd4c7805a2680323 100644 (file)
 
 #define NUM_SHORT_DATE_PATTERNS 14
 #define NUM_LONG_DATE_PATTERNS 8
-#define NUM_SHORT_TIME_PATTERNS 5
-#define NUM_LONG_TIME_PATTERNS 6
+#define NUM_SHORT_TIME_PATTERNS 11
+#define NUM_LONG_TIME_PATTERNS 10
+
+#define idx2string(idx) (locale_strings + (idx))
+
+/* need to change this if the string data ends up to not fit in a 64KB array. */
+typedef guint16 stridx_t;
 
 typedef struct {
-       const gchar *full_date_time_pattern;
-       const gchar *long_date_pattern;
-       const gchar *short_date_pattern;
-       const gchar *long_time_pattern;
-       const gchar *short_time_pattern;
-       const gchar *year_month_pattern;
-       const gchar *month_day_pattern;
-
-       const gchar *am_designator;
-       const gchar *pm_designator;
-
-       const gchar *day_names [NUM_DAYS]; 
-       const gchar *abbreviated_day_names [NUM_DAYS];
-       const gchar *month_names [NUM_MONTHS];
-       const gchar *abbreviated_month_names [NUM_MONTHS];
-
-       gint calendar_week_rule;
-       gint first_day_of_week;
-
-       const gchar *date_separator;
-       const gchar *time_separator;    
-
-       const gchar *short_date_patterns [NUM_SHORT_DATE_PATTERNS];
-       const gchar *long_date_patterns [NUM_LONG_DATE_PATTERNS];
-       const gchar *short_time_patterns [NUM_SHORT_TIME_PATTERNS];
-       const gchar *long_time_patterns [NUM_LONG_TIME_PATTERNS];
+       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;
+       const stridx_t short_time_pattern;
+       const stridx_t year_month_pattern;
+       const stridx_t month_day_pattern;
+
+       const stridx_t am_designator;
+       const stridx_t pm_designator;
+
+       const stridx_t day_names [NUM_DAYS]; 
+       const stridx_t abbreviated_day_names [NUM_DAYS];
+       const stridx_t month_names [NUM_MONTHS];
+       const stridx_t abbreviated_month_names [NUM_MONTHS];
+
+       gint8 calendar_week_rule;
+       gint8 first_day_of_week;
+
+       const stridx_t date_separator;
+       const stridx_t time_separator;  
+
+       const stridx_t short_date_patterns [NUM_SHORT_DATE_PATTERNS];
+       const stridx_t long_date_patterns [NUM_LONG_DATE_PATTERNS];
+       const stridx_t short_time_patterns [NUM_SHORT_TIME_PATTERNS];
+       const stridx_t long_time_patterns [NUM_LONG_TIME_PATTERNS];
 } DateTimeFormatEntry;
 
 typedef struct {
-       const gchar *currency_decimal_separator;
-       const gchar *currency_group_separator;
-       const gchar *percent_decimal_separator;
-       const gchar *percent_group_separator;
-       const gchar *number_decimal_separator;
-       const gchar *number_group_separator;
-
-       const gchar *currency_symbol;
-       const gchar *percent_symbol;
-       const gchar *nan_symbol;
-       const gchar *per_mille_symbol;
-       const gchar *negative_infinity_symbol;
-       const gchar *positive_infinity_symbol;
-
-       const gchar *negative_sign;
-       const gchar *positive_sign;
-
-       gint currency_negative_pattern;
-       gint currency_positive_pattern;
-       gint percent_negative_pattern;
-       gint percent_positive_pattern;
-       gint number_negative_pattern;
-
-       gint currency_decimal_digits;
-       gint percent_decimal_digits;
-       gint number_decimal_digits;
+       const stridx_t currency_decimal_separator;
+       const stridx_t currency_group_separator;
+       const stridx_t percent_decimal_separator;
+       const stridx_t percent_group_separator;
+       const stridx_t number_decimal_separator;
+       const stridx_t number_group_separator;
+
+       const stridx_t currency_symbol;
+       const stridx_t percent_symbol;
+       const stridx_t nan_symbol;
+       const stridx_t per_mille_symbol;
+       const stridx_t negative_infinity_symbol;
+       const stridx_t positive_infinity_symbol;
+
+       const stridx_t negative_sign;
+       const stridx_t positive_sign;
+
+       gint8 currency_negative_pattern;
+       gint8 currency_positive_pattern;
+       gint8 percent_negative_pattern;
+       gint8 percent_positive_pattern;
+       gint8 number_negative_pattern;
+
+       gint8 currency_decimal_digits;
+       gint8 percent_decimal_digits;
+       gint8 number_decimal_digits;
 
        const gint currency_group_sizes [GROUP_SIZE];
        const gint percent_group_sizes [GROUP_SIZE];
@@ -77,28 +82,58 @@ typedef struct {
 } NumberFormatEntry;
 
 typedef struct {
-       gint lcid;
-       gint parent_lcid;
-       gint specific_lcid;
-       const gchar *name;
-       const gchar *icu_name;
-       const gchar *englishname;
-       const gchar *displayname;
-       const gchar *nativename;
-       const gchar *win3lang;
-       const gchar *iso3lang;
-       const gchar *iso2lang;
+       const gint ansi;
+       const gint ebcdic;
+       const gint mac;
+       const gint oem;
+       const char list_sep;
+} TextInfoEntry;
+
+typedef struct {
+       gint16 lcid;
+       gint16 parent_lcid;
+       gint16 specific_lcid;
+       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;
 
        gint calendar_data [NUM_OPT_CALS];
 
-       gint datetime_format_index;
-       gint number_format_index;
+       gint16 datetime_format_index;
+       gint16 number_format_index;
+       
+       TextInfoEntry text_info;
 } CultureInfoEntry;
 
 typedef struct {
-       const gchar *name;
-       gint culture_entry_index;
+       const stridx_t name;
+       gint16 culture_entry_index;
 } CultureInfoNameEntry;
 
+typedef struct {
+       gint16 lcid;
+       gint16 region_id; /* it also works as geoId in 2.0 */
+       /* gint8 measurement_system; // 0:metric 1:US 2:UK */
+       const stridx_t iso2name;
+       const stridx_t iso3name;
+       const stridx_t win3name;
+       const stridx_t english_name;
+       const stridx_t currency_symbol;
+       const stridx_t iso_currency_symbol;
+       const stridx_t currency_english_name;
+} RegionInfoEntry;
+
+typedef struct {
+       const stridx_t name;
+       gint16 region_entry_index;
+} RegionInfoNameEntry;
+
 #endif