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

Collapse All | Expand All

(-)a/locale/C-time.c (-1 / +25 lines)
Lines 30-36 const struct __locale_data _nl_C_LC_TIME attribute_hidden = Link Here
30
  { NULL, },			/* no cached data */
30
  { NULL, },			/* no cached data */
31
  UNDELETABLE,
31
  UNDELETABLE,
32
  0,
32
  0,
33
  135,
33
  159,
34
  {
34
  {
35
    { .string = "Sun" },
35
    { .string = "Sun" },
36
    { .string = "Mon" },
36
    { .string = "Mon" },
Lines 166-171 const struct __locale_data _nl_C_LC_TIME attribute_hidden = Link Here
166
    { .wstr = (const uint32_t *) L"" },
166
    { .wstr = (const uint32_t *) L"" },
167
    { .wstr = (const uint32_t *) L"" },
167
    { .wstr = (const uint32_t *) L"" },
168
    { .wstr = (const uint32_t *) L"" },
168
    { .wstr = (const uint32_t *) L"" },
169
    { .wstr = (const uint32_t *) L"" },
170
    { .string = "" },
171
    { .string = "" },
172
    { .string = "" },
173
    { .string = "" },
174
    { .string = "" },
175
    { .string = "" },
176
    { .string = "" },
177
    { .string = "" },
178
    { .string = "" },
179
    { .string = "" },
180
    { .string = "" },
181
    { .string = "" },
182
    { .wstr = (const uint32_t *) L"" },
183
    { .wstr = (const uint32_t *) L"" },
184
    { .wstr = (const uint32_t *) L"" },
185
    { .wstr = (const uint32_t *) L"" },
186
    { .wstr = (const uint32_t *) L"" },
187
    { .wstr = (const uint32_t *) L"" },
188
    { .wstr = (const uint32_t *) L"" },
189
    { .wstr = (const uint32_t *) L"" },
190
    { .wstr = (const uint32_t *) L"" },
191
    { .wstr = (const uint32_t *) L"" },
192
    { .wstr = (const uint32_t *) L"" },
169
    { .wstr = (const uint32_t *) L"" }
193
    { .wstr = (const uint32_t *) L"" }
170
  }
194
  }
171
};
195
};
(-)a/locale/categories.def (-2 / +4 lines)
Lines 249-256 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)
252
  DEFINE_ELEMENT (ALTMON_1,        "alt_mon",         opt, stringarray,  12, 12)
253
  DEFINE_ELEMENT (_NL_WALTMON_1,  "wide-alt_mon",  opt, wstringarray, 12, 12)
253
  DEFINE_ELEMENT (_NL_WALTMON_1,   "wide-alt_mon",    opt, wstringarray, 12, 12)
254
  DEFINE_ELEMENT (_NL_ABALTMON_1,  "ab_alt_mon",      opt, stringarray,  12, 12)
255
  DEFINE_ELEMENT (_NL_WABALTMON_1, "wide-ab_alt_mon", opt, wstringarray, 12, 12)
254
  ), NO_POSTLOAD)
256
  ), NO_POSTLOAD)
255
257
256
258
(-)a/locale/langinfo.h (+31 lines)
Lines 283-288 enum Link Here
283
  _NL_WALTMON_11,
283
  _NL_WALTMON_11,
284
  _NL_WALTMON_12,
284
  _NL_WALTMON_12,
285
285
286
  /* Abbreviated alternative month names.  */
287
  /* In most languages which need alternative month names the abbreviated
288
     regular and the abbreviated alternative month names are identical.
289
     An example where they differ is May in Russian.  */
290
  _NL_ABALTMON_1,			/* Jan */
291
  _NL_ABALTMON_2,
292
  _NL_ABALTMON_3,
293
  _NL_ABALTMON_4,
294
  _NL_ABALTMON_5,
295
  _NL_ABALTMON_6,
296
  _NL_ABALTMON_7,
297
  _NL_ABALTMON_8,
298
  _NL_ABALTMON_9,
299
  _NL_ABALTMON_10,
300
  _NL_ABALTMON_11,
301
  _NL_ABALTMON_12,
302
303
  /* Abbreviated alternative month names.  */
304
  _NL_WABALTMON_1,			/* Jan */
305
  _NL_WABALTMON_2,
306
  _NL_WABALTMON_3,
307
  _NL_WABALTMON_4,
308
  _NL_WABALTMON_5,
