summaryrefslogtreecommitdiffstats
path: root/src/kernel/tqscriptengine.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-12-08 15:17:51 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-12-08 19:38:03 +0900
commit7d612f7c91d55501276a385a30dbadb121e7bd9f (patch)
tree4c6f1546e16db32779dfbf5c9e107b938faee6bb /src/kernel/tqscriptengine.cpp
parent5a863a8932d14b99c5f838c4efa1618070d71b29 (diff)
downloadtqt-7d612f7c91d55501276a385a30dbadb121e7bd9f.tar.gz
tqt-7d612f7c91d55501276a385a30dbadb121e7bd9f.zip
Replace TRUE/FALSE with boolean values true/false - part 8HEADmaster
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/kernel/tqscriptengine.cpp')
-rw-r--r--src/kernel/tqscriptengine.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/src/kernel/tqscriptengine.cpp b/src/kernel/tqscriptengine.cpp
index 36df1fa77..963d2bb3b 100644
--- a/src/kernel/tqscriptengine.cpp
+++ b/src/kernel/tqscriptengine.cpp
@@ -259,7 +259,7 @@ static inline void positionCluster(TQShaperItem *item, int gfrom, int glast)
}
item->advances[gfrom+i] = 0;
}
- item->has_positioning = TRUE;
+ item->has_positioning = true;
}
@@ -306,31 +306,31 @@ static void heuristicSetGlyphAttributes(TQShaperItem *item, const TQChar *uc, in
// first char in a run is never (treated as) a mark
int cStart = 0;
- item->attributes[0].mark = FALSE;
- item->attributes[0].clusterStart = TRUE;
+ item->attributes[0].mark = false;
+ item->attributes[0].clusterStart = true;
item->attributes[0].combiningClass = 0;
if (qIsZeroWidthChar(uc[0].unicode())) {
- item->attributes[0].zeroWidth = TRUE;
+ item->attributes[0].zeroWidth = true;
item->advances[0] = 0;
- item->has_positioning = TRUE;
+ item->has_positioning = true;
} else {
- item->attributes[0].zeroWidth = FALSE;
+ item->attributes[0].zeroWidth = false;
}
int lastCat = ::category(uc[0]);
for (int i = 1; i < length; ++i) {
int cat = ::category(uc[i]);
if (qIsZeroWidthChar(uc[i].unicode())) {
- item->attributes[i].mark = FALSE;
- item->attributes[i].clusterStart = TRUE;
- item->attributes[i].zeroWidth = TRUE;
+ item->attributes[i].mark = false;
+ item->attributes[i].clusterStart = true;
+ item->attributes[i].zeroWidth = true;
item->attributes[i].combiningClass = 0;
cStart = i;
item->advances[i] = 0;
- item->has_positioning = TRUE;
+ item->has_positioning = true;
} else if (cat != TQChar::Mark_NonSpacing) {
- item->attributes[i].mark = FALSE;
- item->attributes[i].clusterStart = TRUE;
+ item->attributes[i].mark = false;
+ item->attributes[i].clusterStart = true;
item->attributes[i].combiningClass = 0;
cStart = i;
} else {
@@ -366,12 +366,12 @@ static void heuristicSetGlyphAttributes(TQShaperItem *item, const TQChar *uc, in
}
}
- item->attributes[i].mark = TRUE;
- item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].mark = true;
+ item->attributes[i].clusterStart = false;
item->attributes[i].combiningClass = cmb;
logClusters[i] = cStart;
item->advances[i] = 0;
- item->has_positioning = TRUE;
+ item->has_positioning = true;
}
if (lastCat == TQChar::Separator_Space)
@@ -395,11 +395,11 @@ static bool basic_shape(TQShaperItem *item)
{
if (item->font->stringToCMap(item->string->unicode()+item->from, item->length, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
heuristicSetGlyphAttributes(item);
qt_heuristicPosition(item);
- return TRUE;
+ return true;
}
// --------------------------------------------------------------------------------------------------------------------------------------------
@@ -436,7 +436,7 @@ static bool hebrew_shape(TQShaperItem *item)
if (item->font->stringToCMap(item->string->unicode()+item->from, item->length, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
heuristicSetGlyphAttributes(item);
openType->shape(item);
@@ -467,7 +467,7 @@ static bool hebrew_shape(TQShaperItem *item)
for (i = 1; i < item->length; ++i) {
ushort base = shapedChars[slen-1].unicode();
ushort shaped = 0;
- bool invalid = FALSE;
+ bool invalid = false;
if (uc[i].unicode() == Dagesh) {
if (base >= 0x5d0
&& base <= 0x5ea
@@ -480,7 +480,7 @@ static bool hebrew_shape(TQShaperItem *item)
} else if (base == 0xfb2a || base == 0xfb2b /* Shin with Shin or Sin dot */) {
shaped = base + 2;
} else {
- invalid = TRUE;
+ invalid = true;
}
} else if (uc[i].unicode() == ShinDot) {
if (base == 0x05e9)
@@ -488,14 +488,14 @@ static bool hebrew_shape(TQShaperItem *item)
else if (base == 0xfb49)
shaped = 0xfb2c;
else
- invalid = TRUE;
+ invalid = true;
} else if (uc[i].unicode() == SinDot) {
if (base == 0x05e9)
shaped = 0xfb2b;
else if (base == 0xfb49)
shaped = 0xfb2d;
else
- invalid = TRUE;
+ invalid = true;
} else if (uc[i].unicode() == Patah) {
if (base == 0x5d0)
shaped = 0xfb2e;
@@ -516,8 +516,8 @@ static bool hebrew_shape(TQShaperItem *item)
if (invalid) {
shapedChars[slen] = 0x25cc;
- item->attributes[slen].clusterStart = TRUE;
- item->attributes[slen].mark = FALSE;
+ item->attributes[slen].clusterStart = true;
+ item->attributes[slen].mark = false;
item->attributes[slen].combiningClass = 0;
cluster_start = slen;
++slen;
@@ -531,13 +531,13 @@ static bool hebrew_shape(TQShaperItem *item)
if (!shaped) {
shapedChars[slen] = uc[i];
if (::category(uc[i]) != TQChar::Mark_NonSpacing) {
- item->attributes[slen].clusterStart = TRUE;
- item->attributes[slen].mark = FALSE;
+ item->attributes[slen].clusterStart = true;
+ item->attributes[slen].mark = false;
item->attributes[slen].combiningClass = 0;
cluster_start = slen;
} else {
- item->attributes[slen].clusterStart = FALSE;
- item->attributes[slen].mark = TRUE;
+ item->attributes[slen].clusterStart = false;
+ item->attributes[slen].mark = true;
item->attributes[slen].combiningClass = ::combiningClass(uc[i]);
}
++slen;
@@ -547,7 +547,7 @@ static bool hebrew_shape(TQShaperItem *item)
if (item->font->stringToCMap(shapedChars, slen, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
for (i = 0; i < item->num_glyphs; ++i) {
if (item->attributes[i].mark)
item->advances[i] = 0;
@@ -556,7 +556,7 @@ static bool hebrew_shape(TQShaperItem *item)
if (item->length > 256)
::free(shapedChars);
- return TRUE;
+ return true;
}
// these groups correspond to the groups defined in the Unicode standard.
@@ -957,7 +957,7 @@ static void getArabicProperties(const unsigned short *chars, int len, TQArabicPr
break;
default:
- Q_ASSERT(FALSE);
+ Q_ASSERT(false);
}
lastGroup = ArabicNone;
@@ -1005,7 +1005,7 @@ static void getArabicProperties(const unsigned short *chars, int len, TQArabicPr
lastGroup = Noon;
break;
case ArabicGroupsEnd:
- Q_ASSERT(FALSE);
+ Q_ASSERT(false);
}
lastPos = i;
@@ -1451,10 +1451,10 @@ static void shapedString(const TQString *uc, int from, int len, TQChar *shapeBuf
// ##### Fixme
//attributes[gpos].zeroWidth = zeroWidth;
if (::category(*ch) == TQChar::Mark_NonSpacing) {
- attributes[gpos].mark = TRUE;
+ attributes[gpos].mark = true;
// tqDebug("glyph %d (char %d) is mark!", gpos, i);
} else {
- attributes[gpos].mark = FALSE;
+ attributes[gpos].mark = false;
clusterStart = data - shapeBuffer;
}
attributes[gpos].clusterStart = !attributes[gpos].mark;
@@ -1524,7 +1524,7 @@ static bool arabicSyriacOpenTypeShape(TQOpenType *openType, TQShaperItem *item,
int nglyphs = item->num_glyphs;
if (item->font->stringToCMap(item->string->unicode()+item->from, item->length, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
heuristicSetGlyphAttributes(item);
unsigned short *logClusters = item->log_clusters;
@@ -1613,13 +1613,13 @@ static bool arabic_shape(TQShaperItem *item)
if (item->font->stringToCMap((TQChar *)shapedChars.data(), slen, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
for (int i = 0; i < slen; ++i)
if (item->attributes[i].mark)
item->advances[i] = 0;
qt_heuristicPosition(item);
- return TRUE;
+ return true;
}
#if defined(TQ_WS_X11)