mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-06 05:55:35 +00:00
ICU-12752 merge from branch; z porting changes
X-SVN-Rev: 39385
This commit is contained in:
parent
6f70b217a8
commit
29d7ab227d
8 changed files with 77 additions and 13 deletions
|
@ -15,15 +15,27 @@
|
|||
#
|
||||
# Set the following variable to the list of binary file suffixes (extensions)
|
||||
|
||||
#binary_suffixes='ico ICO bmp BMP jpg JPG gif GIF brk BRK'
|
||||
#ICU specific binary files
|
||||
binary_suffixes='brk BRK bin BIN res RES cnv CNV dat DAT icu ICU spp SPP xml XML nrm NRM'
|
||||
#****************************************************************************
|
||||
binary_suffixes='brk BRK bin BIN res RES cnv CNV dat DAT icu ICU spp SPP xml XML nrm NRM utf16be UTF16BE'
|
||||
data_files='icu/source/data/brkitr/* icu/source/data/locales/* icu/source/data/coll/* icu/source/data/rbnf/* icu/source/data/mappings/* icu/source/data/misc/* icu/source/data/translit/* icu/source/data/unidata/* icu/source/test/testdata/*'
|
||||
|
||||
#****************************************************************************
|
||||
# Function: usage
|
||||
# Description: Prints out text that describes how to call this script
|
||||
# Input: None
|
||||
# Output: None
|
||||
#****************************************************************************
|
||||
usage()
|
||||
{
|
||||
echo "Enter archive filename as a parameter: $0 icu-archive.tar"
|
||||
}
|
||||
|
||||
#****************************************************************************
|
||||
# first make sure we at least one arg and it's a file we can read
|
||||
#****************************************************************************
|
||||
|
||||
# check for no arguments
|
||||
if [ $# -eq 0 ]; then
|
||||
usage
|
||||
exit
|
||||
|
@ -41,14 +53,25 @@ echo ""
|
|||
# extract files while converting them to EBCDIC
|
||||
pax -rvf $tar_file -o to=IBM-1047,from=ISO8859-1 -o setfiletag
|
||||
|
||||
#****************************************************************************
|
||||
# For files we have restored as CCSID 37, check the BOM to see if they
|
||||
# should be processed as 819. Also handle files with special paths. Files
|
||||
# that match will be added to binary files lists. The lists will in turn
|
||||
# be processed to restore files as 819.
|
||||
#****************************************************************************
|
||||
echo ""
|
||||
echo "Determining binary files ..."
|
||||
echo "Determining binary files by BOM ..."
|
||||
echo ""
|
||||
|
||||
# When building in ASCII mode, text files are converted as ASCII
|
||||
if [ "${ICU_ENABLE_ASCII_STRINGS}" -eq 1 ]; then
|
||||
binary_suffixes="$binary_suffixes txt TXT ucm UCM"
|
||||
elif [ -f icu/as_is/bomlist.txt ];
|
||||
then
|
||||
echo 'Using icu/as_is/bomlist.txt'
|
||||
binary_files=$(cat icu/as_is/bomlist.txt)
|
||||
else
|
||||
echo "Analyzing files .."
|
||||
for file in `find ./icu \( -name \*.txt -print \) | sed -e 's/^\.\///'`; do
|
||||
bom8=`head -c 3 $file|\
|
||||
od -t x1|\
|
||||
|
@ -64,6 +87,8 @@ else
|
|||
done
|
||||
fi
|
||||
|
||||
echo "Looking for binary suffixes.."
|
||||
|
||||
for i in $(pax -f $tar_file 2>/dev/null)
|
||||
do
|
||||
case $i in
|
||||
|
|
|
@ -394,15 +394,20 @@ static void U_CALLCONV
|
|||
static void U_CALLCONV
|
||||
_ISO2022Reset(UConverter *converter, UConverterResetChoice choice);
|
||||
|
||||
U_CDECL_BEGIN
|
||||
static const char * U_CALLCONV
|
||||
_ISO2022getName(const UConverter* cnv);
|
||||
U_CDECL_END
|
||||
|
||||
static void U_CALLCONV
|
||||
_ISO_2022_WriteSub(UConverterFromUnicodeArgs *args, int32_t offsetIndex, UErrorCode *err);
|
||||
|
||||
U_CDECL_BEGIN
|
||||
static UConverter * U_CALLCONV
|
||||
_ISO_2022_SafeClone(const UConverter *cnv, void *stackBuffer, int32_t *pBufferSize, UErrorCode *status);
|
||||
|
||||
U_CDECL_END
|
||||
|
||||
#ifdef U_ENABLE_GENERIC_ISO_2022
|
||||
static void U_CALLCONV
|
||||
T_UConverter_toUnicode_ISO_2022_OFFSETS_LOGIC(UConverterToUnicodeArgs* args, UErrorCode* err);
|
||||
|
@ -716,6 +721,8 @@ _ISO2022Reset(UConverter *converter, UConverterResetChoice choice) {
|
|||
}
|
||||
}
|
||||
|
||||
U_CDECL_BEGIN
|
||||
|
||||
static const char * U_CALLCONV
|
||||
_ISO2022getName(const UConverter* cnv){
|
||||
if(cnv->extraInfo){
|
||||
|
@ -725,6 +732,8 @@ _ISO2022getName(const UConverter* cnv){
|
|||
return NULL;
|
||||
}
|
||||
|
||||
U_CDECL_END
|
||||
|
||||
|
||||
/*************** to unicode *******************/
|
||||
/****************************************************************************
|
||||
|
@ -3580,6 +3589,8 @@ struct cloneStruct
|
|||
};
|
||||
|
||||
|
||||
U_CDECL_BEGIN
|
||||
|
||||
static UConverter * U_CALLCONV
|
||||
_ISO_2022_SafeClone(
|
||||
const UConverter *cnv,
|
||||
|
@ -3627,6 +3638,8 @@ _ISO_2022_SafeClone(
|
|||
return &localClone->cnv;
|
||||
}
|
||||
|
||||
U_CDECL_END
|
||||
|
||||
static void U_CALLCONV
|
||||
_ISO_2022_GetUnicodeSet(const UConverter *cnv,
|
||||
const USetAdder *sa,
|
||||
|
|
|
@ -381,8 +381,9 @@ static const uint8_t ebcdicTypes[128] = {
|
|||
# error U_CHARSET_FAMILY is not valid
|
||||
#endif
|
||||
|
||||
|
||||
/* @see ucnv_compareNames */
|
||||
U_CAPI char * U_EXPORT2
|
||||
U_CAPI char * U_CALLCONV
|
||||
ucnv_io_stripASCIIForCompare(char *dst, const char *name) {
|
||||
char *dstItr = dst;
|
||||
uint8_t type, nextType;
|
||||
|
@ -417,7 +418,7 @@ ucnv_io_stripASCIIForCompare(char *dst, const char *name) {
|
|||
return dst;
|
||||
}
|
||||
|
||||
U_CAPI char * U_EXPORT2
|
||||
U_CAPI char * U_CALLCONV
|
||||
ucnv_io_stripEBCDICForCompare(char *dst, const char *name) {
|
||||
char *dstItr = dst;
|
||||
uint8_t type, nextType;
|
||||
|
@ -733,9 +734,7 @@ findTaggedConverterNum(const char *alias, const char *standard, UErrorCode *pErr
|
|||
return UINT32_MAX;
|
||||
}
|
||||
|
||||
|
||||
|
||||
U_CFUNC const char *
|
||||
U_CAPI const char *
|
||||
ucnv_io_getConverterName(const char *alias, UBool *containsOption, UErrorCode *pErrorCode) {
|
||||
const char *aliasTmp = alias;
|
||||
int32_t i = 0;
|
||||
|
@ -766,6 +765,9 @@ ucnv_io_getConverterName(const char *alias, UBool *containsOption, UErrorCode *p
|
|||
return NULL;
|
||||
}
|
||||
|
||||
U_CDECL_BEGIN
|
||||
|
||||
|
||||
static int32_t U_CALLCONV
|
||||
ucnv_io_countStandardAliases(UEnumeration *enumerator, UErrorCode * /*pErrorCode*/) {
|
||||
int32_t value = 0;
|
||||
|
@ -816,6 +818,8 @@ ucnv_io_closeUEnumeration(UEnumeration *enumerator) {
|
|||
uprv_free(enumerator);
|
||||
}
|
||||
|
||||
U_CDECL_END
|
||||
|
||||
/* Enumerate the aliases for the specified converter and standard tag */
|
||||
static const UEnumeration gEnumAliases = {
|
||||
NULL,
|
||||
|
@ -1012,6 +1016,9 @@ ucnv_getCanonicalName(const char *alias, const char *standard, UErrorCode *pErro
|
|||
return NULL;
|
||||
}
|
||||
|
||||
U_CDECL_BEGIN
|
||||
|
||||
|
||||
static int32_t U_CALLCONV
|
||||
ucnv_io_countAllConverters(UEnumeration * /*enumerator*/, UErrorCode * /*pErrorCode*/) {
|
||||
return gMainTable.converterListSize;
|
||||
|
@ -1042,7 +1049,7 @@ static void U_CALLCONV
|
|||
ucnv_io_resetAllConverters(UEnumeration *enumerator, UErrorCode * /*pErrorCode*/) {
|
||||
*((uint16_t *)(enumerator->context)) = 0;
|
||||
}
|
||||
|
||||
U_CDECL_END
|
||||
static const UEnumeration gEnumAllConverters = {
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -1077,7 +1084,7 @@ ucnv_openAllNames(UErrorCode *pErrorCode) {
|
|||
return myEnum;
|
||||
}
|
||||
|
||||
U_CFUNC uint16_t
|
||||
U_CAPI uint16_t
|
||||
ucnv_io_countKnownConverters(UErrorCode *pErrorCode) {
|
||||
if (haveAliasData(pErrorCode)) {
|
||||
return (uint16_t)gMainTable.converterListSize;
|
||||
|
@ -1087,7 +1094,11 @@ ucnv_io_countKnownConverters(UErrorCode *pErrorCode) {
|
|||
|
||||
/* alias table swapping ----------------------------------------------------- */
|
||||
|
||||
U_CDECL_BEGIN
|
||||
|
||||
typedef char * U_CALLCONV StripForCompareFn(char *dst, const char *name);
|
||||
U_CDECL_END
|
||||
|
||||
|
||||
/*
|
||||
* row of a temporary array
|
||||
|
|
|
@ -93,7 +93,7 @@ ucnv_io_stripEBCDICForCompare(char *dst, const char *name);
|
|||
* @param pErrorCode The error code
|
||||
* @return the converter name in mixed-case, return NULL if the alias is not found.
|
||||
*/
|
||||
U_CFUNC const char *
|
||||
U_CAPI const char *
|
||||
ucnv_io_getConverterName(const char *alias, UBool *containsOption, UErrorCode *pErrorCode);
|
||||
|
||||
/**
|
||||
|
@ -101,7 +101,7 @@ ucnv_io_getConverterName(const char *alias, UBool *containsOption, UErrorCode *p
|
|||
* @param pErrorCode The error code
|
||||
* @return the number of all aliases
|
||||
*/
|
||||
U_CFUNC uint16_t
|
||||
U_CAPI uint16_t
|
||||
ucnv_io_countKnownConverters(UErrorCode *pErrorCode);
|
||||
|
||||
/**
|
||||
|
|
|
@ -400,8 +400,10 @@ ucnv_MBCSGetStarters(const UConverter* cnv,
|
|||
UBool starters[256],
|
||||
UErrorCode *pErrorCode);
|
||||
|
||||
U_CDECL_BEGIN
|
||||
static const char* U_CALLCONV
|
||||
ucnv_MBCSGetName(const UConverter *cnv);
|
||||
U_CDECL_END
|
||||
|
||||
static void U_CALLCONV
|
||||
ucnv_MBCSWriteSub(UConverterFromUnicodeArgs *pArgs,
|
||||
|
@ -1982,6 +1984,8 @@ ucnv_MBCSOpen(UConverter *cnv,
|
|||
#endif
|
||||
}
|
||||
|
||||
U_CDECL_BEGIN
|
||||
|
||||
static const char* U_CALLCONV
|
||||
ucnv_MBCSGetName(const UConverter *cnv) {
|
||||
if((cnv->options&UCNV_OPTION_SWAP_LFNL)!=0 && cnv->sharedData->mbcs.swapLFNLName!=NULL) {
|
||||
|
@ -1990,6 +1994,8 @@ ucnv_MBCSGetName(const UConverter *cnv) {
|
|||
return cnv->sharedData->staticData->name;
|
||||
}
|
||||
}
|
||||
U_CDECL_END
|
||||
|
||||
|
||||
/* MBCS-to-Unicode conversion functions ------------------------------------- */
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ U_NAMESPACE_BEGIN
|
|||
|
||||
// EquivIterator iterates over all strings that are equivalent to a given
|
||||
// string, s. Note that EquivIterator will never yield s itself.
|
||||
class EquivIterator : icu::UMemory {
|
||||
class EquivIterator : public icu::UMemory {
|
||||
public:
|
||||
// Constructor. hash stores the equivalence relationships; s is the string
|
||||
// for which we find equivalent strings.
|
||||
|
|
|
@ -1474,6 +1474,8 @@ typedef struct UKeywordsContext {
|
|||
char* current;
|
||||
} UKeywordsContext;
|
||||
|
||||
U_CDECL_BEGIN
|
||||
|
||||
static void U_CALLCONV
|
||||
uloc_kw_closeKeywords(UEnumeration *enumerator) {
|
||||
uprv_free(((UKeywordsContext *)enumerator->context)->keywords);
|
||||
|
@ -1516,6 +1518,9 @@ uloc_kw_resetKeywords(UEnumeration* en,
|
|||
((UKeywordsContext *)en->context)->current = ((UKeywordsContext *)en->context)->keywords;
|
||||
}
|
||||
|
||||
U_CDECL_END
|
||||
|
||||
|
||||
static const UEnumeration gKeywordsEnum = {
|
||||
NULL,
|
||||
NULL,
|
||||
|
|
|
@ -2408,6 +2408,9 @@ ures_loc_countLocales(UEnumeration *en, UErrorCode * /*status*/) {
|
|||
return ures_getSize(&ctx->installed);
|
||||
}
|
||||
|
||||
U_CDECL_BEGIN
|
||||
|
||||
|
||||
static const char * U_CALLCONV
|
||||
ures_loc_nextLocale(UEnumeration* en,
|
||||
int32_t* resultLength,
|
||||
|
@ -2434,6 +2437,7 @@ ures_loc_resetLocales(UEnumeration* en,
|
|||
ures_resetIterator(res);
|
||||
}
|
||||
|
||||
U_CDECL_END
|
||||
|
||||
static const UEnumeration gLocalesEnum = {
|
||||
NULL,
|
||||
|
|
Loading…
Add table
Reference in a new issue