309
  _NL_WABALTMON_6,
310
  _NL_WABALTMON_7,
311
  _NL_WABALTMON_8,
312
  _NL_WABALTMON_9,
313
  _NL_WABALTMON_10,
314
  _NL_WABALTMON_11,
315
  _NL_WABALTMON_12,
316
286
  _NL_NUM_LC_TIME,	/* Number of indices in LC_TIME category.  */
317
  _NL_NUM_LC_TIME,	/* Number of indices in LC_TIME category.  */
287
318
288
  /* LC_COLLATE category: text sorting.
319
  /* LC_COLLATE category: text sorting.
(-)a/locale/programs/ld-time.c (+19 lines)
Lines 94-99 struct locale_time_t Link Here
94
  const char *alt_mon[12];
94
  const char *alt_mon[12];
95
  const uint32_t *walt_mon[12];
95
  const uint32_t *walt_mon[12];
96
  int alt_mon_defined;
96
  int alt_mon_defined;
97
  const char *ab_alt_mon[12];
98
  const uint32_t *wab_alt_mon[12];
99
  int ab_alt_mon_defined;
97
  unsigned char week_ndays;
100
  unsigned char week_ndays;
98
  uint32_t week_1stday;
101
  uint32_t week_1stday;
99
  unsigned char week_1stweek;
102
  unsigned char week_1stweek;
Lines 664-669 time_output (struct localedef_t *locale, const struct charmap_t *charmap, Link Here
664
  for (n = 0; n < 12; ++n)
667
  for (n = 0; n < 12; ++n)
665
    add_locale_wstring (&file, time->walt_mon[n] ?: empty_wstr);
668
    add_locale_wstring (&file, time->walt_mon[n] ?: empty_wstr);
666
669
670
  /* The ab'alt'mons.  */
671
  for (n = 0; n < 12; ++n)
672
    add_locale_string (&file, time->ab_alt_mon[n] ?: "");
673
674
  /* The wide character ab'alt'mons.  */
675
  for (n = 0; n < 12; ++n)
676
    add_locale_wstring (&file, time->wab_alt_mon[n] ?: empty_wstr);
677
667
  write_locale_data (output_path, LC_TIME, "LC_TIME", &file);
678
  write_locale_data (output_path, LC_TIME, "LC_TIME", &file);
