ICU-3132 change le_bool back to UBool, and uppercase true and false; some lame-o C++ compilers don't implement bool.

X-SVN-Rev: 14039
This commit is contained in:
Eric Mader 2003-12-08 22:43:41 +00:00
parent 2a2724559f
commit c68a5bdf67
36 changed files with 176 additions and 176 deletions

View file

@ -127,7 +127,7 @@ void ArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], l
} else if (fGDEFTable != NULL) {
GDEFMarkFilter filter(fGDEFTable);
adjustMarkGlyphs(glyphs, glyphCount, false, &filter, positions, success);
adjustMarkGlyphs(glyphs, glyphCount, FALSE, &filter, positions, success);
} else {
GlyphDefinitionTableHeader *gdefTable = (GlyphDefinitionTableHeader *) ArabicShaping::glyphDefinitionTable;
GDEFMarkFilter filter(gdefTable);
@ -206,7 +206,7 @@ le_int32 UnicodeArabicOpenTypeLayoutEngine::glyphPostProcessing(LEGlyphID tempGl
charIndices = tempCharIndices;
ArabicOpenTypeLayoutEngine::mapCharsToGlyphs(tempChars, 0, tempGlyphCount, false, true, glyphs, charIndices, success);
ArabicOpenTypeLayoutEngine::mapCharsToGlyphs(tempChars, 0, tempGlyphCount, FALSE, TRUE, glyphs, charIndices, success);
LE_DELETE_ARRAY(tempChars);

View file

@ -99,7 +99,7 @@ protected:
* @param offset - the index of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
* @param rightToLeft - true if the characters are in a right to left directional run
* @param rightToLeft - TRUE if the characters are in a right to left directional run
*
* Output parameters:
* @param outChars - the output character arrayt
@ -123,7 +123,7 @@ protected:
* @param chars - the input character context
* @param offset - the offset of the first character to process
* @param count - the number of characters to process
* @param reverse - true if the glyphs in the glyph array have been reordered
* @param reverse - TRUE if the glyphs in the glyph array have been reordered
* @param glyphs - the input glyph array
* @param glyphCount - the number of glyphs
* @param positions - the position array, will be updated as needed
@ -210,8 +210,8 @@ protected:
* @param chars - the input character context
* @param offset - the offset of the first character to be mapped
* @param count - the number of characters to be mapped
* @param reverse - if true, the output will be in reverse order
* @param mirror - if true, do character mirroring
* @param reverse - if TRUE, the output will be in reverse order
* @param mirror - if TRUE, do character mirroring
*
* Output parameters:
* @param glyphs - the glyph array
@ -231,7 +231,7 @@ protected:
* @param chars - the input character context
* @param offset - the offset of the first character to process
* @param count - the number of characters to process
* @param reverse - true if the glyphs in the glyph array have been reordered
* @param reverse - TRUE if the glyphs in the glyph array have been reordered
* @param glyphs - the input glyph array
* @param glyphCount - the number of glyphs
* @param positions - the position array, will be updated as needed

View file

@ -150,7 +150,7 @@ void ArabicShaping::shape(const LEUnicode *chars, le_int32 offset, le_int32 char
// erout is effective right logical index
le_int32 erout = -1;
le_bool rightShapes = false;
le_bool rightShapes = FALSE;
le_bool rightCauses = (rightType & MASK_SHAPE_LEFT) != 0;
le_int32 in, e, out = 0, dir = 1;

View file

@ -83,11 +83,11 @@ le_bool ClassDefFormat1Table::hasGlyphClass(le_int32 glyphClass) const
for (i = 0; i < count; i += 1) {
if (SWAPW(classValueArray[i]) == glyphClass) {
return true;
return TRUE;
}
}
return false;
return FALSE;
}
le_int32 ClassDefFormat2Table::getGlyphClass(LEGlyphID glyphID) const
@ -111,11 +111,11 @@ le_bool ClassDefFormat2Table::hasGlyphClass(le_int32 glyphClass) const
for (i = 0; i < rangeCount; i += 1) {
if (SWAPW(classRangeRecordArray[i].rangeValue) == glyphClass) {
return true;
return TRUE;
}
}
return false;
return FALSE;
}
U_NAMESPACE_END

View file

@ -57,20 +57,20 @@ le_bool ContextualSubstitutionBase::matchGlyphIDs(const TTGlyphID *glyphArray, l
while (glyphCount > 0) {
if (! glyphIterator->next()) {
return false;
return FALSE;
}
TTGlyphID glyph = (TTGlyphID) glyphIterator->getCurrGlyphID();
if (glyph != SWAPW(glyphArray[match])) {
return false;
return FALSE;
}
glyphCount -= 1;
match += direction;
}
return true;
return TRUE;
}
le_bool ContextualSubstitutionBase::matchGlyphClasses(const le_uint16 *classArray, le_uint16 glyphCount,
@ -88,7 +88,7 @@ le_bool ContextualSubstitutionBase::matchGlyphClasses(const le_uint16 *classArra
while (glyphCount > 0) {
if (! glyphIterator->next()) {
return false;
return FALSE;
}
LEGlyphID glyph = glyphIterator->getCurrGlyphID();
@ -101,7 +101,7 @@ le_bool ContextualSubstitutionBase::matchGlyphClasses(const le_uint16 *classArra
// table. If we're looking for such a class, pretend that
// we found it.
if (classDefinitionTable->hasGlyphClass(matchClass)) {
return false;
return FALSE;
}
}
@ -109,7 +109,7 @@ le_bool ContextualSubstitutionBase::matchGlyphClasses(const le_uint16 *classArra
match += direction;
}
return true;
return TRUE;
}
le_bool ContextualSubstitutionBase::matchGlyphCoverages(const Offset *coverageTableOffsetArray, le_uint16 glyphCount,
@ -128,18 +128,18 @@ le_bool ContextualSubstitutionBase::matchGlyphCoverages(const Offset *coverageTa
const CoverageTable *coverageTable = (const CoverageTable *) (offsetBase + coverageTableOffset);
if (! glyphIterator->next()) {
return false;
return FALSE;
}
if (coverageTable->getGlyphCoverage((LEGlyphID) glyphIterator->getCurrGlyphID()) < 0) {
return false;
return FALSE;
}
glyphCount -= 1;
glyph += direction;
}
return true;
return TRUE;
}
le_uint32 ContextualSubstitutionSubtable::process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator,
@ -364,7 +364,7 @@ le_uint32 ChainingContextualSubstitutionFormat1Subtable::process(const LookupPro
}
tempIterator.prev();
if (! matchGlyphIDs(chainSubRuleTable->backtrackGlyphArray, backtrackGlyphCount, &tempIterator, true)) {
if (! matchGlyphIDs(chainSubRuleTable->backtrackGlyphArray, backtrackGlyphCount, &tempIterator, TRUE)) {
continue;
}
@ -438,7 +438,7 @@ le_uint32 ChainingContextualSubstitutionFormat2Subtable::process(const LookupPro
tempIterator.prev();
if (! matchGlyphClasses(chainSubClassRuleTable->backtrackClassArray, backtrackGlyphCount,
&tempIterator, backtrackClassDefinitionTable, true)) {
&tempIterator, backtrackClassDefinitionTable, TRUE)) {
continue;
}
@ -485,7 +485,7 @@ le_uint32 ChainingContextualSubstitutionFormat3Subtable::process(const LookupPro
tempIterator.prev();
if (! ContextualSubstitutionBase::matchGlyphCoverages(backtrackCoverageTableOffsetArray,
backtrkGlyphCount, &tempIterator, (const char *) this, true)) {
backtrkGlyphCount, &tempIterator, (const char *) this, TRUE)) {
return 0;
}

View file

@ -32,15 +32,15 @@ struct ContextualSubstitutionBase : GlyphSubstitutionSubtable
{
static le_bool matchGlyphIDs(
const TTGlyphID *glyphArray, le_uint16 glyphCount, GlyphIterator *glyphIterator,
le_bool backtrack = false);
le_bool backtrack = FALSE);
static le_bool matchGlyphClasses(
const le_uint16 *classArray, le_uint16 glyphCount, GlyphIterator *glyphIterator,
const ClassDefinitionTable *classDefinitionTable, le_bool backtrack = false);
const ClassDefinitionTable *classDefinitionTable, le_bool backtrack = FALSE);
static le_bool matchGlyphCoverages(
const Offset *coverageTableOffsetArray, le_uint16 glyphCount,
GlyphIterator *glyphIterator, const char *offsetBase, le_bool backtrack = false);
GlyphIterator *glyphIterator, const char *offsetBase, le_bool backtrack = FALSE);
static void applySubstitutionLookups(
const LookupProcessor *lookupProcessor,

View file

@ -39,7 +39,7 @@ le_int32 GXLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset,
return 0;
}
mapCharsToGlyphs(chars, offset, count, false, rightToLeft, glyphs, charIndices, success);
mapCharsToGlyphs(chars, offset, count, FALSE, rightToLeft, glyphs, charIndices, success);
if (LE_FAILURE(success)) {
return 0;

View file

@ -90,7 +90,7 @@ protected:
* @param offset - the index of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
* @param rightToLeft - true if the text is in a right to left directional run
* @param rightToLeft - TRUE if the text is in a right to left directional run
*
* Output parameters:
* @param glyphs - the glyph index array

View file

@ -73,11 +73,11 @@ le_bool InsertionList::applyInsertions(InsertionCallback *callback)
{
for (InsertionRecord *rec = head; rec != NULL; rec = rec->next) {
if (callback->applyInsertion(rec->position, rec->count, rec->glyphs)) {
return true;
return TRUE;
}
}
return false;
return FALSE;
}
GlyphIterator::GlyphIterator(LEGlyphID *&theGlyphs, GlyphPositionAdjustment *theGlyphPositionAdjustments, le_int32 *&theCharIndices, le_int32 theGlyphCount,
@ -86,7 +86,7 @@ GlyphIterator::GlyphIterator(LEGlyphID *&theGlyphs, GlyphPositionAdjustment *the
: direction(1), position(-1), nextLimit(theGlyphCount), prevLimit(-1),
cursiveFirstPosition(-1), cursiveLastPosition(-1), cursiveBaselineAdjustment(0),
glyphsRef(&theGlyphs), glyphs(theGlyphs), glyphPositionAdjustments(theGlyphPositionAdjustments),
charIndicesRef(&theCharIndices), charIndices(theCharIndices), glyphCount(theGlyphCount), insertionList(NULL), ownInsertionList(true), srcIndex(-1), destIndex(-1),
charIndicesRef(&theCharIndices), charIndices(theCharIndices), glyphCount(theGlyphCount), insertionList(NULL), ownInsertionList(TRUE), srcIndex(-1), destIndex(-1),
lookupFlags(theLookupFlags), featureTag(theFeatureTag), glyphTagsRef(&theGlyphTags), glyphTags(theGlyphTags),
glyphClassDefinitionTable(NULL),
markAttachClassDefinitionTable(NULL)
@ -125,7 +125,7 @@ GlyphIterator::GlyphIterator(GlyphIterator &that)
charIndices = that.charIndices;
glyphCount = that.glyphCount;
insertionList = that.insertionList;
ownInsertionList = false;
ownInsertionList = FALSE;
srcIndex = that.srcIndex;
destIndex = that.destIndex;
lookupFlags = that.lookupFlags;
@ -153,7 +153,7 @@ GlyphIterator::GlyphIterator(GlyphIterator &that, LETag newFeatureTag)
charIndices = that.charIndices;
glyphCount = that.glyphCount;
insertionList = that.insertionList;
ownInsertionList = false;
ownInsertionList = FALSE;
srcIndex = that.srcIndex;
destIndex = that.destIndex;
lookupFlags = that.lookupFlags;
@ -182,7 +182,7 @@ GlyphIterator::GlyphIterator(GlyphIterator &that, le_uint16 newLookupFlags)
charIndices = that.charIndices;
glyphCount = that.glyphCount;
insertionList = that.insertionList;
ownInsertionList = false;
ownInsertionList = FALSE;
srcIndex = that.srcIndex;
destIndex = that.destIndex;
lookupFlags = newLookupFlags;
@ -283,7 +283,7 @@ le_bool GlyphIterator::applyInsertion(le_int32 atPosition, le_int32 count, LEGly
// just got replaced by the insertion
srcIndex -= 1;
return false;
return FALSE;
}
le_int32 GlyphIterator::getCurrStreamPosition() const
@ -561,7 +561,7 @@ le_bool GlyphIterator::filterGlyph(le_uint32 index) const
le_int32 glyphClass = gcdNoGlyphClass;
if (LE_GET_GLYPH(glyphID) >= 0xFFFE) {
return true;
return TRUE;
}
if (glyphClassDefinitionTable != NULL) {
@ -571,7 +571,7 @@ le_bool GlyphIterator::filterGlyph(le_uint32 index) const
switch (glyphClass)
{
case gcdNoGlyphClass:
return false;
return FALSE;
case gcdSimpleGlyph:
return (lookupFlags & lfIgnoreBaseGlyphs) != 0;
@ -582,7 +582,7 @@ le_bool GlyphIterator::filterGlyph(le_uint32 index) const
case gcdMarkGlyph:
{
if ((lookupFlags & lfIgnoreMarks) != 0) {
return true;
return TRUE;
}
le_uint16 markAttachType = (lookupFlags & lfMarkAttachTypeMask) >> lfMarkAttachTypeShift;
@ -591,14 +591,14 @@ le_bool GlyphIterator::filterGlyph(le_uint32 index) const
return markAttachClassDefinitionTable->getGlyphClass(glyphID) != markAttachType;
}
return false;
return FALSE;
}
case gcdComponentGlyph:
return (lookupFlags & lfIgnoreBaseGlyphs) != 0;
default:
return false;
return FALSE;
}
}
@ -608,7 +608,7 @@ const LETag defaultTag = 0xFFFFFFFF;
le_bool GlyphIterator::hasFeatureTag() const
{
if (featureTag == defaultTag || featureTag == emptyTag) {
return true;
return TRUE;
}
if (glyphTags != NULL) {
@ -616,12 +616,12 @@ le_bool GlyphIterator::hasFeatureTag() const
for (le_int32 tag = 0; tagList[tag] != emptyTag; tag += 1) {
if (tagList[tag] == featureTag) {
return true;
return TRUE;
}
}
}
return false;
return FALSE;
}
le_bool GlyphIterator::findFeatureTag()
@ -629,11 +629,11 @@ le_bool GlyphIterator::findFeatureTag()
while (nextInternal()) {
if (hasFeatureTag()) {
prevInternal();
return true;
return TRUE;
}
}
return false;
return FALSE;
}

View file

@ -39,7 +39,7 @@ le_bool GlyphSubstitutionTableHeader::coversScriptAndLanguage(LETag scriptTag, L
{
const ScriptListTable *scriptListTable = (const ScriptListTable *) ((char *)this + SWAPW(scriptListOffset));
return scriptListTable->findLanguage(scriptTag, languageTag, true) != NULL;
return scriptListTable->findLanguage(scriptTag, languageTag, TRUE) != NULL;
}
U_NAMESPACE_END

View file

@ -4,7 +4,7 @@
*
* (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved.
*
* $Source: /xsrl/Nsvn/icu/icu/source/layout/HanLayoutEngine.h,v $ $Date: 2003/11/26 00:19:39 $ $Revision: 1.4 $
* $Source: /xsrl/Nsvn/icu/icu/source/layout/HanLayoutEngine.h,v $ $Date: 2003/12/08 22:41:38 $ $Revision: 1.5 $
*/
#ifndef __HANLAYOUTENGINE_H
@ -82,7 +82,7 @@ protected:
* @param offset - the index of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
* @param rightToLeft - true if the characters are in a right to left directional run
* @param rightToLeft - TRUE if the characters are in a right to left directional run
*
* Output parameters:
* @param outChars - the output character arrayt

View file

@ -108,7 +108,7 @@ protected:
* @param offset - the index of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
* @param rightToLeft - true if the characters are in a right to left directional run
* @param rightToLeft - TRUE if the characters are in a right to left directional run
*
* Output parameters:
* @param outChars - the output character arrayt
@ -137,7 +137,7 @@ protected:
* @param offset - the index of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
* @param rightToLeft - true if the characters are in a right to left directional run
* @param rightToLeft - TRUE if the characters are in a right to left directional run
* @param featureTags - the feature tag array
*
* Output parameters:

View file

@ -2,8 +2,8 @@
* (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
*
* $Source: /xsrl/Nsvn/icu/icu/source/layout/IndicReordering.cpp,v $
* $Date: 2003/06/03 20:58:21 $
* $Revision: 1.13 $
* $Date: 2003/12/08 22:41:38 $
* $Revision: 1.14 $
*
*/
@ -319,8 +319,8 @@ le_int32 IndicReordering::reorder(const LEUnicode *chars, le_int32 charCount, le
le_int32 baseConsonant = lastConsonant;
le_int32 postBase = lastConsonant + 1;
le_int32 postBaseLimit = classTable->scriptFlags & IndicClassTable::SF_POST_BASE_LIMIT_MASK;
le_bool seenVattu = false;
le_bool seenBelowBaseForm = false;
le_bool seenVattu = FALSE;
le_bool seenBelowBaseForm = FALSE;
while (baseConsonant > baseLimit) {
IndicClassTable::CharClass charClass = classTable->getCharClass(chars[baseConsonant]);
@ -341,7 +341,7 @@ le_int32 IndicReordering::reorder(const LEUnicode *chars, le_int32 charCount, le
postBase = baseConsonant;
} else if (IndicClassTable::hasBelowBaseForm(charClass)) {
seenBelowBaseForm = true;
seenBelowBaseForm = TRUE;
}
postBaseLimit -= 1;
@ -362,7 +362,7 @@ le_int32 IndicReordering::reorder(const LEUnicode *chars, le_int32 charCount, le
}
// write any pre-base consonants
le_bool supressVattu = true;
le_bool supressVattu = TRUE;
for (i = baseLimit; i < baseConsonant; i += 1) {
LEUnicode ch = chars[i];

View file

@ -161,12 +161,12 @@ public:
* to glyph mapping.
*
* The default implementation of this method will return
* <code>true</code> if <code>mapCharToGlyph(ch)</code>
* <code>TRUE</code> if <code>mapCharToGlyph(ch)</code>
* returns a non-zero value.
*
* @param ch - the character to be tested
*
* @return true if the font can render ch.
* @return TRUE if the font can render ch.
*
* @draft ICU 2.6
*/
@ -189,7 +189,7 @@ public:
* @param chars - the character array
* @param offset - the index of the first character
* @param count - the number of characters
* @param reverse - if true, store the glyph indices in reverse order.
* @param reverse - if TRUE, store the glyph indices in reverse order.
* @param mapper - the character mapper.
* @param glyphs - the output glyph array
*
@ -251,7 +251,7 @@ public:
* @param pointNumber - the number of the point
* @param point - the point's X and Y pixel values will be stored here
*
* @return true if the point coordinates could be stored.
* @return TRUE if the point coordinates could be stored.
*
* @stable ICU 2.8
*/

View file

@ -33,7 +33,7 @@ public:
*
* @param glyph - the glyph index to be tested
*
* @return true if the glyph index is in the set.
* @return TRUE if the glyph index is in the set.
*
* @internal
*/

View file

@ -67,7 +67,7 @@ public:
* lowest address. On little endian platforms, the FF will
* be in the byte with the highest address.
*
* @return true if the platform is big endian
* @return TRUE if the platform is big endian
*
* @stable ICU 2.8
*/

View file

@ -70,7 +70,7 @@ typedef uint8_t le_uint8;
*
* @stable ICU 2.4
*/
typedef bool le_bool;
typedef UBool le_bool;
#ifndef NULL
/**

View file

@ -376,7 +376,7 @@ void LayoutEngine::mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le
}
}
DefaultCharMapper charMapper(true, mirror);
DefaultCharMapper charMapper(TRUE, mirror);
fFontInstance->mapCharsToGlyphs(chars, offset, count, reverse, &charMapper, glyphs);
}

View file

@ -163,7 +163,7 @@ protected:
* @param offset - the offset of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the context.
* @param rightToLeft - true if the text is in a right to left directional run
* @param rightToLeft - TRUE if the text is in a right to left directional run
*
* Output parameters:
* @param glyphs - the glyph index array
@ -207,7 +207,7 @@ protected:
* @param chars - the input character context
* @param offset - the offset of the first character to process
* @param count - the number of characters to process
* @param reverse - true if the glyphs in the glyph array have been reordered
* @param reverse - TRUE if the glyphs in the glyph array have been reordered
* @param glyphs - the input glyph array
* @param glyphCount - the number of glyphs
* @param positions - the position array, will be updated as needed
@ -249,8 +249,8 @@ protected:
* @param chars - the input character context
* @param offset - the offset of the first character to be mapped
* @param count - the number of characters to be mapped
* @param reverse - if true, the output will be in reverse order
* @param mirror - if true, do character mirroring
* @param reverse - if TRUE, the output will be in reverse order
* @param mirror - if TRUE, do character mirroring
*
* Output parameters:
* @param glyphs - the glyph array
@ -269,7 +269,7 @@ protected:
*
* @param glyphs - the glyph array
* @param glyphCount - the number of glyphs
* @param reverse - true if the glyph array has been reordered
* @param reverse - TRUE if the glyph array has been reordered
* @param markFilter - used to identify mark glyphs
* @param positions - the glyph position array - updated as required
* @param success - output parameter set to an error code if the operation fails
@ -300,7 +300,7 @@ public:
* @param offset - the offset of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
* @param rightToLeft - true if the characers are in a right to left directional run
* @param rightToLeft - TRUE if the characers are in a right to left directional run
* @param x - the initial X position
* @param y - the initial Y position
* @param success - output parameter set to an error code if the operation fails

View file

@ -225,7 +225,7 @@ protected:
* @param offset - the index of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
* @param rightToLeft - true if the characters are in a right to left directional run
* @param rightToLeft - TRUE if the characters are in a right to left directional run
*
* Output parameters:
* @param outChars - the output character array, if different from the input
@ -254,7 +254,7 @@ protected:
* @param offset - the index of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
* @param rightToLeft - true if the characters are in a right to left directional run
* @param rightToLeft - TRUE if the characters are in a right to left directional run
* @param featureTags - the feature tag array
*
* Output parameters:
@ -309,7 +309,7 @@ protected:
* @param offset - the index of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
* @param rightToLeft - true if the text is in a right to left directional run
* @param rightToLeft - TRUE if the text is in a right to left directional run
*
* Output parameters:
* @param glyphs - the glyph index array

View file

@ -34,7 +34,7 @@ struct ScriptTable
le_uint16 langSysCount;
LangSysRecord langSysRecordArray[ANY_NUMBER];
const LangSysTable *findLanguage(LETag languageTag, le_bool exactMatch = false) const;
const LangSysTable *findLanguage(LETag languageTag, le_bool exactMatch = FALSE) const;
};
typedef TagAndOffsetRecord ScriptRecord;
@ -45,7 +45,7 @@ struct ScriptListTable
ScriptRecord scriptRecordArray[ANY_NUMBER];
const ScriptTable *findScript(LETag scriptTag) const;
const LangSysTable *findLanguage(LETag scriptTag, LETag languageTag, le_bool exactMatch = false) const;
const LangSysTable *findLanguage(LETag scriptTag, LETag languageTag, le_bool exactMatch = FALSE) const;
};
U_NAMESPACE_END

View file

@ -83,7 +83,7 @@ le_int32 ThaiLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offse
}
glyphCount = ThaiShaping::compose(chars, offset, count, fGlyphSet, fErrorChar, outChars, charIndices);
mapCharsToGlyphs(outChars, 0, glyphCount, false, false, glyphs, charIndices, success);
mapCharsToGlyphs(outChars, 0, glyphCount, FALSE, FALSE, glyphs, charIndices, success);
LE_DELETE_ARRAY(outChars);

View file

@ -98,7 +98,7 @@ protected:
* @param offset - the index of the first character to process
* @param count - the number of characters to process
* @param max - the number of characters in the input context
* @param rightToLeft - true if the text is in a right to left directional run
* @param rightToLeft - TRUE if the text is in a right to left directional run
*
* Output parameters:
* @param glyphs - the glyph index array

View file

@ -247,16 +247,16 @@ le_bool ThaiShaping::isLegalHere(LEUnicode ch, le_uint8 prevState)
case tF:
case tG:
case tH:
return true;
return TRUE;
case tR:
case tS:
return false;
return FALSE;
default:
// FIXME: if we get here, there's an error
// in the state table!
return false;
return FALSE;
}
}

View file

@ -97,7 +97,7 @@ public:
* @param startOffset - the starting offset of the characters to process
* @param endOffset - the ending offset of the characters to process
* @param max - the number of characters in the input context
* @param rightToLeft - true if the characers are in a right to left directional run
* @param rightToLeft - TRUE if the characers are in a right to left directional run
* @param x - the initial X position
* @param y - the initial Y position
* @param success - output parameter set to an error code if the operation fails
@ -125,7 +125,7 @@ public:
* @param str - the input character context
* @param startOffset - the starting offset of the characters to process
* @param endOffset - the ending offset of the characters to process
* @param rightToLeft - true if the characers are in a right to left directional run
* @param rightToLeft - TRUE if the characers are in a right to left directional run
* @param x - the initial X position
* @param y - the initial Y position
* @param success - output parameter set to an error code if the operation fails
@ -296,7 +296,7 @@ inline int32_t ICULayoutEngine::layoutChars(const UChar chars[],
startOffset,
endOffset - startOffset,
maxOffset,
rightToLeft != 0,
rightToLeft,
x, y,
(LEErrorCode &) success);
}
@ -314,7 +314,7 @@ inline int32_t ICULayoutEngine::layoutString(const UnicodeString &str,
startOffset,
endOffset - startOffset,
str.length(),
rightToLeft != 0,
rightToLeft,
x, y,
(LEErrorCode &) success);
}

View file

@ -126,66 +126,66 @@ le_int32 StyleRuns::getRuns(le_int32 runLimits[], le_int32 styleIndices[])
}
/*
* NOTE: This table only has "true" values for
* NOTE: This table only has "TRUE" values for
* those scripts which the LayoutEngine can currently
* process, rather for all scripts which require
* complex processing for correct rendering.
*/
static const le_bool complexTable[] = {
false , /* Zyyy */
false, /* Qaai */
true, /* Arab */
false, /* Armn */
true, /* Beng */
false, /* Bopo */
false, /* Cher */
false, /* Qaac */
false, /* Cyrl */
false, /* Dsrt */
true, /* Deva */
false, /* Ethi */
false, /* Geor */
false, /* Goth */
false, /* Grek */
true, /* Gujr */
true, /* Guru */
false, /* Hani */
false, /* Hang */
true, /* Hebr */
false, /* Hira */
true, /* Knda */
false, /* Kana */
false, /* Khmr */
false, /* Laoo */
false, /* Latn */
true, /* Mlym */
false, /* Mong */
false, /* Mymr */
false, /* Ogam */
false, /* Ital */
true, /* Orya */
false, /* Runr */
false, /* Sinh */
false, /* Syrc */
true, /* Taml */
true, /* Telu */
false, /* Thaa */
true, /* Thai */
false, /* Tibt */
false, /* Cans */
false, /* Yiii */
false, /* Tglg */
false, /* Hano */
false, /* Buhd */
false, /* Tagb */
false, /* Brai */
false, /* Cprt */
false, /* Limb */
false, /* Linb */
false, /* Osma */
false, /* Shaw */
false, /* Tale */
false /* Ugar */
FALSE , /* Zyyy */
FALSE, /* Qaai */
TRUE, /* Arab */
FALSE, /* Armn */
TRUE, /* Beng */
FALSE, /* Bopo */
FALSE, /* Cher */
FALSE, /* Qaac */
FALSE, /* Cyrl */
FALSE, /* Dsrt */
TRUE, /* Deva */
FALSE, /* Ethi */
FALSE, /* Geor */
FALSE, /* Goth */
FALSE, /* Grek */
TRUE, /* Gujr */
TRUE, /* Guru */
FALSE, /* Hani */
FALSE, /* Hang */
TRUE, /* Hebr */
FALSE, /* Hira */
TRUE, /* Knda */
FALSE, /* Kana */
FALSE, /* Khmr */
FALSE, /* Laoo */
FALSE, /* Latn */
TRUE, /* Mlym */
FALSE, /* Mong */
FALSE, /* Mymr */
FALSE, /* Ogam */
FALSE, /* Ital */
TRUE, /* Orya */
FALSE, /* Runr */
FALSE, /* Sinh */
FALSE, /* Syrc */
TRUE, /* Taml */
TRUE, /* Telu */
FALSE, /* Thaa */
TRUE, /* Thai */
FALSE, /* Tibt */
FALSE, /* Cans */
FALSE, /* Yiii */
FALSE, /* Tglg */
FALSE, /* Hano */
FALSE, /* Buhd */
FALSE, /* Tagb */
FALSE, /* Brai */
FALSE, /* Cprt */
FALSE, /* Limb */
FALSE, /* Linb */
FALSE, /* Osma */
FALSE, /* Shaw */
FALSE, /* Tale */
FALSE /* Ugar */
};
@ -220,7 +220,7 @@ ParagraphLayout::ParagraphLayout(const LEUnicode chars[], le_int32 count,
LEErrorCode &status)
: fChars(chars), fCharCount(count),
fFontRuns(NULL), fLevelRuns(levelRuns), fScriptRuns(scriptRuns), fLocaleRuns(localeRuns),
fVertical(vertical), fClientLevels(true), fClientScripts(true), fClientLocales(true), fEmbeddingLevels(NULL),
fVertical(vertical), fClientLevels(TRUE), fClientScripts(TRUE), fClientLocales(TRUE), fEmbeddingLevels(NULL),
fAscent(0), fDescent(0), fLeading(0),
fGlyphToCharMap(NULL), fCharToMinGlyphMap(NULL), fCharToMaxGlyphMap(NULL), fGlyphWidths(NULL), fGlyphCount(0),
fParaBidi(NULL), fLineBidi(NULL),
@ -363,21 +363,21 @@ ParagraphLayout::~ParagraphLayout()
delete (ValueRuns *) fLevelRuns;
fLevelRuns = NULL;
fClientLevels = true;
fClientLevels = TRUE;
}
if (! fClientScripts) {
delete (ValueRuns *) fScriptRuns;
fScriptRuns = NULL;
fClientScripts = true;
fClientScripts = TRUE;
}
if (! fClientLocales) {
delete (LocaleRuns *) fLocaleRuns;
fLocaleRuns = NULL;
fClientLocales = true;
fClientLocales = TRUE;
}
if (fEmbeddingLevels != NULL) {
@ -452,11 +452,11 @@ le_bool ParagraphLayout::isComplex(const LEUnicode chars[], le_int32 count)
while (uscript_nextRun(sr, NULL, NULL, &scriptCode)) {
if (isComplex(scriptCode)) {
return true;
return TRUE;
}
}
return false;
return FALSE;
}
le_int32 ParagraphLayout::getAscent() const
@ -567,7 +567,7 @@ void ParagraphLayout::computeLevels(UBiDiLevel paragraphLevel)
}
fLevelRuns = levelRuns;
fClientLevels = false;
fClientLevels = FALSE;
}
}
@ -586,7 +586,7 @@ void ParagraphLayout::computeScripts()
uscript_closeRun(sr);
fScriptRuns = scriptRuns;
fClientScripts = false;
fClientScripts = FALSE;
}
void ParagraphLayout::computeLocales()
@ -597,7 +597,7 @@ void ParagraphLayout::computeLocales()
localeRuns->add(defaultLocale, fCharCount);
fLocaleRuns = localeRuns;
fClientLocales = false;
fClientLocales = FALSE;
}
void ParagraphLayout::computeSubFonts(const FontRuns *fontRuns, LEErrorCode &status)
@ -756,7 +756,7 @@ le_int32 ParagraphLayout::getLanguageCode(const Locale *locale)
le_bool ParagraphLayout::isComplex(UScriptCode script)
{
if (script < 0 || script >= USCRIPT_CODE_LIMIT) {
return false;
return FALSE;
}
return complexTable[script];

View file

@ -17,7 +17,7 @@ U_NAMESPACE_BEGIN
const char RunArray::fgClassID = 0;
RunArray::RunArray(le_int32 initialCapacity)
: fClientArrays(false), fLimits(NULL), fCount(0), fCapacity(initialCapacity)
: fClientArrays(FALSE), fLimits(NULL), fCount(0), fCapacity(initialCapacity)
{
if (initialCapacity > 0) {
fLimits = LE_NEW_ARRAY(le_int32, fCapacity);

View file

@ -367,7 +367,7 @@ le_bool GDIFontInstance::getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LE
return result;
#else
return false;
return FALSE;
#endif
}

View file

@ -204,19 +204,19 @@ le_bool GnomeFontInstance::getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber,
error = TT_Load_Glyph(fInstance, fGlyph, glyph, TTLOAD_SCALE_GLYPH | TTLOAD_HINT_GLYPH);
if (error != 0) {
return false;
return FALSE;
}
error = TT_Get_Glyph_Outline(fGlyph, &outline);
if (error != 0 || pointNumber >= outline.n_points) {
return false;
return FALSE;
}
point.fX = outline.points[pointNumber].x >> 6;
point.fY = outline.points[pointNumber].y >> 6;
return true;
return TRUE;
}
// This table was generated by a little Java program.

View file

@ -57,7 +57,7 @@ le_bool ScriptCompositeFontInstance::getGlyphPoint(LEGlyphID glyph, le_int32 poi
return font->getGlyphPoint(LE_GET_GLYPH(glyph), pointNumber, point);
}
return false;
return FALSE;
}
const LEFontInstance *ScriptCompositeFontInstance::getSubFont(const LEUnicode chars[], le_int32 *offset, le_int32 limit, le_int32 script, LEErrorCode &success) const

View file

@ -63,7 +63,7 @@ void InitParagraph(HWND hwnd, Context *context)
si.nMin = 0;
si.nMax = context->paragraph->getLineCount() - 1;
si.nPage = context->height / context->paragraph->getLineHeight();
SetScrollInfo(hwnd, SB_VERT, &si, true);
SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
}
}
@ -211,7 +211,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
}
si.fMask = SIF_POS;
SetScrollInfo(hwnd, SB_VERT, &si, true);
SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
GetScrollInfo(hwnd, SB_VERT, &si);
context = (Context *) GetWindowLong(hwnd, 0);
@ -304,7 +304,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
context->paragraph = newParagraph;
InitParagraph(hwnd, context);
PrettyTitle(hwnd, szTitleName);
InvalidateRect(hwnd, NULL, true);
InvalidateRect(hwnd, NULL, TRUE);
}
}

