forked from jsonn/pkgsrc
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix regression with upstream patch, https://ssl.icu-project.org/trac/ticket/12827 Changelog: Common Changes CLDR 30.0.2: For details of the many changes in CLDR, see CLDR 30. Some things to note: For some combinations of numbering system (arab, arabext, latn) and/or locale (ar, fa, he), there were changes to the bidirectional control characters used with certain symbols (percent, minus, plus), and changes to number patterns (currency and/or percent, including addition of bidirectional control characters in some cases). New in this release, the bidirectional controls used for such purposes include U+061C ARABIC LETTER MARK (ALM), which requires use of the bidirectional algorithm from Unicode 6.3 or later. The time separator for Norwegian locales (nb, nn) was changed to be ':' throughout. Unicode 9.0: Version 9.0 adds exactly 7,500 characters, for a total of 128,172 characters. These additions include six new scripts, 19 symbols for the new 4K TV standard, and 72 new emoji characters. Draft Emoji 4.0 data Emoji updates for word & line breaking. (#12664 & Unicode 9 update #12526) UBiDiTransform/BidiTransform API for convenient transformation of text between different Bidi layouts. (#11679) MeasureFormat API for measurement unit display names. (#12029) Most COUNT and LIMIT enum constants have been deprecated. (#12420) SpoofChecker: Handling of "whole script confusables" has been removed from ICU, in accordance with its removal from UTS #39 Version 9.0.0 and the removal of the corresponding Unicode data file. (#12549) Greek uppercasing ("el" locale ID) removes most diacritics. (#5456) More robust locale data loading across ICU implementation code. Reduced heap memory usage in DateTimePatternGenerator. (#11782) ICU4C Specific Changes The layout engine code has been removed; the ParagraphLayout is not deprecated and remains (and must now be built on top of HarfBuzz). See http://userguide.icu-project.org/layoutengine (#12708) Windows: Supports & requires Visual Studio 2015.
- Loading branch information
ryoon
committed
Dec 4, 2016
1 parent
0459b32
commit 0901889
Showing
10 changed files
with
186 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
$NetBSD: patch-common_ulist.c,v 1.1 2016/12/04 04:11:33 ryoon Exp $ | ||
|
||
--- common/ulist.c.orig 2016-06-15 18:58:17.000000000 +0000 | ||
+++ common/ulist.c | ||
@@ -29,7 +29,6 @@ struct UList { | ||
UListNode *tail; | ||
|
||
int32_t size; | ||
- int32_t currentIndex; | ||
}; | ||
|
||
static void ulist_addFirstItem(UList *list, UListNode *newItem); | ||
@@ -51,7 +50,6 @@ U_CAPI UList *U_EXPORT2 ulist_createEmpt | ||
newList->head = NULL; | ||
newList->tail = NULL; | ||
newList->size = 0; | ||
- newList->currentIndex = -1; | ||
|
||
return newList; | ||
} | ||
@@ -80,8 +78,9 @@ static void ulist_removeItem(UList *list | ||
} else { | ||
p->next->previous = p->previous; | ||
} | ||
- list->curr = NULL; | ||
- list->currentIndex = 0; | ||
+ if (p == list->curr) { | ||
+ list->curr = p->next; | ||
+ } | ||
--list->size; | ||
if (p->forceDelete) { | ||
uprv_free(p->data); | ||
@@ -150,7 +149,6 @@ U_CAPI void U_EXPORT2 ulist_addItemBegin | ||
newItem->next = list->head; | ||
list->head->previous = newItem; | ||
list->head = newItem; | ||
- list->currentIndex++; | ||
} | ||
|
||
list->size++; | ||
@@ -193,7 +191,6 @@ U_CAPI void *U_EXPORT2 ulist_getNext(ULi | ||
|
||
curr = list->curr; | ||
list->curr = curr->next; | ||
- list->currentIndex++; | ||
|
||
return curr->data; | ||
} | ||
@@ -209,7 +206,6 @@ U_CAPI int32_t U_EXPORT2 ulist_getListSi | ||
U_CAPI void U_EXPORT2 ulist_resetList(UList *list) { | ||
if (list != NULL) { | ||
list->curr = list->head; | ||
- list->currentIndex = 0; | ||
} | ||
} | ||
|
||
@@ -272,4 +268,3 @@ U_CAPI void U_EXPORT2 ulist_reset_keywor | ||
U_CAPI UList * U_EXPORT2 ulist_getListFromEnum(UEnumeration *en) { | ||
return (UList *)(en->context); | ||
} | ||
- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
$NetBSD: patch-i18n_digitlst.cpp,v 1.1 2016/12/04 04:11:33 ryoon Exp $ | ||
|
||
--- i18n/digitlst.cpp.orig 2016-10-17 05:10:38.000000000 +0000 | ||
+++ i18n/digitlst.cpp | ||
@@ -61,7 +61,7 @@ | ||
#endif | ||
|
||
#if U_USE_STRTOD_L && !U_PLATFORM_USES_ONLY_WIN32_API | ||
-# if U_PLATFORM == U_PF_CYGWIN | ||
+# if (U_PLATFORM == U_PF_CYGWIN) || defined(__NetBSD__) | ||
# include <locale.h> | ||
# else | ||
# include <xlocale.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
$NetBSD: patch-i18n_ucol__res.cpp,v 1.1 2016/12/04 04:11:33 ryoon Exp $ | ||
|
||
--- i18n/ucol_res.cpp.orig 2016-09-28 02:26:02.000000000 +0000 | ||
+++ i18n/ucol_res.cpp | ||
@@ -680,6 +680,7 @@ ucol_getKeywordValuesForLocale(const cha | ||
return NULL; | ||
} | ||
memcpy(en, &defaultKeywordValues, sizeof(UEnumeration)); | ||
+ ulist_resetList(sink.values); // Initialize the iterator. | ||
en->context = sink.values; | ||
sink.values = NULL; // Avoid deletion in the sink destructor. | ||
return en; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
$NetBSD: patch-test_intltest_apicoll.cpp,v 1.1 2016/12/04 04:11:33 ryoon Exp $ | ||
|
||
--- test/intltest/apicoll.cpp.orig 2016-09-20 04:30:06.000000000 +0000 | ||
+++ test/intltest/apicoll.cpp | ||
@@ -81,17 +81,10 @@ CollationAPITest::TestProperty(/* char* | ||
logln("Test ctors : "); | ||
col = Collator::createInstance(Locale::getEnglish(), success); | ||
if (U_FAILURE(success)){ | ||
- errcheckln(success, "Default Collator creation failed. - %s", u_errorName(success)); | ||
+ errcheckln(success, "English Collator creation failed. - %s", u_errorName(success)); | ||
return; | ||
} | ||
- StringEnumeration* kwEnum = col->getKeywordValuesForLocale("", Locale::getEnglish(),true,success); | ||
- if (U_FAILURE(success)){ | ||
- errcheckln(success, "Get Keyword Values for Locale failed. - %s", u_errorName(success)); | ||
- return; | ||
- } | ||
- delete kwEnum; | ||
- | ||
col->getVersion(versionArray); | ||
// Check for a version greater than some value rather than equality | ||
// so that we need not update the expected version each time. | ||
@@ -231,6 +224,29 @@ CollationAPITest::TestProperty(/* char* | ||
delete junk; | ||
} | ||
+void CollationAPITest::TestKeywordValues() { | ||
+ IcuTestErrorCode errorCode(*this, "TestKeywordValues"); | ||
+ LocalPointer<Collator> col(Collator::createInstance(Locale::getEnglish(), errorCode)); | ||
+ if (errorCode.logIfFailureAndReset("English Collator creation failed")) { | ||
+ return; | ||
+ } | ||
+ | ||
+ LocalPointer<StringEnumeration> kwEnum( | ||
+ col->getKeywordValuesForLocale("collation", Locale::getEnglish(), TRUE, errorCode)); | ||
+ if (errorCode.logIfFailureAndReset("Get Keyword Values for English Collator failed")) { | ||
+ return; | ||
+ } | ||
+ assertTrue("expect at least one collation tailoring for English", kwEnum->count(errorCode) > 0); | ||
+ const char *kw; | ||
+ UBool hasStandard = FALSE; | ||
+ while ((kw = kwEnum->next(NULL, errorCode)) != NULL) { | ||
+ if (strcmp(kw, "standard") == 0) { | ||
+ hasStandard = TRUE; | ||
+ } | ||
+ } | ||
+ assertTrue("expect at least the 'standard' collation tailoring for English", hasStandard); | ||
+} | ||
+ | ||
void | ||
CollationAPITest::TestRuleBasedColl() | ||
{ | ||
@@ -2466,6 +2482,7 @@ void CollationAPITest::runIndexedTest( i | ||
if (exec) logln("TestSuite CollationAPITest: "); | ||
TESTCASE_AUTO_BEGIN; | ||
TESTCASE_AUTO(TestProperty); | ||
+ TESTCASE_AUTO(TestKeywordValues); | ||
TESTCASE_AUTO(TestOperators); | ||
TESTCASE_AUTO(TestDuplicate); | ||
TESTCASE_AUTO(TestCompare); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
$NetBSD: patch-test_intltest_apicoll.h,v 1.1 2016/12/04 04:11:33 ryoon Exp $ | ||
|
||
--- test/intltest/apicoll.h.orig 2016-06-15 18:58:17.000000000 +0000 | ||
+++ test/intltest/apicoll.h | ||
@@ -35,6 +35,7 @@ public: | ||
* - displayable name in the desired locale | ||
*/ | ||
void TestProperty(/* char* par */); | ||
+ void TestKeywordValues(); | ||
|
||
/** | ||
* This tests the RuleBasedCollator |