ICU-9714 merge from branch: fix ebcdic issues, also fix out of source build issue for make dist

X-SVN-Rev: 32793
This commit is contained in:
Steven R. Loomis 2012-11-11 01:30:48 +00:00
parent 8bb10245f2
commit 0b5a813707
5 changed files with 48 additions and 8 deletions

View file

@ -1,3 +1,6 @@
#!/bin/sh
# /* Copyright (C) 2011 IBM Corporation and Others. All Rights Reserved */
# /* Copyright (C) 2011-2012 IBM Corporation and Others. All Rights Reserved */
icc -o iculd iculd.c
icc -o cxxfilt cxxfilt.cpp

View file

@ -0,0 +1,37 @@
/* Copyright (C) 2012 IBM Corporation and Others. All Rights Reserved */
#include <stdio.h>
#include <demangle.h>
void showSym(char *str) {
char *rest;
struct Name *name = Demangle(str, rest); // "f__1XFi"
printf("# '%s'\n", str);
if(*rest) printf("\trest: '%s'\n", rest);
if(name->Kind() == MemberFunction) {
//((MemberFunctionName *) name)->Scope()->Text() is "X"
//((MemberFunctionName *) name)->RootName() is "f"
//((MemberFunctionName *) name)->Text() is "X::f(int)"
printf("\t=> %s\n", ((MemberFunctionName *) name)->Text());
} else {
printf("\t(not MemberFunction)\n");
}
}
int main(int argc, /*const*/ char *argv[]) {
if(argc>1) {
for(int i=1;i<argc;i++) {
showSym(argv[i]);
}
} else {
printf("Usage: %s <symbol> ...\n", argv[0]);
}
}

View file

@ -356,7 +356,7 @@ update-windows-makefiles: config.status
# For building a source distribution.
distcheck dist-local:
$(MAKE) -C . -f config/dist.mk srcdir="$(srcdir)" top_srcdir="$(top_srcdir)" $@
$(MAKE) -C . -f $(top_srcdir)/config/dist.mk srcdir="$(srcdir)" top_srcdir="$(top_srcdir)" $@
ifeq ($(DESTDIR),)
releaseDist:

View file

@ -102,7 +102,7 @@ class PossibleWord {
private:
// list of word candidate lengths, in increasing length order
int32_t lengths[POSSIBLE_WORD_LIST_MAX];
int count; // Count of candidates
int32_t count; // Count of candidates
int32_t prefix; // The longest match with a dictionary word
int32_t offset; // Offset in the text of these candidates
int mark; // The preferred candidate's offset
@ -840,15 +840,15 @@ CjkBreakEngine::divideUpDictionaryRange( UText *text,
// Dynamic programming to find the best segmentation.
bool is_prev_katakana = false;
for (int i = 0; i < numChars; ++i) {
for (int32_t i = 0; i < numChars; ++i) {
//utext_setNativeIndex(text, rangeStart + i);
utext_setNativeIndex(&normalizedText, i);
if (bestSnlp[i] == kuint32max)
continue;
int count;
int32_t count;
// limit maximum word length matched to size of current substring
int maxSearchLength = (i + maxWordSize < (size_t) numChars)? maxWordSize : (numChars - i);
int32_t maxSearchLength = (i + maxWordSize < (size_t) numChars)? maxWordSize : (numChars - i);
fDictionary->matches(&normalizedText, maxSearchLength, lengths.elems(), count, maxSearchLength, values.elems());

View file

@ -876,8 +876,8 @@ ZoneMeta::formatCustomID(uint8_t hour, uint8_t min, uint8_t sec, UBool negative,
id.append((UChar)0x2B); // '+'
}
// Always use US-ASCII digits
id.append((UChar)0x30 + (hour%100)/10);
id.append((UChar)0x30 + (hour%10));
id.append((UChar)(0x30 + (hour%100)/10));
id.append((UChar)(0x30 + (hour%10)));
id.append((UChar)0x3A); // ':'
id.append((UChar)(0x30 + (min%100)/10));
id.append((UChar)(0x30 + (min%10)));