ICU-11258 adjust dependencies, pull charstr & unistr_core into the platform group, fix some code

X-SVN-Rev: 36485
This commit is contained in:
Markus Scherer 2014-09-12 00:11:47 +00:00
parent 11462b188e
commit a3df75f151
5 changed files with 63 additions and 86 deletions

View File

@ -339,4 +339,18 @@ unorm2_getInstance(const char *packageName,
return (const UNormalizer2 *)Normalizer2::getInstance(packageName, name, mode, *pErrorCode);
}
U_CFUNC UNormalizationCheckResult
unorm_getQuickCheck(UChar32 c, UNormalizationMode mode) {
if(mode<=UNORM_NONE || UNORM_FCD<=mode) {
return UNORM_YES;
}
UErrorCode errorCode=U_ZERO_ERROR;
const Normalizer2 *norm2=Normalizer2Factory::getInstance(mode, errorCode);
if(U_SUCCESS(errorCode)) {
return ((const Normalizer2WithImpl *)norm2)->getQuickCheck(c);
} else {
return UNORM_MAYBE;
}
}
#endif // !UCONFIG_NO_NORMALIZATION

View File

@ -507,20 +507,6 @@ u_getCombiningClass(UChar32 c) {
}
}
U_CFUNC UNormalizationCheckResult
unorm_getQuickCheck(UChar32 c, UNormalizationMode mode) {
if(mode<=UNORM_NONE || UNORM_FCD<=mode) {
return UNORM_YES;
}
UErrorCode errorCode=U_ZERO_ERROR;
const Normalizer2 *norm2=Normalizer2Factory::getInstance(mode, errorCode);
if(U_SUCCESS(errorCode)) {
return ((const Normalizer2WithImpl *)norm2)->getQuickCheck(c);
} else {
return UNORM_MAYBE;
}
}
U_CFUNC uint16_t
unorm_getFCD16(UChar32 c) {
UErrorCode errorCode=U_ZERO_ERROR;

View File

@ -127,8 +127,8 @@ static const UChar kFULLSTOP = 0x002E; // '.'
class SimpleFilteredSentenceBreakIterator : public BreakIterator {
public:
SimpleFilteredSentenceBreakIterator(BreakIterator *adopt, UCharsTrie *forwards, UCharsTrie *backwards, UErrorCode &status);
virtual ~SimpleFilteredSentenceBreakIterator() {}
SimpleFilteredSentenceBreakIterator(const SimpleFilteredSentenceBreakIterator& other);
virtual ~SimpleFilteredSentenceBreakIterator();
private:
LocalPointer<BreakIterator> fDelegate;
LocalUTextPointer fText;
@ -198,6 +198,8 @@ SimpleFilteredSentenceBreakIterator::SimpleFilteredSentenceBreakIterator(BreakIt
// all set..
}
SimpleFilteredSentenceBreakIterator::~SimpleFilteredSentenceBreakIterator() {}
int32_t SimpleFilteredSentenceBreakIterator::next() {
int32_t n = fDelegate->next();
if(n == UBRK_DONE || // at end or

View File

@ -61,7 +61,7 @@ group: stdlib_qsort
group: pthread
pthread_mutex_init pthread_mutex_destroy pthread_mutex_lock pthread_mutex_unlock
pthread_cond_wait pthread_cond_broadcast
pthread_cond_wait pthread_cond_broadcast pthread_cond_signal
group: system_locale
getenv
@ -134,11 +134,11 @@ library: common
# Libraries and groups that the common library depends on.
date_interval
breakiterator
uts46 filterednormalizer2 normalizer2 canonical_iterator
uts46 filterednormalizer2 normalizer2 loadednormalizer2 canonical_iterator
normlzr unormcmp unorm
idna2003 stringprep
stringenumeration
unistr_core unistr_props unistr_case unistr_case_locale unistr_titlecase_brkiter unistr_cnv
unistr_props unistr_case unistr_case_locale unistr_titlecase_brkiter unistr_cnv
uniset_core uniset_props uniset_closure usetiter uset uset_props
uiter
ucasemap ucasemap_titlecase_brkiter script_runs
@ -151,7 +151,7 @@ library: common
messagepattern simplepatternformatter
icu_utility icu_utility_with_props
ustr_wcs
lrucache
unifiedcache
ucharstriebuilder ucharstrieiterator
bytestriebuilder bytestrieiterator
hashtable uhash uvector uvector32 uvector64 ulist
@ -207,11 +207,10 @@ group: normlzr # old Normalizer C++ class
group: uts46
uts46.o
deps
normalizer2 punycode
normalizer2 loadednormalizer2 punycode
uchar # for u_charType() (via U_GET_GC_MASK(c))
ubidi_props # for u_charDirection() & ubidi_getJoiningType()
unistr_core
stringpiece bytestream
bytestream
group: filterednormalizer2
filterednormalizer2.o
@ -235,12 +234,16 @@ group: canonical_iterator
deps
normalizer2 usetiter
group: loadednormalizer2
loadednormalizer2impl.o
deps
normalizer2
group: normalizer2
normalizer2.o
normalizer2impl.o
deps
uniset_core
unistr_core
utrie2_builder # for building CanonIterData & FCD
uvector # for building CanonIterData
uhash # for the instance cache
@ -289,7 +292,7 @@ group: uniset_core
uniset.o bmpset.o unisetspan.o
deps
patternprops
unistr_core icu_utility
icu_utility
uvector
group: icu_utility_with_props
@ -300,17 +303,17 @@ group: icu_utility_with_props
group: icu_utility
util.o
deps
unistr_core patternprops
patternprops platform
group: utext
utext.o
deps
unistr_core ucase
ucase
group: stringenumeration
ustrenum.o uenum.o
deps
unistr_core
platform
group: schriter
schriter.o
@ -319,7 +322,7 @@ group: schriter
# schriter and uchriter into separate groups.
uchriter.o
deps
chariter unistr_core
chariter
group: chariter
chariter.o
@ -334,27 +337,22 @@ group: uiter
group: unistr_cnv
unistr_cnv.o
deps
conversion unistr_core
group: unistr_core
unistr.o
deps
ustrtrns appendable stringpiece
conversion
group: uscript
uscript.o # uscript_getCode() accepts a locale ID and loads its script code data
deps
propname resourcebundle
propname loclikely
group: uscript_props # script metadata properties
uscript_props.o
deps
unistr_core platform
platform
group: uprops
uprops.o
deps
normalizer2
normalizer2 loadednormalizer2
uchar
ubidi_props
unistr_case ustring_case # only for case folding
@ -383,12 +381,12 @@ group: uchar
group: messagepattern # for MessageFormat and tools
messagepattern.o
deps
patternprops unistr_core
patternprops platform
group: simplepatternformatter
simplepatternformatter.o
deps
unistr_core
platform
group: patternprops
patternprops.o
@ -414,7 +412,7 @@ group: ubidi_props
group: unistr_props
unistr_props.o
deps
unistr_core uchar
uchar platform
group: unistr_case_locale
unistr_case_locale.o
@ -424,7 +422,6 @@ group: unistr_case_locale
group: unistr_case
unistr_case.o
deps
unistr_core
ustring_case
group: unistr_titlecase_brkiter
@ -463,7 +460,7 @@ group: ustring_case
group: ucase
ucase.o
deps
unistr_core utrie2
utrie2
group: uinit
uinit.o
@ -531,7 +528,7 @@ group: icudataver # u_getDataVersion()
group: loclikely
loclikely.o
deps
resourcebundle
resourcebundle uscript_props propname
group: locresdata
# This was intended to collect locale functions that load resource bundle data.
@ -553,12 +550,13 @@ group: ures_cnv # ures_openU, path is a Unicode string
group: resourcebundle
resbund.o uresbund.o uresdata.o
locavailable.o
# uloc_tag.c converts between old ICU/LDML/CLDR locale IDs and newer BCP 47 IDs.
# It uses data from resource bundles for some of the mappings.
# We might want to generate .c files for that data, to #include rather than load,
# uloc_tag.c and uloc_keytype.cpp convert between
# old ICU/LDML/CLDR locale IDs and newer BCP 47 IDs.
# They use data from resource bundles for some of the mappings.
# We might want to generate .h files for that data, to #include rather than load,
# to minimize dependencies from this code.
# Then we could separate this higher-level locale ID code from the resource bundle code.
uloc.o uloc_tag.o
uloc.o uloc_tag.o uloc_keytype.o
# Even basic locid.cpp via Locale constructors and Locale::getDefault()
# depend on canonicalization and data loading.
# We can probably only disentangle basic locale ID handling from resource bundle code
@ -568,17 +566,17 @@ group: resourcebundle
locbased.o
deps
udata ucol_swp
sort stringenumeration uhash
sort stringenumeration uhash uvector
group: udata
udata.o ucmndata.o udatamem.o
umapfile.o
deps
uhash charstr stringpiece platform stubdata
uhash platform stubdata
file_io mmap_functions
group: lrucache
lrucache.o
group: unifiedcache
unifiedcache.o
deps
uhash
platform
@ -587,12 +585,11 @@ group: ucharstriebuilder
ucharstriebuilder.o
deps
ucharstrie stringtriebuilder sort
unistr_core
group: ucharstrieiterator
ucharstrieiterator.o
deps
ucharstrie unistr_core uvector32
ucharstrie uvector32
group: ucharstrie
ucharstrie.o
@ -603,12 +600,11 @@ group: bytestriebuilder
bytestriebuilder.o
deps
bytestrie stringtriebuilder sort
charstr stringpiece
group: bytestrieiterator
bytestrieiterator.o
deps
bytestrie charstr uvector32
bytestrie uvector32
group: bytestrie
bytestrie.o
@ -646,7 +642,6 @@ group: utrie # Callers should use utrie2 instead.
group: hashtable # Maps UnicodeString to value.
uhash_us.o
deps
unistr_core
uhash
group: uhash
@ -687,40 +682,18 @@ group: sort
group: ustr_wcs
ustr_wcs.o
deps
ustrtrns # on platforms where wchar_t is UTF-32
# platform -- on other platforms
group: ustrtrns
ustrtrns.o
deps
platform
group: charstr
charstr.o
deps
unistr_core # for CharString::appendInvariantChars(const UnicodeString &s, UErrorCode &errorCode)
platform
group: stringpiece
stringpiece.o
deps
PIC c_strings
group: bytestream
bytestream.o
deps
platform
group: appendable
appendable.o
deps
platform
group: icuplug
icuplug.o
deps
platform charstr
platform
group: ucol_swp
ucol_swp.o
@ -740,6 +713,9 @@ group: platform
# Files in the "platform" group.
cmemory.o uobject.o
cstring.o cwchar.o uinvchar.o
charstr.o
unistr.o # for CharString::appendInvariantChars(const UnicodeString &s, UErrorCode &errorCode)
appendable.o stringpiece.o ustrtrns.o # for unistr.o
ustring.o # Other platform files really just need u_strlen
ustrfmt.o # uprv_itou
utf_impl.o
@ -819,7 +795,7 @@ group: collation
bocsu.o coleitr.o coll.o sortkey.o ucol.o
ucol_res.o ucol_sit.o ucoleitr.o
deps
bytestream normalizer2 resourcebundle service_registration
bytestream normalizer2 resourcebundle service_registration unifiedcache
ucharstrieiterator uiter ulist uset usetiter uvector32 uvector64
uclean_i18n propname
@ -887,13 +863,13 @@ group: sharedbreakiterator
group: digitlist
digitlst.o decContext.o decNumber.o
deps
charstr stringpiece unistr_core
platform
group: formattable
fmtable.o
measure.o
deps
unistr_core digitlist stringpiece charstr
digitlist
group: formattable_cnv
fmtable_cnv.o
@ -903,13 +879,13 @@ group: formattable_cnv
group: format
format.o fphdlimp.o fpositer.o
deps
resourcebundle parsepos unistr_core uvector32
resourcebundle parsepos uvector32
group: pluralrules
plurrule.o upluralrules.o
deps
digitlist # plurals depend on decimals
patternprops resourcebundle uvector uvector32 lrucache
patternprops resourcebundle uvector uvector32 unifiedcache
unistr_case_locale
uclean_i18n
@ -923,7 +899,6 @@ group: regex
deps
uniset_closure utext uvector32 uvector64 ustack
breakiterator
unistr_core
uinit # TODO: Really needed?
uclean_i18n

View File

@ -128,7 +128,7 @@ def _Resolve(name, parents):
for file_name in files:
if symbol in _obj_files[file_name]["imports"]:
neededFile = _symbols_to_files.get(symbol)
if neededFile:
if neededFile in dependencies.file_to_item:
neededItem = "but %s does not depend on %s (for %s)" % (name, dependencies.file_to_item[neededFile], neededFile)
else:
neededItem = "- is this a new system symbol?"