Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: source/i18n/dtfmtsym.cpp

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/i18n/digitlst.cpp ('k') | source/i18n/dtitvfmt.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ******************************************************************************* 2 *******************************************************************************
3 * Copyright (C) 1997-2014, International Business Machines Corporation and * 3 * Copyright (C) 1997-2015, International Business Machines Corporation and *
4 * others. All Rights Reserved. * 4 * others. All Rights Reserved. *
5 ******************************************************************************* 5 *******************************************************************************
6 * 6 *
7 * File DTFMTSYM.CPP 7 * File DTFMTSYM.CPP
8 * 8 *
9 * Modification History: 9 * Modification History:
10 * 10 *
11 * Date Name Description 11 * Date Name Description
12 * 02/19/97 aliu Converted from java. 12 * 02/19/97 aliu Converted from java.
13 * 07/21/98 stephen Added getZoneIndex 13 * 07/21/98 stephen Added getZoneIndex
14 * Changed weekdays/short weekdays to be one-based 14 * Changed weekdays/short weekdays to be one-based
15 * 06/14/99 stephen Removed SimpleDateFormat::fgTimeZoneDataSuffix 15 * 06/14/99 stephen Removed SimpleDateFormat::fgTimeZoneDataSuffix
16 * 11/16/99 weiv Added 'Y' and 'e' to fgPatternChars 16 * 11/16/99 weiv Added 'Y' and 'e' to fgPatternChars
17 * 03/27/00 weiv Keeping resource bundle around! 17 * 03/27/00 weiv Keeping resource bundle around!
18 * 06/30/05 emmons Added eraNames, narrow month/day, standalone context 18 * 06/30/05 emmons Added eraNames, narrow month/day, standalone context
19 * 10/12/05 emmons Added setters for eraNames, month/day by width/conte xt 19 * 10/12/05 emmons Added setters for eraNames, month/day by width/conte xt
20 ******************************************************************************* 20 *******************************************************************************
21 */ 21 */
22 #include "unicode/utypes.h" 22 #include "unicode/utypes.h"
23 23
24 #if !UCONFIG_NO_FORMATTING 24 #if !UCONFIG_NO_FORMATTING
25 #include "unicode/ustring.h" 25 #include "unicode/ustring.h"
26 #include "unicode/localpointer.h"
26 #include "unicode/dtfmtsym.h" 27 #include "unicode/dtfmtsym.h"
27 #include "unicode/smpdtfmt.h" 28 #include "unicode/smpdtfmt.h"
28 #include "unicode/msgfmt.h" 29 #include "unicode/msgfmt.h"
30 #include "unicode/numsys.h"
29 #include "unicode/tznames.h" 31 #include "unicode/tznames.h"
30 #include "cpputils.h" 32 #include "cpputils.h"
31 #include "umutex.h" 33 #include "umutex.h"
32 #include "cmemory.h" 34 #include "cmemory.h"
33 #include "cstring.h" 35 #include "cstring.h"
34 #include "locbased.h" 36 #include "locbased.h"
35 #include "gregoimp.h" 37 #include "gregoimp.h"
36 #include "hash.h" 38 #include "hash.h"
37 #include "uresimp.h" 39 #include "uresimp.h"
38 #include "ureslocs.h" 40 #include "ureslocs.h"
41 #include "shareddateformatsymbols.h"
42 #include "unicode/calendar.h"
43 #include "unifiedcache.h"
39 44
40 // ***************************************************************************** 45 // *****************************************************************************
41 // class DateFormatSymbols 46 // class DateFormatSymbols
42 // ***************************************************************************** 47 // *****************************************************************************
43 48
44 /** 49 /**
45 * These are static arrays we use only in the case where we have no 50 * These are static arrays we use only in the case where we have no
46 * resource data. 51 * resource data.
47 */ 52 */
48 53
54 #if UDAT_HAS_PATTERN_CHAR_FOR_TIME_SEPARATOR
55 #define PATTERN_CHARS_LEN 36
56 #else
49 #define PATTERN_CHARS_LEN 35 57 #define PATTERN_CHARS_LEN 35
58 #endif
50 59
51 /** 60 /**
52 * Unlocalized date-time pattern characters. For example: 'y', 'd', etc. All 61 * Unlocalized date-time pattern characters. For example: 'y', 'd', etc. All
53 * locales use the same these unlocalized pattern characters. 62 * locales use the same these unlocalized pattern characters.
54 */ 63 */
55 static const UChar gPatternChars[] = { 64 static const UChar gPatternChars[] = {
65 #if UDAT_HAS_PATTERN_CHAR_FOR_TIME_SEPARATOR
66 // GyMdkHmsSEDFwWahKzYeugAZvcLQqVUOXxr:
67 #else
56 // GyMdkHmsSEDFwWahKzYeugAZvcLQqVUOXxr 68 // GyMdkHmsSEDFwWahKzYeugAZvcLQqVUOXxr
69 #endif
57 0x47, 0x79, 0x4D, 0x64, 0x6B, 0x48, 0x6D, 0x73, 0x53, 0x45, 70 0x47, 0x79, 0x4D, 0x64, 0x6B, 0x48, 0x6D, 0x73, 0x53, 0x45,
58 0x44, 0x46, 0x77, 0x57, 0x61, 0x68, 0x4B, 0x7A, 0x59, 0x65, 71 0x44, 0x46, 0x77, 0x57, 0x61, 0x68, 0x4B, 0x7A, 0x59, 0x65,
59 0x75, 0x67, 0x41, 0x5A, 0x76, 0x63, 0x4c, 0x51, 0x71, 0x56, 72 0x75, 0x67, 0x41, 0x5A, 0x76, 0x63, 0x4c, 0x51, 0x71, 0x56,
73 #if UDAT_HAS_PATTERN_CHAR_FOR_TIME_SEPARATOR
74 0x55, 0x4F, 0x58, 0x78, 0x72, 0x3a, 0
75 #else
60 0x55, 0x4F, 0x58, 0x78, 0x72, 0 76 0x55, 0x4F, 0x58, 0x78, 0x72, 0
77 #endif
61 }; 78 };
62 79
63 /* length of an array */ 80 /* length of an array */
64 #define ARRAY_LENGTH(array) (sizeof(array)/sizeof(array[0])) 81 #define ARRAY_LENGTH(array) (sizeof(array)/sizeof(array[0]))
65 82
66 //------------------------------------------------------ 83 //------------------------------------------------------
67 // Strings of last resort. These are only used if we have no resource 84 // Strings of last resort. These are only used if we have no resource
68 // files. They aren't designed for actual use, just for backup. 85 // files. They aren't designed for actual use, just for backup.
69 86
70 // These are the month names and abbreviations of last resort. 87 // These are the month names and abbreviations of last resort.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 156
140 kZoneNum = 5, 157 kZoneNum = 5,
141 kZoneLen = 4, 158 kZoneLen = 4,
142 159
143 kGmtHourNum = 4, 160 kGmtHourNum = 4,
144 kGmtHourLen = 10 161 kGmtHourLen = 10
145 } LastResortSize; 162 } LastResortSize;
146 163
147 U_NAMESPACE_BEGIN 164 U_NAMESPACE_BEGIN
148 165
166 SharedDateFormatSymbols::~SharedDateFormatSymbols() {
167 }
168
169 template<> U_I18N_API
170 const SharedDateFormatSymbols *
171 LocaleCacheKey<SharedDateFormatSymbols>::createObject(
172 const void */*unusedContext*/, UErrorCode &status) const {
173 char type[256];
174 Calendar::getCalendarTypeFromLocale(fLoc, type, UPRV_LENGTHOF(type), status) ;
175 if (U_FAILURE(status)) {
176 return NULL;
177 }
178 SharedDateFormatSymbols *shared
179 = new SharedDateFormatSymbols(fLoc, type, status);
180 if (shared == NULL) {
181 status = U_MEMORY_ALLOCATION_ERROR;
182 return NULL;
183 }
184 if (U_FAILURE(status)) {
185 delete shared;
186 return NULL;
187 }
188 shared->addRef();
189 return shared;
190 }
191
149 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(DateFormatSymbols) 192 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(DateFormatSymbols)
150 193
151 #define kSUPPLEMENTAL "supplementalData" 194 #define kSUPPLEMENTAL "supplementalData"
152 195
153 /** 196 /**
154 * These are the tags we expect to see in normal resource bundle files associate d 197 * These are the tags we expect to see in normal resource bundle files associate d
155 * with a locale and calendar 198 * with a locale and calendar
156 */ 199 */
157 static const char gErasTag[]="eras"; 200 static const char gErasTag[]="eras";
158 static const char gCyclicNameSetsTag[]="cyclicNameSets"; 201 static const char gCyclicNameSetsTag[]="cyclicNameSets";
159 static const char gNameSetYearsTag[]="years"; 202 static const char gNameSetYearsTag[]="years";
160 static const char gNameSetZodiacsTag[]="zodiacs"; 203 static const char gNameSetZodiacsTag[]="zodiacs";
161 static const char gMonthNamesTag[]="monthNames"; 204 static const char gMonthNamesTag[]="monthNames";
162 static const char gMonthPatternsTag[]="monthPatterns"; 205 static const char gMonthPatternsTag[]="monthPatterns";
163 static const char gDayNamesTag[]="dayNames"; 206 static const char gDayNamesTag[]="dayNames";
164 static const char gNamesWideTag[]="wide"; 207 static const char gNamesWideTag[]="wide";
165 static const char gNamesAbbrTag[]="abbreviated"; 208 static const char gNamesAbbrTag[]="abbreviated";
166 static const char gNamesShortTag[]="short"; 209 static const char gNamesShortTag[]="short";
167 static const char gNamesNarrowTag[]="narrow"; 210 static const char gNamesNarrowTag[]="narrow";
168 static const char gNamesAllTag[]="all"; 211 static const char gNamesAllTag[]="all";
169 static const char gNamesLeapTag[]="leap"; 212 static const char gNamesLeapTag[]="leap";
170 static const char gNamesFormatTag[]="format"; 213 static const char gNamesFormatTag[]="format";
171 static const char gNamesStandaloneTag[]="stand-alone"; 214 static const char gNamesStandaloneTag[]="stand-alone";
172 static const char gNamesNumericTag[]="numeric"; 215 static const char gNamesNumericTag[]="numeric";
173 static const char gAmPmMarkersTag[]="AmPmMarkers"; 216 static const char gAmPmMarkersTag[]="AmPmMarkers";
217 static const char gAmPmMarkersNarrowTag[]="AmPmMarkersNarrow";
174 static const char gQuartersTag[]="quarters"; 218 static const char gQuartersTag[]="quarters";
219 static const char gNumberElementsTag[]="NumberElements";
220 static const char gSymbolsTag[]="symbols";
221 static const char gTimeSeparatorTag[]="timeSeparator";
175 222
176 // static const char gZoneStringsTag[]="zoneStrings"; 223 // static const char gZoneStringsTag[]="zoneStrings";
177 224
178 // static const char gLocalPatternCharsTag[]="localPatternChars"; 225 // static const char gLocalPatternCharsTag[]="localPatternChars";
179 226
180 static const char gContextTransformsTag[]="contextTransforms"; 227 static const char gContextTransformsTag[]="contextTransforms";
181 228
182 static UMutex LOCK = U_MUTEX_INITIALIZER; 229 static UMutex LOCK = U_MUTEX_INITIALIZER;
183 230
184 /** 231 /**
185 * Jitterbug 2974: MSVC has a bug whereby new X[0] behaves badly. 232 * Jitterbug 2974: MSVC has a bug whereby new X[0] behaves badly.
186 * Work around this. 233 * Work around this.
187 */ 234 */
188 static inline UnicodeString* newUnicodeStringArray(size_t count) { 235 static inline UnicodeString* newUnicodeStringArray(size_t count) {
189 return new UnicodeString[count ? count : 1]; 236 return new UnicodeString[count ? count : 1];
190 } 237 }
191 238
192 //------------------------------------------------------ 239 //------------------------------------------------------
193 240
241 DateFormatSymbols * U_EXPORT2
242 DateFormatSymbols::createForLocale(
243 const Locale& locale, UErrorCode &status) {
244 const SharedDateFormatSymbols *shared = NULL;
245 UnifiedCache::getByLocale(locale, shared, status);
246 if (U_FAILURE(status)) {
247 return NULL;
248 }
249 DateFormatSymbols *result = new DateFormatSymbols(shared->get());
250 shared->removeRef();
251 if (result == NULL) {
252 status = U_MEMORY_ALLOCATION_ERROR;
253 return NULL;
254 }
255 return result;
256 }
257
194 DateFormatSymbols::DateFormatSymbols(const Locale& locale, 258 DateFormatSymbols::DateFormatSymbols(const Locale& locale,
195 UErrorCode& status) 259 UErrorCode& status)
196 : UObject() 260 : UObject()
197 { 261 {
198 initializeData(locale, NULL, status); 262 initializeData(locale, NULL, status);
199 } 263 }
200 264
201 DateFormatSymbols::DateFormatSymbols(UErrorCode& status) 265 DateFormatSymbols::DateFormatSymbols(UErrorCode& status)
202 : UObject() 266 : UObject()
203 { 267 {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 uprv_free(fZoneStrings); 351 uprv_free(fZoneStrings);
288 fZoneStrings = NULL; 352 fZoneStrings = NULL;
289 } 353 }
290 } 354 }
291 355
292 /** 356 /**
293 * Copy all of the other's data to this. 357 * Copy all of the other's data to this.
294 */ 358 */
295 void 359 void
296 DateFormatSymbols::copyData(const DateFormatSymbols& other) { 360 DateFormatSymbols::copyData(const DateFormatSymbols& other) {
361 UErrorCode status = U_ZERO_ERROR;
362 U_LOCALE_BASED(locBased, *this);
363 locBased.setLocaleIDs(
364 other.getLocale(ULOC_VALID_LOCALE, status),
365 other.getLocale(ULOC_ACTUAL_LOCALE, status));
297 assignArray(fEras, fErasCount, other.fEras, other.fErasCount); 366 assignArray(fEras, fErasCount, other.fEras, other.fErasCount);
298 assignArray(fEraNames, fEraNamesCount, other.fEraNames, other.fEraNamesCount ); 367 assignArray(fEraNames, fEraNamesCount, other.fEraNames, other.fEraNamesCount );
299 assignArray(fNarrowEras, fNarrowErasCount, other.fNarrowEras, other.fNarrowE rasCount); 368 assignArray(fNarrowEras, fNarrowErasCount, other.fNarrowEras, other.fNarrowE rasCount);
300 assignArray(fMonths, fMonthsCount, other.fMonths, other.fMonthsCount); 369 assignArray(fMonths, fMonthsCount, other.fMonths, other.fMonthsCount);
301 assignArray(fShortMonths, fShortMonthsCount, other.fShortMonths, other.fShor tMonthsCount); 370 assignArray(fShortMonths, fShortMonthsCount, other.fShortMonths, other.fShor tMonthsCount);
302 assignArray(fNarrowMonths, fNarrowMonthsCount, other.fNarrowMonths, other.fN arrowMonthsCount); 371 assignArray(fNarrowMonths, fNarrowMonthsCount, other.fNarrowMonths, other.fN arrowMonthsCount);
303 assignArray(fStandaloneMonths, fStandaloneMonthsCount, other.fStandaloneMont hs, other.fStandaloneMonthsCount); 372 assignArray(fStandaloneMonths, fStandaloneMonthsCount, other.fStandaloneMont hs, other.fStandaloneMonthsCount);
304 assignArray(fStandaloneShortMonths, fStandaloneShortMonthsCount, other.fStan daloneShortMonths, other.fStandaloneShortMonthsCount); 373 assignArray(fStandaloneShortMonths, fStandaloneShortMonthsCount, other.fStan daloneShortMonths, other.fStandaloneShortMonthsCount);
305 assignArray(fStandaloneNarrowMonths, fStandaloneNarrowMonthsCount, other.fSt andaloneNarrowMonths, other.fStandaloneNarrowMonthsCount); 374 assignArray(fStandaloneNarrowMonths, fStandaloneNarrowMonthsCount, other.fSt andaloneNarrowMonths, other.fStandaloneNarrowMonthsCount);
306 assignArray(fWeekdays, fWeekdaysCount, other.fWeekdays, other.fWeekdaysCount ); 375 assignArray(fWeekdays, fWeekdaysCount, other.fWeekdays, other.fWeekdaysCount );
307 assignArray(fShortWeekdays, fShortWeekdaysCount, other.fShortWeekdays, other .fShortWeekdaysCount); 376 assignArray(fShortWeekdays, fShortWeekdaysCount, other.fShortWeekdays, other .fShortWeekdaysCount);
308 assignArray(fShorterWeekdays, fShorterWeekdaysCount, other.fShorterWeekdays, other.fShorterWeekdaysCount); 377 assignArray(fShorterWeekdays, fShorterWeekdaysCount, other.fShorterWeekdays, other.fShorterWeekdaysCount);
309 assignArray(fNarrowWeekdays, fNarrowWeekdaysCount, other.fNarrowWeekdays, ot her.fNarrowWeekdaysCount); 378 assignArray(fNarrowWeekdays, fNarrowWeekdaysCount, other.fNarrowWeekdays, ot her.fNarrowWeekdaysCount);
310 assignArray(fStandaloneWeekdays, fStandaloneWeekdaysCount, other.fStandalone Weekdays, other.fStandaloneWeekdaysCount); 379 assignArray(fStandaloneWeekdays, fStandaloneWeekdaysCount, other.fStandalone Weekdays, other.fStandaloneWeekdaysCount);
311 assignArray(fStandaloneShortWeekdays, fStandaloneShortWeekdaysCount, other.f StandaloneShortWeekdays, other.fStandaloneShortWeekdaysCount); 380 assignArray(fStandaloneShortWeekdays, fStandaloneShortWeekdaysCount, other.f StandaloneShortWeekdays, other.fStandaloneShortWeekdaysCount);
312 assignArray(fStandaloneShorterWeekdays, fStandaloneShorterWeekdaysCount, oth er.fStandaloneShorterWeekdays, other.fStandaloneShorterWeekdaysCount); 381 assignArray(fStandaloneShorterWeekdays, fStandaloneShorterWeekdaysCount, oth er.fStandaloneShorterWeekdays, other.fStandaloneShorterWeekdaysCount);
313 assignArray(fStandaloneNarrowWeekdays, fStandaloneNarrowWeekdaysCount, other .fStandaloneNarrowWeekdays, other.fStandaloneNarrowWeekdaysCount); 382 assignArray(fStandaloneNarrowWeekdays, fStandaloneNarrowWeekdaysCount, other .fStandaloneNarrowWeekdays, other.fStandaloneNarrowWeekdaysCount);
314 assignArray(fAmPms, fAmPmsCount, other.fAmPms, other.fAmPmsCount); 383 assignArray(fAmPms, fAmPmsCount, other.fAmPms, other.fAmPmsCount);
384 assignArray(fNarrowAmPms, fNarrowAmPmsCount, other.fNarrowAmPms, other.fNarr owAmPmsCount );
385 fTimeSeparator.fastCopyFrom(other.fTimeSeparator); // fastCopyFrom() - see assignArray comments
315 assignArray(fQuarters, fQuartersCount, other.fQuarters, other.fQuartersCount ); 386 assignArray(fQuarters, fQuartersCount, other.fQuarters, other.fQuartersCount );
316 assignArray(fShortQuarters, fShortQuartersCount, other.fShortQuarters, other .fShortQuartersCount); 387 assignArray(fShortQuarters, fShortQuartersCount, other.fShortQuarters, other .fShortQuartersCount);
317 assignArray(fStandaloneQuarters, fStandaloneQuartersCount, other.fStandalone Quarters, other.fStandaloneQuartersCount); 388 assignArray(fStandaloneQuarters, fStandaloneQuartersCount, other.fStandalone Quarters, other.fStandaloneQuartersCount);
318 assignArray(fStandaloneShortQuarters, fStandaloneShortQuartersCount, other.f StandaloneShortQuarters, other.fStandaloneShortQuartersCount); 389 assignArray(fStandaloneShortQuarters, fStandaloneShortQuartersCount, other.f StandaloneShortQuarters, other.fStandaloneShortQuartersCount);
319 if (other.fLeapMonthPatterns != NULL) { 390 if (other.fLeapMonthPatterns != NULL) {
320 assignArray(fLeapMonthPatterns, fLeapMonthPatternsCount, other.fLeapMont hPatterns, other.fLeapMonthPatternsCount); 391 assignArray(fLeapMonthPatterns, fLeapMonthPatternsCount, other.fLeapMont hPatterns, other.fLeapMonthPatternsCount);
321 } else { 392 } else {
322 fLeapMonthPatterns = NULL; 393 fLeapMonthPatterns = NULL;
323 fLeapMonthPatternsCount = 0; 394 fLeapMonthPatternsCount = 0;
324 } 395 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 if (fStandaloneNarrowMonths) delete[] fStandaloneNarrowMonths; 455 if (fStandaloneNarrowMonths) delete[] fStandaloneNarrowMonths;
385 if (fWeekdays) delete[] fWeekdays; 456 if (fWeekdays) delete[] fWeekdays;
386 if (fShortWeekdays) delete[] fShortWeekdays; 457 if (fShortWeekdays) delete[] fShortWeekdays;
387 if (fShorterWeekdays) delete[] fShorterWeekdays; 458 if (fShorterWeekdays) delete[] fShorterWeekdays;
388 if (fNarrowWeekdays) delete[] fNarrowWeekdays; 459 if (fNarrowWeekdays) delete[] fNarrowWeekdays;
389 if (fStandaloneWeekdays) delete[] fStandaloneWeekdays; 460 if (fStandaloneWeekdays) delete[] fStandaloneWeekdays;
390 if (fStandaloneShortWeekdays) delete[] fStandaloneShortWeekdays; 461 if (fStandaloneShortWeekdays) delete[] fStandaloneShortWeekdays;
391 if (fStandaloneShorterWeekdays) delete[] fStandaloneShorterWeekdays; 462 if (fStandaloneShorterWeekdays) delete[] fStandaloneShorterWeekdays;
392 if (fStandaloneNarrowWeekdays) delete[] fStandaloneNarrowWeekdays; 463 if (fStandaloneNarrowWeekdays) delete[] fStandaloneNarrowWeekdays;
393 if (fAmPms) delete[] fAmPms; 464 if (fAmPms) delete[] fAmPms;
465 if (fNarrowAmPms) delete[] fNarrowAmPms;
394 if (fQuarters) delete[] fQuarters; 466 if (fQuarters) delete[] fQuarters;
395 if (fShortQuarters) delete[] fShortQuarters; 467 if (fShortQuarters) delete[] fShortQuarters;
396 if (fStandaloneQuarters) delete[] fStandaloneQuarters; 468 if (fStandaloneQuarters) delete[] fStandaloneQuarters;
397 if (fStandaloneShortQuarters) delete[] fStandaloneShortQuarters; 469 if (fStandaloneShortQuarters) delete[] fStandaloneShortQuarters;
398 if (fLeapMonthPatterns) delete[] fLeapMonthPatterns; 470 if (fLeapMonthPatterns) delete[] fLeapMonthPatterns;
399 if (fShortYearNames) delete[] fShortYearNames; 471 if (fShortYearNames) delete[] fShortYearNames;
400 if (fShortZodiacNames) delete[] fShortZodiacNames; 472 if (fShortZodiacNames) delete[] fShortZodiacNames;
401 473
402 disposeZoneStrings(); 474 disposeZoneStrings();
403 } 475 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 fStandaloneNarrowMonthsCount == other.fStandaloneNarrowMonthsCount && 527 fStandaloneNarrowMonthsCount == other.fStandaloneNarrowMonthsCount &&
456 fWeekdaysCount == other.fWeekdaysCount && 528 fWeekdaysCount == other.fWeekdaysCount &&
457 fShortWeekdaysCount == other.fShortWeekdaysCount && 529 fShortWeekdaysCount == other.fShortWeekdaysCount &&
458 fShorterWeekdaysCount == other.fShorterWeekdaysCount && 530 fShorterWeekdaysCount == other.fShorterWeekdaysCount &&
459 fNarrowWeekdaysCount == other.fNarrowWeekdaysCount && 531 fNarrowWeekdaysCount == other.fNarrowWeekdaysCount &&
460 fStandaloneWeekdaysCount == other.fStandaloneWeekdaysCount && 532 fStandaloneWeekdaysCount == other.fStandaloneWeekdaysCount &&
461 fStandaloneShortWeekdaysCount == other.fStandaloneShortWeekdaysCount && 533 fStandaloneShortWeekdaysCount == other.fStandaloneShortWeekdaysCount &&
462 fStandaloneShorterWeekdaysCount == other.fStandaloneShorterWeekdaysCount && 534 fStandaloneShorterWeekdaysCount == other.fStandaloneShorterWeekdaysCount &&
463 fStandaloneNarrowWeekdaysCount == other.fStandaloneNarrowWeekdaysCount & & 535 fStandaloneNarrowWeekdaysCount == other.fStandaloneNarrowWeekdaysCount & &
464 fAmPmsCount == other.fAmPmsCount && 536 fAmPmsCount == other.fAmPmsCount &&
537 fNarrowAmPmsCount == other.fNarrowAmPmsCount &&
465 fQuartersCount == other.fQuartersCount && 538 fQuartersCount == other.fQuartersCount &&
466 fShortQuartersCount == other.fShortQuartersCount && 539 fShortQuartersCount == other.fShortQuartersCount &&
467 fStandaloneQuartersCount == other.fStandaloneQuartersCount && 540 fStandaloneQuartersCount == other.fStandaloneQuartersCount &&
468 fStandaloneShortQuartersCount == other.fStandaloneShortQuartersCount && 541 fStandaloneShortQuartersCount == other.fStandaloneShortQuartersCount &&
469 fLeapMonthPatternsCount == other.fLeapMonthPatternsCount && 542 fLeapMonthPatternsCount == other.fLeapMonthPatternsCount &&
470 fShortYearNamesCount == other.fShortYearNamesCount && 543 fShortYearNamesCount == other.fShortYearNamesCount &&
471 fShortZodiacNamesCount == other.fShortZodiacNamesCount && 544 fShortZodiacNamesCount == other.fShortZodiacNamesCount &&
472 (uprv_memcmp(fCapitalization, other.fCapitalization, sizeof(fCapitalizat ion))==0)) 545 (uprv_memcmp(fCapitalization, other.fCapitalization, sizeof(fCapitalizat ion))==0))
473 { 546 {
474 // Now compare the arrays themselves 547 // Now compare the arrays themselves
475 if (arrayCompare(fEras, other.fEras, fErasCount) && 548 if (arrayCompare(fEras, other.fEras, fErasCount) &&
476 arrayCompare(fEraNames, other.fEraNames, fEraNamesCount) && 549 arrayCompare(fEraNames, other.fEraNames, fEraNamesCount) &&
477 arrayCompare(fNarrowEras, other.fNarrowEras, fNarrowErasCount) && 550 arrayCompare(fNarrowEras, other.fNarrowEras, fNarrowErasCount) &&
478 arrayCompare(fMonths, other.fMonths, fMonthsCount) && 551 arrayCompare(fMonths, other.fMonths, fMonthsCount) &&
479 arrayCompare(fShortMonths, other.fShortMonths, fShortMonthsCount) && 552 arrayCompare(fShortMonths, other.fShortMonths, fShortMonthsCount) &&
480 arrayCompare(fNarrowMonths, other.fNarrowMonths, fNarrowMonthsCount) && 553 arrayCompare(fNarrowMonths, other.fNarrowMonths, fNarrowMonthsCount) &&
481 arrayCompare(fStandaloneMonths, other.fStandaloneMonths, fStandalone MonthsCount) && 554 arrayCompare(fStandaloneMonths, other.fStandaloneMonths, fStandalone MonthsCount) &&
482 arrayCompare(fStandaloneShortMonths, other.fStandaloneShortMonths, f StandaloneShortMonthsCount) && 555 arrayCompare(fStandaloneShortMonths, other.fStandaloneShortMonths, f StandaloneShortMonthsCount) &&
483 arrayCompare(fStandaloneNarrowMonths, other.fStandaloneNarrowMonths, fStandaloneNarrowMonthsCount) && 556 arrayCompare(fStandaloneNarrowMonths, other.fStandaloneNarrowMonths, fStandaloneNarrowMonthsCount) &&
484 arrayCompare(fWeekdays, other.fWeekdays, fWeekdaysCount) && 557 arrayCompare(fWeekdays, other.fWeekdays, fWeekdaysCount) &&
485 arrayCompare(fShortWeekdays, other.fShortWeekdays, fShortWeekdaysCou nt) && 558 arrayCompare(fShortWeekdays, other.fShortWeekdays, fShortWeekdaysCou nt) &&
486 arrayCompare(fShorterWeekdays, other.fShorterWeekdays, fShorterWeekd aysCount) && 559 arrayCompare(fShorterWeekdays, other.fShorterWeekdays, fShorterWeekd aysCount) &&
487 arrayCompare(fNarrowWeekdays, other.fNarrowWeekdays, fNarrowWeekdays Count) && 560 arrayCompare(fNarrowWeekdays, other.fNarrowWeekdays, fNarrowWeekdays Count) &&
488 arrayCompare(fStandaloneWeekdays, other.fStandaloneWeekdays, fStanda loneWeekdaysCount) && 561 arrayCompare(fStandaloneWeekdays, other.fStandaloneWeekdays, fStanda loneWeekdaysCount) &&
489 arrayCompare(fStandaloneShortWeekdays, other.fStandaloneShortWeekday s, fStandaloneShortWeekdaysCount) && 562 arrayCompare(fStandaloneShortWeekdays, other.fStandaloneShortWeekday s, fStandaloneShortWeekdaysCount) &&
490 arrayCompare(fStandaloneShorterWeekdays, other.fStandaloneShorterWee kdays, fStandaloneShorterWeekdaysCount) && 563 arrayCompare(fStandaloneShorterWeekdays, other.fStandaloneShorterWee kdays, fStandaloneShorterWeekdaysCount) &&
491 arrayCompare(fStandaloneNarrowWeekdays, other.fStandaloneNarrowWeekd ays, fStandaloneNarrowWeekdaysCount) && 564 arrayCompare(fStandaloneNarrowWeekdays, other.fStandaloneNarrowWeekd ays, fStandaloneNarrowWeekdaysCount) &&
492 arrayCompare(fAmPms, other.fAmPms, fAmPmsCount) && 565 arrayCompare(fAmPms, other.fAmPms, fAmPmsCount) &&
566 arrayCompare(fNarrowAmPms, other.fNarrowAmPms, fNarrowAmPmsCount) &&
567 fTimeSeparator == other.fTimeSeparator &&
493 arrayCompare(fQuarters, other.fQuarters, fQuartersCount) && 568 arrayCompare(fQuarters, other.fQuarters, fQuartersCount) &&
494 arrayCompare(fShortQuarters, other.fShortQuarters, fShortQuartersCou nt) && 569 arrayCompare(fShortQuarters, other.fShortQuarters, fShortQuartersCou nt) &&
495 arrayCompare(fStandaloneQuarters, other.fStandaloneQuarters, fStanda loneQuartersCount) && 570 arrayCompare(fStandaloneQuarters, other.fStandaloneQuarters, fStanda loneQuartersCount) &&
496 arrayCompare(fStandaloneShortQuarters, other.fStandaloneShortQuarter s, fStandaloneShortQuartersCount) && 571 arrayCompare(fStandaloneShortQuarters, other.fStandaloneShortQuarter s, fStandaloneShortQuartersCount) &&
497 arrayCompare(fLeapMonthPatterns, other.fLeapMonthPatterns, fLeapMont hPatternsCount) && 572 arrayCompare(fLeapMonthPatterns, other.fLeapMonthPatterns, fLeapMont hPatternsCount) &&
498 arrayCompare(fShortYearNames, other.fShortYearNames, fShortYearNames Count) && 573 arrayCompare(fShortYearNames, other.fShortYearNames, fShortYearNames Count) &&
499 arrayCompare(fShortZodiacNames, other.fShortZodiacNames, fShortZodia cNamesCount)) 574 arrayCompare(fShortZodiacNames, other.fShortZodiacNames, fShortZodia cNamesCount))
500 { 575 {
501 // Compare the contents of fZoneStrings 576 // Compare the contents of fZoneStrings
502 if (fZoneStrings == NULL && other.fZoneStrings == NULL) { 577 if (fZoneStrings == NULL && other.fZoneStrings == NULL) {
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 case DT_WIDTH_COUNT : 793 case DT_WIDTH_COUNT :
719 break; 794 break;
720 } 795 }
721 break; 796 break;
722 case DT_CONTEXT_COUNT : 797 case DT_CONTEXT_COUNT :
723 break; 798 break;
724 } 799 }
725 return returnValue; 800 return returnValue;
726 } 801 }
727 802
803 UnicodeString&
804 DateFormatSymbols::getTimeSeparatorString(UnicodeString& result) const
805 {
806 // fastCopyFrom() - see assignArray comments
807 return result.fastCopyFrom(fTimeSeparator);
808 }
809
728 const UnicodeString* 810 const UnicodeString*
729 DateFormatSymbols::getAmPmStrings(int32_t &count) const 811 DateFormatSymbols::getAmPmStrings(int32_t &count) const
730 { 812 {
731 count = fAmPmsCount; 813 count = fAmPmsCount;
732 return fAmPms; 814 return fAmPms;
733 } 815 }
734 816
735 const UnicodeString* 817 const UnicodeString*
736 DateFormatSymbols::getLeapMonthPatterns(int32_t &count) const 818 DateFormatSymbols::getLeapMonthPatterns(int32_t &count) const
737 { 819 {
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 // delete the old list if we own it 1189 // delete the old list if we own it
1108 if (fAmPms) delete[] fAmPms; 1190 if (fAmPms) delete[] fAmPms;
1109 1191
1110 // we always own the new list, which we create here (we duplicate rather 1192 // we always own the new list, which we create here (we duplicate rather
1111 // than adopting the list passed in) 1193 // than adopting the list passed in)
1112 fAmPms = newUnicodeStringArray(count); 1194 fAmPms = newUnicodeStringArray(count);
1113 uprv_arrayCopy(amPmsArray,fAmPms,count); 1195 uprv_arrayCopy(amPmsArray,fAmPms,count);
1114 fAmPmsCount = count; 1196 fAmPmsCount = count;
1115 } 1197 }
1116 1198
1199 void
1200 DateFormatSymbols::setTimeSeparatorString(const UnicodeString& newTimeSeparator)
1201 {
1202 fTimeSeparator = newTimeSeparator;
1203 }
1204
1117 const UnicodeString** 1205 const UnicodeString**
1118 DateFormatSymbols::getZoneStrings(int32_t& rowCount, int32_t& columnCount) const 1206 DateFormatSymbols::getZoneStrings(int32_t& rowCount, int32_t& columnCount) const
1119 { 1207 {
1120 const UnicodeString **result = NULL; 1208 const UnicodeString **result = NULL;
1121 1209
1122 umtx_lock(&LOCK); 1210 umtx_lock(&LOCK);
1123 if (fZoneStrings == NULL) { 1211 if (fZoneStrings == NULL) {
1124 if (fLocaleZoneStrings == NULL) { 1212 if (fLocaleZoneStrings == NULL) {
1125 ((DateFormatSymbols*)this)->initZoneStringsArray(); 1213 ((DateFormatSymbols*)this)->initZoneStringsArray();
1126 } 1214 }
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 fStandaloneWeekdays = NULL; 1511 fStandaloneWeekdays = NULL;
1424 fStandaloneWeekdaysCount=0; 1512 fStandaloneWeekdaysCount=0;
1425 fStandaloneShortWeekdays = NULL; 1513 fStandaloneShortWeekdays = NULL;
1426 fStandaloneShortWeekdaysCount=0; 1514 fStandaloneShortWeekdaysCount=0;
1427 fStandaloneShorterWeekdays = NULL; 1515 fStandaloneShorterWeekdays = NULL;
1428 fStandaloneShorterWeekdaysCount=0; 1516 fStandaloneShorterWeekdaysCount=0;
1429 fStandaloneNarrowWeekdays = NULL; 1517 fStandaloneNarrowWeekdays = NULL;
1430 fStandaloneNarrowWeekdaysCount=0; 1518 fStandaloneNarrowWeekdaysCount=0;
1431 fAmPms = NULL; 1519 fAmPms = NULL;
1432 fAmPmsCount=0; 1520 fAmPmsCount=0;
1521 fNarrowAmPms = NULL;
1522 fNarrowAmPmsCount=0;
1523 fTimeSeparator.setToBogus();
1433 fQuarters = NULL; 1524 fQuarters = NULL;
1434 fQuartersCount = 0; 1525 fQuartersCount = 0;
1435 fShortQuarters = NULL; 1526 fShortQuarters = NULL;
1436 fShortQuartersCount = 0; 1527 fShortQuartersCount = 0;
1437 fStandaloneQuarters = NULL; 1528 fStandaloneQuarters = NULL;
1438 fStandaloneQuartersCount = 0; 1529 fStandaloneQuartersCount = 0;
1439 fStandaloneShortQuarters = NULL; 1530 fStandaloneShortQuarters = NULL;
1440 fStandaloneShortQuartersCount = 0; 1531 fStandaloneShortQuartersCount = 0;
1441 fLeapMonthPatterns = NULL; 1532 fLeapMonthPatterns = NULL;
1442 fLeapMonthPatternsCount = 0; 1533 fLeapMonthPatternsCount = 0;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 fCapitalization[typeMapPtr->usageTypeEnumValue][0] = intVector[0]; 1661 fCapitalization[typeMapPtr->usageTypeEnumValue][0] = intVector[0];
1571 fCapitalization[typeMapPtr->usageTypeEnumValue][1] = intVector[1]; 1662 fCapitalization[typeMapPtr->usageTypeEnumValue][1] = intVector[1];
1572 } 1663 }
1573 } 1664 }
1574 } 1665 }
1575 tempStatus = U_ZERO_ERROR; 1666 tempStatus = U_ZERO_ERROR;
1576 ures_close(contextTransformUsage); 1667 ures_close(contextTransformUsage);
1577 } 1668 }
1578 ures_close(contextTransforms); 1669 ures_close(contextTransforms);
1579 } 1670 }
1671
1672 tempStatus = U_ZERO_ERROR;
1673 const LocalPointer<NumberingSystem> numberingSystem(
1674 NumberingSystem::createInstance(locale, tempStatus), tempStatus) ;
1675 if (U_SUCCESS(tempStatus)) {
1676 // These functions all fail gracefully if passed NULL pointers and
1677 // do nothing unless U_SUCCESS(tempStatus), so it's only necessary
1678 // to check for errors once after all calls are made.
1679 const LocalUResourceBundlePointer numberElementsData(ures_getByKeyWi thFallback(
1680 localeBundle, gNumberElementsTag, NULL, &tempStatus));
1681 const LocalUResourceBundlePointer nsNameData(ures_getByKeyWithFallba ck(
1682 numberElementsData.getAlias(), numberingSystem->getName(), N ULL, &tempStatus));
1683 const LocalUResourceBundlePointer symbolsData(ures_getByKeyWithFallb ack(
1684 nsNameData.getAlias(), gSymbolsTag, NULL, &tempStatus));
1685 fTimeSeparator = ures_getUnicodeStringByKey(
1686 symbolsData.getAlias(), gTimeSeparatorTag, &tempStatus);
1687 if (U_FAILURE(tempStatus)) {
1688 fTimeSeparator.setToBogus();
1689 }
1690 }
1691
1580 ures_close(localeBundle); 1692 ures_close(localeBundle);
1581 } 1693 }
1582 1694
1695 if (fTimeSeparator.isBogus()) {
1696 fTimeSeparator.setTo(DateFormatSymbols::DEFAULT_TIME_SEPARATOR);
1697 }
1698
1583 UResourceBundle *weekdaysData = NULL; // Data closed by calData 1699 UResourceBundle *weekdaysData = NULL; // Data closed by calData
1584 UResourceBundle *abbrWeekdaysData = NULL; // Data closed by calData 1700 UResourceBundle *abbrWeekdaysData = NULL; // Data closed by calData
1585 UResourceBundle *shorterWeekdaysData = NULL; // Data closed by calData 1701 UResourceBundle *shorterWeekdaysData = NULL; // Data closed by calData
1586 UResourceBundle *narrowWeekdaysData = NULL; // Data closed by calData 1702 UResourceBundle *narrowWeekdaysData = NULL; // Data closed by calData
1587 UResourceBundle *standaloneWeekdaysData = NULL; // Data closed by calData 1703 UResourceBundle *standaloneWeekdaysData = NULL; // Data closed by calData
1588 UResourceBundle *standaloneAbbrWeekdaysData = NULL; // Data closed by calDat a 1704 UResourceBundle *standaloneAbbrWeekdaysData = NULL; // Data closed by calDat a
1589 UResourceBundle *standaloneShorterWeekdaysData = NULL; // Data closed by cal Data 1705 UResourceBundle *standaloneShorterWeekdaysData = NULL; // Data closed by cal Data
1590 UResourceBundle *standaloneNarrowWeekdaysData = NULL; // Data closed by calD ata 1706 UResourceBundle *standaloneNarrowWeekdaysData = NULL; // Data closed by calD ata
1591 1707
1592 U_LOCALE_BASED(locBased, *this); 1708 U_LOCALE_BASED(locBased, *this);
(...skipping 19 matching lines...) Expand all
1612 initField(&fStandaloneNarrowMonths, fStandaloneNarrowMonthsCount, (c onst UChar *)gLastResortMonthNames, kMonthNum, kMonthLen, status); 1728 initField(&fStandaloneNarrowMonths, fStandaloneNarrowMonthsCount, (c onst UChar *)gLastResortMonthNames, kMonthNum, kMonthLen, status);
1613 initField(&fWeekdays, fWeekdaysCount, (const UChar *)gLastResortDayN ames, kDayNum, kDayLen, status); 1729 initField(&fWeekdays, fWeekdaysCount, (const UChar *)gLastResortDayN ames, kDayNum, kDayLen, status);
1614 initField(&fShortWeekdays, fShortWeekdaysCount, (const UChar *)gLast ResortDayNames, kDayNum, kDayLen, status); 1730 initField(&fShortWeekdays, fShortWeekdaysCount, (const UChar *)gLast ResortDayNames, kDayNum, kDayLen, status);
1615 initField(&fShorterWeekdays, fShorterWeekdaysCount, (const UChar *)g LastResortDayNames, kDayNum, kDayLen, status); 1731 initField(&fShorterWeekdays, fShorterWeekdaysCount, (const UChar *)g LastResortDayNames, kDayNum, kDayLen, status);
1616 initField(&fNarrowWeekdays, fNarrowWeekdaysCount, (const UChar *)gLa stResortDayNames, kDayNum, kDayLen, status); 1732 initField(&fNarrowWeekdays, fNarrowWeekdaysCount, (const UChar *)gLa stResortDayNames, kDayNum, kDayLen, status);
1617 initField(&fStandaloneWeekdays, fStandaloneWeekdaysCount, (const UCh ar *)gLastResortDayNames, kDayNum, kDayLen, status); 1733 initField(&fStandaloneWeekdays, fStandaloneWeekdaysCount, (const UCh ar *)gLastResortDayNames, kDayNum, kDayLen, status);
1618 initField(&fStandaloneShortWeekdays, fStandaloneShortWeekdaysCount, (const UChar *)gLastResortDayNames, kDayNum, kDayLen, status); 1734 initField(&fStandaloneShortWeekdays, fStandaloneShortWeekdaysCount, (const UChar *)gLastResortDayNames, kDayNum, kDayLen, status);
1619 initField(&fStandaloneShorterWeekdays, fStandaloneShorterWeekdaysCou nt, (const UChar *)gLastResortDayNames, kDayNum, kDayLen, status); 1735 initField(&fStandaloneShorterWeekdays, fStandaloneShorterWeekdaysCou nt, (const UChar *)gLastResortDayNames, kDayNum, kDayLen, status);
1620 initField(&fStandaloneNarrowWeekdays, fStandaloneNarrowWeekdaysCount , (const UChar *)gLastResortDayNames, kDayNum, kDayLen, status); 1736 initField(&fStandaloneNarrowWeekdays, fStandaloneNarrowWeekdaysCount , (const UChar *)gLastResortDayNames, kDayNum, kDayLen, status);
1621 initField(&fAmPms, fAmPmsCount, (const UChar *)gLastResortAmPmMarker s, kAmPmNum, kAmPmLen, status); 1737 initField(&fAmPms, fAmPmsCount, (const UChar *)gLastResortAmPmMarker s, kAmPmNum, kAmPmLen, status);
1738 initField(&fNarrowAmPms, fNarrowAmPmsCount, (const UChar *)gLastReso rtAmPmMarkers, kAmPmNum, kAmPmLen, status);
1622 initField(&fQuarters, fQuartersCount, (const UChar *)gLastResortQuar ters, kQuarterNum, kQuarterLen, status); 1739 initField(&fQuarters, fQuartersCount, (const UChar *)gLastResortQuar ters, kQuarterNum, kQuarterLen, status);
1623 initField(&fShortQuarters, fShortQuartersCount, (const UChar *)gLast ResortQuarters, kQuarterNum, kQuarterLen, status); 1740 initField(&fShortQuarters, fShortQuartersCount, (const UChar *)gLast ResortQuarters, kQuarterNum, kQuarterLen, status);
1624 initField(&fStandaloneQuarters, fStandaloneQuartersCount, (const UCh ar *)gLastResortQuarters, kQuarterNum, kQuarterLen, status); 1741 initField(&fStandaloneQuarters, fStandaloneQuartersCount, (const UCh ar *)gLastResortQuarters, kQuarterNum, kQuarterLen, status);
1625 initField(&fStandaloneShortQuarters, fStandaloneShortQuartersCount, (const UChar *)gLastResortQuarters, kQuarterNum, kQuarterLen, status); 1742 initField(&fStandaloneShortQuarters, fStandaloneShortQuartersCount, (const UChar *)gLastResortQuarters, kQuarterNum, kQuarterLen, status);
1626 fLocalPatternChars.setTo(TRUE, gPatternChars, PATTERN_CHARS_LEN); 1743 fLocalPatternChars.setTo(TRUE, gPatternChars, PATTERN_CHARS_LEN);
1627 } 1744 }
1628 goto cleanup; 1745 goto cleanup;
1629 } 1746 }
1630 1747
1631 // if we make it to here, the resource data is cool, and we can get everythi ng out 1748 // if we make it to here, the resource data is cool, and we can get everythi ng out
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 initField(&fStandaloneNarrowMonths, fStandaloneNarrowMonthsCount, calData.ge tByKey3(gMonthNamesTag, gNamesStandaloneTag, gNamesNarrowTag, status), status); 1781 initField(&fStandaloneNarrowMonths, fStandaloneNarrowMonthsCount, calData.ge tByKey3(gMonthNamesTag, gNamesStandaloneTag, gNamesNarrowTag, status), status);
1665 if ( status == U_MISSING_RESOURCE_ERROR ) { /* if standalone/narrow not avai labe, try format/narrow */ 1782 if ( status == U_MISSING_RESOURCE_ERROR ) { /* if standalone/narrow not avai labe, try format/narrow */
1666 status = U_ZERO_ERROR; 1783 status = U_ZERO_ERROR;
1667 initField(&fStandaloneNarrowMonths, fStandaloneNarrowMonthsCount, calData .getByKey2(gMonthNamesTag, gNamesNarrowTag, status), status); 1784 initField(&fStandaloneNarrowMonths, fStandaloneNarrowMonthsCount, calData .getByKey2(gMonthNamesTag, gNamesNarrowTag, status), status);
1668 if ( status == U_MISSING_RESOURCE_ERROR ) { /* if still not there, use fo rmat/abbreviated */ 1785 if ( status == U_MISSING_RESOURCE_ERROR ) { /* if still not there, use fo rmat/abbreviated */
1669 status = U_ZERO_ERROR; 1786 status = U_ZERO_ERROR;
1670 initField(&fStandaloneNarrowMonths, fStandaloneNarrowMonthsCount, calD ata.getByKey2(gMonthNamesTag, gNamesAbbrTag, status), status); 1787 initField(&fStandaloneNarrowMonths, fStandaloneNarrowMonthsCount, calD ata.getByKey2(gMonthNamesTag, gNamesAbbrTag, status), status);
1671 } 1788 }
1672 } 1789 }
1673 initField(&fAmPms, fAmPmsCount, calData.getByKey(gAmPmMarkersTag, status), s tatus); 1790 initField(&fAmPms, fAmPmsCount, calData.getByKey(gAmPmMarkersTag, status), s tatus);
1791 initField(&fNarrowAmPms, fNarrowAmPmsCount, calData.getByKey(gAmPmMarkersNar rowTag, status), status);
1674 1792
1675 initField(&fQuarters, fQuartersCount, calData.getByKey2(gQuartersTag, gNames WideTag, status), status); 1793 initField(&fQuarters, fQuartersCount, calData.getByKey2(gQuartersTag, gNames WideTag, status), status);
1676 initField(&fShortQuarters, fShortQuartersCount, calData.getByKey2(gQuartersT ag, gNamesAbbrTag, status), status); 1794 initField(&fShortQuarters, fShortQuartersCount, calData.getByKey2(gQuartersT ag, gNamesAbbrTag, status), status);
1677 1795
1678 initField(&fStandaloneQuarters, fStandaloneQuartersCount, calData.getByKey3( gQuartersTag, gNamesStandaloneTag, gNamesWideTag, status), status); 1796 initField(&fStandaloneQuarters, fStandaloneQuartersCount, calData.getByKey3( gQuartersTag, gNamesStandaloneTag, gNamesWideTag, status), status);
1679 if(status == U_MISSING_RESOURCE_ERROR) { 1797 if(status == U_MISSING_RESOURCE_ERROR) {
1680 status = U_ZERO_ERROR; 1798 status = U_ZERO_ERROR;
1681 initField(&fStandaloneQuarters, fStandaloneQuartersCount, calData.getByK ey2(gQuartersTag, gNamesWideTag, status), status); 1799 initField(&fStandaloneQuarters, fStandaloneQuartersCount, calData.getByK ey2(gQuartersTag, gNamesWideTag, status), status);
1682 } 1800 }
1683 1801
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1879 DateFormatSymbols::getLocale(ULocDataLocaleType type, UErrorCode& status) const { 1997 DateFormatSymbols::getLocale(ULocDataLocaleType type, UErrorCode& status) const {
1880 U_LOCALE_BASED(locBased, *this); 1998 U_LOCALE_BASED(locBased, *this);
1881 return locBased.getLocale(type, status); 1999 return locBased.getLocale(type, status);
1882 } 2000 }
1883 2001
1884 U_NAMESPACE_END 2002 U_NAMESPACE_END
1885 2003
1886 #endif /* #if !UCONFIG_NO_FORMATTING */ 2004 #endif /* #if !UCONFIG_NO_FORMATTING */
1887 2005
1888 //eof 2006 //eof
OLDNEW
« no previous file with comments | « source/i18n/digitlst.cpp ('k') | source/i18n/dtitvfmt.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698