Index: source/i18n/dtptngen.cpp |
diff --git a/source/i18n/dtptngen.cpp b/source/i18n/dtptngen.cpp |
index c3759a3cc813ea1086d86d94b5c4bc5aa2bc74b9..fe1f5a150f6359eb5399b0b408309e38389a3448 100644 |
--- a/source/i18n/dtptngen.cpp |
+++ b/source/i18n/dtptngen.cpp |
@@ -1,6 +1,6 @@ |
/* |
******************************************************************************* |
-* Copyright (C) 2007-2013, International Business Machines Corporation and |
+* Copyright (C) 2007-2014, International Business Machines Corporation and |
* others. All Rights Reserved. |
******************************************************************************* |
* |
@@ -26,7 +26,6 @@ |
#include "unicode/ustring.h" |
#include "unicode/rep.h" |
#include "cpputils.h" |
-#include "ucln_in.h" |
#include "mutex.h" |
#include "cmemory.h" |
#include "cstring.h" |
@@ -36,8 +35,6 @@ |
#include "uresimp.h" |
#include "dtptngen_impl.h" |
-#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0])) |
- |
#if U_CHARSET_FAMILY==U_EBCDIC_FAMILY |
/** |
* If we are on EBCDIC, use an iterator which will |
@@ -144,6 +141,7 @@ static const dtTypeElem dtTypes[] = { |
{LOW_Y, UDATPG_YEAR_FIELD, DT_NUMERIC, 1, 20}, |
{CAP_Y, UDATPG_YEAR_FIELD, DT_NUMERIC + DT_DELTA, 1, 20}, |
{LOW_U, UDATPG_YEAR_FIELD, DT_NUMERIC + 2*DT_DELTA, 1, 20}, |
+ {LOW_R, UDATPG_YEAR_FIELD, DT_NUMERIC + 3*DT_DELTA, 1, 20}, |
{CAP_U, UDATPG_YEAR_FIELD, DT_SHORT, 1, 3}, |
{CAP_U, UDATPG_YEAR_FIELD, DT_LONG, 4, 0}, |
{CAP_U, UDATPG_YEAR_FIELD, DT_NARROW, 5, 0}, |
@@ -510,7 +508,7 @@ DateTimePatternGenerator::addCLDRData(const Locale& locale, UErrorCode& err) { |
const char *key=NULL; |
int32_t i; |
- UnicodeString defaultItemFormat(TRUE, UDATPG_ItemFormat, LENGTHOF(UDATPG_ItemFormat)-1); // Read-only alias. |
+ UnicodeString defaultItemFormat(TRUE, UDATPG_ItemFormat, UPRV_LENGTHOF(UDATPG_ItemFormat)-1); // Read-only alias. |
err = U_ZERO_ERROR; |