668
}
679
}
669
680
Lines 808-813 time_read (struct linereader *ldfile, struct localedef_t *result, Link Here
808
	  STRARR_ELEM (am_pm, 2, 2);
819
	  STRARR_ELEM (am_pm, 2, 2);
809
	  STRARR_ELEM (alt_digits, 0, 100);
820
	  STRARR_ELEM (alt_digits, 0, 100);
810
	  STRARR_ELEM (alt_mon, 12, 12);
821
	  STRARR_ELEM (alt_mon, 12, 12);
822
	  STRARR_ELEM (ab_alt_mon, 12, 12);
811
823
812
	case tok_era:
824
	case tok_era:
813
	  /* Ignore the rest of the line if we don't need the input of
825
	  /* Ignore the rest of the line if we don't need the input of
Lines 968-973 time_read (struct linereader *ldfile, struct localedef_t *result, Link Here
968
	      memcpy (time->walt_mon, time->wmon, sizeof (time->wmon));
980
	      memcpy (time->walt_mon, time->wmon, sizeof (time->wmon));
969
	      time->alt_mon_defined = 1;
981
	      time->alt_mon_defined = 1;
970
	    }
982
	    }
983
	  /* The same for abbreviated versions.  */
984
	  if (!ignore_content && !time->ab_alt_mon_defined)
985
	    {
986
	      memcpy (time->ab_alt_mon, time->abmon, sizeof (time->abmon));
987
	      memcpy (time->wab_alt_mon, time->wabmon, sizeof (time->wabmon));
988
	      time->ab_alt_mon_defined = 1;
989
	    }
971
	  return;
990
	  return;
972
991
973
	default:
992
	default:
(-)a/locale/programs/locfile-kw.gperf (+1 lines)
Lines 149-154 cal_direction, tok_cal_direction, 0 Link Here
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
151
alt_mon,                tok_alt_mon,                0
152
ab_alt_mon,             tok_ab_alt_mon,             0
152
LC_MESSAGES,            tok_lc_messages,            0
153
LC_MESSAGES,            tok_lc_messages,            0
153
yesexpr,                tok_yesexpr,                0
154
yesexpr,                tok_yesexpr,                0
154
noexpr,                 tok_noexpr,                 0
155
noexpr,                 tok_noexpr,                 0
(-)a/locale/programs/locfile-kw.h (-53 / +55 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 177
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 167 "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 152 "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 160 "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 157 "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 185 "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 187 "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 200 "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 180 "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 153 "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 155 "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 158 "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 188 "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 196 "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 183 "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 193 "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 159 "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 184 "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 156 "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 166 "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 164 "locfile-kw.gperf"
333
      {"name_mrs",               tok_name_mrs,               0},
334
#line 165 "locfile-kw.gperf"
332
#line 165 "locfile-kw.gperf"
333
      {"name_mrs",               tok_name_mrs,               0},
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 189 "locfile-kw.gperf"
338
#line 190 "locfile-kw.gperf"
339
      {"source",                 tok_source,                 0},
339
      {"source",                 tok_source,                 0},
340
#line 163 "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 162 "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 201 "locfile-kw.gperf"
344
#line 202 "locfile-kw.gperf"
345
      {"date",                   tok_date,                   0},
345
      {"date",                   tok_date,                   0},
346
      {""}, {""},
346
      {""}, {""},
347
#line 190 "locfile-kw.gperf"
347
#line 191 "locfile-kw.gperf"
348
      {"address",                tok_address,                0},
348
      {"address",                tok_address,                0},
349
#line 161 "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 169 "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 154 "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 197 "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 174 "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 186 "locfile-kw.gperf"
409
#line 187 "locfile-kw.gperf"
410
      {"measurement",            tok_measurement,            0},
410
      {"measurement",            tok_measurement,            0},
411
#line 175 "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 182 "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 170 "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 176 "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 181 "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 199 "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 195 "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 198 "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 202 "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-538 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 177 "locfile-kw.gperf"
513
#line 178 "locfile-kw.gperf"
514
      {"lang_ab",                tok_lang_ab,                0},
514
      {"lang_ab",                tok_lang_ab,                0},
515
#line 179 "locfile-kw.gperf"
515
#line 180 "locfile-kw.gperf"
516
      {"lang_lib",               tok_lang_lib,               0},
516
      {"lang_lib",               tok_lang_lib,               0},
517
      {""}, {""}, {""},
517
      {""}, {""}, {""},
518
#line 191 "locfile-kw.gperf"
518
#line 192 "locfile-kw.gperf"
519
      {"contact",                tok_contact,                0},
519
      {"contact",                tok_contact,                0},
520
      {""}, {""}, {""},
520
      {""}, {""}, {""},
521
#line 172 "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 192 "locfile-kw.gperf"
524
#line 193 "locfile-kw.gperf"
525
      {"email",                  tok_email,                  0},
525
      {"email",                  tok_email,                  0},
526
#line 171 "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 194 "locfile-kw.gperf"
532
#line 195 "locfile-kw.gperf"
533
      {"fax",                    tok_fax,                    0},
533
      {"fax",                    tok_fax,                    0},
534
      {""}, {""}, {""}, {""}, {""}, {""}, {""},
534
      {""}, {""}, {""}, {""}, {""}, {""}, {""},
535
#line 173 "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"
Lines 560-566 locfile_hash (register const char *str, register unsigned int len) Link Here
560
#line 59 "locfile-kw.gperf"
560
#line 59 "locfile-kw.gperf"
561
      {"collating-element",      tok_collating_element,      0},
561
      {"collating-element",      tok_collating_element,      0},
562
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
562
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
563
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
563
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
564
#line 152 "locfile-kw.gperf"
565
      {"ab_alt_mon",             tok_ab_alt_mon,             0},
564
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
566
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
565
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
567
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
566
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
568
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
Lines 571-577 locfile_hash (register const char *str, register unsigned int len) Link Here
571
#line 85 "locfile-kw.gperf"
573
#line 85 "locfile-kw.gperf"
572
      {"mon_decimal_point",      tok_mon_decimal_point,      0},
574
      {"mon_decimal_point",      tok_mon_decimal_point,      0},
573
      {""}, {""},
575
      {""}, {""},
574
#line 168 "locfile-kw.gperf"
576
#line 169 "locfile-kw.gperf"
575
      {"postal_fmt",             tok_postal_fmt,             0},
577
      {"postal_fmt",             tok_postal_fmt,             0},
576
      {""}, {""}, {""}, {""}, {""},
578
      {""}, {""}, {""}, {""}, {""},
577
#line 60 "locfile-kw.gperf"
579
#line 60 "locfile-kw.gperf"
Lines 590-596 locfile_hash (register const char *str, register unsigned int len) Link Here
590
#line 87 "locfile-kw.gperf"
592
#line 87 "locfile-kw.gperf"
591
      {"mon_grouping",           tok_mon_grouping,           0},
593
      {"mon_grouping",           tok_mon_grouping,           0},
592
      {""},
594
      {""},
593
#line 178 "locfile-kw.gperf"
595
#line 179 "locfile-kw.gperf"
594
      {"lang_term",              tok_lang_term,              0},
596
      {"lang_term",              tok_lang_term,              0},
595
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
597
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
596
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
598
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
(-)a/locale/programs/locfile-token.h (+1 lines)
Lines 187-192 enum token_t Link Here
187
  tok_timezone,
187
  tok_timezone,
188
  tok_date_fmt,
188
  tok_date_fmt,
189
  tok_alt_mon,
189
  tok_alt_mon,
190
  tok_ab_alt_mon,
190
  tok_lc_messages,
191
  tok_lc_messages,
191
  tok_yesexpr,
192
  tok_yesexpr,
192
  tok_noexpr,
193
  tok_noexpr,
(-)a/time/strftime_l.c (-2 / +12 lines)
Lines 108-113 extern char *tzname[]; Link Here
108
# define UCHAR_T unsigned char
108
# define UCHAR_T unsigned char
109
# define L_(Str) Str
109
# define L_(Str) Str
110
# define NLW(Sym) Sym
110
# define NLW(Sym) Sym
111
# define ABALTMON_1 _NL_ABALTMON_1
111
112
112
# if !defined STDC_HEADERS && !defined HAVE_MEMCPY
113
# if !defined STDC_HEADERS && !defined HAVE_MEMCPY
113
#  define MEMCPY(d, s, n) bcopy ((s), (d), (n))
114
#  define MEMCPY(d, s, n) bcopy ((s), (d), (n))
Lines 501-506 __strftime_internal (CHAR_T *s, size_t maxsize, const CHAR_T *format, Link Here
501
# define f_month \
502
# define f_month \
502
  ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11			     \
503
  ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11			     \
503
		     ? "?" : _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon)))
