View | Details | Raw Unified | Return to bug 10871 | Differences between
and this patch

Collapse All | Expand All

(-)a/conform/data/langinfo.h-data (+12 lines)
Lines 49-54 constant ERA_D_FMT Link Here
49
constant ERA_D_T_FMT
49
constant ERA_D_T_FMT
50
constant ERA_T_FMT
50
constant ERA_T_FMT
51
constant ALT_DIGITS
51
constant ALT_DIGITS
52
constant ALTMON_1
53
constant ALTMON_2
54
constant ALTMON_3
55
constant ALTMON_4
56
constant ALTMON_5
57
constant ALTMON_6
58
constant ALTMON_7
59
constant ALTMON_8
60
constant ALTMON_9
61
constant ALTMON_10
62
constant ALTMON_11
63
constant ALTMON_12
52
constant RADIXCHAR
64
constant RADIXCHAR
53
constant THOUSEP
65
constant THOUSEP
54
constant YESEXPR
66
constant YESEXPR
(-)a/locale/categories.def (+3 lines)
Lines 249-254 DEFINE_CATEGORY Link Here
249
  DEFINE_ELEMENT (_DATE_FMT,                "date_fmt",            opt, string)
249
  DEFINE_ELEMENT (_DATE_FMT,                "date_fmt",            opt, string)
250
  DEFINE_ELEMENT (_NL_W_DATE_FMT,           "wide-date_fmt",       opt, wstring)
250
  DEFINE_ELEMENT (_NL_W_DATE_FMT,           "wide-date_fmt",       opt, wstring)
251
  DEFINE_ELEMENT (_NL_TIME_CODESET,	    "time-codeset",	   std, string)
251
  DEFINE_ELEMENT (_NL_TIME_CODESET,	    "time-codeset",	   std, string)
252
  DEFINE_ELEMENT (ALTMON_1,       "alt_mon",       opt, stringarray, 12, 12)
253
  DEFINE_ELEMENT (_NL_WALTMON_1,  "wide-alt_mon",    opt, wstringarray, 12, 12)
254
  DEFINE_ELEMENT (_NL_DAY_MONTH_ORDER, "day_month_order", opt, byte)
252
  ), NO_POSTLOAD)
255
  ), NO_POSTLOAD)
253
256
254
257
(-)a/locale/langinfo.h (+48 lines)
Lines 231-236 enum Link Here
231
231
232
  _NL_TIME_CODESET,
232
  _NL_TIME_CODESET,
233
233
234
  /* Alternative (genitive, full date context) month names.  */
235
  ALTMON_1,			/* of January */
236
#define ALTMON_1		ALTMON_1
237
  ALTMON_2,
238
#define ALTMON_2		ALTMON_2
239
  ALTMON_3,
240
#define ALTMON_3		ALTMON_3
241
  ALTMON_4,
242
#define ALTMON_4		ALTMON_4
243
  ALTMON_5,
244
#define ALTMON_5		ALTMON_5
245
  ALTMON_6,
246
#define ALTMON_6		ALTMON_6
247
  ALTMON_7,
248
#define ALTMON_7		ALTMON_7
249
  ALTMON_8,
250
#define ALTMON_8		ALTMON_8
251
  ALTMON_9,
252
#define ALTMON_9		ALTMON_9
253
  ALTMON_10,
254
#define ALTMON_10		ALTMON_10
255
  ALTMON_11,
256
#define ALTMON_11		ALTMON_11
257
  ALTMON_12,
258
#define ALTMON_12		ALTMON_12
259
260
  /* Alternative (genitive, full date context) month names.  */
261
  _NL_WALTMON_1,			/* of January */
262
  _NL_WALTMON_2,
263
  _NL_WALTMON_3,
264
  _NL_WALTMON_4,
265
  _NL_WALTMON_5,
266
  _NL_WALTMON_6,
267
  _NL_WALTMON_7,
268
  _NL_WALTMON_8,
269
  _NL_WALTMON_9,
270
  _NL_WALTMON_10,
271
  _NL_WALTMON_11,
272
  _NL_WALTMON_12,
273
274
  _NL_DAY_MONTH_ORDER,	/* Day-month or month-day order in full date.      */
275
			/* Value 1 means that day-month is valid and also  */
276
			/* requires an alternative (genitive) month case.  */
277
			/* 2 is default, means that both orders are valid  */
278
			/* or it does not matter because the alternative   */
279
			/* case does not exist. 3 means that month-day is  */
280
			/* a valid order.  */
281
234
  _NL_NUM_LC_TIME,	/* Number of indices in LC_TIME category.  */
282
  _NL_NUM_LC_TIME,	/* Number of indices in LC_TIME category.  */
235
283
236
  /* LC_COLLATE category: text sorting.
284
  /* LC_COLLATE category: text sorting.
(-)a/locale/programs/ld-time.c (+26 lines)
Lines 91-96 struct locale_time_t Link Here
91
  const char *date_fmt;
91
  const char *date_fmt;
92
  const uint32_t *wdate_fmt;
92
  const uint32_t *wdate_fmt;
93
  int alt_digits_defined;
93
  int alt_digits_defined;
94
  const char *alt_mon[12];
95
  const uint32_t *walt_mon[12];
96
  int alt_mon_defined;
97
  unsigned char day_month_order;
94
  unsigned char week_ndays;
98
  unsigned char week_ndays;
95
  uint32_t week_1stday;
99
  uint32_t week_1stday;
96
  unsigned char week_1stweek;
100
  unsigned char week_1stweek;
Lines 531-536 No definition for %s category found"), "LC_TIME")); Link Here
531
    time->date_fmt = "%a %b %e %H:%M:%S %Z %Y";
535
    time->date_fmt = "%a %b %e %H:%M:%S %Z %Y";
532
  if (time->wdate_fmt == NULL)
536
  if (time->wdate_fmt == NULL)
533
    time->wdate_fmt = (const uint32_t *) L"%a %b %e %H:%M:%S %Z %Y";
537
    time->wdate_fmt = (const uint32_t *) L"%a %b %e %H:%M:%S %Z %Y";
538
539
  if (time->day_month_order == '\0')
540
    /* The definition does not specify this so the default is used.  */
541
    time->day_month_order = 2;
542
  else if (time->day_month_order > 3)