View file

@ -40,7 +40,7 @@ Paragraph::Paragraph(const LEUnicode chars[], int32_t charCount, const FontRuns
fChars = LE_NEW_ARRAY(LEUnicode, charCount);
LE_ARRAY_COPY(fChars, chars, charCount);
fParagraphLayout = new ParagraphLayout(fChars, charCount, fontRuns, NULL, NULL, locales, UBIDI_DEFAULT_LTR, false, status);
fParagraphLayout = new ParagraphLayout(fChars, charCount, fontRuns, NULL, NULL, locales, UBIDI_DEFAULT_LTR, FALSE, status);
if (LE_FAILURE(status)) {
return;

View file

@ -276,6 +276,6 @@ void PortableFontInstance::getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) co
le_bool PortableFontInstance::getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const
{
return false;
return FALSE;
}

View file

@ -255,10 +255,10 @@ LEUnicode thaiSample[] =
le_int32 thaiSampleLength = ARRAY_LENGTH(thaiSample);
TestInput testInputs[] = {
{"raghu.ttf", devaText, devaTextLength, devaScriptCode, false},
{"CODE2000.TTF", arabText, arabTextLength, arabScriptCode, true},
{"LucidaSansRegular.ttf", arabText, arabTextLength, arabScriptCode, true},
{"Thonburi.ttf", thaiSample, thaiSampleLength, thaiScriptCode, false}
{"raghu.ttf", devaText, devaTextLength, devaScriptCode, FALSE},
{"CODE2000.TTF", arabText, arabTextLength, arabScriptCode, TRUE},
{"LucidaSansRegular.ttf", arabText, arabTextLength, arabScriptCode, TRUE},
{"Thonburi.ttf", thaiSample, thaiSampleLength, thaiScriptCode, FALSE}
};
#define TEST_COUNT ARRAY_LENGTH(testInputs)
@ -409,7 +409,7 @@ int main(int argc, char *argv[])
for (test = 0; test < testCount; test += 1) {
fprintf(outputFile, " {\"%s\", inputText%d, %d, %sScriptCode, %s},\n",
testInputs[test].fontName, test, testInputs[test].textLength, getShortName(testInputs[test].scriptCode),
testInputs[test].rightToLeft? "true" : "false");
testInputs[test].rightToLeft? "TRUE" : "FALSE");
}
fprintf(outputFile, "};\n\nle_int32 testCount = ARRAY_LENGTH(testInputs);\n\n");

