ICU-351 Define UBool to be used in the APIs.

X-SVN-Rev: 1410
This commit is contained in:
Helena Chapman 2000-05-18 22:08:39 +00:00
parent 3f8d04ca3c
commit 69ba12f77c
381 changed files with 1528 additions and 1526 deletions

View file

@ -38,7 +38,7 @@ ComposedCharIter::ComposedCharIter()
* over the Hangul characters and their corresponding
* Jamo decompositions.
*/
ComposedCharIter::ComposedCharIter(bool_t compat,
ComposedCharIter::ComposedCharIter(UBool compat,
int32_t options)
: minDecomp(compat ? 0 : DecompData::MAX_COMPAT),
hangul((options & Normalizer::IGNORE_HANGUL) == 0),
@ -51,7 +51,7 @@ ComposedCharIter::ComposedCharIter(bool_t compat,
* Determines whether there any precomposed Unicode characters not yet returned
* by {@link #next}.
*/
bool_t ComposedCharIter::hasNext() const {
UBool ComposedCharIter::hasNext() const {
if (nextChar == DONE) {
((ComposedCharIter*)this)->findNextChar();
}

View file

@ -86,13 +86,13 @@ class U_COMMON_API ComposedCharIter
* over the Hangul characters and their corresponding
* Jamo decompositions.
*/
ComposedCharIter(bool_t compat, int32_t options);
ComposedCharIter(UBool compat, int32_t options);
/**
* Determines whether there any precomposed Unicode characters not yet returned
* by {@link #next}.
*/
bool_t hasNext(void) const;
UBool hasNext(void) const;
/**
* Returns the next precomposed Unicode character.
@ -117,7 +117,7 @@ class U_COMMON_API ComposedCharIter
void findNextChar(void);
int32_t minDecomp;
bool_t hangul;
UBool hangul;
UChar curChar;
UChar nextChar;

View file

@ -73,7 +73,7 @@ UnicodeConverterCPP& UnicodeConverterCPP::operator=(const UnicodeConverterCPP&
return *this;
}
bool_t UnicodeConverterCPP::operator==(const UnicodeConverterCPP& that) const
UBool UnicodeConverterCPP::operator==(const UnicodeConverterCPP& that) const
{
if ((myUnicodeConverter->sharedData == that.myUnicodeConverter->sharedData) &&
(myUnicodeConverter->fromCharErrorBehaviour == that.myUnicodeConverter->fromCharErrorBehaviour) &&
@ -89,7 +89,7 @@ bool_t UnicodeConverterCPP::operator==(const UnicodeConverterCPP& that) const
else return FALSE;
}
bool_t UnicodeConverterCPP::operator!=(const UnicodeConverterCPP& that) const
UBool UnicodeConverterCPP::operator!=(const UnicodeConverterCPP& that) const
{
return !(*this == that);
}
@ -235,7 +235,7 @@ UnicodeConverterCPP::fromUnicode(char*& target,
const UChar*& source,
const UChar* sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode& err)
{
ucnv_fromUnicode(myUnicodeConverter,
@ -256,7 +256,7 @@ UnicodeConverterCPP::toUnicode(UChar*& target,
const char*& source,
const char* sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode& err)
{
ucnv_toUnicode(myUnicodeConverter,
@ -388,7 +388,7 @@ UConverterType UnicodeConverterCPP::getType() const
return ucnv_getType(myUnicodeConverter);
}
void UnicodeConverterCPP::getStarters(bool_t starters[256],
void UnicodeConverterCPP::getStarters(UBool starters[256],
UErrorCode& err) const
{
ucnv_getStarters(myUnicodeConverter,
@ -476,7 +476,7 @@ void UnicodeConverterCPP::fixFileSeparator(UnicodeString& source) const
}
}
bool_t UnicodeConverterCPP::isAmbiguous(void) const
UBool UnicodeConverterCPP::isAmbiguous(void) const
{
return ucnv_isAmbiguous(myUnicodeConverter);
}

View file

@ -80,7 +80,7 @@ DigitList::operator=(const DigitList& other)
// -------------------------------------
bool_t
UBool
DigitList::operator==(const DigitList& that) const
{
return ((this == &that) ||
@ -144,8 +144,8 @@ int32_t DigitList::getLong() const
* Return true if the number represented by this object can fit into
* a long.
*/
bool_t
DigitList::fitsIntoLong(bool_t isPositive, bool_t ignoreNegativeZero)
UBool
DigitList::fitsIntoLong(UBool isPositive, UBool ignoreNegativeZero)
{
// Figure out if the result will fit in a long. We have to
// first look for nonzero digits after the decimal point;
@ -250,7 +250,7 @@ DigitList::set(int32_t source, int32_t maximumDigits)
* fractional digits to be converted. If false, total digits.
*/
void
DigitList::set(double source, int32_t maximumDigits, bool_t fixedPoint)
DigitList::set(double source, int32_t maximumDigits, UBool fixedPoint)
{
if(source == 0) source = 0;
// Generate a representation of the form DDDDD, DDDDD.DDDDD, or
@ -265,7 +265,7 @@ DigitList::set(double source, int32_t maximumDigits, bool_t fixedPoint)
// Number of zeros between decimal point and first non-zero digit after
// decimal point, for numbers < 1.
int32_t leadingZerosAfterDecimal = 0;
bool_t nonZeroDigitSeen = FALSE;
UBool nonZeroDigitSeen = FALSE;
for (int32_t i=0; i < MAX_DIGITS + 7; ++i) {
char c = rep[i];
if (c == '.') {
@ -275,7 +275,7 @@ DigitList::set(double source, int32_t maximumDigits, bool_t fixedPoint)
// Parse an exponent of the form /[eE][+-]?[0-9]*/
//exponent = Integer.valueOf(rep.substring(i+1)).intValue();
i += 1; // adjust for 'e'
bool_t negExp = rep[i] == '-';
UBool negExp = rep[i] == '-';
if (negExp || rep[i] == '+') {
++i;
}
@ -412,7 +412,7 @@ DigitList::round(int32_t maximumDigits)
* @return true if digit <code>maximumDigits-1</code> should be
* incremented
*/
bool_t DigitList::shouldRoundUp(int32_t maximumDigits) {
UBool DigitList::shouldRoundUp(int32_t maximumDigits) {
// Implement IEEE half-even rounding
if (fDigits[maximumDigits] > '5') {
return TRUE;
@ -481,7 +481,7 @@ bool_t DigitList::shouldRoundUp(int32_t maximumDigits) {
* Return true if this object represents the value zero. Anything with
* no digits, or all zero digits, is zero, regardless of fDecimalAt.
*/
bool_t
UBool
DigitList::isZero() const
{
for (int32_t i=0; i<fCount; ++i) if (fDigits[i] != kZero) return FALSE;
@ -492,7 +492,7 @@ DigitList::isZero() const
* We represent LONG_MIN internally as LONG_MAX + 1. This is actually an impossible
* value, for positive long integers, so we are safe in doing so.
*/
bool_t
UBool
DigitList::isLONG_MIN() const
{
initializeLONG_MIN_REP();

View file

@ -61,12 +61,12 @@ public:
/**
* Return true if another object is semantically equal to this one.
*/
bool_t operator==(const DigitList& other) const;
UBool operator==(const DigitList& other) const;
/**
* Return true if another object is semantically unequal to this one.
*/
bool_t operator!=(const DigitList& other) const { return !operator==(other); }
UBool operator!=(const DigitList& other) const { return !operator==(other); }
/**
* Clears out the digits.
@ -99,14 +99,14 @@ public:
* Return true if the number represented by this object can fit into
* a long.
*/
bool_t fitsIntoLong(bool_t isPositive, bool_t ignoreNegativeZero);
UBool fitsIntoLong(UBool isPositive, UBool ignoreNegativeZero);
/**
* Utility routine to set the value of the digit list from a double
* Input must be non-negative, and must not be Inf, -Inf, or NaN.
* The maximum fraction digits helps us round properly.
*/
void set(double source, int32_t maximumDigits, bool_t fixedPoint = TRUE);
void set(double source, int32_t maximumDigits, UBool fixedPoint = TRUE);
/**
* Utility routine to set the value of the digit list from a long.
@ -118,14 +118,14 @@ public:
/**
* Return true if this is a representation of zero.
*/
bool_t isZero(void) const;
UBool isZero(void) const;
/**
* Return true if this is a representation of LONG_MIN. You must use
* this method to determine if this is so; you cannot check directly,
* because a special format is used to handle this.
*/
bool_t isLONG_MIN(void) const;
UBool isLONG_MIN(void) const;
/**
* This is the zero digit. Array elements fDigits[i] have values from
@ -176,7 +176,7 @@ private:
*/
static void initializeLONG_MIN_REP(void);
bool_t shouldRoundUp(int32_t maximumDigits);
UBool shouldRoundUp(int32_t maximumDigits);
static char LONG_MIN_REP[LONG_DIGITS];
static int32_t LONG_MIN_REP_LENGTH;

View file

@ -75,7 +75,7 @@ T_FileStream_close(FileStream* fileStream)
if (fileStream != 0) fclose((FILE*)fileStream);
}
U_CAPI bool_t
U_CAPI UBool
T_FileStream_file_exists(const char* filename)
{
FILE* temp = fopen(filename, "r");

View file

@ -40,7 +40,7 @@ T_FileStream_wopen(const wchar_t* filename, const wchar_t* mode);
U_CAPI void U_EXPORT2
T_FileStream_close(FileStream* fileStream);
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
T_FileStream_file_exists(const char* filename);

View file

@ -276,7 +276,7 @@ Locale::Locale(const Locale& other)
variant = fullName + (other.variant - other.fullName) ;
}
bool_t
UBool
Locale::operator==( const Locale& other) const
{
if (uprv_strcmp(other.language, language) == 0)

View file

@ -124,7 +124,7 @@ int32_t Normalizer::hashCode() const
return text->hashCode() + fMode + fOptions + bufferPos + bufferLimit;
}
bool_t Normalizer::operator==(const Normalizer& that) const
UBool Normalizer::operator==(const Normalizer& that) const
{
return *text == *(that.text)
&& currentChar == that.currentChar
@ -166,7 +166,7 @@ Normalizer::normalize(const UnicodeString& source,
void
Normalizer::compose(const UnicodeString& source,
bool_t compat,
UBool compat,
int32_t,
UnicodeString& result,
UErrorCode &status)
@ -327,7 +327,7 @@ UChar Normalizer::nextCompose()
uint32_t classesSeen = 0; // Combining classes seen since last base
uint16_t action;
UChar lastBase = 0;
bool_t chFromText = TRUE;
UBool chFromText = TRUE;
// Compatibility explosions have lower indices; skip them if necessary
uint16_t minExplode = (fMode & COMPAT_BIT) ? 0 : ComposeData::MAX_COMPAT;
@ -589,7 +589,7 @@ UChar Normalizer::pairExplode(UnicodeString& target, uint16_t action) {
void
Normalizer::decompose(const UnicodeString& source,
bool_t compat,
UBool compat,
int32_t options,
UnicodeString& result,
UErrorCode &status)
@ -597,7 +597,7 @@ Normalizer::decompose(const UnicodeString& source,
if (U_FAILURE(status)) {
return;
}
bool_t hangul = (options & IGNORE_HANGUL) == 0;
UBool hangul = (options & IGNORE_HANGUL) == 0;
uint16_t limit = compat ? 0 : DecompData::MAX_COMPAT;
result.truncate(0);
@ -636,7 +636,7 @@ Normalizer::decompose(const UnicodeString& source,
*/
UChar Normalizer::nextDecomp()
{
bool_t hangul = ((fOptions & IGNORE_HANGUL) == 0);
UBool hangul = ((fOptions & IGNORE_HANGUL) == 0);
UChar ch = curForward();
uint16_t offset = ucmp16_getu(DecompData::offsets, ch);
@ -650,7 +650,7 @@ UChar Normalizer::nextDecomp()
} else {
buffer += ch;
}
bool_t needToReorder = FALSE;
UBool needToReorder = FALSE;
// Any other combining chacters that immediately follow the decomposed
// character must be included in the buffer too, because they're
@ -707,7 +707,7 @@ UChar Normalizer::nextDecomp()
* </ul>
*/
UChar Normalizer::prevDecomp() {
bool_t hangul = (fOptions & IGNORE_HANGUL) == 0;
UBool hangul = (fOptions & IGNORE_HANGUL) == 0;
UChar ch = curBackward();
@ -991,7 +991,7 @@ Normalizer::getMode() const
void
Normalizer::setOption(int32_t option,
bool_t value)
UBool value)
{
if (value) {
fOptions |= option;
@ -1000,7 +1000,7 @@ Normalizer::setOption(int32_t option,
}
}
bool_t
UBool
Normalizer::getOption(int32_t option) const
{
return (fOptions & option) != 0;

View file

@ -103,9 +103,9 @@
#define SIGN 0x80000000L
/* statics */
static bool_t fgNaNInitialized = FALSE;
static UBool fgNaNInitialized = FALSE;
static double fgNan;
static bool_t fgInfInitialized = FALSE;
static UBool fgInfInitialized = FALSE;
static double fgInf;
/* protos */
@ -174,7 +174,7 @@ uprv_getUTCtime()
for getNaN and getInfinity, and false for isNaN and isInfinite.
---------------------------------------------------------------------------*/
bool_t
UBool
uprv_isNaN(double number)
{
#if IEEE_754
@ -217,7 +217,7 @@ uprv_isNaN(double number)
#endif
}
bool_t
UBool
uprv_isInfinite(double number)
{
#if IEEE_754
@ -255,7 +255,7 @@ return ((highBits & ~SIGN) == 0x70FF0000L) && (lowBits == 0x00000000L);
#endif
}
bool_t
UBool
uprv_isPositiveInfinity(double number)
{
#if IEEE_754 || defined(OS390)
@ -265,7 +265,7 @@ uprv_isPositiveInfinity(double number)
#endif
}
bool_t
UBool
uprv_isNegativeInfinity(double number)
{
#if IEEE_754 || defined(OS390)
@ -681,7 +681,7 @@ uprv_timezone()
#if defined(OS400) || defined(XP_MAC) || defined(RHAPSODY)
time_t t, t1, t2;
struct tm tmrec;
bool_t dst_checked;
UBool dst_checked;
int32_t tdiff = 0;
time(&t);
@ -720,7 +720,7 @@ uprv_tzname(int n)
/* Get and set the ICU data directory --------------------------------------- */
static bool_t
static UBool
gHaveDataDirectory=FALSE;
static char
@ -1318,7 +1318,7 @@ uprv_getDefaultLocaleID()
/* end of platform-specific implementation */
double
uprv_nextDouble(double d, bool_t next)
uprv_nextDouble(double d, UBool next)
{
#if IEEE_754
int32_t highBits;

View file

@ -65,11 +65,11 @@ private:
public:
inline VisitedFileCache() {}
inline ~VisitedFileCache() {}
inline bool_t wasVisited(const UnicodeString& filename) const;
inline UBool wasVisited(const UnicodeString& filename) const;
inline void markAsVisited(const UnicodeString& filename);
};
inline bool_t VisitedFileCache::wasVisited(const UnicodeString& filename) const {
inline UBool VisitedFileCache::wasVisited(const UnicodeString& filename) const {
return (hash.get(filename) != 0);
}

View file

@ -105,7 +105,7 @@ TaggedList::get(const UnicodeString& tag) const {
return (const UnicodeString*) hash->get(tag);
}
bool_t TaggedList::nextElement(const UnicodeString*& key,
UBool TaggedList::nextElement(const UnicodeString*& key,
const UnicodeString*& value,
int32_t& pos) const {
const UHashElement *e = hash->nextElement(pos);

View file

@ -83,7 +83,7 @@ public:
void put(const UnicodeString& tag, const UnicodeString& data);
const UnicodeString* get(const UnicodeString& tag) const;
bool_t nextElement(const UnicodeString*& key,
UBool nextElement(const UnicodeString*& key,
const UnicodeString*& value,
int32_t& pos) const;
int32_t count() const;

View file

@ -354,7 +354,7 @@ int32_t ResourceBundle::getSize(void) const {
return ures_getSize(resource);
}
bool_t ResourceBundle::hasNext(void) const {
UBool ResourceBundle::hasNext(void) const {
return ures_hasNext(resource);
}

View file

@ -74,7 +74,7 @@ StringCharacterIterator::operator=(const StringCharacterIterator& that) {
return *this;
}
bool_t
UBool
StringCharacterIterator::operator==(const ForwardCharacterIterator& that) const {
if (this == &that) {
return TRUE;

View file

@ -107,12 +107,12 @@
/* Local function prototypes */
static int32_t scsu_makeIndex(int32_t c);
static bool_t scsu_inDynamicWindow(const UnicodeCompressor *comp,
static UBool scsu_inDynamicWindow(const UnicodeCompressor *comp,
int32_t c,
int32_t whichWindow);
static bool_t scsu_inStaticWindow(int32_t c,
static UBool scsu_inStaticWindow(int32_t c,
int32_t whichWindow);
static bool_t scsu_isCompressible(int32_t c);
static UBool scsu_isCompressible(int32_t c);
static int32_t scsu_findDynamicWindow(const UnicodeCompressor *comp,
int32_t c);
static int32_t scsu_findStaticWindow(int32_t c);
@ -153,7 +153,7 @@ static int32_t sOffsetTable [] = {
};
/** For quick identification of a byte as a single-byte mode tag */
static bool_t sSingleTagTable [] = {
static UBool sSingleTagTable [] = {
FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE,
FALSE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
@ -185,7 +185,7 @@ static bool_t sSingleTagTable [] = {
};
/** For quick identification of a byte as a unicode mode tag */
static bool_t sUnicodeTagTable [] = {
static UBool sUnicodeTagTable [] = {
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
@ -1306,7 +1306,7 @@ scsu_makeIndex(int32_t c)
* @return TRUE if <TT>c</TT> will fit in <TT>whichWindow</TT>, FALSE
* otherwise.
*/
static bool_t
static UBool
scsu_inDynamicWindow(const UnicodeCompressor *comp,
int32_t c,
int32_t whichWindow)
@ -1322,7 +1322,7 @@ scsu_inDynamicWindow(const UnicodeCompressor *comp,
* @return TRUE if <TT>c</TT> will fit in <TT>whichWindow</TT>, FALSE
* otherwise.
*/
static bool_t
static UBool
scsu_inStaticWindow(int32_t c,
int32_t whichWindow)
{
@ -1334,7 +1334,7 @@ scsu_inStaticWindow(int32_t c,
* @param c The character to test.
* @return TRUE if the <TT>c</TT> is compressible, FALSE otherwise.
*/
static bool_t
static UBool
scsu_isCompressible(int32_t c)
{
return (c < 0x3400 || c >= 0xE000);

View file

@ -203,8 +203,8 @@ ubidi_openSized(UTextOffset maxLength, UTextOffset maxRunCount, UErrorCode *pErr
* which we know we don't need any more;
* is this the best way to do this??
*/
extern bool_t
getMemory(void **pMemory, UTextOffset *pSize, bool_t mayAllocate, UTextOffset sizeNeeded) {
extern UBool
getMemory(void **pMemory, UTextOffset *pSize, UBool mayAllocate, UTextOffset sizeNeeded) {
/* check for existing memory */
if(*pMemory==NULL) {
/* we need to allocate memory */
@ -257,13 +257,13 @@ ubidi_close(UBiDi *pBiDi) {
/* set to approximate "inverse BiDi" ---------------------------------------- */
U_CAPI void U_EXPORT2
ubidi_setInverse(UBiDi *pBiDi, bool_t isInverse) {
ubidi_setInverse(UBiDi *pBiDi, UBool isInverse) {
if(pBiDi!=NULL) {
pBiDi->isInverse=isInverse;
}
}
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
ubidi_isInverse(UBiDi *pBiDi) {
if(pBiDi!=NULL) {
return pBiDi->isInverse;

View file

@ -131,7 +131,7 @@ typedef struct Run {
#define IS_ODD_RUN(x) ((x&INDEX_ODD_BIT)!=0)
#define IS_EVEN_RUN(x) ((x&INDEX_ODD_BIT)==0)
U_CFUNC bool_t
U_CFUNC UBool
ubidi_getRuns(UBiDi *pBiDi);
/* UBiDi structure ----------------------------------------------------------- */
@ -152,14 +152,14 @@ struct UBiDi {
Run *runsMemory;
/* indicators for whether memory may be allocated after ubidi_open() */
bool_t mayAllocateText, mayAllocateRuns;
UBool mayAllocateText, mayAllocateRuns;
/* arrays with one value per text-character */
const DirProp *dirProps;
UBiDiLevel *levels;
/* are we performing an approximation of the "inverse BiDi" algorithm? */
bool_t isInverse;
UBool isInverse;
/* the paragraph level */
UBiDiLevel paraLevel;
@ -183,8 +183,8 @@ struct UBiDi {
};
/* helper function to (re)allocate memory if allowed */
extern bool_t
getMemory(void **pMemory, UTextOffset *pSize, bool_t mayAllocate, UTextOffset sizeNeeded);
extern UBool
getMemory(void **pMemory, UTextOffset *pSize, UBool mayAllocate, UTextOffset sizeNeeded);
/* helper macros for each allocated array in UBiDi */
#define getDirPropsMemory(pBiDi, length) \

View file

@ -87,7 +87,7 @@ getSingleRun(UBiDi *pBiDi, UBiDiLevel level);
static void
reorderLine(UBiDi *pBiDi, UBiDiLevel minLevel, UBiDiLevel maxLevel);
static bool_t
static UBool
prepareReorder(const UBiDiLevel *levels, UTextOffset length,
UTextOffset *indexMap,
UBiDiLevel *pMinLevel, UBiDiLevel *pMaxLevel);
@ -376,7 +376,7 @@ ubidi_getVisualRun(UBiDi *pBiDi, UTextOffset runIndex,
* Odd-level runs have visualStart on their visual right edge and
* they progress visually to the left.
*/
U_CFUNC bool_t
U_CFUNC UBool
ubidi_getRuns(UBiDi *pBiDi) {
if(pBiDi->direction!=UBIDI_MIXED) {
/* simple, single-run case - this covers length==0 */
@ -764,7 +764,7 @@ ubidi_reorderVisual(const UBiDiLevel *levels, UTextOffset length, UTextOffset *i
} while(--maxLevel>=minLevel);
}
static bool_t
static UBool
prepareReorder(const UBiDiLevel *levels, UTextOffset length,
UTextOffset *indexMap,
UBiDiLevel *pMinLevel, UBiDiLevel *pMaxLevel) {

View file

@ -223,7 +223,7 @@ enum {
/* access values calculated from indexes */
static uint16_t stage23Bits, stage2Mask, stage3Mask;
static bool_t
static UBool
isAcceptable(void *context,
const char *type, const char *name,
const UDataInfo *pInfo) {
@ -373,25 +373,25 @@ u_charType(UChar32 c) {
}
/* Checks if ch is a lower case letter.*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_islower(UChar32 c) {
return GET_CATEGORY(GET_PROPS(c))==U_LOWERCASE_LETTER;
}
/* Checks if ch is an upper case letter.*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isupper(UChar32 c) {
return GET_CATEGORY(GET_PROPS(c))==U_UPPERCASE_LETTER;
}
/* Checks if ch is a title case letter; usually upper case letters.*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_istitle(UChar32 c) {
return GET_CATEGORY(GET_PROPS(c))==U_TITLECASE_LETTER;
}
/* Checks if ch is a decimal digit. */
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isdigit(UChar32 c) {
return ((1UL<<GET_CATEGORY(GET_PROPS(c)))&
(1UL<<U_DECIMAL_DIGIT_NUMBER|1UL<<U_OTHER_NUMBER|1UL<<U_LETTER_NUMBER)
@ -399,7 +399,7 @@ u_isdigit(UChar32 c) {
}
/* Checks if the Unicode character is a letter.*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isalpha(UChar32 c) {
return ((1UL<<GET_CATEGORY(GET_PROPS(c)))&
(1UL<<U_UPPERCASE_LETTER|1UL<<U_LOWERCASE_LETTER|1UL<<U_TITLECASE_LETTER|1UL<<U_MODIFIER_LETTER|1UL<<U_OTHER_LETTER)
@ -407,7 +407,7 @@ u_isalpha(UChar32 c) {
}
/* Checks if ch is a letter or a decimal digit */
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isalnum(UChar32 c) {
return ((1UL<<GET_CATEGORY(GET_PROPS(c)))&
(1UL<<U_DECIMAL_DIGIT_NUMBER|1UL<<U_OTHER_NUMBER|1UL<<U_LETTER_NUMBER|
@ -416,13 +416,13 @@ u_isalnum(UChar32 c) {
}
/* Checks if ch is a unicode character with assigned character type.*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isdefined(UChar32 c) {
return GET_PROPS(c)!=0;
}
/* Checks if the Unicode character is a base form character that can take a diacritic.*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isbase(UChar32 c) {
return ((1UL<<GET_CATEGORY(GET_PROPS(c)))&
(1UL<<U_DECIMAL_DIGIT_NUMBER|1UL<<U_OTHER_NUMBER|1UL<<U_LETTER_NUMBER|
@ -432,7 +432,7 @@ u_isbase(UChar32 c) {
}
/* Checks if the Unicode character is a control character.*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_iscntrl(UChar32 c) {
return ((1UL<<GET_CATEGORY(GET_PROPS(c)))&
(1UL<<U_CONTROL_CHAR|1UL<<U_FORMAT_CHAR|1UL<<U_LINE_SEPARATOR|1UL<<U_PARAGRAPH_SEPARATOR)
@ -440,7 +440,7 @@ u_iscntrl(UChar32 c) {
}
/* Checks if the Unicode character is a space character.*/
bool_t
UBool
u_isspace(UChar32 c) {
return ((1UL<<GET_CATEGORY(GET_PROPS(c)))&
(1UL<<U_SPACE_SEPARATOR|1UL<<U_LINE_SEPARATOR|1UL<<U_PARAGRAPH_SEPARATOR)
@ -448,7 +448,7 @@ u_isspace(UChar32 c) {
}
/* Checks if the Unicode character is a whitespace character.*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isWhitespace(UChar32 c) {
return ((1UL<<GET_CATEGORY(GET_PROPS(c)))&
(1UL<<U_SPACE_SEPARATOR|1UL<<U_LINE_SEPARATOR|1UL<<U_PARAGRAPH_SEPARATOR)
@ -457,7 +457,7 @@ u_isWhitespace(UChar32 c) {
}
/* Checks if the Unicode character is printable.*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isprint(UChar32 c) {
return ((1UL<<GET_CATEGORY(GET_PROPS(c)))&
(1UL<<U_DECIMAL_DIGIT_NUMBER|1UL<<U_OTHER_NUMBER|1UL<<U_LETTER_NUMBER|
@ -470,7 +470,7 @@ u_isprint(UChar32 c) {
}
/* Checks if the Unicode character can start a Unicode identifier.*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isIDStart(UChar32 c) {
/* same as u_isalpha() */
return ((1UL<<GET_CATEGORY(GET_PROPS(c)))&
@ -480,7 +480,7 @@ u_isIDStart(UChar32 c) {
/* Checks if the Unicode character can be a Unicode identifier part other than starting the
identifier.*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isIDPart(UChar32 c) {
return ((1UL<<GET_CATEGORY(GET_PROPS(c)))&
(1UL<<U_DECIMAL_DIGIT_NUMBER|1UL<<U_LETTER_NUMBER|
@ -491,7 +491,7 @@ u_isIDPart(UChar32 c) {
}
/*Checks if the Unicode character can be ignorable in a Java or Unicode identifier.*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isIDIgnorable(UChar32 c) {
return (uint32_t)c<=8 ||
(uint32_t)(c-0xe)<=(0x1b-0xe) ||
@ -502,7 +502,7 @@ u_isIDIgnorable(UChar32 c) {
}
/*Checks if the Unicode character can start a Java identifier.*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isJavaIDStart(UChar32 c) {
return ((1UL<<GET_CATEGORY(GET_PROPS(c)))&
(1UL<<U_UPPERCASE_LETTER|1UL<<U_LOWERCASE_LETTER|1UL<<U_TITLECASE_LETTER|1UL<<U_MODIFIER_LETTER|1UL<<U_OTHER_LETTER|
@ -513,7 +513,7 @@ u_isJavaIDStart(UChar32 c) {
/*Checks if the Unicode character can be a Java identifier part other than starting the
* identifier.
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isJavaIDPart(UChar32 c) {
return ((1UL<<GET_CATEGORY(GET_PROPS(c)))&
(1UL<<U_DECIMAL_DIGIT_NUMBER|1UL<<U_LETTER_NUMBER|
@ -643,7 +643,7 @@ u_charDirection(UChar32 c) {
}
}
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isMirrored(UChar32 c) {
return GET_PROPS(c)&(1UL<<MIRROR_SHIFT) ? TRUE : FALSE;
}

View file

@ -56,7 +56,7 @@ UCharCharacterIterator::operator=(const UCharCharacterIterator& that) {
UCharCharacterIterator::~UCharCharacterIterator() {
}
bool_t
UBool
UCharCharacterIterator::operator==(const ForwardCharacterIterator& that) const {
if (this == &that) {
return TRUE;
@ -159,7 +159,7 @@ UCharCharacterIterator::nextPostInc() {
}
}
bool_t
UBool
UCharCharacterIterator::hasNext() {
return pos < end ? TRUE : FALSE;
}
@ -173,7 +173,7 @@ UCharCharacterIterator::previous() {
}
}
bool_t
UBool
UCharCharacterIterator::hasPrevious() {
return pos > begin ? TRUE : FALSE;
}

View file

@ -58,7 +58,7 @@ static CompactShortArray* setToBogus(CompactShortArray* array);
static void touchBlock(CompactShortArray* this_obj,
int32_t i,
int16_t value);
static bool_t blockTouched(const CompactShortArray* this_obj,
static UBool blockTouched(const CompactShortArray* this_obj,
int32_t i);
@ -396,7 +396,7 @@ void ucmp16_compact(CompactShortArray* this_obj)
for (i = 0, iBlockStart = 0; i < (1 << (16 - this_obj->kBlockShift)); i += 1, iBlockStart += (1 << this_obj->kBlockShift))
{
bool_t touched = blockTouched(this_obj, i);
UBool touched = blockTouched(this_obj, i);
this_obj->fIndex[i] = 0xFFFF;
@ -485,7 +485,7 @@ void touchBlock(CompactShortArray* this_obj,
this_obj->fHashes[i] = (this_obj->fHashes[i] + (value << 1)) | 1;
}
bool_t blockTouched(const CompactShortArray* this_obj, int32_t i)
UBool blockTouched(const CompactShortArray* this_obj, int32_t i)
{
return (this_obj->fHashes[i] != 0);
}

View file

@ -70,7 +70,7 @@
* @see CompactIntArray
* @see CompactCharArray
* @see CompactStringArray
* @version $Revision: 1.10 $ 8/25/98
* @version $Revision: 1.11 $ 8/25/98
* @author Helena Shih
*/
@ -81,12 +81,12 @@ typedef struct CompactShortArray {
int32_t* fHashes;
int32_t fCount;
int16_t fDefaultValue;
bool_t fCompact;
bool_t fBogus;
bool_t fAlias;
UBool fCompact;
UBool fBogus;
UBool fAlias;
int32_t kBlockShift;
int32_t kBlockMask;
bool_t fIAmOwned; /* don't free CSA on close */
UBool fIAmOwned; /* don't free CSA on close */
} CompactShortArray;
@ -135,7 +135,7 @@ U_CAPI void U_EXPORT2 ucmp16_close(CompactShortArray* array);
* Returns TRUE if the creation of the compact array fails.
*/
U_CAPI bool_t U_EXPORT2 ucmp16_isBogus(const CompactShortArray* array);
U_CAPI UBool U_EXPORT2 ucmp16_isBogus(const CompactShortArray* array);
/**
*

View file

@ -27,7 +27,7 @@ static int32_t ucmp32_findOverlappingPosition(CompactIntArray* this_obj, uint32_
int32_t tempIndexCount,
uint32_t cycle);
static bool_t debugSmall = FALSE;
static UBool debugSmall = FALSE;
static uint32_t debugSmallLimit = 30000;
/** debug flags
@ -207,7 +207,7 @@ void ucmp32_close( CompactIntArray* this_obj)
}
}
bool_t ucmp32_isBogus(const CompactIntArray* this_obj)
UBool ucmp32_isBogus(const CompactIntArray* this_obj)
{
return this_obj == NULL || this_obj->fBogus;
}

View file

@ -75,7 +75,7 @@
* @see CompactIntArray
* @see CompactCharArray
* @see CompactStringArray
* @version $Revision: 1.8 $ 8/25/98
* @version $Revision: 1.9 $ 8/25/98
* @author Helena Shih
*/
/*====================================*/
@ -89,8 +89,8 @@ typedef struct{
int32_t* fArray;
uint16_t* fIndex;
int32_t fCount;
bool_t fCompact;
bool_t fBogus;
UBool fCompact;
UBool fBogus;
} CompactIntArray;
U_CAPI int32_t U_EXPORT2 ucmp32_getkUnicodeCount(void);
@ -125,7 +125,7 @@ U_CAPI void U_EXPORT2 ucmp32_close(CompactIntArray* array);
* Returns TRUE if the creation of the compact array fails.
*/
U_CAPI bool_t U_EXPORT2 ucmp32_isBogus(const CompactIntArray* array);
U_CAPI UBool U_EXPORT2 ucmp32_isBogus(const CompactIntArray* array);
/**
*
* Get the mapped value of a Unicode character.

View file

@ -322,7 +322,7 @@ findOverlappingPosition(CompactByteArray* this_obj,
return i;
}
bool_t
UBool
ucmp8_isBogus(const CompactByteArray* this_obj)
{
return this_obj == NULL || this_obj->fBogus;

View file

@ -34,10 +34,10 @@ typedef struct CompactByteArray {
int8_t* fArray;
uint16_t* fIndex;
int32_t fCount;
bool_t fCompact;
bool_t fBogus;
bool_t fAlias;
bool_t fIAmOwned; /* don't free CBA on close */
UBool fCompact;
UBool fBogus;
UBool fAlias;
UBool fIAmOwned; /* don't free CBA on close */
} CompactByteArray;
#define UCMP8_kUnicodeCount 65536
@ -60,7 +60,7 @@ U_CAPI CompactByteArray* U_EXPORT2 ucmp8_openAlias(uint16_t* indexArray,
int8_t* newValues,
int32_t count);
U_CAPI void U_EXPORT2 ucmp8_close(CompactByteArray* array);
U_CAPI bool_t U_EXPORT2 isBogus(const CompactByteArray* array);
U_CAPI UBool U_EXPORT2 isBogus(const CompactByteArray* array);
#define ucmp8_get(array, index) (array->fArray[(array->fIndex[index >> UCMP8_kBlockShift] & 0xFFFF) + (index & UCMP8_kBlockMask)])

View file

@ -46,7 +46,7 @@ static void T_UConverter_fromCodepageToCodepage (UConverter * outConverter,
const char **source,
const char *sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode * err);
@ -426,7 +426,7 @@ void ucnv_fromUnicode (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
/*
@ -518,7 +518,7 @@ void ucnv_toUnicode (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
/*
@ -876,7 +876,7 @@ T_UConverter_fromCodepageToCodepage (UConverter * outConverter,
const char **source,
const char *sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
@ -1049,7 +1049,7 @@ UConverterType ucnv_getType(const UConverter* converter)
}
void ucnv_getStarters(const UConverter* converter,
bool_t starters[256],
UBool starters[256],
UErrorCode* err)
{
if (err == NULL || U_FAILURE(*err)) {
@ -1108,17 +1108,17 @@ void ucnv_fixFileSeparator(const UConverter *cnv,
}
}
bool_t ucnv_isAmbiguous(const UConverter *cnv)
UBool ucnv_isAmbiguous(const UConverter *cnv)
{
return (ucnv_getAmbiguousCCSID(cnv) == -1 ? FALSE : TRUE);
}
void ucnv_setFallback(UConverter *cnv, bool_t usesFallback)
void ucnv_setFallback(UConverter *cnv, UBool usesFallback)
{
cnv->useFallback = usesFallback;
}
bool_t ucnv_usesFallback(const UConverter *cnv)
UBool ucnv_usesFallback(const UConverter *cnv)
{
return cnv->useFallback;
}

View file

@ -28,7 +28,7 @@ void T_UConverter_fromUnicode_UTF8 (UConverter * converter,
const UChar ** source,
const UChar * sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode * err);
void T_UConverter_fromUnicode_UTF8_OFFSETS_LOGIC (UConverter * converter,
@ -37,7 +37,7 @@ void T_UConverter_fromUnicode_UTF8_OFFSETS_LOGIC (UConverter * converter,
const UChar ** source,
const UChar * sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode * err);
#define ESC_2022 0x1B /*ESC*/
@ -107,13 +107,13 @@ UCNV_TableStates_2022 escSeqStateTable_Value_2022[MAX_STATES_2022] = {
*data stream*/
static const char* getEndOfBuffer_2022(const char* source,
const char* sourceLimit,
bool_t flush);
UBool flush);
/*runs through a state machine to determine the escape sequence - codepage correspondance
*changes the pointer pointed to be _this->extraInfo*/
static void changeState_2022(UConverter* _this,
const char** source,
const char* sourceLimit,
bool_t flush,
UBool flush,
UErrorCode* err);
UCNV_TableStates_2022 getKey_2022(char source,
@ -165,7 +165,7 @@ static void T_UConverter_fromUnicode_ISO_2022(UConverter* _this,
const UChar** source,
const UChar* sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode* err)
{
char const* targetStart = *target;
@ -186,7 +186,7 @@ static void T_UConverter_fromUnicode_ISO_2022_OFFSETS_LOGIC(UConverter* _this,
const UChar** source,
const UChar* sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode* err)
{
@ -258,7 +258,7 @@ UCNV_TableStates_2022 getKey_2022(char c,
void changeState_2022(UConverter* _this,
const char** source,
const char* sourceLimit,
bool_t flush,
UBool flush,
UErrorCode* err)
{
UConverter* myUConverter;
@ -436,7 +436,7 @@ void changeState_2022(UConverter* _this,
*/
const char* getEndOfBuffer_2022(const char* source,
const char* sourceLimit,
bool_t flush)
UBool flush)
{
const char* mySource = source;
@ -477,7 +477,7 @@ static void T_UConverter_toUnicode_ISO_2022(UConverter* _this,
const char** source,
const char* sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode* err)
{
int32_t base = 0;
@ -550,7 +550,7 @@ static void T_UConverter_toUnicode_ISO_2022_OFFSETS_LOGIC(UConverter* _this,
const char** source,
const char* sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode* err)
{
int32_t myOffset=0;
@ -716,7 +716,7 @@ void T_UConverter_toUnicode_EBCDIC_STATEFUL (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
const char *mySource = *source;
@ -833,7 +833,7 @@ void T_UConverter_toUnicode_EBCDIC_STATEFUL_OFFSETS_LOGIC (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
const char *mySource = *source;
@ -960,7 +960,7 @@ void T_UConverter_fromUnicode_EBCDIC_STATEFUL (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
@ -974,8 +974,8 @@ void T_UConverter_fromUnicode_EBCDIC_STATEFUL (UConverter * _this,
UChar targetUniChar = 0x0000;
int8_t targetUniCharByteNum = 0;
UChar mySourceChar = 0x0000;
bool_t isTargetUCharDBCS = (bool_t)_this->fromUnicodeStatus;
bool_t oldIsTargetUCharDBCS = isTargetUCharDBCS;
UBool isTargetUCharDBCS = (UBool)_this->fromUnicodeStatus;
UBool oldIsTargetUCharDBCS = isTargetUCharDBCS;
myFromUnicode = &_this->sharedData->table->dbcs.fromUnicode;
/*writing the char to the output stream */
@ -1080,7 +1080,7 @@ void T_UConverter_fromUnicode_EBCDIC_STATEFUL_OFFSETS_LOGIC (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
@ -1094,8 +1094,8 @@ void T_UConverter_fromUnicode_EBCDIC_STATEFUL_OFFSETS_LOGIC (UConverter * _this,
UChar targetUniChar = 0x0000;
int8_t targetUniCharByteNum = 0;
UChar mySourceChar = 0x0000;
bool_t isTargetUCharDBCS = (bool_t)_this->fromUnicodeStatus;
bool_t oldIsTargetUCharDBCS = isTargetUCharDBCS;
UBool isTargetUCharDBCS = (UBool)_this->fromUnicodeStatus;
UBool oldIsTargetUCharDBCS = isTargetUCharDBCS;
int32_t* originalOffsets = offsets;
myFromUnicode = &_this->sharedData->table->dbcs.fromUnicode;

View file

@ -87,7 +87,7 @@ U_CAPI UConverterSharedData* U_EXPORT2 ucnv_data_unFlattenClone(UDataMemory *pD
/*initializes some global variables */
UHashtable *SHARED_DATA_HASHTABLE = NULL;
static bool_t
static UBool
isCnvAcceptable(void *context,
const char *type, const char *name,
const UDataInfo *pInfo) {
@ -207,7 +207,7 @@ UConverterSharedData *getSharedConverterData (const char *name)
/*frees the string of memory blocks associates with a sharedConverter
*if and only if the referenceCounter == 0
*/
bool_t deleteSharedConverterData (UConverterSharedData * deadSharedData)
UBool deleteSharedConverterData (UConverterSharedData * deadSharedData)
{
if (deadSharedData->referenceCounter > 0)
return FALSE;

View file

@ -44,7 +44,7 @@ UConverterDBCSTable;
typedef struct
{
bool_t *starters; /* [256]; */
UBool *starters; /* [256]; */
CompactShortArray toUnicode;
CompactShortArray fromUnicode;
CompactShortArray toUnicodeFallback;
@ -164,7 +164,7 @@ typedef void (*T_ToUnicodeFunction) (UConverter *,
const char **,
const char *,
int32_t* offsets,
bool_t,
UBool,
UErrorCode *);
typedef void (*T_FromUnicodeFunction) (UConverter *,
@ -173,7 +173,7 @@ typedef void (*T_FromUnicodeFunction) (UConverter *,
const UChar **,
const UChar *,
int32_t* offsets,
bool_t,
UBool,
UErrorCode *);
typedef UChar32 (*T_GetNextUCharFunction) (UConverter *,
@ -182,10 +182,10 @@ typedef UChar32 (*T_GetNextUCharFunction) (UConverter *,
UErrorCode *);
typedef void (*UConverterGetStarters)(const UConverter* converter,
bool_t starters[256],
UBool starters[256],
UErrorCode *pErrorCode);
bool_t CONVERSION_U_SUCCESS (UErrorCode err);
UBool CONVERSION_U_SUCCESS (UErrorCode err);
void flushInternalUnicodeBuffer (UConverter * _this,
UChar * myTarget,

View file

@ -29,7 +29,7 @@
#define ToOffset(a) a<=9?(0x0030+a):(0x0030+a+7)
bool_t
UBool
CONVERSION_U_SUCCESS (UErrorCode err)
{
if ((err == U_INVALID_CHAR_FOUND) || (err == U_ILLEGAL_CHAR_FOUND)) return FALSE;
@ -78,7 +78,7 @@ void UCNV_FROM_U_CALLBACK_STOP (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
return;
@ -92,7 +92,7 @@ void UCNV_TO_U_CALLBACK_STOP (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
return;
@ -104,7 +104,7 @@ void UCNV_FROM_U_CALLBACK_SKIP (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
if (CONVERSION_U_SUCCESS (*err)) return;
@ -117,7 +117,7 @@ void UCNV_FROM_U_CALLBACK_SUBSTITUTE (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
char togo[5];
@ -200,7 +200,7 @@ void UCNV_FROM_U_CALLBACK_ESCAPE (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
@ -320,7 +320,7 @@ void UCNV_TO_U_CALLBACK_SKIP (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
if (CONVERSION_U_SUCCESS (*err)) return;
@ -333,7 +333,7 @@ void UCNV_TO_U_CALLBACK_SUBSTITUTE (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
@ -366,7 +366,7 @@ void UCNV_TO_U_CALLBACK_ESCAPE (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
UChar uniValueString[VALUE_STRING_LENGTH];

View file

@ -49,11 +49,11 @@ UConverterSharedData *getSharedConverterData (const char *name);
* returns TRUE,
* otherwise returns FALSE
*/
bool_t deleteSharedConverterData (UConverterSharedData * sharedConverterData);
UBool deleteSharedConverterData (UConverterSharedData * sharedConverterData);
/* returns true if "name" is in algorithmicConverterNames
*/
bool_t isDataBasedConverter (const char *name);
UBool isDataBasedConverter (const char *name);
void copyPlatformString (char *platformString, UConverterPlatform pltfrm);

View file

@ -71,7 +71,7 @@
static UDataMemory *aliasData=NULL;
static const uint16_t *aliasTable=NULL;
static bool_t
static UBool
isAcceptable(void *context,
const char *type, const char *name,
const UDataInfo *pInfo) {
@ -86,7 +86,7 @@ isAcceptable(void *context,
pInfo->formatVersion[0]==2;
}
static bool_t
static UBool
haveAliasData(UErrorCode *pErrorCode) {
if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
return FALSE;
@ -124,7 +124,7 @@ haveAliasData(UErrorCode *pErrorCode) {
return TRUE;
}
static bool_t
static UBool
isAlias(const char *alias, UErrorCode *pErrorCode) {
if(alias==NULL) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
@ -363,7 +363,7 @@ ucnv_io_setDefaultConverterName(const char *converterName) {
int32_t length=uprv_strlen(converterName);
if(length<sizeof(defaultConverterNameBuffer)) {
/* it was not found as an alias, so copy it - accept an empty name */
bool_t didLock;
UBool didLock;
if(defaultConverterName==defaultConverterNameBuffer) {
umtx_lock(NULL);
didLock=TRUE;

View file

@ -204,20 +204,20 @@ ulmbcs_grp_t FindLMBCSUniRange(UChar uniChar, UErrorCode* err)
int LMBCSConversionWorker (
UConverterDataLMBCS * extraInfo, ulmbcs_grp_t group,
uint8_t * pStartLMBCS, UChar * pUniChar,
ulmbcs_grp_t * lastConverterIndex, bool_t * groups_tried,
ulmbcs_grp_t * lastConverterIndex, UBool * groups_tried,
UErrorCode* err);
int LMBCSConversionWorker (
UConverterDataLMBCS * extraInfo, ulmbcs_grp_t group,
uint8_t * pStartLMBCS, UChar * pUniChar,
ulmbcs_grp_t * lastConverterIndex, bool_t * groups_tried,
ulmbcs_grp_t * lastConverterIndex, UBool * groups_tried,
UErrorCode * err)
{
uint8_t * pLMBCS = pStartLMBCS;
UConverter * xcnv = extraInfo->OptGrpConverter[group];
uint8_t mbChar [ULMBCS_CHARSIZE_MAX];
uint8_t * pmbChar = mbChar;
bool_t isDoubleByteGroup = (group >= ULMBCS_DOUBLEOPTGROUP) ? TRUE : FALSE;
UBool isDoubleByteGroup = (group >= ULMBCS_DOUBLEOPTGROUP) ? TRUE : FALSE;
UErrorCode localErr = 0;
int bytesConverted =0;
@ -275,7 +275,7 @@ void _LMBCSFromUnicode(UConverter* _this,
const UChar** source,
const UChar* sourceLimit,
int32_t * offsets,
bool_t flush,
UBool flush,
UErrorCode* err)
{
ulmbcs_grp_t lastConverterIndex = 0;
@ -283,7 +283,7 @@ void _LMBCSFromUnicode(UConverter* _this,
uint8_t LMBCS[ULMBCS_CHARSIZE_MAX];
uint8_t * pLMBCS;
int bytes_written;
bool_t groups_tried[ULMBCS_GRP_LAST];
UBool groups_tried[ULMBCS_GRP_LAST];
UConverterDataLMBCS * extraInfo = (UConverterDataLMBCS *) _this->extraInfo;
/* Arguments Check */
@ -716,7 +716,7 @@ void _LMBCSToUnicodeWithOffsets(UConverter* _this,
const char** source,
const char* sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode* err)
{
UChar32 uniChar; /* an output UNICODE char */
@ -836,7 +836,7 @@ void _LMBCSToUnicode(UConverter* _this,
const char** source,
const char* sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode* err)
{
_LMBCSToUnicodeWithOffsets(_this, target, targetLimit, source, sourceLimit, offsets, flush,err);

View file

@ -62,7 +62,7 @@ void T_UConverter_toUnicode_UTF8 (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
const unsigned char *mySource = (unsigned char *) *source;
@ -205,7 +205,7 @@ void T_UConverter_toUnicode_UTF8_OFFSETS_LOGIC (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
const unsigned char *mySource = (unsigned char *) *source;
@ -345,7 +345,7 @@ void T_UConverter_fromUnicode_UTF8 (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
const UChar *mySource = *source;
@ -455,7 +455,7 @@ void T_UConverter_fromUnicode_UTF8_OFFSETS_LOGIC (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
const UChar *mySource = *source;
@ -713,7 +713,7 @@ void T_UConverter_toUnicode_UTF16_BE (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
const unsigned char *mySource = (unsigned char *) *source;
@ -779,7 +779,7 @@ void T_UConverter_fromUnicode_UTF16_BE (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
const UChar *mySource = *source;
@ -914,7 +914,7 @@ void T_UConverter_toUnicode_UTF16_LE (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
const unsigned char *mySource = (unsigned char *) *source;
@ -981,7 +981,7 @@ void T_UConverter_fromUnicode_UTF16_LE (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
const UChar *mySource = *source;

View file

@ -27,7 +27,7 @@ static void T_UConverter_toUnicode_LATIN_1 (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
unsigned char *mySource = (unsigned char *) *source;
@ -65,7 +65,7 @@ static void T_UConverter_fromUnicode_LATIN_1 (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
const UChar *mySource = *source;

View file

@ -30,8 +30,8 @@ static void
_MBCSLoad(UConverterSharedData *sharedData, const uint8_t *raw, UErrorCode *pErrorCode) {
const uint8_t *oldraw;
sharedData->table->mbcs.starters = (bool_t*)raw;
oldraw = raw += sizeof(bool_t)*256;
sharedData->table->mbcs.starters = (UBool*)raw;
oldraw = raw += sizeof(UBool)*256;
ucmp16_initFromData(&sharedData->table->mbcs.toUnicode, &raw, pErrorCode);
if(((raw-oldraw)&3)!=0) {
@ -73,7 +73,7 @@ static void T_UConverter_toUnicode_MBCS (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
const char *mySource = *source;
@ -85,7 +85,7 @@ static void T_UConverter_toUnicode_MBCS (UConverter * _this,
CompactShortArray *myToUnicode = NULL, *myToUnicodeFallback = NULL;
UChar targetUniChar = 0x0000;
UChar mySourceChar = 0x0000;
bool_t *myStarters = NULL;
UBool *myStarters = NULL;
@ -202,7 +202,7 @@ static void T_UConverter_toUnicode_MBCS_OFFSETS_LOGIC (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
const char *mySource = *source;
@ -215,7 +215,7 @@ static void T_UConverter_toUnicode_MBCS_OFFSETS_LOGIC (UConverter * _this,
UChar targetUniChar = 0x0000;
UChar mySourceChar = 0x0000;
UChar oldMySourceChar = 0x0000;
bool_t *myStarters = NULL;
UBool *myStarters = NULL;
myToUnicode = &_this->sharedData->table->mbcs.toUnicode;
myToUnicodeFallback = &_this->sharedData->table->mbcs.toUnicodeFallback;
@ -352,7 +352,7 @@ static void T_UConverter_fromUnicode_MBCS (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
@ -468,7 +468,7 @@ static void T_UConverter_fromUnicode_MBCS_OFFSETS_LOGIC (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
@ -671,9 +671,9 @@ static UChar32 T_UConverter_getNextUChar_MBCS(UConverter* converter,
}
static void
_MBCSGetStarters(const UConverter* converter, bool_t starters[256], UErrorCode *pErrorCode) {
_MBCSGetStarters(const UConverter* converter, UBool starters[256], UErrorCode *pErrorCode) {
/* fills in the starters boolean array */
uprv_memcpy(starters, converter->sharedData->table->mbcs.starters, 256*sizeof(bool_t));
uprv_memcpy(starters, converter->sharedData->table->mbcs.starters, 256*sizeof(UBool));
}
static const UConverterImpl _MBCSImpl={

View file

@ -62,7 +62,7 @@ void T_UConverter_toUnicode_SBCS (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
char *mySource = (char *) *source;
@ -143,7 +143,7 @@ void T_UConverter_fromUnicode_SBCS (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
const UChar *mySource = *source;
@ -350,7 +350,7 @@ void T_UConverter_toUnicode_DBCS (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
const char *mySource = ( char *) *source;
@ -461,7 +461,7 @@ void T_UConverter_fromUnicode_DBCS (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t *offsets,
bool_t flush,
UBool flush,
UErrorCode * err)
{
const UChar *mySource = *source;

View file

@ -286,7 +286,7 @@ typedef struct {
/* memory-mapping base functions -------------------------------------------- */
#if MAP_IMPLEMENTATION==MAP_WIN32
static bool_t
static UBool
uprv_mapFile(UDataMemory *pData, const char *path, const char *basename) {
char buffer[100];
HANDLE map;
@ -339,7 +339,7 @@ typedef struct {
}
#elif MAP_IMPLEMENTATION==MAP_POSIX
static bool_t
static UBool
uprv_mapFile(UDataMemory *pData, const char *path, const char *basename) {
int fd;
int length;
@ -394,7 +394,7 @@ typedef struct {
}
#elif MAP_IMPLEMENTATION==MAP_FILE_STREAM
static bool_t
static UBool
uprv_mapFile(UDataMemory *pData, const char *path, const char *basename) {
FileStream *file;
int32_t fileLength;
@ -542,7 +542,7 @@ static UDataMemory commonICUData={ NULL };
static void
setCommonICUData(UDataMemory *pData) {
bool_t setThisLib=FALSE;
UBool setThisLib=FALSE;
/* in the mutex block, set the common library for this process */
umtx_lock(NULL);
@ -622,7 +622,7 @@ findBasename(const char *path) {
static UDataMemory *
openCommonData(UDataMemory *pData,
const char *path, bool_t isICUData,
const char *path, UBool isICUData,
char *pathBuffer,
UErrorCode *pErrorCode) {
# if !UDATA_NO_DLL
@ -894,7 +894,7 @@ doOpenChoice(const char *path, const char *type, const char *name,
const char *inBasename;
char *basename, *suffix;
UErrorCode errorCode=U_ZERO_ERROR;
bool_t isICUData= path==NULL;
UBool isICUData= path==NULL;
/* set up the ToC names for DLL and offset-ToC lookups */
setEntryNames(type, name, tocEntryName, dllEntryName);

View file

@ -429,7 +429,7 @@ uhash_hashIChars(const void *key) {
* PUBLIC Comparator Functions
********************************************************************/
U_CAPI bool_t
U_CAPI UBool
uhash_compareUChars(const void *key1, const void *key2) {
const UChar *p1 = (const UChar*) key1;
const UChar *p2 = (const UChar*) key2;
@ -446,7 +446,7 @@ uhash_compareUChars(const void *key1, const void *key2) {
return (*p1 == *p2);
}
U_CAPI bool_t
U_CAPI UBool
uhash_compareChars(const void *key1, const void *key2) {
const char *p1 = (const char*) key1;
const char *p2 = (const char*) key2;
@ -463,7 +463,7 @@ uhash_compareChars(const void *key1, const void *key2) {
return (*p1 == *p2);
}
U_CAPI bool_t
U_CAPI UBool
uhash_compareIChars(const void *key1, const void *key2) {
const char *p1 = (const char*) key1;
const char *p2 = (const char*) key2;
@ -489,7 +489,7 @@ uhash_hashLong(const void *key) {
return (int32_t) key;
}
U_CAPI bool_t
U_CAPI UBool
uhash_compareLong(const void *key1, const void *key2) {
return key1 == key2;
}

View file

@ -86,7 +86,7 @@ typedef int32_t (* U_CALLCONV UHashFunction)(const void* key);
* @param key2 A key stored in a hashtable
* @return TRUE if the two keys are equal.
*/
typedef bool_t (* U_CALLCONV UKeyComparator)(const void* key1,
typedef UBool (* U_CALLCONV UKeyComparator)(const void* key1,
const void* key2);
/**
@ -382,21 +382,21 @@ uhash_hashIChars(const void *key);
* Comparator for null-terminated UChar* strings. Use together with
* uhash_hashUChars.
*/
U_CAPI bool_t
U_CAPI UBool
uhash_compareUChars(const void *key1, const void *key2);
/**
* Comparator for null-terminated char* strings. Use together with
* uhash_hashChars.
*/
U_CAPI bool_t
U_CAPI UBool
uhash_compareChars(const void *key1, const void *key2);
/**
* Case-insensitive comparator for null-terminated char* strings. Use
* together with uhash_hashIChars.
*/
U_CAPI bool_t
U_CAPI UBool
uhash_compareIChars(const void *key1, const void *key2);
/********************************************************************
@ -412,7 +412,7 @@ uhash_hashUnicodeString(const void *key);
/**
* Comparator function for UnicodeString* keys.
*/
U_CAPI bool_t
U_CAPI UBool
uhash_compareUnicodeString(const void *key1, const void *key2);
/**
@ -434,7 +434,7 @@ uhash_hashLong(const void *key);
/**
* Comparator function for 32-bit integer keys.
*/
U_CAPI bool_t
U_CAPI UBool
uhash_compareLong(const void *key1, const void *key2);
/********************************************************************

View file

@ -25,7 +25,7 @@ uhash_deleteUnicodeString(void *obj) {
delete (UnicodeString*) obj;
}
U_CAPI bool_t
U_CAPI UBool
uhash_compareUnicodeString(const void *key1, const void *key2) {
if (key1 == key2) {
return TRUE;

View file

@ -186,7 +186,7 @@ int16_t _findIndex(const char* list, int32_t listLength, const char* key)
{
const char* anchor = list;
const char* listEnd = anchor + listLength;
bool_t found = FALSE;
UBool found = FALSE;
int tokenSize = uprv_strlen(list)+1; /*gets the size of the tokens*/
while (!found && list<listEnd)
@ -530,8 +530,8 @@ int32_t uloc_getDisplayLanguage(const char* locale,
UErrorCode err = U_ZERO_ERROR;
UResourceBundle* bundle;
const UChar* temp = NULL;
bool_t isDefaultLocale = FALSE;
bool_t done = FALSE;
UBool isDefaultLocale = FALSE;
UBool done = FALSE;
if (U_FAILURE(*status)) return 0;
@ -653,8 +653,8 @@ int32_t uloc_getDisplayCountry(const char* locale,
UErrorCode err = U_ZERO_ERROR;
UResourceBundle* bundle = NULL;
char inLocaleBuffer[TEMPBUFSIZE];
bool_t isDefaultLocale = FALSE;
bool_t done = FALSE;
UBool isDefaultLocale = FALSE;
UBool done = FALSE;
if (U_FAILURE(*status)) return 0;
@ -773,10 +773,10 @@ int32_t uloc_getDisplayVariant(const char* locale,
UErrorCode err = U_ZERO_ERROR;
UResourceBundle* bundle;
char inLocaleBuffer[TEMPBUFSIZE];
bool_t isDefaultLocale = FALSE;
UBool isDefaultLocale = FALSE;
char inVariantTagBuffer[TEMPBUFSIZE+2];
char* inVariantTag = inVariantTagBuffer;
bool_t done = FALSE;
UBool done = FALSE;
if (U_FAILURE(*status)) return 0;
@ -915,7 +915,7 @@ int32_t uloc_getDisplayName(const char* locale,
UErrorCode int_err = U_ZERO_ERROR;
int i = 0;
int cntSze, varSze;
bool_t has_lang = TRUE;
UBool has_lang = TRUE;
int result_size;
int_err = U_ZERO_ERROR;

View file

@ -65,12 +65,12 @@ U_CAPI void U_EXPORT2 uprv_mstrm_close(UMemoryStream *MS){
uprv_free(MS);
}
U_CAPI bool_t U_EXPORT2 uprv_mstrm_setError(UMemoryStream *MS){
U_CAPI UBool U_EXPORT2 uprv_mstrm_setError(UMemoryStream *MS){
MS->fError = TRUE;
return MS->fError;
}
U_CAPI bool_t U_EXPORT2 uprv_mstrm_error(UMemoryStream *MS){
U_CAPI UBool U_EXPORT2 uprv_mstrm_error(UMemoryStream *MS){
return MS->fError;
}

View file

@ -36,15 +36,15 @@ struct UMemoryStream{
int32_t fSize;
int32_t fPos;
int32_t fReadPos;
bool_t fReadOnly;
bool_t fError;
UBool fReadOnly;
UBool fError;
};
U_CAPI UMemoryStream * U_EXPORT2 uprv_mstrm_openNew(int32_t size);
U_CAPI UMemoryStream * U_EXPORT2 uprv_mstrm_openBuffer(uint8_t *buffer, int32_t len);
U_CAPI void U_EXPORT2 uprv_mstrm_close(UMemoryStream *MS);
U_CAPI bool_t U_EXPORT2 uprv_mstrm_setError(UMemoryStream *MS);
U_CAPI bool_t U_EXPORT2 uprv_mstrm_error(UMemoryStream *MS);
U_CAPI UBool U_EXPORT2 uprv_mstrm_setError(UMemoryStream *MS);
U_CAPI UBool U_EXPORT2 uprv_mstrm_error(UMemoryStream *MS);
U_CAPI int32_t U_EXPORT2 uprv_mstrm_read(UMemoryStream *MS, void* addr, int32_t len);
U_CAPI int32_t U_EXPORT2 uprv_mstrm_write(UMemoryStream *MS, uint8_t *buffer, int32_t len);
U_CAPI uint8_t * U_EXPORT2 uprv_mstrm_getBuffer(UMemoryStream *MS, int32_t *len);

View file

@ -54,7 +54,7 @@
# ifdef POSIX_DEBUG_REENTRANCY
pthread_t gLastThread;
bool_t gInMutex;
UBool gInMutex;
U_EXPORT void WeAreDeadlocked();

View file

@ -52,7 +52,7 @@ typedef struct {
static UDataMemory *uCharNamesData=NULL;
static UCharNames *uCharNames=NULL;
static bool_t
static UBool
isAcceptable(void *context,
const char *type, const char *name,
const UDataInfo *pInfo);
@ -146,7 +146,7 @@ u_charName(uint32_t code, UCharNameChoice nameChoice,
/* implementation ----------------------------------------------------------- */
static bool_t
static UBool
isAcceptable(void *context,
const char *type, const char *name,
const UDataInfo *pInfo) {

View file

@ -67,7 +67,7 @@ public:
* @draft
*/
void
setInverse(bool_t isInverse);
setInverse(UBool isInverse);
/**
* Is this BiDi object set to perform the inverse BiDi algorithm?
@ -75,7 +75,7 @@ public:
* @see setInverse
* @draft
*/
bool_t
UBool
isInverse();
/** @memo Set this object for one paragraph's text.
@ -255,11 +255,11 @@ inline BiDi::~BiDi() {
}
inline void
BiDi::setInverse(bool_t isInverse) {
BiDi::setInverse(UBool isInverse) {
ubidi_setInverse(pBiDi, isInverse);
}
inline bool_t
inline UBool
BiDi::isInverse() {
return ubidi_isInverse(pBiDi);
}

View file

@ -95,7 +95,7 @@ public:
* character in the same character-storage object.
* @stable
*/
virtual bool_t operator==(const ForwardCharacterIterator& that) const = 0;
virtual UBool operator==(const ForwardCharacterIterator& that) const = 0;
/**
* Returns true when the iterators refer to different
@ -103,7 +103,7 @@ public:
* same text-storage object.
* @stable
*/
inline bool_t operator!=(const ForwardCharacterIterator& that) const;
inline UBool operator!=(const ForwardCharacterIterator& that) const;
/**
* Generates a hash code for this iterator.
@ -143,7 +143,7 @@ public:
* This is used with nextPostInc() or next32PostInc() in forward
* iteration.
*/
virtual bool_t hasNext() = 0;
virtual UBool hasNext() = 0;
protected:
ForwardCharacterIterator() {}
@ -459,7 +459,7 @@ public:
* This is used with previous() or previous32() in backward
* iteration.
*/
virtual bool_t hasPrevious() = 0;
virtual UBool hasPrevious() = 0;
/**
* Returns the numeric index in the underlying text-storage
@ -534,7 +534,7 @@ protected:
UTextOffset end;
};
inline bool_t
inline UBool
ForwardCharacterIterator::operator!=(const ForwardCharacterIterator& that) const {
return !operator==(that);
}

View file

@ -140,7 +140,7 @@ void fromUnicode(char*& target,
const UChar*& source,
const UChar* sourceLimit,
int32_t * offsets,
bool_t flush,
UBool flush,
UErrorCode& err);
@ -168,7 +168,7 @@ void fromUnicode(char*& target,
const char*& source,
const char* sourceLimit,
int32_t * offsets,
bool_t flush,
UBool flush,
UErrorCode& err);
@ -207,7 +207,7 @@ UConverterType getType(void) const;
* @see ucnv_getType
* @stable
*/
void getStarters(bool_t starters[256],
void getStarters(UBool starters[256],
UErrorCode& err) const;
/**
* Fills in the output parameter, subChars, with the substitution characters
@ -325,8 +325,8 @@ UConverterPlatform getCodepagePlatform(UErrorCode& err) const;
UnicodeConverterCPP& operator=(const UnicodeConverterCPP& that);
bool_t operator==(const UnicodeConverterCPP& that) const;
bool_t operator!=(const UnicodeConverterCPP& that) const;
UBool operator==(const UnicodeConverterCPP& that) const;
UBool operator!=(const UnicodeConverterCPP& that) const;
UnicodeConverterCPP(const UnicodeConverterCPP& that);
/**
@ -364,7 +364,7 @@ void fixFileSeparator(UnicodeString& source) const;
* character, FALSE otherwise.
* @draft
*/
bool_t isAmbiguous(void) const;
UBool isAmbiguous(void) const;
};
#endif

View file

@ -286,7 +286,7 @@ public:
* @return True if the two locale keys are the same, false otherwise.
* @stable
*/
bool_t operator==(const Locale& other) const;
UBool operator==(const Locale& other) const;
/**
* Checks if two locale keys are not the same.
@ -296,7 +296,7 @@ public:
* otherwise.
* @stable
*/
bool_t operator!=(const Locale& other) const;
UBool operator!=(const Locale& other) const;
/**
* Common methods of getting the current default Locale. Used for the
@ -651,7 +651,7 @@ friend void locale_set_default_internal(const char *);
};
inline bool_t
inline UBool
Locale::operator!=(const Locale& other) const
{
return !operator==(other);

View file

@ -398,7 +398,7 @@ class U_COMMON_API Normalizer
* @stable
*/
static void compose(const UnicodeString& source,
bool_t compat,
UBool compat,
int32_t options,
UnicodeString& result,
UErrorCode &status);
@ -430,7 +430,7 @@ class U_COMMON_API Normalizer
* @stable
*/
static void decompose(const UnicodeString& source,
bool_t compat,
UBool compat,
int32_t options,
UnicodeString& result,
UErrorCode &status);
@ -544,9 +544,9 @@ class U_COMMON_API Normalizer
* character-storage object.
* @stable
*/
// virtual bool_t operator==(const CharacterIterator& that) const;
bool_t operator==(const Normalizer& that) const;
inline bool_t operator!=(const Normalizer& that) const;
// virtual UBool operator==(const CharacterIterator& that) const;
UBool operator==(const Normalizer& that) const;
inline UBool operator!=(const Normalizer& that) const;
/**
* Returns a pointer to a new Normalizer that is a clone of this one.
@ -625,7 +625,7 @@ class U_COMMON_API Normalizer
* @stable
*/
void setOption(int32_t option,
bool_t value);
UBool value);
/**
* Determine whether an option is turned on or off.
@ -633,7 +633,7 @@ class U_COMMON_API Normalizer
* @see #setOption
* @stable
*/
bool_t getOption(int32_t option) const;
UBool getOption(int32_t option) const;
/**
* Set the input text over which this <tt>Normalizer</tt> will iterate.
@ -765,7 +765,7 @@ private:
friend class ComposedCharIter;
};
inline bool_t
inline UBool
Normalizer::operator!= (const Normalizer& other) const
{ return ! operator==(other); }

View file

@ -44,10 +44,10 @@
/* Floating point utilities
* @draft
*/
U_CAPI bool_t U_EXPORT2 uprv_isNaN(double);
U_CAPI bool_t U_EXPORT2 uprv_isInfinite(double);
U_CAPI bool_t U_EXPORT2 uprv_isPositiveInfinity(double);
U_CAPI bool_t U_EXPORT2 uprv_isNegativeInfinity(double);
U_CAPI UBool U_EXPORT2 uprv_isNaN(double);
U_CAPI UBool U_EXPORT2 uprv_isInfinite(double);
U_CAPI UBool U_EXPORT2 uprv_isPositiveInfinity(double);
U_CAPI UBool U_EXPORT2 uprv_isNegativeInfinity(double);
U_CAPI double U_EXPORT2 uprv_getNaN(void);
U_CAPI double U_EXPORT2 uprv_getInfinity(void);
@ -173,7 +173,7 @@ U_CAPI const char* U_EXPORT2 uprv_getDefaultLocaleID(void);
* It is not a general purpose function and not defined for NaN or Infinity
* @draft
*/
U_CAPI double U_EXPORT2 uprv_nextDouble(double d, bool_t positive);
U_CAPI double U_EXPORT2 uprv_nextDouble(double d, UBool positive);
/**
* Filesystem file and path separator characters.

View file

@ -217,7 +217,7 @@ public:
* @return TRUE if there are more elements, FALSE if there is no more elements
* @draft
*/
bool_t hasNext(void) const;
UBool hasNext(void) const;
/**
* Resets the internal context of a resource so that iteration starts from the first element.
*

View file

@ -99,7 +99,7 @@ public:
* same string and are pointing at the same character.
* @stable
*/
virtual bool_t operator==(const ForwardCharacterIterator& that) const;
virtual UBool operator==(const ForwardCharacterIterator& that) const;
/**
* Returns a new StringCharacterIterator referring to the same

View file

@ -264,7 +264,7 @@ ubidi_close(UBiDi *pBiDi);
* @see ubidi_writeReordered
*/
U_CAPI void U_EXPORT2
ubidi_setInverse(UBiDi *pBiDi, bool_t isInverse);
ubidi_setInverse(UBiDi *pBiDi, UBool isInverse);
/**
* Is this BiDi object set to perform the inverse BiDi algorithm?
@ -273,7 +273,7 @@ ubidi_setInverse(UBiDi *pBiDi, bool_t isInverse);
*
* @see ubidi_setInverse
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
ubidi_isInverse(UBiDi *pBiDi);
/**

View file

@ -418,7 +418,7 @@ typedef enum UCharNameChoice UCharNameChoice;
* @see u_islower()
* @draft
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_islower(UChar32 c);
/**
@ -432,7 +432,7 @@ u_islower(UChar32 c);
* @see u_tolower()
* @draft
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isupper(UChar32 c);
/**
@ -446,7 +446,7 @@ u_isupper(UChar32 c);
* @see u_totitle()
* @draft
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_istitle(UChar32 c);
/**
@ -457,7 +457,7 @@ u_istitle(UChar32 c);
* @return true if the character is a digit; false otherwise.
* @draft
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isdigit(UChar32 c);
/**
@ -468,7 +468,7 @@ u_isdigit(UChar32 c);
* @return true if the character is a letter or a digit; false otherwise.
* @draft
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isalnum(UChar32 c);
/**
@ -486,7 +486,7 @@ u_isalnum(UChar32 c);
* @see u_istitle()
* @draft
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isdefined(UChar32 c);
/**
@ -500,7 +500,7 @@ u_isdefined(UChar32 c);
* @see u_isalnum()
* @draft
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isalpha(UChar32 c);
/**
@ -510,7 +510,7 @@ u_isalpha(UChar32 c);
* @return true if the character is a space character; false otherwise.
* @draft
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isspace(UChar32 c);
/**
@ -541,7 +541,7 @@ u_isspace(UChar32 c);
* @see #isspace
* @draft
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isWhitespace(UChar32 c);
/**
@ -553,7 +553,7 @@ u_isWhitespace(UChar32 c);
* @see u_isprint()
* @draft
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_iscntrl(UChar32 c);
@ -567,7 +567,7 @@ u_iscntrl(UChar32 c);
* @see u_iscntrl()
* @draft
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isprint(UChar32 c);
/**
@ -581,7 +581,7 @@ u_isprint(UChar32 c);
* @see u_isdigit()
* @draft
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isbase(UChar32 c);
/**
@ -605,7 +605,7 @@ u_charDirection(UChar32 c);
* @param c the character (code point, Unicode scalar value) to be tested
* @return TRUE if the character has the "mirrored" property
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isMirrored(UChar32 c);
/**
@ -752,7 +752,7 @@ u_charName(uint32_t code, UCharNameChoice nameChoice,
* @see u_isIDPart
* @draft
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isIDStart(UChar32 c);
/**
* A convenience method for determining if a Unicode character
@ -778,7 +778,7 @@ u_isIDStart(UChar32 c);
* @see u_isIDStart
* @draft
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isIDPart(UChar32 c);
/**
* A convenience method for determining if a Unicode character
@ -804,7 +804,7 @@ u_isIDPart(UChar32 c);
* @see u_isIDPart
* @draft
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isIDIgnorable(UChar32 c);
/**
* A convenience method for determining if a Unicode character
@ -826,7 +826,7 @@ u_isIDIgnorable(UChar32 c);
* @see u_isIDStart
* @draft
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isJavaIDStart(UChar32 c);
/**
* A convenience method for determining if a Unicode character
@ -857,7 +857,7 @@ u_isJavaIDStart(UChar32 c);
* @draft
*/
U_CAPI bool_t U_EXPORT2
U_CAPI UBool U_EXPORT2
u_isJavaIDPart(UChar32 c);
/**

View file

@ -91,7 +91,7 @@ public:
* same string and are pointing at the same character.
* @stable
*/
virtual bool_t operator==(const ForwardCharacterIterator& that) const;
virtual UBool operator==(const ForwardCharacterIterator& that) const;
/**
* Generates a hash code for this iterator.
@ -233,7 +233,7 @@ public:
* This is used with nextPostInc() or next32PostInc() in forward
* iteration.
*/
virtual bool_t hasNext();
virtual UBool hasNext();
/**
* Advances to the previous code unit in the iteration rance (toward
@ -257,7 +257,7 @@ public:
* This is used with previous() or previous32() in backward
* iteration.
*/
virtual bool_t hasPrevious();
virtual UBool hasPrevious();
/**
* Moves the current position relative to the start or end of the

View file

@ -36,7 +36,7 @@ typedef void (*UConverterToUCallback) (UConverter *,
const char **,
const char *,
int32_t* offsets,
bool_t,
UBool,
UErrorCode *);
typedef void (*UConverterFromUCallback) (UConverter *,
@ -45,7 +45,7 @@ typedef void (*UConverterFromUCallback) (UConverter *,
const UChar **,
const UChar *,
int32_t* offsets,
bool_t,
UBool,
UErrorCode *);
U_CDECL_END
@ -320,7 +320,7 @@ ucnv_getType (const UConverter * converter);
* @stable
*/
U_CAPI void U_EXPORT2 ucnv_getStarters(const UConverter* converter,
bool_t starters[256],
UBool starters[256],
UErrorCode* err);
@ -417,7 +417,7 @@ U_CAPI
const UChar ** source,
const UChar * sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode * err);
@ -457,7 +457,7 @@ U_CAPI
const char **source,
const char *sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode * err);
@ -690,7 +690,7 @@ U_CAPI void U_EXPORT2 ucnv_fixFileSeparator(const UConverter *cnv, UChar* source
* character, FALSE otherwise.
* @draft
*/
U_CAPI bool_t U_EXPORT2 ucnv_isAmbiguous(const UConverter *cnv);
U_CAPI UBool U_EXPORT2 ucnv_isAmbiguous(const UConverter *cnv);
/**
* Sets the converter to use fallback mapping or not.
@ -699,14 +699,14 @@ U_CAPI bool_t U_EXPORT2 ucnv_isAmbiguous(const UConverter *cnv);
* mapping, FALSE otherwise.
* @draft
*/
U_CAPI void U_EXPORT2 ucnv_setFallback(UConverter *cnv, bool_t usesFallback);
U_CAPI void U_EXPORT2 ucnv_setFallback(UConverter *cnv, UBool usesFallback);
/**
* Determines if the converter uses fallback mappings or not.
* @return TRUE if the converter uses fallback, FALSE otherwise.
* @draft
*/
U_CAPI bool_t U_EXPORT2 ucnv_usesFallback(const UConverter *cnv);
U_CAPI UBool U_EXPORT2 ucnv_usesFallback(const UConverter *cnv);
#endif
/*_UCNV*/

View file

@ -153,7 +153,7 @@ typedef struct {
int8_t subCharLen;
uint8_t subChar[UCNV_MAX_SUBCHAR_LEN];
uint8_t hasToUnicodeFallback; /* bool_t needs to be changed to UBool to be consistent across platform */
uint8_t hasToUnicodeFallback; /* UBool needs to be changed to UBool to be consistent across platform */
uint8_t hasFromUnicodeFallback;
uint8_t reserved[19]; /* to round out the structure */
@ -171,7 +171,7 @@ typedef struct {
UConverterTable *table; /* Pointer to conversion data */
const UConverterStaticData *staticData; /* pointer to the static (non changing) data. */
bool_t staticDataOwned; /* T if we own the staticData */
UBool staticDataOwned; /* T if we own the staticData */
const UConverterImpl *impl; /* vtable-style struct of mostly function pointers */
/*initial values of some members of the mutable part of object */
@ -185,7 +185,7 @@ struct UConverter {
uint32_t toUnicodeStatus; /* Used to internalize stream status information */
uint32_t fromUnicodeStatus;
int32_t mode;
bool_t useFallback;
UBool useFallback;
int8_t subCharLen; /* length of the codepage specific character sequence */
int8_t invalidCharLength;
@ -210,7 +210,7 @@ struct UConverter {
const UChar **,
const UChar *,
int32_t* offsets,
bool_t,
UBool,
UErrorCode *);
/*
* Error function pointer called when conversion issues
@ -222,7 +222,7 @@ struct UConverter {
const char **,
const char *,
int32_t* offsets,
bool_t,
UBool,
UErrorCode *);
UConverterSharedData *sharedData; /* Pointer to the shared immutable part of the converter object */

View file

@ -48,7 +48,7 @@ U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_STOP (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode * err);
@ -62,7 +62,7 @@ U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_STOP (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode * err);
@ -78,7 +78,7 @@ U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_SKIP (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode * err);
/**
@ -95,7 +95,7 @@ U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_SUBSTITUTE (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode * err);
/**
@ -115,7 +115,7 @@ U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_ESCAPE (UConverter * _this,
const UChar ** source,
const UChar * sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode * err);
@ -129,7 +129,7 @@ U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_SKIP (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode * err);
@ -146,7 +146,7 @@ U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_SUBSTITUTE (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode * err);
/**
@ -164,7 +164,7 @@ U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_ESCAPE (UConverter * _this,
const char **source,
const char *sourceLimit,
int32_t* offsets,
bool_t flush,
UBool flush,
UErrorCode * err);

View file

@ -99,7 +99,7 @@ typedef struct UDataMemory UDataMemory;
* @return TRUE if the current data memory is acceptable
* @stable
*/
typedef bool_t
typedef UBool
UDataMemoryIsAcceptable(void *context,
const char *type, const char *name,
const UDataInfo *pInfo);

View file

@ -141,6 +141,8 @@
typedef int8_t bool_t;
#endif
typedef int8_t UBool;
#ifndef TRUE
# define TRUE 1
#endif

View file

@ -254,7 +254,7 @@ public:
* @param c The code unit to be tested.
* @return Boolean value.
*/
static inline bool_t isSingle(UChar c);
static inline UBool isSingle(UChar c);
/**
* Is this code unit the first of a multiple-unit sequence?
@ -263,7 +263,7 @@ public:
* @param c The code unit to be tested.
* @return Boolean value.
*/
static inline bool_t isLead(UChar c);
static inline UBool isLead(UChar c);
/**
* Is this code unit one of, but not the first, of a multiple-unit sequence?
@ -272,7 +272,7 @@ public:
* @param c The code unit to be tested.
* @return Boolean value.
*/
static inline bool_t isTrail(UChar c);
static inline UBool isTrail(UChar c);
/**
* Is this code point a surrogate character?
@ -283,7 +283,7 @@ public:
* @param c The code point to be tested.
* @return Boolean value.
*/
static inline bool_t isSurrogate(UChar32 c);
static inline UBool isSurrogate(UChar32 c);
/**
* Is this code point a Unicode character?
@ -296,7 +296,7 @@ public:
* @param c The code point to be tested.
* @return Boolean value.
*/
static inline bool_t isUnicodeChar(UChar32 c);
static inline UBool isUnicodeChar(UChar32 c);
/**
* Is this code point an error value?
@ -308,7 +308,7 @@ public:
* @param c The code point to be tested.
* @return Boolean value.
*/
static inline bool_t isError(UChar32 c);
static inline UBool isError(UChar32 c);
/**
* Is this code point a Unicode character, and not an error value?
@ -318,7 +318,7 @@ public:
* @param c The code point to be tested.
* @return Boolean value.
*/
static inline bool_t isValid(UChar32 c);
static inline UBool isValid(UChar32 c);
/**
* When writing code units for a given code point, is more than one
@ -330,7 +330,7 @@ public:
* @param c The code point to be tested.
* @return Boolean value.
*/
static inline bool_t needMultipleUChar(UChar32 c);
static inline UBool needMultipleUChar(UChar32 c);
/**
* When writing code units for a given code point, how many
@ -367,7 +367,7 @@ public:
* @see Unicode#toLowerCase
* @draft
*/
static inline bool_t isLowerCase(UChar32 ch);
static inline UBool isLowerCase(UChar32 ch);
/**
* Determines whether the specified character is an uppercase character
@ -380,7 +380,7 @@ public:
* @see Unicode#toUpperCase
* @draft
*/
static inline bool_t isUpperCase(UChar32 ch);
static inline UBool isUpperCase(UChar32 ch);
/**
* Determines whether the specified character is a titlecase character
@ -393,7 +393,7 @@ public:
* @see Unicode#toTitleCase
* @draft
*/
static inline bool_t isTitleCase(UChar32 ch);
static inline UBool isTitleCase(UChar32 ch);
/**
* Determines whether the specified character is a digit according to Unicode
@ -406,7 +406,7 @@ public:
* @see Unicode#digitValue
* @draft
*/
static inline bool_t isDigit(UChar32 ch);
static inline UBool isDigit(UChar32 ch);
/**
* Determines whether the specified numeric value is actually a defined character
@ -423,7 +423,7 @@ public:
* @see Unicode#isTitleCase
* @draft
*/
static inline bool_t isDefined(UChar32 ch);
static inline UBool isDefined(UChar32 ch);
/**
* Determines whether the specified character is a control character according
@ -435,7 +435,7 @@ public:
* @see Unicode#isPrintable
* @draft
*/
static inline bool_t isControl(UChar32 ch);
static inline UBool isControl(UChar32 ch);
/**
* Determines whether the specified character is a printable character according
@ -447,7 +447,7 @@ public:
* @see Unicode#isControl
* @draft
*/
static inline bool_t isPrintable(UChar32 ch);
static inline UBool isPrintable(UChar32 ch);
/**
* Determines whether the specified character is of the base form according
@ -460,7 +460,7 @@ public:
* @see Unicode#isDigit
* @draft
*/
static inline bool_t isBaseForm(UChar32 ch);
static inline UBool isBaseForm(UChar32 ch);
/**
* Determines whether the specified character is a letter
@ -477,7 +477,7 @@ public:
* @see Unicode#isTitleCase
* @draft
*/
static inline bool_t isLetter(UChar32 ch);
static inline UBool isLetter(UChar32 ch);
/**
* A convenience method for determining if a Unicode character
@ -499,7 +499,7 @@ public:
* @see isUnicodeIdentifierStart
* @draft
*/
static inline bool_t isJavaIdentifierStart(UChar32 ch);
static inline UBool isJavaIdentifierStart(UChar32 ch);
/**
* A convenience method for determining if a Unicode character
@ -529,7 +529,7 @@ public:
* @see isUnicodeIdentifierPart
* @draft
*/
static inline bool_t isJavaIdentifierPart(UChar32 ch);
static inline UBool isJavaIdentifierPart(UChar32 ch);
/**
* A convenience method for determining if a Unicode character
@ -545,7 +545,7 @@ public:
* @see isUnicodeIdentifierPart
* @draft
*/
static inline bool_t isUnicodeIdentifierStart(UChar32 ch);
static inline UBool isUnicodeIdentifierStart(UChar32 ch);
/**
* A convenience method for determining if a Unicode character
@ -573,7 +573,7 @@ public:
* @see isUnicodeIdentifierStart
* @draft
*/
static inline bool_t isUnicodeIdentifierPart(UChar32 ch);
static inline UBool isUnicodeIdentifierPart(UChar32 ch);
/**
* A convenience method for determining if a Unicode character
@ -600,7 +600,7 @@ public:
* @see isUnicodeIdentifierPart
* @draft
*/
static inline bool_t isIdentifierIgnorable(UChar32 ch);
static inline UBool isIdentifierIgnorable(UChar32 ch);
/**
* The given character is mapped to its lowercase equivalent according to
@ -678,7 +678,7 @@ public:
* @return true if the character is a space character; false otherwise.
* @draft
*/
static inline bool_t isSpaceChar(UChar32 ch);
static inline UBool isSpaceChar(UChar32 ch);
/**
* Determines if the specified character is white space according to ICU.
@ -708,7 +708,7 @@ public:
* @see #isSpaceChar
* @draft
*/
static inline bool_t isWhitespace(UChar32 ch);
static inline UBool isWhitespace(UChar32 ch);
/**
* Returns a value indicating a character category according to Unicode
@ -766,7 +766,7 @@ public:
* @param c the character (code point, Unicode scalar value) to be tested
* @return TRUE if the character has the "mirrored" property
*/
static inline bool_t isMirrored(UChar32 c);
static inline UBool isMirrored(UChar32 c);
/**
* Maps the specified character to a "mirror-image" character.
@ -978,42 +978,42 @@ protected:
/* inline implementations --------------------------------------------------- */
inline bool_t
inline UBool
Unicode::isSingle(UChar c) {
return UTF_IS_SINGLE(c);
}
inline bool_t
inline UBool
Unicode::isLead(UChar c) {
return UTF_IS_LEAD(c);
}
inline bool_t
inline UBool
Unicode::isTrail(UChar c) {
return UTF_IS_TRAIL(c);
}
inline bool_t
inline UBool
Unicode::isSurrogate(UChar32 c) {
return UTF_IS_SURROGATE(c);
}
inline bool_t
inline UBool
Unicode::isUnicodeChar(UChar32 c) {
return UTF_IS_UNICODE_CHAR(c);
}
inline bool_t
inline UBool
Unicode::isError(UChar32 c) {
return UTF_IS_ERROR(c);
}
inline bool_t
inline UBool
Unicode::isValid(UChar32 c) {
return UTF_IS_VALID(c);
}
inline bool_t
inline UBool
Unicode::needMultipleUChar(UChar32 c) {
return UTF_NEED_MULTIPLE_UCHAR(c);
}
@ -1029,87 +1029,87 @@ Unicode::arraySize(int32_t size) {
}
// Checks if ch is a lower case letter.
inline bool_t
inline UBool
Unicode::isLowerCase(UChar32 ch) {
return u_islower(ch);
}
// Checks if ch is a upper case letter.
inline bool_t
inline UBool
Unicode::isUpperCase(UChar32 ch) {
return u_isupper(ch);
}
// Checks if ch is a title case letter; usually upper case letters.
inline bool_t
inline UBool
Unicode::isTitleCase(UChar32 ch) {
return u_istitle(ch);
}
// Checks if ch is a decimal digit.
inline bool_t
inline UBool
Unicode::isDigit(UChar32 ch) {
return u_isdigit(ch);
}
// Checks if ch is a unicode character with assigned character type.
inline bool_t
inline UBool
Unicode::isDefined(UChar32 ch) {
return u_isdefined(ch);
}
// Checks if the Unicode character is a control character.
inline bool_t
inline UBool
Unicode::isControl(UChar32 ch) {
return u_iscntrl(ch);
}
// Checks if the Unicode character is printable.
inline bool_t
inline UBool
Unicode::isPrintable(UChar32 ch) {
return u_isprint(ch);
}
// Checks if the Unicode character is a base form character that can take a diacritic.
inline bool_t
inline UBool
Unicode::isBaseForm(UChar32 ch) {
return u_isbase(ch);
}
// Checks if the Unicode character is a letter.
inline bool_t
inline UBool
Unicode::isLetter(UChar32 ch) {
return u_isalpha(ch);
}
// Checks if the Unicode character can start a Java identifier.
inline bool_t
inline UBool
Unicode::isJavaIdentifierStart(UChar32 ch) {
return u_isJavaIDStart(ch);
}
// Checks if the Unicode character can be a Java identifier part other than starting the
// identifier.
inline bool_t
inline UBool
Unicode::isJavaIdentifierPart(UChar32 ch) {
return u_isJavaIDPart(ch);
}
// Checks if the Unicode character can start a Unicode identifier.
inline bool_t
inline UBool
Unicode::isUnicodeIdentifierStart(UChar32 ch) {
return u_isIDStart(ch);
}
// Checks if the Unicode character can be a Unicode identifier part other than starting the
// identifier.
inline bool_t
inline UBool
Unicode::isUnicodeIdentifierPart(UChar32 ch) {
return u_isIDPart(ch);
}
// Checks if the Unicode character can be ignorable in a Java or Unicode identifier.
inline bool_t
inline UBool
Unicode::isIdentifierIgnorable(UChar32 ch) {
return u_isIDIgnorable(ch);
}
@ -1133,13 +1133,13 @@ Unicode::toTitleCase(UChar32 ch) {
}
// Checks if the Unicode character is a space character.
inline bool_t
inline UBool
Unicode::isSpaceChar(UChar32 ch) {
return u_isspace(ch);
}
// Determines if the specified character is white space according to ICU.
inline bool_t
inline UBool
Unicode::isWhitespace(UChar32 ch) {
return u_isWhitespace(ch);
}
@ -1157,7 +1157,7 @@ Unicode::characterDirection(UChar32 ch) {
}
// Determines if the character has the "mirrored" property.
inline bool_t
inline UBool
Unicode::isMirrored(UChar32 ch) {
return u_isMirrored(ch);
}

View file

@ -127,7 +127,7 @@ public:
* FALSE otherwise.
* @stable
*/
inline bool_t operator== (const UnicodeString& text) const;
inline UBool operator== (const UnicodeString& text) const;
/**
* Inequality operator. Performs only bitwise comparison.
@ -136,7 +136,7 @@ public:
* TRUE otherwise.
* @stable
*/
inline bool_t operator!= (const UnicodeString& text) const;
inline UBool operator!= (const UnicodeString& text) const;
/**
* Greater than operator. Performs only bitwise comparison.
@ -145,7 +145,7 @@ public:
* greater than the characters in this, FALSE otherwise
* @stable
*/
inline bool_t operator> (const UnicodeString& text) const;
inline UBool operator> (const UnicodeString& text) const;
/**
* Less than operator. Performs only bitwise comparison.
@ -154,7 +154,7 @@ public:
* less than the characters in this, FALSE otherwise
* @stable
*/
inline bool_t operator< (const UnicodeString& text) const;
inline UBool operator< (const UnicodeString& text) const;
/**
* Greater than or equal operator. Performs only bitwise comparison.
@ -163,7 +163,7 @@ public:
* greater than or equal to the characters in this, FALSE otherwise
* @stable
*/
inline bool_t operator>= (const UnicodeString& text) const;
inline UBool operator>= (const UnicodeString& text) const;
/**
* Less than or equal operator. Performs only bitwise comparison.
@ -172,7 +172,7 @@ public:
* less than or equal to the characters in this, FALSE otherwise
* @stable
*/
inline bool_t operator<= (const UnicodeString& text) const;
inline UBool operator<= (const UnicodeString& text) const;
/**
* Compare the characters bitwise in this UnicodeString to
@ -314,7 +314,7 @@ public:
* FALSE otherwise
* @stable
*/
inline bool_t startsWith(const UnicodeString& text) const;
inline UBool startsWith(const UnicodeString& text) const;
/**
* Determine if this starts with the characters in <TT>srcText</TT>
@ -326,7 +326,7 @@ public:
* FALSE otherwise
* @stable
*/
inline bool_t startsWith(const UnicodeString& srcText,
inline UBool startsWith(const UnicodeString& srcText,
UTextOffset srcStart,
int32_t srcLength) const;
@ -338,7 +338,7 @@ public:
* FALSE otherwise
* @stable
*/
inline bool_t startsWith(const UChar *srcChars,
inline UBool startsWith(const UChar *srcChars,
int32_t srcLength) const;
/**
@ -351,7 +351,7 @@ public:
FALSE otherwise
* @stable
*/
inline bool_t startsWith(const UChar *srcChars,
inline UBool startsWith(const UChar *srcChars,
UTextOffset srcStart,
int32_t srcLength) const;
@ -362,7 +362,7 @@ public:
* FALSE otherwise
* @stable
*/
inline bool_t endsWith(const UnicodeString& text) const;
inline UBool endsWith(const UnicodeString& text) const;
/**
* Determine if this ends with the characters in <TT>srcText</TT>
@ -374,7 +374,7 @@ public:
* FALSE otherwise
* @stable
*/
inline bool_t endsWith(const UnicodeString& srcText,
inline UBool endsWith(const UnicodeString& srcText,
UTextOffset srcStart,
int32_t srcLength) const;
@ -386,7 +386,7 @@ public:
* FALSE otherwise
* @stable
*/
inline bool_t endsWith(const UChar *srcChars,
inline UBool endsWith(const UChar *srcChars,
int32_t srcLength) const;
/**
@ -399,7 +399,7 @@ public:
* FALSE otherwise
* @stable
*/
inline bool_t endsWith(const UChar *srcChars,
inline UBool endsWith(const UChar *srcChars,
UTextOffset srcStart,
int32_t srcLength) const;
@ -929,7 +929,7 @@ public:
* @return TRUE if this string contains 0 characters, FALSE otherwise.
* @stable
*/
inline bool_t empty(void) const;
inline UBool empty(void) const;
/* Other operations */
@ -946,7 +946,7 @@ public:
* @return TRUE if the string is valid, FALSE otherwise
* @draft
*/
inline bool_t isBogus(void) const;
inline UBool isBogus(void) const;
//========================================
@ -1040,7 +1040,7 @@ public:
* by calling <code>u_strlen()</code>.
* @draft
*/
UnicodeString &setTo(bool_t isTerminated,
UnicodeString &setTo(UBool isTerminated,
const UChar *text,
int32_t textLength);
@ -1498,7 +1498,7 @@ public:
* @return TRUE if the text was padded, FALSE otherwise.
* @draft
*/
bool_t padLeading(int32_t targetLength,
UBool padLeading(int32_t targetLength,
UChar padChar = 0x0020);
/**
@ -1512,7 +1512,7 @@ public:
* @return TRUE if the text was padded, FALSE otherwise.
* @draft
*/
bool_t padTrailing(int32_t targetLength,
UBool padTrailing(int32_t targetLength,
UChar padChar = 0x0020);
/**
@ -1521,7 +1521,7 @@ public:
* @return TRUE if the text was truncated, FALSE otherwise
* @stable
*/
inline bool_t truncate(int32_t targetLength);
inline UBool truncate(int32_t targetLength);
/**
* Trims leading and trailing whitespace from this UnicodeString.
@ -1659,7 +1659,7 @@ public:
* by calling <code>u_strlen()</code>.
* @stable
*/
UnicodeString(bool_t isTerminated,
UnicodeString(UBool isTerminated,
const UChar *text,
int32_t textLength);
@ -1752,7 +1752,7 @@ public:
*/
int32_t numDisplayCells(UTextOffset start = 0,
int32_t length = INT32_MAX,
bool_t asian = TRUE) const;
UBool asian = TRUE) const;
UCharReference operator[] (UTextOffset pos);
@ -1824,7 +1824,7 @@ private:
// sets refCount to 1 if appropriate
// sets fArray, fCapacity, and fFlags
// returns boolean for success or failure
bool_t allocate(int32_t capacity);
UBool allocate(int32_t capacity);
// release the array if owned
inline void releaseArray();
@ -1861,9 +1861,9 @@ private:
*
* Return FALSE if memory could not be allocated.
*/
bool_t cloneArrayIfNeeded(int32_t newCapacity = -1,
UBool cloneArrayIfNeeded(int32_t newCapacity = -1,
int32_t growCapacity = -1,
bool_t doCopyArray = TRUE,
UBool doCopyArray = TRUE,
int32_t **pBufferToDelete = 0);
// ref counting
@ -1990,7 +1990,7 @@ uprv_arrayCopy(const UnicodeString *src, int32_t srcStart,
//========================================
// Read-only alias methods
//========================================
inline bool_t
inline UBool
UnicodeString::operator== (const UnicodeString& text) const
{
if(isBogus()) {
@ -2003,23 +2003,23 @@ UnicodeString::operator== (const UnicodeString& text) const
}
}
inline bool_t
inline UBool
UnicodeString::operator!= (const UnicodeString& text) const
{ return (! operator==(text)); }
inline bool_t
inline UBool
UnicodeString::operator> (const UnicodeString& text) const
{ return doCompare(0, fLength, text, 0, text.fLength) == 1; }
inline bool_t
inline UBool
UnicodeString::operator< (const UnicodeString& text) const
{ return doCompare(0, fLength, text, 0, text.fLength) == -1; }
inline bool_t
inline UBool
UnicodeString::operator>= (const UnicodeString& text) const
{ return doCompare(0, fLength, text, 0, text.fLength) != -1; }
inline bool_t
inline UBool
UnicodeString::operator<= (const UnicodeString& text) const
{ return doCompare(0, fLength, text, 0, text.fLength) != 1; }
@ -2282,46 +2282,46 @@ UnicodeString::lastIndexOf(UChar32 c,
}
}
inline bool_t
inline UBool
UnicodeString::startsWith(const UnicodeString& text) const
{ return compare(0, text.fLength, text, 0, text.fLength) == 0; }
inline bool_t
inline UBool
UnicodeString::startsWith(const UnicodeString& srcText,
UTextOffset srcStart,
int32_t srcLength) const
{ return doCompare(0, srcLength, srcText, srcStart, srcLength) == 0; }
inline bool_t
inline UBool
UnicodeString::startsWith(const UChar *srcChars,
int32_t srcLength) const
{ return doCompare(0, srcLength, srcChars, 0, srcLength) == 0; }
inline bool_t
inline UBool
UnicodeString::startsWith(const UChar *srcChars,
UTextOffset srcStart,
int32_t srcLength) const
{ return doCompare(0, srcLength, srcChars, srcStart, srcLength) == 0;}
inline bool_t
inline UBool
UnicodeString::endsWith(const UnicodeString& text) const
{ return doCompare(fLength - text.fLength, text.fLength,
text, 0, text.fLength) == 0; }
inline bool_t
inline UBool
UnicodeString::endsWith(const UnicodeString& srcText,
UTextOffset srcStart,
int32_t srcLength) const
{ return doCompare(fLength - srcLength, srcLength,
srcText, srcStart, srcLength) == 0; }
inline bool_t
inline UBool
UnicodeString::endsWith(const UChar *srcChars,
int32_t srcLength) const
{ return doCompare(fLength - srcLength, srcLength,
srcChars, 0, srcLength) == 0; }
inline bool_t
inline UBool
UnicodeString::endsWith(const UChar *srcChars,
UTextOffset srcStart,
int32_t srcLength) const
@ -2478,7 +2478,7 @@ UnicodeString::getCharLimit(UTextOffset offset) {
}
}
inline bool_t
inline UBool
UnicodeString::empty() const
{ return fLength == 0; }
@ -2613,7 +2613,7 @@ UnicodeString::removeBetween(UTextOffset start,
UTextOffset limit)
{ return doReplace(start, limit - start, 0, 0, 0); }
inline bool_t
inline UBool
UnicodeString::truncate(int32_t targetLength)
{
if((uint32_t)targetLength < (uint32_t)fLength) {
@ -2637,7 +2637,7 @@ UnicodeString::reverse(UTextOffset start,
//========================================
// Write implementation methods
//========================================
inline bool_t
inline UBool
UnicodeString::isBogus() const
{ return fFlags & kIsBogus; }

View file

@ -449,7 +449,7 @@ U_CAPI void U_EXPORT2 ures_resetIterator(UResourceBundle *resourceBundle);
* @return TRUE if there are more elements, FALSE if there is no more elements
* @draft
*/
U_CAPI bool_t U_EXPORT2 ures_hasNext(UResourceBundle *resourceBundle);
U_CAPI UBool U_EXPORT2 ures_hasNext(UResourceBundle *resourceBundle);
/**
* Returns the next resource in a given resource or NULL if there are no more resources

View file

@ -188,7 +188,7 @@ U_CAPI char* U_EXPORT2 u_austrcpy(char *s1,
* <pre>
* &#32; U_STRING_DECL(ustringVar1, "Quick-Fox 2", 11);
* &#32; U_STRING_DECL(ustringVar2, "jumps 5%", 8);
* &#32; static bool_t didInit=FALSE;
* &#32; static UBool didInit=FALSE;
* &#32;
* &#32; int32_t function() {
* &#32; if(!didInit) {

View file

@ -39,13 +39,13 @@ utf8_countTrailBytes[256];
#define UTF8_MASK_LEAD_BYTE(leadByte, countTrailBytes) ((leadByte)&=(1<<(6-(countTrailBytes)))-1)
U_CAPI UChar32 U_EXPORT2
utf8_nextCharSafeBody(const uint8_t *s, UTextOffset *pi, UTextOffset length, UChar32 c, bool_t strict);
utf8_nextCharSafeBody(const uint8_t *s, UTextOffset *pi, UTextOffset length, UChar32 c, UBool strict);
U_CAPI UTextOffset U_EXPORT2
utf8_appendCharSafeBody(uint8_t *s, UTextOffset i, UTextOffset length, UChar32 c);
U_CAPI UChar32 U_EXPORT2
utf8_prevCharSafeBody(const uint8_t *s, UTextOffset start, UTextOffset *pi, UChar32 c, bool_t strict);
utf8_prevCharSafeBody(const uint8_t *s, UTextOffset start, UTextOffset *pi, UChar32 c, UBool strict);
U_CAPI UTextOffset U_EXPORT2
utf8_back1SafeBody(const uint8_t *s, UTextOffset start, UTextOffset i);

View file

@ -244,9 +244,9 @@ typedef enum UErrorCode UErrorCode;
/* operational success or failure. */
#ifdef XP_CPLUSPLUS
/** @stable */
inline bool_t U_SUCCESS(UErrorCode code) { return (bool_t)(code<=U_ZERO_ERROR); }
inline UBool U_SUCCESS(UErrorCode code) { return (UBool)(code<=U_ZERO_ERROR); }
/** @stable */
inline bool_t U_FAILURE(UErrorCode code) { return (bool_t)(code>U_ZERO_ERROR); }
inline UBool U_FAILURE(UErrorCode code) { return (UBool)(code>U_ZERO_ERROR); }
#else
/** @stable */
#define U_SUCCESS(x) ((x)<=U_ZERO_ERROR)

View file

@ -199,7 +199,7 @@ UnicodeString::UnicodeString(const UChar *text,
doReplace(0, 0, text, 0, textLength);
}
UnicodeString::UnicodeString(bool_t isTerminated,
UnicodeString::UnicodeString(UBool isTerminated,
const UChar *text,
int32_t textLength)
: fArray((UChar *)text),
@ -269,7 +269,7 @@ UnicodeString::UnicodeString(const UnicodeString& that)
// array allocation
//========================================
bool_t
UBool
UnicodeString::allocate(int32_t capacity) {
if(capacity <= US_STACKBUF_SIZE) {
fArray = fStackBuffer;
@ -379,7 +379,7 @@ UnicodeString::operator= (const UnicodeString& src)
int32_t
UnicodeString::numDisplayCells( UTextOffset start,
int32_t length,
bool_t asian) const
UBool asian) const
{
// pin indices to legal values
pinIndices(start, length);
@ -703,7 +703,7 @@ UnicodeString::setToBogus()
// setTo() analogous to the readonly-aliasing constructor with the same signature
UnicodeString &
UnicodeString::setTo(bool_t isTerminated,
UnicodeString::setTo(UBool isTerminated,
const UChar *text,
int32_t textLength)
{
@ -1055,7 +1055,7 @@ UnicodeString::doReverse(UTextOffset start,
return *this;
}
bool_t
UBool
UnicodeString::padLeading(int32_t targetLength,
UChar padChar)
{
@ -1075,7 +1075,7 @@ UnicodeString::padLeading(int32_t targetLength,
}
}
bool_t
UBool
UnicodeString::padTrailing(int32_t targetLength,
UChar padChar)
{
@ -1289,7 +1289,7 @@ UnicodeString::doCodepageCreate(const char *codepageData,
int32_t arraySize = dataLength + (dataLength >> 2);
// we do not care about the current contents
bool_t doCopyArray = FALSE;
UBool doCopyArray = FALSE;
for(;;) {
if(!cloneArrayIfNeeded(arraySize, arraySize, doCopyArray)) {
setToBogus();
@ -1353,10 +1353,10 @@ UnicodeString::getUChars() const {
//========================================
// Miscellaneous
//========================================
bool_t
UBool
UnicodeString::cloneArrayIfNeeded(int32_t newCapacity,
int32_t growCapacity,
bool_t doCopyArray,
UBool doCopyArray,
int32_t **pBufferToDelete) {
// default parameters need to be static, therefore
// the defaults are -1 to have convenience defaults

View file

@ -27,7 +27,7 @@ void entryClose(UResourceDataEntry *resB);
/* Static cache for already opened resource bundles - mostly for keeping fallback info */
static UHashtable *cache = NULL;
static bool_t isMutexInited = FALSE;
static UBool isMutexInited = FALSE;
static UMTX resbMutex = NULL;
/* INTERNAL: hashes an entry */
@ -37,7 +37,7 @@ int32_t hashEntry(const void *parm) {
}
/* INTERNAL: compares two entries */
bool_t compareEntries(const void *p1, const void *p2) {
UBool compareEntries(const void *p1, const void *p2) {
UResourceDataEntry *b1 = (UResourceDataEntry *)p1;
UResourceDataEntry *b2 = (UResourceDataEntry *)p2;
@ -50,7 +50,7 @@ bool_t compareEntries(const void *p1, const void *p2) {
* Internal function, gets parts of locale name according
* to the position of '_' character
*/
bool_t chopLocale(char *name) {
UBool chopLocale(char *name) {
char *i = uprv_strrchr(name, '_');
if(i != NULL) {
@ -187,7 +187,7 @@ UResourceDataEntry *init_entry(const char *localeID, const char *path, UErrorCod
r->fCountExisting++; /* we just increase it's reference count */
*status = r->fBogus; /* and set returning status */
} else { /* otherwise, we'll try to construct a new entry */
bool_t result = FALSE;
UBool result = FALSE;
r = (UResourceDataEntry *) uprv_malloc(sizeof(UResourceDataEntry));
@ -265,10 +265,10 @@ UResourceDataEntry *entryOpen(const char* path, const char* localeID, UErrorCode
UResourceDataEntry *r = NULL;
UResourceDataEntry *t1 = NULL;
UResourceDataEntry *t2 = NULL;
bool_t isDefault = FALSE;
bool_t isRoot = FALSE;
bool_t hasRealData = FALSE;
bool_t hasChopped = FALSE;
UBool isDefault = FALSE;
UBool isRoot = FALSE;
UBool hasRealData = FALSE;
UBool hasChopped = FALSE;
char name[96];
if(U_FAILURE(*status)) {
@ -420,7 +420,7 @@ UResourceBundle *init_resb_result(const ResourceData *rdata, const Resource r, c
}
UResourceBundle *copyResb(UResourceBundle *r, const UResourceBundle *original) {
bool_t isStackObject;
UBool isStackObject;
if(r == original) {
return r;
}
@ -471,7 +471,7 @@ void copyResbFillIn(UResourceBundle *r, const UResourceBundle *original) {
U_CFUNC UChar** ures_listInstalledLocales(const char* path, int32_t* count) {
UChar **result;
UErrorCode status;
bool_t opres = FALSE;
UBool opres = FALSE;
ResourceData *res = (ResourceData *)uprv_malloc(sizeof(ResourceData));
opres = res_load(res, path, kIndexLocaleName, &status);
@ -587,7 +587,7 @@ U_CAPI void U_EXPORT2 ures_resetIterator(UResourceBundle *resB){
resB->fIndex = -1;
}
U_CAPI bool_t U_EXPORT2 ures_hasNext(UResourceBundle *resB) {
U_CAPI UBool U_EXPORT2 ures_hasNext(UResourceBundle *resB) {
if(resB == NULL) {
return FALSE;
}

View file

@ -164,7 +164,7 @@ _res_findTableIndex(const Resource *pRoot, const Resource res, const char *key)
}
}
static bool_t
static UBool
_res_isStringArray(Resource *r) {
int32_t count=*(int32_t *)r;
@ -180,7 +180,7 @@ _res_isStringArray(Resource *r) {
/* helper for res_load() ---------------------------------------------------- */
static bool_t
static UBool
isAcceptable(void *context,
const char *type, const char *name,
const UDataInfo *pInfo) {
@ -198,7 +198,7 @@ isAcceptable(void *context,
/* semi-public functions ---------------------------------------------------- */
U_CFUNC bool_t
U_CFUNC UBool
res_load(ResourceData *pResData,
const char *path, const char *name, UErrorCode *errorCode) {
if(errorCode==NULL || U_FAILURE(*errorCode)) {

View file

@ -73,7 +73,7 @@ typedef struct {
* Load a resource bundle file.
* The ResourceData structure must be allocated externally.
*/
U_CFUNC bool_t
U_CFUNC UBool
res_load(ResourceData *pResData,
const char *path, const char *name, UErrorCode *errorCode);

View file

@ -51,9 +51,9 @@ struct UResourceDataEntry {
struct UResourceBundle {
const char *fKey; /*tag*/
char *fVersion;
bool_t fHasFallback;
bool_t fIsTopLevel;
bool_t fIsStackObject;
UBool fHasFallback;
UBool fIsTopLevel;
UBool fIsStackObject;
UResourceDataEntry *fData; /*for low-level access*/
int32_t fIndex;
int32_t fSize;
@ -67,7 +67,7 @@ U_CFUNC const char* ures_getRealLocale(const UResourceBundle* resourceBundle, UE
/*U_CFUNC UChar** ures_listInstalledLocales(const char *path, int32_t* count);*/
U_CFUNC const ResourceData *getFallbackData(const UResourceBundle* resBundle, const char* * resTag, Resource *res, UErrorCode *status);
U_CFUNC int32_t hashBundle(const void *parm);
U_CFUNC bool_t compareBundles(const void *p1, const void *p2);
U_CFUNC UBool compareBundles(const void *p1, const void *p2);
/* Candidates for export */
U_CFUNC UResourceBundle *copyResb(UResourceBundle *r, const UResourceBundle *original);

View file

@ -74,7 +74,7 @@ utf8_errorValue[6]={
};
U_CAPI UChar32 U_EXPORT2
utf8_nextCharSafeBody(const uint8_t *s, UTextOffset *pi, UTextOffset length, UChar32 c, bool_t strict) {
utf8_nextCharSafeBody(const uint8_t *s, UTextOffset *pi, UTextOffset length, UChar32 c, UBool strict) {
UTextOffset i=*pi;
uint8_t count=UTF8_COUNT_TRAIL_BYTES(c);
if((i)+count<=(length)) {
@ -193,7 +193,7 @@ utf8_appendCharSafeBody(uint8_t *s, UTextOffset i, UTextOffset length, UChar32 c
}
U_CAPI UChar32 U_EXPORT2
utf8_prevCharSafeBody(const uint8_t *s, UTextOffset start, UTextOffset *pi, UChar32 c, bool_t strict) {
utf8_prevCharSafeBody(const uint8_t *s, UTextOffset start, UTextOffset *pi, UChar32 c, UBool strict) {
UTextOffset i=*pi;
uint8_t b, count=1, shift=6;

View file

@ -11,7 +11,7 @@
#include "uvector.h"
#include "cmemory.h"
bool_t UVector::outOfMemory = FALSE;
UBool UVector::outOfMemory = FALSE;
UVector::UVector(int32_t initialCapacity) :
capacity(0),
@ -86,7 +86,7 @@ void UVector::removeElementAt(int32_t index) {
}
}
bool_t UVector::removeElement(void* obj) {
UBool UVector::removeElement(void* obj) {
int32_t i = indexOf(obj);
if (i >= 0) {
removeElementAt(i);
@ -117,7 +117,7 @@ int32_t UVector::indexOf(void* obj, int32_t startIndex) const {
return -1;
}
bool_t UVector::ensureCapacity(int32_t minimumCapacity) {
UBool UVector::ensureCapacity(int32_t minimumCapacity) {
if (capacity >= minimumCapacity) {
return TRUE;
} else {
@ -147,7 +147,7 @@ UVector::Comparer UVector::setComparer(Comparer d) {
return old;
}
bool_t UVector::isOutOfMemory(void) {
UBool UVector::isOutOfMemory(void) {
return outOfMemory;
}

View file

@ -67,7 +67,7 @@
class U_COMMON_API UVector {
public:
typedef void (*Deleter)(void*);
typedef bool_t (*Comparer)(void*, void*);
typedef UBool (*Comparer)(void*, void*);
private:
int32_t count;
@ -80,7 +80,7 @@ private:
Comparer comparer;
static bool_t outOfMemory;
static UBool outOfMemory;
public:
UVector(int32_t initialCapacity = 8);
@ -107,19 +107,19 @@ public:
int32_t indexOf(void* obj, int32_t startIndex = 0) const;
bool_t contains(void* obj) const;
UBool contains(void* obj) const;
void removeElementAt(int32_t index);
bool_t removeElement(void* obj);
UBool removeElement(void* obj);
void removeAllElements();
int32_t size(void) const;
bool_t isEmpty(void) const;
UBool isEmpty(void) const;
bool_t ensureCapacity(int32_t minimumCapacity);
UBool ensureCapacity(int32_t minimumCapacity);
//------------------------------------------------------------
// New API
@ -129,7 +129,7 @@ public:
Comparer setComparer(Comparer c);
static bool_t isOutOfMemory(void);
static UBool isOutOfMemory(void);
void* operator[](int32_t index) const;
@ -180,7 +180,7 @@ public:
// It's okay not to have a virtual destructor (in UVector)
// because UStack has no special cleanup to do.
bool_t empty(void) const;
UBool empty(void) const;
void* peek(void) const;
@ -205,11 +205,11 @@ inline int32_t UVector::size(void) const {
return count;
}
inline bool_t UVector::isEmpty(void) const {
inline UBool UVector::isEmpty(void) const {
return count == 0;
}
inline bool_t UVector::contains(void* obj) const {
inline UBool UVector::contains(void* obj) const {
return indexOf(obj) >= 0;
}
@ -227,7 +227,7 @@ inline void* UVector::operator[](int32_t index) const {
// UStack inlines
inline bool_t UStack::empty(void) const {
inline UBool UStack::empty(void) const {
return isEmpty();
}

View file

@ -120,7 +120,7 @@ ufile_lookup_codepage(const char *locale)
return 0;
}
bool_t hasICUData() {
UBool hasICUData() {
UErrorCode status = U_ZERO_ERROR;
UConverter *cnv = NULL;
UResourceBundle *r = NULL;
@ -151,7 +151,7 @@ u_fopen(const char *filename,
const char *codepage)
{
UErrorCode status = U_ZERO_ERROR;
bool_t useSysCP = (locale == 0 && codepage == 0);
UBool useSysCP = (locale == 0 && codepage == 0);
UFILE *result = (UFILE*) malloc(sizeof(UFILE));
if(result == 0)
return 0;
@ -206,7 +206,7 @@ u_finit(FILE *f,
const char *codepage)
{
UErrorCode status = U_ZERO_ERROR;
bool_t useSysCP = (locale == NULL && codepage == NULL);
UBool useSysCP = (locale == NULL && codepage == NULL);
UFILE *result = (UFILE*) malloc(sizeof(UFILE));
if(result == 0)
return 0;

View file

@ -32,10 +32,10 @@
/* A UFILE */
struct UFILE {
FILE *fFile; /* the actual fs interface */
bool_t fOwnFile; /* TRUE if fFile should be closed */
UBool fOwnFile; /* TRUE if fFile should be closed */
ULocaleBundle *fBundle; /* formatters */
bool_t fOwnBundle; /* TRUE if fBundle should be deleted */
UBool fOwnBundle; /* TRUE if fBundle should be deleted */
UConverter *fConverter; /* for codeset conversion */

View file

@ -28,7 +28,7 @@ ufmt_digitvalue(UChar c)
return c - 0x0030 - (c >= 0x0041 ? (c >= 0x0061 ? 39 : 7) : 0);
}
bool_t
UBool
ufmt_isdigit(UChar c,
int32_t radix)
{
@ -45,7 +45,7 @@ ufmt_ltou(UChar *buffer,
int32_t *len,
long value,
int32_t radix,
bool_t uselower,
UBool uselower,
int32_t minDigits)
{
int32_t length = 0;
@ -114,7 +114,7 @@ ufmt_utol(const UChar *buffer,
return result;
}
bool_t
UBool
ufmt_isws(UChar c)
{
return (c == 0x0020 || /* space */

View file

@ -77,7 +77,7 @@ ufmt_digitvalue(UChar c);
* @param radix The desired radix.
* @return TRUE if <TT>c</TT> is a digit in <TT>radix</TT>, FALSE otherwise.
*/
bool_t
UBool
ufmt_isdigit(UChar c,
int32_t radix);
@ -97,7 +97,7 @@ ufmt_ltou(UChar *buffer,
int32_t *len,
long value,
int32_t radix,
bool_t uselower,
UBool uselower,
int32_t minDigits);
/**
@ -121,7 +121,7 @@ ufmt_utol(const UChar *buffer,
* form-feed (U+000C), or any other Unicode-defined space, line, or paragraph
* separator.
*/
bool_t
UBool
ufmt_isws(UChar c);
/**

View file

@ -36,7 +36,7 @@
u_printf_handler g_u_printf_handlers [256];
u_printf_info g_u_printf_infos [256];
bool_t g_u_printf_inited = FALSE;
UBool g_u_printf_inited = FALSE;
/* buffer size for formatting */
#define UFPRINTF_BUFFER_SIZE 1024
@ -337,7 +337,7 @@ u_printf_hex_handler(UFILE *stream,
/* format the number, preserving the minimum # of digits */
ufmt_ltou(result, &len, num, 16,
(bool_t)(info->fSpec == 0x0078),
(UBool)(info->fSpec == 0x0078),
(info->fPrecision == -1 && info->fZero) ? info->fWidth : info->fPrecision);
/* convert to alt form, if desired */
@ -1264,7 +1264,7 @@ u_printf_scidbl_handler(UFILE *stream,
const ufmt_args *args)
{
double num = (double)(args[0].doubleValue);
bool_t useE;
UBool useE;
/* a precision of 0 is taken as 1 */
if(info->fPrecision == 0)

View file

@ -34,16 +34,16 @@ struct u_printf_spec_info {
UChar fPadChar; /* Padding character */
bool_t fAlt; /* # flag */
bool_t fSpace; /* Space flag */
bool_t fLeft; /* - flag */
bool_t fShowSign; /* + flag */
bool_t fZero; /* 0 flag */
UBool fAlt; /* # flag */
UBool fSpace; /* Space flag */
UBool fLeft; /* - flag */
UBool fShowSign; /* + flag */
UBool fZero; /* 0 flag */
bool_t fIsLongDouble; /* L flag */
bool_t fIsShort; /* h flag */
bool_t fIsLong; /* l flag */
bool_t fIsLongLong; /* ll flag */
UBool fIsLongDouble; /* L flag */
UBool fIsShort; /* h flag */
UBool fIsLong; /* l flag */
UBool fIsLongLong; /* ll flag */
};
typedef struct u_printf_spec_info u_printf_spec_info;

View file

@ -37,7 +37,7 @@
u_scanf_handler g_u_scanf_handlers [256];
u_scanf_info g_u_scanf_infos [256];
bool_t g_u_scanf_inited = FALSE;
UBool g_u_scanf_inited = FALSE;
int32_t
u_fscanf( UFILE *f,
@ -531,7 +531,7 @@ u_scanf_scidbl_handler(UFILE *stream,
int32_t scientificParsePos = 0, genericParsePos = 0;
UErrorCode scientificStatus = U_ZERO_ERROR;
UErrorCode genericStatus = U_ZERO_ERROR;
bool_t useScientific;
UBool useScientific;
/* since we can't determine by scanning the characters whether */
@ -1161,7 +1161,7 @@ u_scanf_scanset_handler(UFILE *stream,
{
u_scanf_scanset scanset;
int32_t len;
bool_t success;
UBool success;
UChar c;
const UChar *source;
UConverter *conv;

View file

@ -32,10 +32,10 @@ struct u_scanf_spec_info {
UChar fPadChar; /* Padding character */
bool_t fIsLongDouble; /* L flag */
bool_t fIsShort; /* h flag */
bool_t fIsLong; /* l flag */
bool_t fIsLongLong; /* ll flag */
UBool fIsLongDouble; /* L flag */
UBool fIsShort; /* h flag */
UBool fIsLong; /* l flag */
UBool fIsLongLong; /* ll flag */
};
typedef struct u_scanf_spec_info u_scanf_spec_info;

View file

@ -27,7 +27,7 @@
struct u_scanf_spec {
u_scanf_spec_info fInfo; /* Information on this spec */
int32_t fArgPos; /* Position of data in arg list */
bool_t fSkipArg; /* TRUE if arg should be skipped */
UBool fSkipArg; /* TRUE if arg should be skipped */
};
typedef struct u_scanf_spec u_scanf_spec;

View file

@ -19,7 +19,7 @@
#include "uscanset.h"
bool_t
UBool
u_scanf_scanset_add(u_scanf_scanset *scanset,
UChar c)
{
@ -32,7 +32,7 @@ u_scanf_scanset_add(u_scanf_scanset *scanset,
return TRUE;
}
bool_t
UBool
u_scanf_scanset_addrange(u_scanf_scanset *scanset,
UChar start,
UChar end)
@ -48,7 +48,7 @@ u_scanf_scanset_addrange(u_scanf_scanset *scanset,
return TRUE;
}
bool_t
UBool
u_scanf_scanset_init(u_scanf_scanset *scanset,
const UChar *s,
int32_t *len)
@ -56,7 +56,7 @@ u_scanf_scanset_init(u_scanf_scanset *scanset,
UChar c;
const UChar *limit;
int32_t count;
bool_t result;
UBool result;
/* set up parameters */
@ -126,7 +126,7 @@ u_scanf_scanset_init(u_scanf_scanset *scanset,
return result;
}
bool_t
UBool
u_scanf_scanset_in(u_scanf_scanset *scanset,
UChar c)
{

View file

@ -37,7 +37,7 @@ typedef struct u_scanf_scanset_pair u_scanf_scanset_pair;
* Struct representing a scanset
*/
struct u_scanf_scanset {
bool_t is_inclusive; /* false if '^' is given */
UBool is_inclusive; /* false if '^' is given */
UChar singles [U_SCANF_MAX_SCANSET_SIZE];
u_scanf_scanset_pair pairs [U_SCANF_MAX_SCANSET_SIZE];
@ -55,7 +55,7 @@ typedef struct u_scanf_scanset u_scanf_scanset;
* a pointer to the number of characters parsed, excluding the final ']'
* @return TRUE if successful, FALSE otherwise.
*/
bool_t
UBool
u_scanf_scanset_init(u_scanf_scanset *scanset,
const UChar *s,
int32_t *len);
@ -66,7 +66,7 @@ u_scanf_scanset_init(u_scanf_scanset *scanset,
* @param c The UChar to test.
* @return TRUE if the UChar is in the scanset, FALSE otherwise
*/
bool_t
UBool
u_scanf_scanset_in(u_scanf_scanset *scanset,
UChar c);

View file

@ -30,7 +30,7 @@ static const UChar DELIMITERS [] = { 0x000A, 0x0000 };
#define DELIM_CR 0x000D
#define DELIM_LF 0x000A
#define IS_STRING_DELIMITER(s) (bool_t)( (s) == DELIM_CR || \
#define IS_STRING_DELIMITER(s) (UBool)( (s) == DELIM_CR || \
(s) == DELIM_LF )

View file

@ -179,7 +179,7 @@ BreakDictionary::at(int32_t row, int32_t col) const
* Given (logical) row and column numbers, returns true if the
* cell in that position is populated
*/
bool_t
UBool
BreakDictionary::cellIsPopulated(int32_t row, int32_t col) const
{
// look up the entry in the bitmap index for the specified row.

View file

@ -144,7 +144,7 @@ private:
* Given (logical) row and column numbers, returns true if the
* cell in that position is populated
*/
bool_t cellIsPopulated(int32_t row, int32_t col) const;
UBool cellIsPopulated(int32_t row, int32_t col) const;
/**
* Implementation of at() when we know the specified cell is populated.

View file

@ -245,7 +245,7 @@ Calendar::createInstance(const TimeZone& zone, const Locale& aLocale, UErrorCode
// -------------------------------------
bool_t
UBool
Calendar::operator==(const Calendar& that) const
{
UErrorCode status = U_ZERO_ERROR;
@ -284,7 +284,7 @@ Calendar::operator==(const Calendar& that) const
// -------------------------------------
bool_t
UBool
Calendar::equals(const Calendar& when, UErrorCode& status) const
{
return (this == &when ||
@ -293,7 +293,7 @@ Calendar::equals(const Calendar& when, UErrorCode& status) const
// -------------------------------------
bool_t
UBool
Calendar::before(const Calendar& when, UErrorCode& status) const
{
return (this != &when &&
@ -302,7 +302,7 @@ Calendar::before(const Calendar& when, UErrorCode& status) const
// -------------------------------------
bool_t
UBool
Calendar::after(const Calendar& when, UErrorCode& status) const
{
return (this != &when &&
@ -310,7 +310,7 @@ Calendar::after(const Calendar& when, UErrorCode& status) const
}
// {sfb} not in Java API, but looks similar to operator==
bool_t
UBool
Calendar::equivalentTo(const Calendar& other) const
{
// Return true if another Calendar object is equivalent to this one. An equivalent
@ -469,7 +469,7 @@ Calendar::clear(EDateFields field)
// -------------------------------------
bool_t
UBool
Calendar::isSet(EDateFields field) const
{
return fStamp[field] != kUnset;
@ -534,14 +534,14 @@ Calendar::orphanTimeZone()
// -------------------------------------
void
Calendar::setLenient(bool_t lenient)
Calendar::setLenient(UBool lenient)
{
fLenient = lenient;
}
// -------------------------------------
bool_t
UBool
Calendar::isLenient() const
{
return fLenient;

View file

@ -175,7 +175,7 @@ SpecialMapping TextBoundaryData::kCharacterExceptionChar[] = {
const int32_t TextBoundaryData::kCharacterExceptionChar_length =
sizeof(TextBoundaryData::kCharacterExceptionChar) / sizeof(TextBoundaryData::kCharacterExceptionChar[0]);
const bool_t TextBoundaryData::kCharacterExceptionFlags[] = {
const UBool TextBoundaryData::kCharacterExceptionFlags[] = {
FALSE, // kNonCharacter = 0,
FALSE, // kUppercaseLetter = 1,
FALSE, // kLowercaseLetter = 2,

View file

@ -18,7 +18,7 @@
* wchar.h.
* 07/09/97 helena Made ParsePosition into a class.
* 08/06/97 nos removed overloaded constructor, fixed 'format(array)'
* 07/22/98 stephen JDK 1.2 Sync - removed bool_t array (doubleFlags)
* 07/22/98 stephen JDK 1.2 Sync - removed UBool array (doubleFlags)
* 02/22/99 stephen Removed character literals for EBCDIC safety
********************************************************************************
*/
@ -75,7 +75,7 @@ ChoiceFormat::ChoiceFormat(const ChoiceFormat& that)
// -------------------------------------
bool_t
UBool
ChoiceFormat::operator==(const Format& that) const
{
if (this == &that) return TRUE;
@ -239,7 +239,7 @@ ChoiceFormat::applyPattern(const UnicodeString& newPattern,
int32_t part = 0;
double startValue = 0;
double oldStartValue = uprv_getNaN();
bool_t inQuote = FALSE;
UBool inQuote = FALSE;
for(int i = 0; i < newPattern.length(); ++i) {
UChar ch = newPattern[i];
if(ch == 0x0027 /*'\''*/) {
@ -358,7 +358,7 @@ ChoiceFormat::toPattern(UnicodeString& result) const
// Append fChoiceFormats[i], using quotes if there are special characters.
// Single quotes themselves must be escaped in either case.
UnicodeString text = fChoiceFormats[i];
bool_t needQuote = text.indexOf((UChar)0x003C /*'<'*/) >= 0
UBool needQuote = text.indexOf((UChar)0x003C /*'<'*/) >= 0
|| text.indexOf((UChar)0x0023 /*'#'*/) >= 0
|| text.indexOf((UChar32)0x2264) >= 0
|| text.indexOf((UChar)0x007C /*'|'*/) >= 0;
@ -573,7 +573,7 @@ ChoiceFormat::clone() const
// -------------------------------------
double
ChoiceFormat::nextDouble( double d, bool_t positive )
ChoiceFormat::nextDouble( double d, UBool positive )
{
return uprv_nextDouble( d, positive );
}

View file

@ -183,7 +183,7 @@ CollationElementIterator::~CollationElementIterator()
delete reorderBuffer;
}
bool_t
UBool
CollationElementIterator::operator==(const CollationElementIterator& that) const
{
if (this == &that)
@ -215,7 +215,7 @@ CollationElementIterator::operator==(const CollationElementIterator& that) const
return TRUE;
}
bool_t
UBool
CollationElementIterator::operator!=(const CollationElementIterator& other) const
{
return !(*this == other);
@ -598,7 +598,7 @@ int32_t CollationElementIterator::prevContractChar(UChar ch,
VectorOfInt* CollationElementIterator::makeReorderedBuffer(UChar colFirst,
int32_t lastValue,
VectorOfInt* lastExpansion,
bool_t forward,
UBool forward,
UErrorCode& status) {
VectorOfInt* result;

View file

@ -123,19 +123,19 @@ Collator::createInstance(const Locale& desiredLocale,
return collation;
}
bool_t
UBool
Collator::equals(const UnicodeString& source,
const UnicodeString& target) const
{
return (compare(source, target) == Collator::EQUAL);
}
bool_t
UBool
Collator::greaterOrEqual(const UnicodeString& source,
const UnicodeString& target) const
{
return (compare(source, target) != Collator::LESS);
}
bool_t
UBool
Collator::greater(const UnicodeString& source,
const UnicodeString& target) const
{

View file

@ -261,7 +261,7 @@ void CompoundTransliterator::adoptFilter(UnicodeFilter* f) {
* Implements {@link Transliterator#handleTransliterate}.
*/
void CompoundTransliterator::handleTransliterate(Replaceable& text, Position& index,
bool_t incremental) const {
UBool incremental) const {
/* Call each transliterator with the same start value and
* initial cursor index, but with the limit index as modified
* by preceding transliterators. The cursor index must be

View file

@ -68,7 +68,7 @@ DateFormat::~DateFormat()
//----------------------------------------------------------------------
bool_t
UBool
DateFormat::operator==(const Format& other) const
{
// This protected comparison operator should only be called by subclasses
@ -348,14 +348,14 @@ DateFormat::getTimeZone() const
//----------------------------------------------------------------------
void
DateFormat::setLenient(bool_t lenient)
DateFormat::setLenient(UBool lenient)
{
fCalendar->setLenient(lenient);
}
//----------------------------------------------------------------------
bool_t
UBool
DateFormat::isLenient() const
{
return fCalendar->isLenient();

View file

@ -302,7 +302,7 @@ DictionaryBasedBreakIterator::divideUpDictionaryRange(int32_t startPos, int32_t
// the character where the error occurred.
int32_t farthestEndPoint = text->getIndex();
UStack bestBreakPositions;
bool_t bestBreakPositionsInitialized = FALSE;
UBool bestBreakPositionsInitialized = FALSE;
// initialize (we always exit the loop with a break statement)
c = text->current();

Some files were not shown because too many files have changed in this diff Show more