543
    WITH_CUR_LOCALE (error (0, 0, _("\
544
%s: values for field `%s' must not be larger than %d"),
545
			    "LC_TIME", "day_month_order", 3));
534
}
546
}
535
547
536
548
Lines 648-653 time_output (struct localedef_t *locale, const struct charmap_t *charmap, Link Here
648
  add_locale_string (&file, time->date_fmt);
660
  add_locale_string (&file, time->date_fmt);
649
  add_locale_wstring (&file, time->wdate_fmt);
661
  add_locale_wstring (&file, time->wdate_fmt);
650
  add_locale_string (&file, charmap->code_set_name);
662
  add_locale_string (&file, charmap->code_set_name);
663
664
  /* The alt'mons.  */
665
  for (n = 0; n < 12; ++n)
666
    add_locale_string (&file, time->alt_mon[n] ?: "");
667
668
  /* The wide character alt'mons.  */
669
  for (n = 0; n < 12; ++n)
670
    add_locale_wstring (&file, time->walt_mon[n] ?: empty_wstr);
671
672
  /* The preferred day-month order in full date format.  */
673
  add_locale_char (&file, time->day_month_order);
674
651
  write_locale_data (output_path, LC_TIME, "LC_TIME", &file);
675
  write_locale_data (output_path, LC_TIME, "LC_TIME", &file);
652
}
676
}
653
677
Lines 791-796 time_read (struct linereader *ldfile, struct localedef_t *result, Link Here
791
	  STRARR_ELEM (mon, 12, 12);
815
	  STRARR_ELEM (mon, 12, 12);
792
	  STRARR_ELEM (am_pm, 2, 2);
816
	  STRARR_ELEM (am_pm, 2, 2);
793
	  STRARR_ELEM (alt_digits, 0, 100);
817
	  STRARR_ELEM (alt_digits, 0, 100);
818
	  STRARR_ELEM (alt_mon, 12, 12);
794
819
795
	case tok_era:
820
	case tok_era:
796
	  /* Ignore the rest of the line if we don't need the input of
821
	  /* Ignore the rest of the line if we don't need the input of
Lines 896-901 time_read (struct linereader *ldfile, struct localedef_t *result, Link Here
896
	  INT_ELEM (first_weekday);
921
	  INT_ELEM (first_weekday);
897
	  INT_ELEM (first_workday);
922
	  INT_ELEM (first_workday);
898
	  INT_ELEM (cal_direction);
923
	  INT_ELEM (cal_direction);
924
	  INT_ELEM (day_month_order);
899
925
900
	case tok_week:
926
	case tok_week:
901
	  /* Ignore the rest of the line if we don't need the input of
927
	  /* Ignore the rest of the line if we don't need the input of
(-)a/locale/programs/locfile-kw.gperf (+2 lines)
Lines 148-153 first_workday, tok_first_workday, 0 Link Here
148
cal_direction,          tok_cal_direction,          0
148
cal_direction,          tok_cal_direction,          0
149
timezone,               tok_timezone,               0
149
timezone,               tok_timezone,               0
150
date_fmt,               tok_date_fmt,               0
150
date_fmt,               tok_date_fmt,               0
151
alt_mon,                tok_alt_mon,                0
152
day_month_order,        tok_day_month_order,        0
151
LC_MESSAGES,            tok_lc_messages,            0
153
LC_MESSAGES,            tok_lc_messages,            0
152
yesexpr,                tok_yesexpr,                0
154
yesexpr,                tok_yesexpr,                0
153
noexpr,                 tok_noexpr,                 0
155
noexpr,                 tok_noexpr,                 0
(-)a/locale/programs/locfile-kw.h (-54 / +58 lines)
Lines 54-60 Link Here
54
#line 24 "locfile-kw.gperf"
54
#line 24 "locfile-kw.gperf"
55
struct keyword_t ;
55
struct keyword_t ;
56
56
57
#define TOTAL_KEYWORDS 176
57
#define TOTAL_KEYWORDS 178
58
#define MIN_WORD_LENGTH 3
58
#define MIN_WORD_LENGTH 3
59
#define MAX_WORD_LENGTH 22
59
#define MAX_WORD_LENGTH 22
60
#define MIN_HASH_VALUE 3
60
#define MIN_HASH_VALUE 3
Lines 147-168 locfile_hash (register const char *str, register unsigned int len) Link Here
147
#line 30 "locfile-kw.gperf"
147
#line 30 "locfile-kw.gperf"
148
      {"LC_CTYPE",               tok_lc_ctype,               0},
148
      {"LC_CTYPE",               tok_lc_ctype,               0},
149
      {""},
149
      {""},
150
#line 166 "locfile-kw.gperf"
150
#line 168 "locfile-kw.gperf"
151
      {"LC_ADDRESS",             tok_lc_address,             0},
151
      {"LC_ADDRESS",             tok_lc_address,             0},
152
#line 151 "locfile-kw.gperf"
152
#line 153 "locfile-kw.gperf"
153
      {"LC_MESSAGES",            tok_lc_messages,            0},
153
      {"LC_MESSAGES",            tok_lc_messages,            0},
154
#line 159 "locfile-kw.gperf"
154
#line 161 "locfile-kw.gperf"
155
      {"LC_NAME",                tok_lc_name,                0},
155
      {"LC_NAME",                tok_lc_name,                0},
156
#line 156 "locfile-kw.gperf"
156
#line 158 "locfile-kw.gperf"
157
      {"LC_PAPER",               tok_lc_paper,               0},
157
      {"LC_PAPER",               tok_lc_paper,               0},
158
#line 184 "locfile-kw.gperf"
158
#line 186 "locfile-kw.gperf"
159
      {"LC_MEASUREMENT",         tok_lc_measurement,         0},
159
      {"LC_MEASUREMENT",         tok_lc_measurement,         0},
160
#line 56 "locfile-kw.gperf"
160
#line 56 "locfile-kw.gperf"
161
      {"LC_COLLATE",             tok_lc_collate,             0},
161
      {"LC_COLLATE",             tok_lc_collate,             0},
162
      {""},
162
      {""},
163
#line 186 "locfile-kw.gperf"
163
#line 188 "locfile-kw.gperf"
164
      {"LC_IDENTIFICATION",      tok_lc_identification,      0},
164
      {"LC_IDENTIFICATION",      tok_lc_identification,      0},
165
#line 199 "locfile-kw.gperf"
165
#line 201 "locfile-kw.gperf"
166
      {"revision",               tok_revision,               0},
166
      {"revision",               tok_revision,               0},
167
#line 69 "locfile-kw.gperf"
167
#line 69 "locfile-kw.gperf"
168
      {"UNDEFINED",              tok_undefined,              0},
168
      {"UNDEFINED",              tok_undefined,              0},
Lines 170-188 locfile_hash (register const char *str, register unsigned int len) Link Here
170
      {"LC_NUMERIC",             tok_lc_numeric,             0},
170
      {"LC_NUMERIC",             tok_lc_numeric,             0},
171
#line 82 "locfile-kw.gperf"
171
#line 82 "locfile-kw.gperf"
172
      {"LC_MONETARY",            tok_lc_monetary,            0},
172
      {"LC_MONETARY",            tok_lc_monetary,            0},
173
#line 179 "locfile-kw.gperf"
173
#line 181 "locfile-kw.gperf"
174
      {"LC_TELEPHONE",           tok_lc_telephone,           0},
174
      {"LC_TELEPHONE",           tok_lc_telephone,           0},
175
      {""}, {""}, {""},
175
      {""}, {""}, {""},
176
#line 75 "locfile-kw.gperf"
176
#line 75 "locfile-kw.gperf"
177
      {"define",                 tok_define,                 0},
177
      {"define",                 tok_define,                 0},
178
#line 152 "locfile-kw.gperf"
178
#line 154 "locfile-kw.gperf"
179
      {"yesexpr",                tok_yesexpr,                0},
179
      {"yesexpr",                tok_yesexpr,                0},
180
#line 141 "locfile-kw.gperf"
180
#line 141 "locfile-kw.gperf"
181
      {"era_year",               tok_era_year,               0},
181
      {"era_year",               tok_era_year,               0},
182
      {""},
182
      {""},
183
#line 54 "locfile-kw.gperf"
183
#line 54 "locfile-kw.gperf"
184
      {"translit_ignore",        tok_translit_ignore,        0},
184
      {"translit_ignore",        tok_translit_ignore,        0},
185
#line 154 "locfile-kw.gperf"
185
#line 156 "locfile-kw.gperf"
186
      {"yesstr",                 tok_yesstr,                 0},
186
      {"yesstr",                 tok_yesstr,                 0},
187
      {""},
187
      {""},
188
#line 89 "locfile-kw.gperf"
188
#line 89 "locfile-kw.gperf"
Lines 190-196 locfile_hash (register const char *str, register unsigned int len) Link Here
190
      {""},
190
      {""},
191
#line 137 "locfile-kw.gperf"
191
#line 137 "locfile-kw.gperf"
192
      {"t_fmt",                  tok_t_fmt,                  0},
192
      {"t_fmt",                  tok_t_fmt,                  0},
193
#line 157 "locfile-kw.gperf"
193
#line 159 "locfile-kw.gperf"
194
      {"height",                 tok_height,                 0},
194
      {"height",                 tok_height,                 0},
195
      {""}, {""},
195
      {""}, {""},
196
#line 52 "locfile-kw.gperf"
196
#line 52 "locfile-kw.gperf"
Lines 213-219 locfile_hash (register const char *str, register unsigned int len) Link Here
213
      {""},
213
      {""},
214
#line 142 "locfile-kw.gperf"
214
#line 142 "locfile-kw.gperf"
215
      {"era_d_fmt",              tok_era_d_fmt,              0},
215
      {"era_d_fmt",              tok_era_d_fmt,              0},
216
#line 187 "locfile-kw.gperf"
216
#line 189 "locfile-kw.gperf"
217
      {"title",                  tok_title,                  0},
217
      {"title",                  tok_title,                  0},
218
      {""}, {""},
218
      {""}, {""},
219
#line 149 "locfile-kw.gperf"
219
#line 149 "locfile-kw.gperf"
Lines 243-249 locfile_hash (register const char *str, register unsigned int len) Link Here
243
      {"duo_n_cs_precedes",      tok_duo_n_cs_precedes,      0},
243
      {"duo_n_cs_precedes",      tok_duo_n_cs_precedes,      0},
244
#line 127 "locfile-kw.gperf"
244
#line 127 "locfile-kw.gperf"
245
      {"thousands_sep",          tok_thousands_sep,          0},
245
      {"thousands_sep",          tok_thousands_sep,          0},
246
#line 195 "locfile-kw.gperf"
246
#line 197 "locfile-kw.gperf"
247
      {"territory",              tok_territory,              0},
247
      {"territory",              tok_territory,              0},
248
#line 36 "locfile-kw.gperf"
248
#line 36 "locfile-kw.gperf"
249
      {"digit",                  tok_digit,                  0},
249
      {"digit",                  tok_digit,                  0},
Lines 258-264 locfile_hash (register const char *str, register unsigned int len) Link Here
258
      {""},
258
      {""},
259
#line 78 "locfile-kw.gperf"
259
#line 78 "locfile-kw.gperf"
260
      {"else",                   tok_else,                   0},
260
      {"else",                   tok_else,                   0},
261
#line 182 "locfile-kw.gperf"
261
#line 184 "locfile-kw.gperf"
262
      {"int_select",             tok_int_select,             0},
262
      {"int_select",             tok_int_select,             0},
263
      {""}, {""}, {""},
263
      {""}, {""}, {""},
264
#line 132 "locfile-kw.gperf"
264
#line 132 "locfile-kw.gperf"
Lines 266-276 locfile_hash (register const char *str, register unsigned int len) Link Here
266
#line 33 "locfile-kw.gperf"
266
#line 33 "locfile-kw.gperf"
267
      {"upper",                  tok_upper,                  0},
267
      {"upper",                  tok_upper,                  0},
268
      {""}, {""},
268
      {""}, {""},
269
#line 192 "locfile-kw.gperf"
269
#line 194 "locfile-kw.gperf"
270
      {"tel",                    tok_tel,                    0},
270
      {"tel",                    tok_tel,                    0},
271
#line 93 "locfile-kw.gperf"
271
#line 93 "locfile-kw.gperf"
272
      {"p_sep_by_space",         tok_p_sep_by_space,         0},
272
      {"p_sep_by_space",         tok_p_sep_by_space,         0},
273
#line 158 "locfile-kw.gperf"
273
#line 160 "locfile-kw.gperf"
274
      {"width",                  tok_width,                  0},
274
      {"width",                  tok_width,                  0},
275
      {""},
275
      {""},
276
#line 98 "locfile-kw.gperf"
276
#line 98 "locfile-kw.gperf"
Lines 301-307 locfile_hash (register const char *str, register unsigned int len) Link Here
301
      {""}, {""}, {""}, {""}, {""},
301
      {""}, {""}, {""}, {""}, {""},
302
#line 58 "locfile-kw.gperf"
302
#line 58 "locfile-kw.gperf"
303
      {"section-symbol",         tok_section_symbol,         0},
303
      {"section-symbol",         tok_section_symbol,         0},
304
#line 183 "locfile-kw.gperf"
304
#line 185 "locfile-kw.gperf"
305
      {"int_prefix",             tok_int_prefix,             0},
305
      {"int_prefix",             tok_int_prefix,             0},
306
      {""}, {""}, {""}, {""},
306
      {""}, {""}, {""}, {""},
307
#line 42 "locfile-kw.gperf"
307
#line 42 "locfile-kw.gperf"
Lines 318-324 locfile_hash (register const char *str, register unsigned int len) Link Here
318
      {"duo_p_sep_by_space",     tok_duo_p_sep_by_space,     0},
318
      {"duo_p_sep_by_space",     tok_duo_p_sep_by_space,     0},
319
#line 118 "locfile-kw.gperf"
319
#line 118 "locfile-kw.gperf"
320
      {"duo_int_p_sign_posn",    tok_duo_int_p_sign_posn,    0},
320
      {"duo_int_p_sign_posn",    tok_duo_int_p_sign_posn,    0},
321
#line 155 "locfile-kw.gperf"
321
#line 157 "locfile-kw.gperf"
322
      {"nostr",                  tok_nostr,                  0},
322
      {"nostr",                  tok_nostr,                  0},
323
      {""}, {""},
323
      {""}, {""},
324
#line 140 "locfile-kw.gperf"
324
#line 140 "locfile-kw.gperf"
Lines 327-352 locfile_hash (register const char *str, register unsigned int len) Link Here
327
#line 84 "locfile-kw.gperf"
327
#line 84 "locfile-kw.gperf"
328
      {"currency_symbol",        tok_currency_symbol,        0},
328
      {"currency_symbol",        tok_currency_symbol,        0},
329
      {""},
329
      {""},
330
#line 165 "locfile-kw.gperf"
330
#line 167 "locfile-kw.gperf"
331
      {"name_ms",                tok_name_ms,                0},
331
      {"name_ms",                tok_name_ms,                0},
332
#line 163 "locfile-kw.gperf"
332
#line 165 "locfile-kw.gperf"
333
      {"name_mrs",               tok_name_mrs,               0},
333
      {"name_mrs",               tok_name_mrs,               0},
334
#line 164 "locfile-kw.gperf"
334
#line 166 "locfile-kw.gperf"
335
      {"name_miss",              tok_name_miss,              0},
335
      {"name_miss",              tok_name_miss,              0},
336
#line 83 "locfile-kw.gperf"
336
#line 83 "locfile-kw.gperf"
337
      {"int_curr_symbol",        tok_int_curr_symbol,        0},
337
      {"int_curr_symbol",        tok_int_curr_symbol,        0},
338
#line 188 "locfile-kw.gperf"
338
#line 190 "locfile-kw.gperf"
339
      {"source",                 tok_source,                 0},
339
      {"source",                 tok_source,                 0},
340
#line 162 "locfile-kw.gperf"
340
#line 164 "locfile-kw.gperf"
341
      {"name_mr",                tok_name_mr,                0},
341
      {"name_mr",                tok_name_mr,                0},
342
#line 161 "locfile-kw.gperf"
342
#line 163 "locfile-kw.gperf"
343
      {"name_gen",               tok_name_gen,               0},
343
      {"name_gen",               tok_name_gen,               0},
344
#line 200 "locfile-kw.gperf"
344
#line 202 "locfile-kw.gperf"
345
      {"date",                   tok_date,                   0},
345
      {"date",                   tok_date,                   0},
346
      {""}, {""},
346
      {""}, {""},
347
#line 189 "locfile-kw.gperf"
347
#line 191 "locfile-kw.gperf"
348
      {"address",                tok_address,                0},
348
      {"address",                tok_address,                0},
349
#line 160 "locfile-kw.gperf"
349
#line 162 "locfile-kw.gperf"
350
      {"name_fmt",               tok_name_fmt,               0},
350
      {"name_fmt",               tok_name_fmt,               0},
351
#line 32 "locfile-kw.gperf"
351
#line 32 "locfile-kw.gperf"
352
      {"copy",                   tok_copy,                   0},
352
      {"copy",                   tok_copy,                   0},
Lines 365-380 locfile_hash (register const char *str, register unsigned int len) Link Here
365
#line 117 "locfile-kw.gperf"
365
#line 117 "locfile-kw.gperf"
366
      {"duo_n_sign_posn",        tok_duo_n_sign_posn,        0},
366
      {"duo_n_sign_posn",        tok_duo_n_sign_posn,        0},
367
      {""},
367
      {""},
368
#line 168 "locfile-kw.gperf"
368
#line 170 "locfile-kw.gperf"
369
      {"country_name",           tok_country_name,           0},
369
      {"country_name",           tok_country_name,           0},
370
#line 71 "locfile-kw.gperf"
370
#line 71 "locfile-kw.gperf"
371
      {"reorder-after",          tok_reorder_after,          0},
371
      {"reorder-after",          tok_reorder_after,          0},
372
      {""}, {""},
372
      {""}, {""},
373
#line 153 "locfile-kw.gperf"
373
#line 155 "locfile-kw.gperf"
374
      {"noexpr",                 tok_noexpr,                 0},
374
      {"noexpr",                 tok_noexpr,                 0},
375
#line 50 "locfile-kw.gperf"
375
#line 50 "locfile-kw.gperf"
376
      {"tolower",                tok_tolower,                0},
376
      {"tolower",                tok_tolower,                0},
377
#line 196 "locfile-kw.gperf"
377
#line 198 "locfile-kw.gperf"
378
      {"audience",               tok_audience,               0},
378
      {"audience",               tok_audience,               0},
379
      {""}, {""}, {""},
379
      {""}, {""}, {""},
380
#line 49 "locfile-kw.gperf"
380
#line 49 "locfile-kw.gperf"
Lines 395-401 locfile_hash (register const char *str, register unsigned int len) Link Here
395
      {""},
395
      {""},
396
#line 102 "locfile-kw.gperf"
396
#line 102 "locfile-kw.gperf"
397
      {"int_p_sign_posn",        tok_int_p_sign_posn,        0},
397
      {"int_p_sign_posn",        tok_int_p_sign_posn,        0},
398
#line 173 "locfile-kw.gperf"
398
#line 175 "locfile-kw.gperf"
399
      {"country_car",            tok_country_car,            0},
399
      {"country_car",            tok_country_car,            0},
400
      {""}, {""},
400
      {""}, {""},
401
#line 104 "locfile-kw.gperf"
401
#line 104 "locfile-kw.gperf"
Lines 406-414 locfile_hash (register const char *str, register unsigned int len) Link Here
406
      {""}, {""},
406
      {""}, {""},
407
#line 116 "locfile-kw.gperf"
407
#line 116 "locfile-kw.gperf"
408
      {"duo_p_sign_posn",        tok_duo_p_sign_posn,        0},
408
      {"duo_p_sign_posn",        tok_duo_p_sign_posn,        0},
409
#line 185 "locfile-kw.gperf"
409
#line 187 "locfile-kw.gperf"
410
      {"measurement",            tok_measurement,            0},
410
      {"measurement",            tok_measurement,            0},
411
#line 174 "locfile-kw.gperf"
411
#line 176 "locfile-kw.gperf"
412
      {"country_isbn",           tok_country_isbn,           0},
412
      {"country_isbn",           tok_country_isbn,           0},
413
#line 37 "locfile-kw.gperf"
413
#line 37 "locfile-kw.gperf"
414
      {"outdigit",               tok_outdigit,               0},
414
      {"outdigit",               tok_outdigit,               0},
Lines 418-426 locfile_hash (register const char *str, register unsigned int len) Link Here
418
      {""}, {""}, {""},
418
      {""}, {""}, {""},
419
#line 34 "locfile-kw.gperf"
419
#line 34 "locfile-kw.gperf"
420
      {"lower",                  tok_lower,                  0},
420
      {"lower",                  tok_lower,                  0},
421
#line 181 "locfile-kw.gperf"
421
#line 183 "locfile-kw.gperf"
422
      {"tel_dom_fmt",            tok_tel_dom_fmt,            0},
422
      {"tel_dom_fmt",            tok_tel_dom_fmt,            0},
423
#line 169 "locfile-kw.gperf"
423
#line 171 "locfile-kw.gperf"
424
      {"country_post",           tok_country_post,           0},
424
      {"country_post",           tok_country_post,           0},
425
#line 148 "locfile-kw.gperf"
425
#line 148 "locfile-kw.gperf"
426
      {"cal_direction",          tok_cal_direction,          0},
426
      {"cal_direction",          tok_cal_direction,          0},
Lines 430-436 locfile_hash (register const char *str, register unsigned int len) Link Here
430
#line 91 "locfile-kw.gperf"
430
#line 91 "locfile-kw.gperf"
431
      {"frac_digits",            tok_frac_digits,            0},
431
      {"frac_digits",            tok_frac_digits,            0},
432
      {""}, {""},
432
      {""}, {""},
433
#line 175 "locfile-kw.gperf"
433
#line 177 "locfile-kw.gperf"
434
      {"lang_name",              tok_lang_name,              0},
434
      {"lang_name",              tok_lang_name,              0},
435
#line 90 "locfile-kw.gperf"
435
#line 90 "locfile-kw.gperf"
436
      {"int_frac_digits",        tok_int_frac_digits,        0},
436
      {"int_frac_digits",        tok_int_frac_digits,        0},
Lines 445-451 locfile_hash (register const char *str, register unsigned int len) Link Here
445
      {""}, {""}, {""}, {""},
445
      {""}, {""}, {""}, {""},
446
#line 107 "locfile-kw.gperf"
446
#line 107 "locfile-kw.gperf"
447
      {"duo_frac_digits",        tok_duo_frac_digits,        0},
447
      {"duo_frac_digits",        tok_duo_frac_digits,        0},
448
#line 180 "locfile-kw.gperf"
448
#line 182 "locfile-kw.gperf"
449
      {"tel_int_fmt",            tok_tel_int_fmt,            0},
449
      {"tel_int_fmt",            tok_tel_int_fmt,            0},
450
#line 123 "locfile-kw.gperf"
450
#line 123 "locfile-kw.gperf"
451
      {"duo_valid_to",           tok_duo_valid_to,           0},
451
      {"duo_valid_to",           tok_duo_valid_to,           0},
Lines 455-461 locfile_hash (register const char *str, register unsigned int len) Link Here
455
#line 130 "locfile-kw.gperf"
455
#line 130 "locfile-kw.gperf"
456
      {"abday",                  tok_abday,                  0},
456
      {"abday",                  tok_abday,                  0},
457
      {""},
457
      {""},
458
#line 198 "locfile-kw.gperf"
458
#line 200 "locfile-kw.gperf"
459
      {"abbreviation",           tok_abbreviation,           0},
459
      {"abbreviation",           tok_abbreviation,           0},
460
#line 147 "locfile-kw.gperf"
460
#line 147 "locfile-kw.gperf"
461
      {"first_workday",          tok_first_workday,          0},
461
      {"first_workday",          tok_first_workday,          0},
Lines 472-483 locfile_hash (register const char *str, register unsigned int len) Link Here
472
#line 45 "locfile-kw.gperf"
472
#line 45 "locfile-kw.gperf"
473
      {"blank",                  tok_blank,                  0},
473
      {"blank",                  tok_blank,                  0},
474
      {""}, {""},
474
      {""}, {""},
475
#line 194 "locfile-kw.gperf"
475
#line 196 "locfile-kw.gperf"
476
      {"language",               tok_language,               0},
476
      {"language",               tok_language,               0},
477
#line 120 "locfile-kw.gperf"
477
#line 120 "locfile-kw.gperf"
478
      {"uno_valid_from",         tok_uno_valid_from,         0},
478
      {"uno_valid_from",         tok_uno_valid_from,         0},
479
      {""},
479
      {""},
480
#line 197 "locfile-kw.gperf"
480
#line 199 "locfile-kw.gperf"
481
      {"application",            tok_application,            0},
481
      {"application",            tok_application,            0},
482
      {""},
482
      {""},
483
#line 80 "locfile-kw.gperf"
483
#line 80 "locfile-kw.gperf"
Lines 498-504 locfile_hash (register const char *str, register unsigned int len) Link Here
498
#line 96 "locfile-kw.gperf"
498
#line 96 "locfile-kw.gperf"
499
      {"p_sign_posn",            tok_p_sign_posn,            0},
499
      {"p_sign_posn",            tok_p_sign_posn,            0},
500
      {""},
500
      {""},
501
#line 201 "locfile-kw.gperf"
501
#line 203 "locfile-kw.gperf"
502
      {"category",               tok_category,               0},
502
      {"category",               tok_category,               0},
503
      {""}, {""}, {""}, {""},
503
      {""}, {""}, {""}, {""},
504
#line 134 "locfile-kw.gperf"
504
#line 134 "locfile-kw.gperf"
Lines 510-545 locfile_hash (register const char *str, register unsigned int len) Link Here
510
#line 63 "locfile-kw.gperf"
510
#line 63 "locfile-kw.gperf"
511
      {"order_start",            tok_order_start,            0},
511
      {"order_start",            tok_order_start,            0},
512
      {""}, {""}, {""}, {""}, {""},
512
      {""}, {""}, {""}, {""}, {""},
513
#line 176 "locfile-kw.gperf"
514
      {"lang_ab",                tok_lang_ab,                0},
515
#line 178 "locfile-kw.gperf"
513
#line 178 "locfile-kw.gperf"
514
      {"lang_ab",                tok_lang_ab,                0},
515
#line 180 "locfile-kw.gperf"
516
      {"lang_lib",               tok_lang_lib,               0},
516
      {"lang_lib",               tok_lang_lib,               0},
517
      {""}, {""}, {""},
517
      {""}, {""}, {""},
518
#line 190 "locfile-kw.gperf"
518
#line 192 "locfile-kw.gperf"
519
      {"contact",                tok_contact,                0},
519
      {"contact",                tok_contact,                0},
520
      {""}, {""}, {""},
520
      {""}, {""}, {""},
521
#line 171 "locfile-kw.gperf"
521
#line 173 "locfile-kw.gperf"
522
      {"country_ab3",            tok_country_ab3,            0},
522
      {"country_ab3",            tok_country_ab3,            0},
523
      {""}, {""}, {""},
523
      {""}, {""}, {""},
524
#line 191 "locfile-kw.gperf"
524
#line 193 "locfile-kw.gperf"
525
      {"email",                  tok_email,                  0},
525
      {"email",                  tok_email,                  0},
526
#line 170 "locfile-kw.gperf"
526
#line 172 "locfile-kw.gperf"
527
      {"country_ab2",            tok_country_ab2,            0},
527
      {"country_ab2",            tok_country_ab2,            0},
528
      {""}, {""}, {""},
528
      {""}, {""}, {""},
529
#line 55 "locfile-kw.gperf"
529
#line 55 "locfile-kw.gperf"
530
      {"default_missing",        tok_default_missing,        0},
530
      {"default_missing",        tok_default_missing,        0},
531
      {""}, {""},
531
      {""}, {""},
532
#line 193 "locfile-kw.gperf"
532
#line 195 "locfile-kw.gperf"
533
      {"fax",                    tok_fax,                    0},
533
      {"fax",                    tok_fax,                    0},
534
      {""}, {""}, {""}, {""}, {""}, {""}, {""},
534
      {""}, {""}, {""}, {""}, {""}, {""}, {""},
535
#line 172 "locfile-kw.gperf"
535
#line 174 "locfile-kw.gperf"
536
      {"country_num",            tok_country_num,            0},
536
      {"country_num",            tok_country_num,            0},
537
      {""}, {""}, {""}, {""}, {""}, {""},
537
      {""}, {""}, {""}, {""}, {""}, {""},
538
#line 51 "locfile-kw.gperf"
538
#line 51 "locfile-kw.gperf"
539
      {"map",                    tok_map,                    0},
539
      {"map",                    tok_map,                    0},
540
#line 65 "locfile-kw.gperf"
540
#line 65 "locfile-kw.gperf"
541
      {"from",                   tok_from,                   0},
541
      {"from",                   tok_from,                   0},
542
      {""}, {""}, {""}, {""}, {""}, {""}, {""},
542
#line 152 "locfile-kw.gperf"
543
      {"day_month_order",        tok_day_month_order,        0},
544
      {""}, {""}, {""}, {""}, {""}, {""},
543
#line 86 "locfile-kw.gperf"
545
#line 86 "locfile-kw.gperf"
544
      {"mon_thousands_sep",      tok_mon_thousands_sep,      0},
546
      {"mon_thousands_sep",      tok_mon_thousands_sep,      0},
545
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
547
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
Lines 548-554 locfile_hash (register const char *str, register unsigned int len) Link Here
548
      {"endif",                  tok_endif,                  0},
550
      {"endif",                  tok_endif,                  0},
549
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
551
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
550
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
552
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
551
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
553
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
554
#line 151 "locfile-kw.gperf"
555
      {"alt_mon",                tok_alt_mon,                0},
552
      {""}, {""}, {""}, {""}, {""}, {""}, {""},
556
      {""}, {""}, {""}, {""}, {""}, {""}, {""},
553
#line 76 "locfile-kw.gperf"
557
#line 76 "locfile-kw.gperf"
554
      {"undef",                  tok_undef,                  0},
558
      {"undef",                  tok_undef,                  0},
Lines 569-575 locfile_hash (register const char *str, register unsigned int len) Link Here
569
#line 85 "locfile-kw.gperf"
573
#line 85 "locfile-kw.gperf"
570
      {"mon_decimal_point",      tok_mon_decimal_point,      0},
574
      {"mon_decimal_point",      tok_mon_decimal_point,      0},
571
      {""}, {""},
575
      {""}, {""},
572
#line 167 "locfile-kw.gperf"
576
#line 169 "locfile-kw.gperf"
573
      {"postal_fmt",             tok_postal_fmt,             0},
577
      {"postal_fmt",             tok_postal_fmt,             0},
574
      {""}, {""}, {""}, {""}, {""},
578
      {""}, {""}, {""}, {""}, {""},
575
#line 60 "locfile-kw.gperf"
579
#line 60 "locfile-kw.gperf"
Lines 588-594 locfile_hash (register const char *str, register unsigned int len) Link Here
588
#line 87 "locfile-kw.gperf"
592
#line 87 "locfile-kw.gperf"
589
      {"mon_grouping",           tok_mon_grouping,           0},
593
      {"mon_grouping",           tok_mon_grouping,           0},
590
      {""},
594
      {""},
591
#line 177 "locfile-kw.gperf"
595
#line 179 "locfile-kw.gperf"
592
      {"lang_term",              tok_lang_term,              0},
596
      {"lang_term",              tok_lang_term,              0},
593
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
597
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
594
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
598
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
(-)a/locale/programs/locfile-token.h (+2 lines)
Lines 186-191 enum token_t Link Here
186
  tok_cal_direction,
186
  tok_cal_direction,
187
  tok_timezone,
187
  tok_timezone,
188
  tok_date_fmt,
188
  tok_date_fmt,
189
  tok_alt_mon,
190
  tok_day_month_order,
189
  tok_lc_messages,
191
  tok_lc_messages,
190
  tok_yesexpr,
192
  tok_yesexpr,
191
  tok_noexpr,
193
  tok_noexpr,
(-)a/localedata/locales/pl_PL (+13 lines)
Lines 2198-2203 date_fmt "<U0025><U0061><U002C><U0020>/ Link Here
2198
week	7;19971130;4
2198
week	7;19971130;4
2199
first_weekday	2
2199
first_weekday	2
2200
first_workday	2
2200
first_workday	2
2201
alt_mon "<U0073><U0074><U0079><U0063><U007A><U006E><U0069><U0061>";/
2202
        "<U006C><U0075><U0074><U0065><U0067><U006F>";/
2203
        "<U006D><U0061><U0072><U0063><U0061>";/
2204
        "<U006B><U0077><U0069><U0065><U0074><U006E><U0069><U0061>";/
2205
        "<U006D><U0061><U006A><U0061>";/
2206
        "<U0063><U007A><U0065><U0072><U0077><U0063><U0061>";/
2207
        "<U006C><U0069><U0070><U0063><U0061>";/
2208
        "<U0073><U0069><U0065><U0072><U0070><U006E><U0069><U0061>";/
2209
        "<U0077><U0072><U007A><U0065><U015B><U006E><U0069><U0061>";/
2210
        "<U0070><U0061><U017A><U0064><U007A><U0069><U0065><U0072><U006E><U0069><U006B><U0061>";/
2211
        "<U006C><U0069><U0073><U0074><U006F><U0070><U0061><U0064><U0061>";/
2212
        "<U0067><U0072><U0075><U0064><U006E><U0069><U0061>"
2213
day_month_order	1
2201
END LC_TIME
2214
END LC_TIME
2202
2215
2203
LC_PAPER
2216
LC_PAPER
(-)a/localedata/locales/ru_RU (-12 / +25 lines)
Lines 116-133 abday "<U0412><U0441>";/ Link Here
116
        "<U0427><U0442>";/
116
        "<U0427><U0442>";/
117
        "<U041F><U0442>";/
117
        "<U041F><U0442>";/
118
        "<U0421><U0431>"
118
        "<U0421><U0431>"
119
mon     "<U042F><U043D><U0432><U0430><U0440><U044C>";/
119
mon     "<U044F><U043D><U0432><U0430><U0440><U044C>";/
120
        "<U0424><U0435><U0432><U0440><U0430><U043B><U044C>";/
120
        "<U0444><U0435><U0432><U0440><U0430><U043B><U044C>";/
121
        "<U041C><U0430><U0440><U0442>";/
121
        "<U043C><U0430><U0440><U0442>";/
122
        "<U0410><U043F><U0440><U0435><U043B><U044C>";/
122
        "<U0430><U043F><U0440><U0435><U043B><U044C>";/
123
        "<U041C><U0430><U0439>";/
123
        "<U043C><U0430><U0439>";/
124
        "<U0418><U044E><U043D><U044C>";/
124
        "<U0438><U044E><U043D><U044C>";/
125
        "<U0418><U044E><U043B><U044C>";/
125
        "<U0438><U044E><U043B><U044C>";/
126
        "<U0410><U0432><U0433><U0443><U0441><U0442>";/
126
        "<U0430><U0432><U0433><U0443><U0441><U0442>";/
127
        "<U0421><U0435><U043D><U0442><U044F><U0431><U0440><U044C>";/
127
        "<U0441><U0435><U043D><U0442><U044F><U0431><U0440><U044C>";/
128
        "<U041E><U043A><U0442><U044F><U0431><U0440><U044C>";/
128
        "<U043E><U043A><U0442><U044F><U0431><U0440><U044C>";/
129
        "<U041D><U043E><U044F><U0431><U0440><U044C>";/
129
        "<U043D><U043E><U044F><U0431><U0440><U044C>";/
130
        "<U0414><U0435><U043A><U0430><U0431><U0440><U044C>"
130
        "<U0434><U0435><U043A><U0430><U0431><U0440><U044C>"
131
abmon   "<U044F><U043D><U0432>";/
131
abmon   "<U044F><U043D><U0432>";/
132
        "<U0444><U0435><U0432>";/
132
        "<U0444><U0435><U0432>";/
133
        "<U043C><U0430><U0440>";/
133
        "<U043C><U0430><U0440>";/
Lines 151-156 date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/ Link Here
151
<U0025><U005A><U0020><U0025><U0059>"
151
<U0025><U005A><U0020><U0025><U0059>"
152
first_weekday 2
152
first_weekday 2
153
first_workday 2
153
first_workday 2
154
alt_mon "<U044F><U043D><U0432><U0430><U0440><U044F>";/
155
        "<U0444><U0435><U0432><U0440><U0430><U043B><U044F>";/
156
        "<U043C><U0430><U0440><U0442><U0430>";/
157
        "<U0430><U043F><U0440><U0435><U043B><U044F>";/
158
        "<U043C><U0430><U044F>";/
159
        "<U0438><U044E><U043D><U044F>";/
160
        "<U0438><U044E><U043B><U044F>";/
161
        "<U0430><U0432><U0433><U0443><U0441><U0442><U0430>";/
162
        "<U0441><U0435><U043D><U0442><U044F><U0431><U0440><U044F>";/
163
        "<U043E><U043A><U0442><U044F><U0431><U0440><U044F>";/
164
        "<U043D><U043E><U044F><U0431><U0440><U044F>";/
165
        "<U0434><U0435><U043A><U0430><U0431><U0440><U044F>"
166
day_month_order 1
154
END LC_TIME
167
END LC_TIME
155
168
156
LC_PAPER
169
LC_PAPER
(-)a/localedata/locales/uk_UA (-12 / +10 lines)
Lines 898-904 abmon / Link Here
898
        "<U043B><U0438><U0441>"; %lys  /
898
        "<U043B><U0438><U0441>"; %lys  /
899
        "<U0433><U0440><U0443>"  %hru
899
        "<U0433><U0440><U0443>"  %hru
900
900
901
% A list of month names in proper form for calendar, see alt_digits. (%B)
901
% A list of month names in proper form for calendar, see alt_mon. (%B)
902
mon /
902
mon /
903
        "<U0441><U0456><U0447><U0435><U043D><U044C>";   %sichen`  /
903
        "<U0441><U0456><U0447><U0435><U043D><U044C>";   %sichen`  /
904
        "<U043B><U044E><U0442><U0438><U0439>";    %lyutyj   /
904
        "<U043B><U044E><U0442><U0438><U0439>";    %lyutyj   /
Lines 913-928 mon / Link Here
913
        "<U043B><U0438><U0441><U0442><U043E><U043F><U0430><U0434>"; %lystopad /
913
        "<U043B><U0438><U0441><U0442><U043E><U043F><U0430><U0434>"; %lystopad /
914
        "<U0433><U0440><U0443><U0434><U0435><U043D><U044C>"   %hruden`
914
        "<U0433><U0440><U0443><U0434><U0435><U043D><U044C>"   %hruden`
915
915
916
% Initially alt_digits was supposed to hold alternative symbols for _digits_,
916
% A list of month names in genitive form, for full date format, with day. (%B)
917
% corresponding to %O modified conversion specification.
917
alt_mon /
918
% Although in Ukrainian language alternate _names_ are used instead of digits.
919
% We'll use this keyword to present a list of month names in proper form for
920
% date, see mon.  (%Om)
921
%
922
% This hack is dedicated for months it won't work for other %O* modifiers
923
% (weeks, days etc).
924
%
925
alt_digits "<U0030>";	     % digits are starting from zero /
926
        "<U0441><U0456><U0447><U043D><U044F>";     % sichnya   /
918
        "<U0441><U0456><U0447><U043D><U044F>";     % sichnya   /
927
        "<U043B><U044E><U0442><U043E><U0433><U043E>";    % lyutoho   /
919
        "<U043B><U044E><U0442><U043E><U0433><U043E>";    % lyutoho   /
928
        "<U0431><U0435><U0440><U0435><U0437><U043D><U044F>";   % bereznya  /
920
        "<U0431><U0435><U0440><U0435><U0437><U043D><U044F>";   % bereznya  /
Lines 936-943 alt_digits "<U0030>"; % digits are starting from zero / Link Here
936
        "<U043B><U0438><U0441><U0442><U043E><U043F><U0430><U0434><U0430>"; % lystopada /
928
        "<U043B><U0438><U0441><U0442><U043E><U043F><U0430><U0434><U0430>"; % lystopada /
937
        "<U0433><U0440><U0443><U0434><U043D><U044F>"     % hrudnya
929
        "<U0433><U0440><U0443><U0434><U043D><U044F>"     % hrudnya
938
930
931
% Proper (preferred) day-month order which also requires a genitive case
932
% for the month name. 1 means "day-month" is a valid order, 2 means that
933
% both orders are correct (or does not matter), 3 means that "month-day"
934
% is a valid order.
935
day_month_order 1
936
939
% Appropriate date representation for date(1).
937
% Appropriate date representation for date(1).
940
date_fmt       "<U0025><U0041><U002C><U0020><U0025><U002D><U0064><U0020><U0025><U004F><U006D><U0020><U0025><U0059><U0020><U0025><U0058><U0020><U0025><U007A>"
938
date_fmt       "<U0025><U0041><U002C><U0020><U0025><U002D><U0064><U0020><U0025><U0042><U0020><U0025><U0059><U0020><U0025><U0058><U0020><U0025><U007A>"
941
939
942
% The appropriate date and time format. (%c)
940
% The appropriate date and time format. (%c)
943
d_t_fmt  "<U0025><U0061><U002C><U0020><U0025><U0064><U002D><U0025><U0062><U002D><U0025><U0059><U0020><U0025><U0058><U0020><U0025><U007A>"
941
d_t_fmt  "<U0025><U0061><U002C><U0020><U0025><U0064><U002D><U0025><U0062><U002D><U0025><U0059><U0020><U0025><U0058><U0020><U0025><U007A>"
(-)a/localedata/tst-langinfo.c (+12 lines)
Lines 50-55 struct map Link Here
50
  VAL (ABMON_8),
50
  VAL (ABMON_8),
51
  VAL (ABMON_9),
51
  VAL (ABMON_9),
52
  VAL (ALT_DIGITS),
52
  VAL (ALT_DIGITS),
53
  VAL (ALTMON_1),
54
  VAL (ALTMON_10),
55
  VAL (ALTMON_11),
56
  VAL (ALTMON_12),
57
  VAL (ALTMON_2),
58
  VAL (ALTMON_3),
59
  VAL (ALTMON_4),
60
  VAL (ALTMON_5),
61
  VAL (ALTMON_6),
62
  VAL (ALTMON_7),
63
  VAL (ALTMON_8),
64
  VAL (ALTMON_9),
53
  VAL (AM_STR),
65
  VAL (AM_STR),
54
  VAL (CRNCYSTR),
66
  VAL (CRNCYSTR),
55
  VAL (CURRENCY_SYMBOL),
67
  VAL (CURRENCY_SYMBOL),
(-)a/time/strftime_l.c (-1 / +154 lines)
Lines 72-77 extern char *tzname[]; Link Here
72
#  define mbstate_t int
72
#  define mbstate_t int
73
#  define mbrlen(s, n, ps) mblen (s, n)
73
#  define mbrlen(s, n, ps) mblen (s, n)
74
#  define mbsinit(ps) (*(ps) == 0)
74
#  define mbsinit(ps) (*(ps) == 0)
75
#  define mbrtowc(pwc, s, n, ps) mbtowc (pwc, s, n)
75
# endif
76
# endif
76
  static const mbstate_t mbstate_zero;
77
  static const mbstate_t mbstate_zero;
77
#endif
78
#endif
Lines 432-437 static CHAR_T const month_name[][10] = Link Here
432
# define ut 0
433
# define ut 0
433
#endif
434
#endif
434
435
436
/* Check if the characters pointed to by S are a valid suffix: if they
437
   start with a valid letter (in the current locale) or a single
438
   punctuation character (a dash, an apostrophe, etc.) followed by
439
   a letter, and they are not a format specifier. If a suffix is appended
440
   at the end of a month name then probably a caller already tries to
441
   workaround the problem of missing genitive forms so we should not
442
   interfere with that.  */
443
static bool is_suffix (const CHAR_T *s)
444
{
445
#if defined COMPILE_WIDE || DO_MULTIBYTE
446
# define ISALPHA iswalpha
447
# define ISPUNCT iswpunct
448
#else
449
# define ISALPHA isalpha
450
# define ISPUNCT ispunct
451
#endif
452
453
#if DO_MULTIBYTE && !defined COMPILE_WIDE
454
  wchar_t c, next_char;
455
  size_t mb_char_len, mb_next_char_len;
456
  mbstate_t mbstate = mbstate_zero;
457
458
  mb_char_len = mbrtowc (&c, s, strlen (s), &mbstate);
459
  if ((ssize_t) mb_char_len <= 0)
460
    c = L_('\0');
461
462
  if (c == L_('\0'))
463
    {
464
      next_char = L_('\0');
465
      mb_next_char_len = 0;
466
    }
467
  else
468
    {
469
      mbsinit (&mbstate);
470
      mb_next_char_len = mbrtowc (&next_char, s + mb_char_len,
471
				  strlen (s + mb_char_len), &mbstate);
472
      if ((ssize_t) mb_next_char_len <= 0)
473
        next_char = L_('\0');
474
    }
475
# define NEXT_CHAR_OFFSET mb_char_len
476
# define NEXT_NEXT_CHAR_OFFSET (mb_char_len + mb_next_char_len)
477
#else
478
  const CHAR_T c = s[0];
479
  const CHAR_T next_char = c == L_('\0') ? L_('\0') : s[1];
480
# define NEXT_CHAR_OFFSET 1
481
# define NEXT_NEXT_CHAR_OFFSET 2
482
#endif
483
484
  if (ISALPHA (c))
485
    return true;
486
487
  if (c == L_('%'))
488
    {
489
      if (next_char == L_('%'))
490
	return is_suffix (s + NEXT_NEXT_CHAR_OFFSET);
491
      else
492
	return false;
493
    }
494
495
  if (ISPUNCT (c))
496
    return is_suffix (s + NEXT_CHAR_OFFSET);
497
498
  return false;
499
}
500
501
/* Checks if the nearest format specifier in the format string pointed
502
   to by Sis a day of the month specifier: "%e" or "%d". The format
503
   specifier may be preceded with any number of other characters and may
504
   contain modifiers. This function does not check if the modifiers are
505
   valid and actually produce the day number so the result may be sometimes
506
   wrong but in these cases the output will be wrong anyway because the
507
   format is wrong.  */
508
static bool next_is_day (const CHAR_T *s)
509
{
510
  /* Skip until the percent sign is found.  */
511
  while (1)
512
    {
513
      switch (*s++)
514
	{
515
	case L_('\0'):
516
	    return false;
517
	case L_('%'):
518
	    if (*s == L_('%'))
519
	      {
520
		++s;
521
		continue;
522
	      }
523
	    break;
524
	default:
525
	    continue;
526
	}
527
      break;
528
    }
529
530
  while (1)
531
    {
532
      switch (*s++)
533
	{
534
	/* Skip the modifiers. Here we don't check if they are valid.  */
535
	case L_('_'):
536
	case L_('-'):
537
	case L_('^'):
538
	case L_('#'):
539
	case L_('E'): case L_('O'):
540
	case L_('0'): case L_('1'): case L_('2'): case L_('3'): case L_('4'):
541
	case L_('5'): case L_('6'): case L_('7'): case L_('8'): case L_('9'):
542
	    continue;
543
544
	/* Day found.  */
545
	case L_('d'): case L_('e'):
546
	    return true;
547
548
	/* Something else found, including the terminating zero.  */
549
	default:
550
	    return false;
551
	}
552
    }
553
}
554
435
static size_t __strftime_internal (CHAR_T *, size_t, const CHAR_T *,
555
static size_t __strftime_internal (CHAR_T *, size_t, const CHAR_T *,
436
				   const struct tm *, bool *
556
				   const struct tm *, bool *
437
				   ut_argument_spec
557
				   ut_argument_spec
Lines 492-497 __strftime_internal (CHAR_T *s, size_t maxsize, const CHAR_T *format, Link Here
492
# define f_month \
612
# define f_month \
493
  ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11			     \
613
  ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11			     \
494
		     ? "?" : _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon)))
614
		     ? "?" : _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon)))
615
# define f_altmonth \
616
  ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11			     \
617
		     ? "?" : _NL_CURRENT (LC_TIME, NLW(ALTMON_1) + tp->tm_mon)))
495
# define ampm \
618
# define ampm \
496
  ((const CHAR_T *) _NL_CURRENT (LC_TIME, tp->tm_hour > 11		      \
619
  ((const CHAR_T *) _NL_CURRENT (LC_TIME, tp->tm_hour > 11		      \
497
				 ? NLW(PM_STR) : NLW(AM_STR)))
620
				 ? NLW(PM_STR) : NLW(AM_STR)))
Lines 499-504 __strftime_internal (CHAR_T *s, size_t maxsize, const CHAR_T *format, Link Here
499
# define aw_len STRLEN (a_wkday)
622
# define aw_len STRLEN (a_wkday)
500
# define am_len STRLEN (a_month)
623
# define am_len STRLEN (a_month)
501
# define ap_len STRLEN (ampm)
624
# define ap_len STRLEN (ampm)
625
# define day_month_order \
626
  (current->values[_NL_ITEM_INDEX (_NL_DAY_MONTH_ORDER)].string[0])
502
#else
627
#else
503
# if !HAVE_STRFTIME
628
# if !HAVE_STRFTIME
504
#  define f_wkday (tp->tm_wday < 0 || tp->tm_wday > 6	\
629
#  define f_wkday (tp->tm_wday < 0 || tp->tm_wday > 6	\
Lines 507-519 __strftime_internal (CHAR_T *s, size_t maxsize, const CHAR_T *format, Link Here
507
		   ? "?" : month_name[tp->tm_mon])
632
		   ? "?" : month_name[tp->tm_mon])
508
#  define a_wkday f_wkday
633
#  define a_wkday f_wkday
509
#  define a_month f_month
634
#  define a_month f_month
635
#  define f_altmonth (L_(""))
510
#  define ampm (L_("AMPM") + 2 * (tp->tm_hour > 11))
636
#  define ampm (L_("AMPM") + 2 * (tp->tm_hour > 11))
511
637
512
  size_t aw_len = 3;
638
  size_t aw_len = 3;
513
  size_t am_len = 3;
639
  size_t am_len = 3;
514
  size_t ap_len = 2;
640
  size_t ap_len = 2;
641
# define day_month_order 2
515
# endif
642
# endif
516
#endif
643
#endif
644
  int last_was_day = 0;
517
  const char *zone;
645
  const char *zone;
518
  size_t i = 0;
646
  size_t i = 0;
519
  CHAR_T *p = s;
647
  CHAR_T *p = s;
Lines 783-789 __strftime_internal (CHAR_T *s, size_t maxsize, const CHAR_T *format, Link Here
783
	      to_lowcase = 0;
911
	      to_lowcase = 0;
784
	    }
912
	    }
785
#if defined _NL_CURRENT || !HAVE_STRFTIME
913
#if defined _NL_CURRENT || !HAVE_STRFTIME
786
	  cpy (STRLEN (f_month), f_month);
914
	  /* Use f_altmonth only if f_altmonth is provided.  */
915
	  if (f_altmonth[0]
916
	  /* Don't use f_altmonth if there is a suffix after %B because
917
	     it means that a caller already provides its own workaround.  */
918
	      && !is_suffix (f + 1)
919
	  /* Use f_altmonth if the day-month order is valid and the last
920
	     format specifier was a day specifier.  */
921
	      && ( (day_month_order <= 2 && last_was_day)
922
	  /* Use f_altmonth if the month-day order is valid and the next
923
	     format specifier will be a day specifier.  */
924
		  || (day_month_order >= 2 && next_is_day (f + 1)) ))
925
	    cpy (STRLEN (f_altmonth), f_altmonth);
926
	  else
927
	    cpy (STRLEN (f_month), f_month);
787
	  break;
928
	  break;
788
#else
929
#else
789
	  goto underlying_strftime;
930
	  goto underlying_strftime;
Lines 1400-1405 __strftime_internal (CHAR_T *s, size_t maxsize, const CHAR_T *format, Link Here
1400
	  }
1541
	  }
1401
	  break;
1542
	  break;
1402
	}
1543
	}
1544
1545
      /* Update the previous_was_day flag. */
1546
      switch (format_char)
1547
	{
1548
	case L_('d'):
1549
	case L_('e'):
1550
	  last_was_day = 1;
1551
	  break;
1552
	default:
1553
	  last_was_day = 0;
1554
	  break;
1555
	}
1403
    }
1556
    }
1404
1557
1405
  if (p && maxsize != 0)
1558
  if (p && maxsize != 0)
(-)a/time/strptime_l.c (-1 / +25 lines)
Lines 124-129 extern const struct __locale_data _nl_C_LC_TIME attribute_hidden; Link Here
124
  (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ABDAY_1)].string)
124
  (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ABDAY_1)].string)
125
# define month_name (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (MON_1)].string)
125
# define month_name (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (MON_1)].string)
126
# define ab_month_name (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ABMON_1)].string)
126
# define ab_month_name (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ABMON_1)].string)
127
# define alt_month_name \
128
  (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ALTMON_1)].string)
127
# define HERE_D_T_FMT (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (D_T_FMT)].string)
129
# define HERE_D_T_FMT (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (D_T_FMT)].string)
128
# define HERE_D_FMT (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (D_FMT)].string)
130
# define HERE_D_FMT (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (D_FMT)].string)
129
# define HERE_AM_STR (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (AM_STR)].string)
131
# define HERE_AM_STR (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (AM_STR)].string)
Lines 153-158 static char const ab_month_name[][4] = Link Here
153
    "Jan", "Feb", "Mar", "Apr", "May", "Jun",
155
    "Jan", "Feb", "Mar", "Apr", "May", "Jun",
154
    "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
156
    "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
155
  };
157
  };
158
static char const alt_month_name[][10] =
159
  {
160
    "January", "February", "March", "April", "May", "June",
161
    "July", "August", "September", "October", "November", "December"
162
  };
156
# define HERE_D_T_FMT "%a %b %e %H:%M:%S %Y"
163
# define HERE_D_T_FMT "%a %b %e %H:%M:%S %Y"
157
# define HERE_D_FMT "%m/%d/%y"
164
# define HERE_D_FMT "%m/%d/%y"
158
# define HERE_AM_STR "AM"
165
# define HERE_AM_STR "AM"
Lines 403-408 __strptime_internal (const char *rp, const char *fmt, struct tm *tmp, Link Here
403
	      if (s.decided !=raw)
410
	      if (s.decided !=raw)
404
		{
411
		{
405
		  trp = rp;
412
		  trp = rp;
413
		  /* First check if the alt month is provided.  */
414
		  if (_NL_CURRENT (LC_TIME, ALTMON_1 + cnt)
415
		      && * (_NL_CURRENT (LC_TIME, ALTMON_1 + cnt))
416
		      && match_string (_NL_CURRENT (LC_TIME, ALTMON_1 + cnt), trp)
417
		      && trp > rp_longest)
418
		    {
419
		      rp_longest = trp;
420
		      cnt_longest = cnt;
421
		      if (s.decided == not
422
			  && strcmp (_NL_CURRENT (LC_TIME, ALTMON_1 + cnt),
423
				     alt_month_name[cnt]))
424
			decided_longest = loc;
425
		    }
426
		  trp = rp;
406
		  if (match_string (_NL_CURRENT (LC_TIME, MON_1 + cnt), trp)
427
		  if (match_string (_NL_CURRENT (LC_TIME, MON_1 + cnt), trp)
407
		      && trp > rp_longest)
428
		      && trp > rp_longest)
408
		    {
429
		    {
Lines 429-434 __strptime_internal (const char *rp, const char *fmt, struct tm *tmp, Link Here
429
	      if (s.decided != loc
450
	      if (s.decided != loc
430
		  && (((trp = rp, match_string (month_name[cnt], trp))
451
		  && (((trp = rp, match_string (month_name[cnt], trp))
431
		       && trp > rp_longest)
452
		       && trp > rp_longest)
453
		      || ((trp = rp, alt_month_name[cnt]
454
			  && alt_month_name[cnt][0]
455
			  && match_string (alt_month_name[cnt], trp))
456
			  && trp > rp_longest)
432
		      || ((trp = rp, match_string (ab_month_name[cnt], trp))
457
		      || ((trp = rp, match_string (ab_month_name[cnt], trp))
433
			  && trp > rp_longest)))
458
			  && trp > rp_longest)))
434
		{
459
		{
435
- 

Return to bug 10871