View file

@ -26,7 +26,7 @@ le_bool compareResults(le_int32 testNumber, TestResult *expected, TestResult *ac
/* NOTE: we'll stop on the first failure 'cause once there's one error, it may cascade... */
if (actual->glyphCount != expected->glyphCount) {
printf("incorrect glyph count: exptected %d, got %d\n", expected->glyphCount, actual->glyphCount);
return false;
return FALSE;
}
le_int32 i;
@ -34,14 +34,14 @@ le_bool compareResults(le_int32 testNumber, TestResult *expected, TestResult *ac
for (i = 0; i < actual->glyphCount; i += 1) {
if (actual->glyphs[i] != expected->glyphs[i]) {
printf("incorrect id for glyph %d: expected %4X, got %4X\n", i, expected->glyphs[i], actual->glyphs[i]);
return false;
return FALSE;
}
}
for (i = 0; i < actual->glyphCount; i += 1) {
if (actual->indices[i] != expected->indices[i]) {
printf("incorrect index for glyph %d: expected %8X, got %8X\n", i, expected->indices[i], actual->indices[i]);
return false;
return FALSE;
}
}
@ -50,7 +50,7 @@ le_bool compareResults(le_int32 testNumber, TestResult *expected, TestResult *ac
if (xError > 0.0001) {
printf("incorrect x position for glyph %d: expected %f, got %f\n", i, expected->positions[i * 2], actual->positions[i * 2]);
return false;
return FALSE;
}
double yError = fabs(actual->positions[i * 2 + 1] - expected->positions[i * 2 + 1]);
@ -61,11 +61,11 @@ le_bool compareResults(le_int32 testNumber, TestResult *expected, TestResult *ac
if (yError > 0.0001) {
printf("incorrect y position for glyph %d: expected %f, got %f\n", i, expected->positions[i * 2 + 1], actual->positions[i * 2 + 1]);
return false;
return FALSE;
}
}
return true;
return TRUE;
}
int main(int argc, char *argv[])

View file

@ -608,10 +608,10 @@ float resultPositions3[] =
TestInput testInputs[] =
{
{"raghu.ttf", inputText0, 136, devaScriptCode, false},
{"CODE2000.TTF", inputText1, 252, arabScriptCode, true},
{"LucidaSansRegular.ttf", inputText2, 252, arabScriptCode, true},
{"Thonburi.ttf", inputText3, 168, thaiScriptCode, false},
{"raghu.ttf", inputText0, 136, devaScriptCode, FALSE},
{"CODE2000.TTF", inputText1, 252, arabScriptCode, TRUE},
{"LucidaSansRegular.ttf", inputText2, 252, arabScriptCode, TRUE},
{"Thonburi.ttf", inputText3, 168, thaiScriptCode, FALSE},
};
le_int32 testCount = ARRAY_LENGTH(testInputs);