504
		     ? "?" : _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon)))
505
# define a_altmonth \
506
  ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11			     \
507
		     ? "?" : _NL_CURRENT (LC_TIME, NLW(ABALTMON_1) + tp->tm_mon)))
504
# define f_altmonth \
508
# define f_altmonth \
505
  ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11			     \
509
  ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11			     \
506
		     ? "?" : _NL_CURRENT (LC_TIME, NLW(ALTMON_1) + tp->tm_mon)))
510
		     ? "?" : _NL_CURRENT (LC_TIME, NLW(ALTMON_1) + tp->tm_mon)))
Lines 510-515 __strftime_internal (CHAR_T *s, size_t maxsize, const CHAR_T *format, Link Here
510
514
511
# define aw_len STRLEN (a_wkday)
515
# define aw_len STRLEN (a_wkday)
512
# define am_len STRLEN (a_month)
516
# define am_len STRLEN (a_month)
517
# define aam_len STRLEN (a_altmonth)
513
# define ap_len STRLEN (ampm)
518
# define ap_len STRLEN (ampm)
514
#else
519
#else
515
# if !HAVE_STRFTIME
520
# if !HAVE_STRFTIME
Lines 519-529 __strftime_internal (CHAR_T *s, size_t maxsize, const CHAR_T *format, Link Here
519
		   ? "?" : month_name[tp->tm_mon])
524
		   ? "?" : month_name[tp->tm_mon])
520
#  define a_wkday f_wkday
525
#  define a_wkday f_wkday
521
#  define a_month f_month
526
#  define a_month f_month
527
#  define a_altmonth a_month
522
#  define f_altmonth f_month
528
#  define f_altmonth f_month
523
#  define ampm (L_("AMPM") + 2 * (tp->tm_hour > 11))
529
#  define ampm (L_("AMPM") + 2 * (tp->tm_hour > 11))
524
530
525
  size_t aw_len = 3;
531
  size_t aw_len = 3;
526
  size_t am_len = 3;
532
  size_t am_len = 3;
533
  size_t aam_len = 3;
527
  size_t ap_len = 2;
