mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 09:05:45 +00:00
013fc50cd5
Bug 924839 - Remove a patch already part of ICU 52.1. See http://bugs.icu-project.org/trac/ticket/10283 but also note the relevant code was removed completely upstream. r=glandium * * * Bug 924839 - Remove another patch already part of ICU 52.1. See http://bugs.icu-project.org/trac/ticket/10290 for that. r=gaston * * * Bug 924839 - Remove another patch already in ICU 52.1. See http://bugs.icu-project.org/trac/ticket/10045 for more. r=Norbert * * * Bug 924839 - Remove another patch already applied upstream. See http://bugs.icu-project.org/trac/changeset/32937 for more. r=gaston * * * Bug 924839 - Update the ICU update script to update to 52.1, *without* applying any of our local patches. r=glandium * * * Bug 924839 - Make the ICU update script only do updating within intl/icu/source and nowhere else. r=glandium * * * Bug 924839 - Implement the changes that would be made by |cd intl/; ./update-icu.sh http://source.icu-project.org/repos/icu/icu/tags/release-52-1/;|, run with the prior changesets' changes made (thus not applying any of our local patches). These changes don't actually work without subsequent adjustments, but this provides a codebase upon which those adjustments can be made, for the purpose of generating local patches to be kept in intl/icu-patches/. rs=the-usual-suspects * * * Bug 924839 - Update the bug 899722 local patch to make runConfigureICU not override CC/CXX on BSD systems. r=gaston * * * Bug 924839 - Update the bug 724533 patch that makes ICU builds with MozillaBuild on Windows. r=glandium * * * Bug 924839 - Import an upstream patch fixing the genrb tool to properly handle the -R (--omitCollationRules) option. See http://bugs.icu-project.org/trac/ticket/10043 for the original bug report and a link to the ultimate upstream landing. r=Norbert * * * Bug 924839 - Import the upstream fix for http://bugs.icu-project.org/trac/ticket/10486 so that ICU with -DU_USING_ICU_NAMESPACE=0 will compile on Windows. r=Norbert * * * Bug 924839 - Adjust the update script to update ICU, then to apply all local patches (rather than skipping the second step). Thus if the update script is properly run, now, the final result should be no changes at all to the tree. NOT REVIEWED YET * * * Bug 924839 - Update jstests that depend on CLDR locale data to match CLDR 24. r=Norbert
87 lines
2.2 KiB
C++
87 lines
2.2 KiB
C++
/*
|
|
*****************************************************************************************
|
|
* Copyright (C) 2013, International Business Machines Corporation and others.
|
|
* All Rights Reserved.
|
|
*****************************************************************************************
|
|
*/
|
|
|
|
#include "unicode/utypes.h"
|
|
|
|
#if !UCONFIG_NO_FORMATTING
|
|
|
|
#include "unicode/unumsys.h"
|
|
#include "unicode/numsys.h"
|
|
#include "unicode/uenum.h"
|
|
|
|
U_NAMESPACE_USE
|
|
|
|
|
|
U_CAPI UNumberingSystem* U_EXPORT2
|
|
unumsys_open(const char *locale, UErrorCode *status)
|
|
{
|
|
// createInstance returns immediately if status indicates error
|
|
return (UNumberingSystem*)NumberingSystem::createInstance(Locale(locale), *status);
|
|
}
|
|
|
|
|
|
U_CAPI UNumberingSystem* U_EXPORT2
|
|
unumsys_openByName(const char *name, UErrorCode *status)
|
|
{
|
|
// createInstanceByName does NOT return immediately if status indicates error
|
|
if (U_FAILURE(*status)) {
|
|
return NULL;
|
|
}
|
|
return (UNumberingSystem*)NumberingSystem::createInstanceByName(name, *status);
|
|
}
|
|
|
|
|
|
U_CAPI void U_EXPORT2
|
|
unumsys_close(UNumberingSystem *unumsys)
|
|
{
|
|
delete ((NumberingSystem*)unumsys);
|
|
}
|
|
|
|
|
|
U_CAPI UEnumeration* U_EXPORT2
|
|
unumsys_openAvailableNames(UErrorCode *status)
|
|
{
|
|
// getAvailableNames returns immediately if status indicates error
|
|
return uenum_openFromStringEnumeration(NumberingSystem::getAvailableNames(*status), status);
|
|
}
|
|
|
|
|
|
U_CAPI const char * U_EXPORT2
|
|
unumsys_getName(const UNumberingSystem *unumsys)
|
|
{
|
|
return ((NumberingSystem*)unumsys)->getName();
|
|
}
|
|
|
|
|
|
U_CAPI int32_t U_EXPORT2
|
|
unumsys_getRadix(const UNumberingSystem *unumsys)
|
|
{
|
|
return ((NumberingSystem*)unumsys)->getRadix();
|
|
}
|
|
|
|
|
|
U_CAPI UBool U_EXPORT2
|
|
unumsys_isAlgorithmic(const UNumberingSystem *unumsys)
|
|
{
|
|
return ((NumberingSystem*)unumsys)->isAlgorithmic();
|
|
}
|
|
|
|
U_CAPI int32_t U_EXPORT2
|
|
unumsys_getDescription(const UNumberingSystem *unumsys, UChar *result,
|
|
int32_t resultLength, UErrorCode *status)
|
|
{
|
|
if (U_FAILURE(*status)) {
|
|
return -1;
|
|
}
|
|
// implement
|
|
UnicodeString descrip = ((NumberingSystem*)unumsys)->getDescription();
|
|
return descrip.extract(result, resultLength, *status);
|
|
}
|
|
|
|
|
|
#endif /* #if !UCONFIG_NO_FORMATTING */
|