]> granicus.if.org Git - icu/commitdiff
ICU-9353 fix dependencies, mostly dictionary code and listformatter
authorMarkus Scherer <markus.icu@gmail.com>
Tue, 4 Sep 2012 20:38:14 +0000 (20:38 +0000)
committerMarkus Scherer <markus.icu@gmail.com>
Tue, 4 Sep 2012 20:38:14 +0000 (20:38 +0000)
X-SVN-Rev: 32331

icu4c/source/common/dictbe.cpp
icu4c/source/common/dictionarydata.cpp
icu4c/source/common/dictionarydata.h
icu4c/source/test/depstest/dependencies.txt

index b310462f68e52eb503fd2d5be6762946fe5eaf7a..29488b57c7ee83baf24afcdd8140abe9e81c6e8d 100644 (file)
@@ -771,6 +771,7 @@ CjkBreakEngine::divideUpDictionaryRange( UText *text,
     }
 
     UnicodeString inputString(charString.elems(), inputLength);
+    // TODO: Use Normalizer2.
     UNormalizationMode norm_mode = UNORM_NFKC;
     UBool isNormalized =
         Normalizer::quickCheck(inputString, norm_mode, status) == UNORM_YES ||
index e9ec12edc2b40e8724a1a2a2b8d9383635f290b3..1971751dede108685108da493a22642fad4dd787 100644 (file)
@@ -22,6 +22,9 @@ const int32_t DictionaryData::TRIE_TYPE_BYTES;
 const int32_t DictionaryData::TRIE_TYPE_UCHARS;
 #endif
 
+DictionaryMatcher::~DictionaryMatcher() {
+}
+
 UCharsDictionaryMatcher::~UCharsDictionaryMatcher() {
     udata_close(file);
 }
index 06b438a309dcf169838b43ef2b1d7fa1a242f763..eedc926fa097ea31f0518c2b16fe3c9a91d0763c 100644 (file)
@@ -61,13 +61,15 @@ public:
  * Wrapper class around generic dictionaries, implementing matches().
  * getType() should return a TRIE_TYPE_??? constant from DictionaryData.
  * 
- * All implementations of this interface must be threadsafe if they are to be used inside of the
+ * All implementations of this interface must be thread-safe if they are to be used inside of the
  * dictionary-based break iteration code.
  */
-class U_COMMON_API DictionaryMatcher {
+class U_COMMON_API DictionaryMatcher : public UMemory {
 public:
+    virtual ~DictionaryMatcher();
     // this should emulate CompactTrieDictionary::matches()
-    virtual int32_t matches(UText *text, int32_t maxLength, int32_t *lengths, int &count, int limit, int32_t *values = NULL) const = 0;
+    virtual int32_t matches(UText *text, int32_t maxLength, int32_t *lengths, int &count,
+                            int limit, int32_t *values = NULL) const = 0;
     /** @return DictionaryData::TRIE_TYPE_XYZ */
     virtual int32_t getType() const = 0;
 };
@@ -78,8 +80,9 @@ public:
     // constructs a new UCharsDictionaryMatcher.
     // The UDataMemory * will be closed on this object's destruction.
     UCharsDictionaryMatcher(const UChar *c, UDataMemory *f) : characters(c), file(f) { }
-    ~UCharsDictionaryMatcher();
-    virtual int32_t matches(UText *text, int32_t maxLength, int32_t *lengths, int &count, int limit, int32_t *values = NULL) const;
+    virtual ~UCharsDictionaryMatcher();
+    virtual int32_t matches(UText *text, int32_t maxLength, int32_t *lengths, int &count,
+                            int limit, int32_t *values = NULL) const;
     virtual int32_t getType() const;
 private:
     const UChar *characters;
@@ -92,9 +95,11 @@ public:
     // constructs a new BytesTrieDictionaryMatcher
     // the transform constant should be the constant read from the file, not a masked version!
     // the UDataMemory * fed in here will be closed on this object's destruction
-    BytesDictionaryMatcher(const char *c, int32_t t, UDataMemory *f) : characters(c), transformConstant(t), file(f) { }
-    ~BytesDictionaryMatcher();
-    virtual int32_t matches(UText *text, int32_t maxLength, int32_t *lengths, int &count, int limit, int32_t *values = NULL) const;
+    BytesDictionaryMatcher(const char *c, int32_t t, UDataMemory *f)
+            : characters(c), transformConstant(t), file(f) { }
+    virtual ~BytesDictionaryMatcher();
+    virtual int32_t matches(UText *text, int32_t maxLength, int32_t *lengths, int &count,
+                            int limit, int32_t *values = NULL) const;
     virtual int32_t getType() const;
 private:
     UChar32 transform(UChar32 c) const;
index e66480eb21648c14331f55528abda1b6edff0835..89153636c593af7da966cec6d383d727f2de6cdc 100644 (file)
@@ -37,7 +37,7 @@ group: c_strings
     memcmp memcpy memmove memset
     # Additional symbols in an optimized build.
     __strcpy_chk __strncpy_chk __strcat_chk __strncat_chk
-    __rawmemchr __memcpy_chk __memmove_chk
+    __rawmemchr __memcpy_chk __memmove_chk __memset_chk
 
 group: c_string_formatting
     atoi atol strtod strtol strtoul
@@ -136,6 +136,7 @@ library: common
     ucasemap ucasemap_titlecase_brkiter script_runs
     uprops ubidi_props ucase uscript
     ubidi ushape
+    listformatter
     resourcebundle service_registration resbund_cnv ures_cnv icudataver ucat
     loclikely
     conversion converter_selector ucnv_set ucnvdisp
@@ -164,12 +165,13 @@ group: breakiterator
     brkiter.o brkeng.o ubrk.o
     rbbi.o rbbinode.o rbbiscan.o rbbisetb.o rbbistbl.o rbbitblb.o
     rbbidata.o rbbirb.o
-    triedict.o dictbe.o
+    dictionarydata.o dictbe.o
   deps
     resourcebundle service_registration
     schriter utext uniset_core uniset_props
     uhash ustack utrie
-    uvector32  # for triedict.o
+    ucharstrie bytestrie
+    normlzr  # for dictbe.o, should switch to Normalizer2
 
 group: unormcmp  # unorm_compare()
     unormcmp.o
@@ -491,6 +493,11 @@ group: service_registration
     locale_display_names resourcebundle
     hashtable uvector
 
+group: listformatter
+    listformatter.o
+  deps
+    resourcebundle
+
 group: ucat  # message-catalog-like API
     ucat.o
   deps