534
  size_t ap_len = 2;
528
# endif
535
# endif
529
#endif
536
#endif
Lines 788-797 __strftime_internal (CHAR_T *s, size_t maxsize, const CHAR_T *format, Link Here
788
	      to_uppcase = 1;
795
	      to_uppcase = 1;
789
	      to_lowcase = 0;
796
	      to_lowcase = 0;
790
	    }
797
	    }
791
	  if (modifier != 0)
798
	  if (modifier == L_('E'))
792
	    goto bad_format;
799
	    goto bad_format;
793
#if defined _NL_CURRENT || !HAVE_STRFTIME
800
#if defined _NL_CURRENT || !HAVE_STRFTIME
794
	  cpy (am_len, a_month);
801
	  if (modifier == L_('O'))
802
	    cpy (aam_len, a_altmonth);
803
	  else
804
	    cpy (am_len, a_month);
795
	  break;
805
	  break;
796
#else
806
#else
797
	  goto underlying_strftime;
807
	  goto underlying_strftime;
(-)a/time/strptime_l.c (-1 / +18 lines)
Lines 126-131 extern const struct __locale_data _nl_C_LC_TIME attribute_hidden; Link Here
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 \
127
# define alt_month_name \
128
  (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ALTMON_1)].string)
128
  (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ALTMON_1)].string)
129
# define ab_alt_month_name \
130
  (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (_NL_ABALTMON_1)].string)
129
# define HERE_D_T_FMT (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (D_T_FMT)].string)
131
# define HERE_D_T_FMT (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (D_T_FMT)].string)
130
# define HERE_D_FMT (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (D_FMT)].string)
132
# define HERE_D_FMT (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (D_FMT)].string)
131
# define HERE_AM_STR (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (AM_STR)].string)
133
# define HERE_AM_STR (_nl_C_LC_TIME.values[_NL_ITEM_INDEX (AM_STR)].string)
Lines 418-423 __strptime_internal (const char *rp, const char *fmt, struct tm *tmp, Link Here
418
			decided_longest = loc;
420
			decided_longest = loc;
419
		    }
421
		    }
420
		  trp = rp;
422
		  trp = rp;
423
		  if (match_string (_NL_CURRENT (LC_TIME, _NL_ABALTMON_1 + cnt),
424
				    trp)
425
		      && trp > rp_longest)
426
		    {
427
		      rp_longest = trp;
428
		      cnt_longest = cnt;
429
		      if (s.decided == not
430
			  && strcmp (_NL_CURRENT (LC_TIME, _NL_ABALTMON_1 + cnt),
431
				     alt_month_name[cnt]))
432
			decided_longest = loc;
433
		    }
434
		  trp = rp;
421
#endif
435
#endif
422
		  if (match_string (_NL_CURRENT (LC_TIME, MON_1 + cnt), trp)
436
		  if (match_string (_NL_CURRENT (LC_TIME, MON_1 + cnt), trp)
423
		      && trp > rp_longest)
437
		      && trp > rp_longest)
Lines 448-453 __strptime_internal (const char *rp, const char *fmt, struct tm *tmp, Link Here
448
#ifdef _LIBC
462
#ifdef _LIBC
449
		      || ((trp = rp, match_string (alt_month_name[cnt], trp))
463
		      || ((trp = rp, match_string (alt_month_name[cnt], trp))
450
			  && trp > rp_longest)
464
			  && trp > rp_longest)
465
		      || ((trp = rp, match_string (ab_alt_month_name[cnt], trp))
466
			  && trp > rp_longest)
451
#endif
467
#endif
452
		      || ((trp = rp, match_string (ab_month_name[cnt], trp))
468
		      || ((trp = rp, match_string (ab_month_name[cnt], trp))
453
			  && trp > rp_longest)))
469
			  && trp > rp_longest)))
Lines 1036-1042 __strptime_internal (const char *rp, const char *fmt, struct tm *tmp, Link Here
1036
	case 'O':
1052
	case 'O':
1037
	  switch (*fmt++)
1053
	  switch (*fmt++)
1038
	    {
1054
	    {
1055
	    case 'b':
1039
	    case 'B':
1056
	    case 'B':
1057
	    case 'h':
1040
	      /* Undo the increment and continue.  */
1058
	      /* Undo the increment and continue.  */
1041
	      fmt--;
1059
	      fmt--;
1042
	      break;
1060
	      break;
1043
- 

Return to bug 10871