@@ -11837,24 +11837,24 @@ NextTag(
1183711837 return 0 ; /* never reached */
1183811838}
1183911839
11840- int
11840+ bool
1184111841TkBTreeNextTag (
1184211842 TkTextSearch * searchPtr ) /* Information about search in progress; must
1184311843 * have been set up by call to TkBTreeStartSearch. */
1184411844{
1184511845 if (searchPtr -> resultPtr ) {
1184611846 searchPtr -> segPtr = searchPtr -> resultPtr ;
1184711847 searchPtr -> resultPtr = NULL ;
11848- return 1 ;
11848+ return true ;
1184911849 }
1185011850
1185111851 if (searchPtr -> linesLeft <= 0 ) {
1185211852 searchPtr -> segPtr = NULL ;
11853- return 0 ;
11853+ return false ;
1185411854 }
1185511855
1185611856 if (NextTag (searchPtr )) {
11857- return 1 ;
11857+ return true ;
1185811858 }
1185911859
1186011860 if (searchPtr -> endOfText && searchPtr -> tagon ) {
@@ -11863,10 +11863,10 @@ TkBTreeNextTag(
1186311863 searchPtr -> curIndex .textPtr , searchPtr -> curIndex .tree );
1186411864 searchPtr -> segPtr = TkTextIndexGetContentSegment (& searchPtr -> curIndex , NULL );
1186511865 searchPtr -> tagon = 0 ;
11866- return 1 ;
11866+ return true ;
1186711867 }
1186811868
11869- return 0 ;
11869+ return false ;
1187011870}
1187111871
1187211872/*
@@ -11949,7 +11949,7 @@ PrevTagFindPrevNode(
1194911949 return NULL ;
1195011950}
1195111951
11952- static int
11952+ static bool
1195311953PrevTag (
1195411954 TkTextSearch * searchPtr ) /* Information about search in progress; must
1195511955 * have been set up by call to TkBTreeStartSearch. */
@@ -12000,7 +12000,7 @@ PrevTag(
1200012000 searchPtr -> segPtr = linePtr -> segPtr ;
1200112001 }
1200212002 searchPtr -> tagon = tagon ;
12003- return 1 ;
12003+ return true ;
1200412004 }
1200512005
1200612006 prevPtr = firstPtr = NULL ;
@@ -12012,14 +12012,14 @@ PrevTag(
1201212012 if (prevPtr ) {
1201312013 TkTextIndexSetByteIndex (& searchPtr -> curIndex , offset );
1201412014 searchPtr -> tagon = tagon ;
12015- return 1 ;
12015+ return true ;
1201612016 }
1201712017 firstPtr = segPtr ;
1201812018 } else if (firstPtr ) {
1201912019 TkTextIndexSetByteIndex (& searchPtr -> curIndex , offset );
1202012020 searchPtr -> segPtr = firstPtr ;
1202112021 searchPtr -> tagon = tagon ;
12022- return 1 ;
12022+ return true ;
1202312023 } else if (!tagon ) {
1202412024 prevPtr = segPtr ;
1202512025 }
@@ -12032,10 +12032,10 @@ PrevTag(
1203212032 TkTextIndexSetByteIndex (& searchPtr -> curIndex , offset );
1203312033 searchPtr -> segPtr = firstPtr ;
1203412034 searchPtr -> tagon = tagon ;
12035- return 1 ;
12035+ return true ;
1203612036 }
1203712037 searchPtr -> linesLeft = 0 ;
12038- return 0 ;
12038+ return false ;
1203912039 }
1204012040 if (!(segPtr = segPtr -> prevPtr )) {
1204112041 break ;
@@ -12046,7 +12046,7 @@ PrevTag(
1204612046 TkTextIndexSetByteIndex (& searchPtr -> curIndex , offset );
1204712047 searchPtr -> segPtr = firstPtr ;
1204812048 searchPtr -> tagon = tagon ;
12049- return 1 ;
12049+ return true ;
1205012050 }
1205112051 } else {
1205212052 linePtr = TkTextIndexGetLine (& searchPtr -> curIndex );
@@ -12062,7 +12062,7 @@ PrevTag(
1206212062
1206312063 do {
1206412064 if (-- searchPtr -> linesLeft == 0 ) {
12065- return 0 ;
12065+ return false ;
1206612066 }
1206712067 linePtr = linePtr -> prevPtr ;
1206812068 } while (linePtr != lastPtr && !LineTestToggleBack (linePtr , tagPtr -> index , tagon ));
@@ -12074,7 +12074,7 @@ PrevTag(
1207412074
1207512075 if (!(nodePtr = PrevTagFindPrevNode (nodePtr , searchPtr , tagon ))) {
1207612076 searchPtr -> linesLeft = 0 ;
12077- return 0 ;
12077+ return false ;
1207812078 }
1207912079
1208012080 /*
@@ -12094,7 +12094,7 @@ PrevTag(
1209412094 nodePtr = nodeStack [-- idx ];
1209512095 while (!NodeTestToggleBack (nodePtr , tagPtr -> index , tagon )) {
1209612096 if ((searchPtr -> linesLeft -= nodePtr -> numLines ) <= 0 ) {
12097- return 0 ;
12097+ return false ;
1209812098 }
1209912099 assert (idx > 0 );
1210012100 nodePtr = nodeStack [-- idx ];
@@ -12114,7 +12114,7 @@ PrevTag(
1211412114
1211512115 while (!LineTestToggleBack (linePtr , tagPtr -> index , tagon )) {
1211612116 if (-- searchPtr -> linesLeft == 0 ) {
12117- return 0 ;
12117+ return false ;
1211812118 }
1211912119 linePtr = linePtr -> prevPtr ;
1212012120 assert (linePtr != lastPtr );
@@ -12126,24 +12126,24 @@ PrevTag(
1212612126 return 0 ; /* never reached */
1212712127}
1212812128
12129- int
12129+ bool
1213012130TkBTreePrevTag (
1213112131 TkTextSearch * searchPtr ) /* Information about search in progress; must
1213212132 * have been set up by call to TkBTreeStartSearch. */
1213312133{
1213412134 if (searchPtr -> resultPtr ) {
1213512135 searchPtr -> segPtr = searchPtr -> resultPtr ;
1213612136 searchPtr -> resultPtr = NULL ;
12137- return 1 ;
12137+ return true ;
1213812138 }
1213912139
1214012140 if (searchPtr -> linesLeft <= 0 ) {
1214112141 searchPtr -> segPtr = NULL ;
12142- return 0 ;
12142+ return false ;
1214312143 }
1214412144
1214512145 if (PrevTag (searchPtr )) {
12146- return 1 ;
12146+ return true ;
1214712147 }
1214812148
1214912149 if (searchPtr -> endOfText && !searchPtr -> tagon ) {
@@ -12152,10 +12152,10 @@ TkBTreePrevTag(
1215212152 searchPtr -> curIndex .textPtr , searchPtr -> curIndex .tree );
1215312153 searchPtr -> segPtr = TkTextIndexGetContentSegment (& searchPtr -> curIndex , NULL );
1215412154 searchPtr -> tagon = 1 ;
12155- return 1 ;
12155+ return true ;
1215612156 }
1215712157
12158- return 0 ;
12158+ return false ;
1215912159}
1216012160
1216112161/*
@@ -15143,7 +15143,7 @@ TkBTreeCountSize(
1514315143 *----------------------------------------------------------------------
1514415144 */
1514515145
15146- int
15146+ bool
1514715147TkBTreeMoveForward (
1514815148 TkTextIndex * indexPtr ,
1514915149 unsigned byteCount )
@@ -15154,7 +15154,7 @@ TkBTreeMoveForward(
1515415154 int byteIndex ;
1515515155
1515615156 if (byteCount == 0 ) {
15157- return 1 ;
15157+ return true ;
1515815158 }
1515915159
1516015160 byteIndex = byteCount + TkTextIndexGetByteIndex (indexPtr );
@@ -15179,7 +15179,7 @@ TkBTreeMoveForward(
1517915179 byteIndex -= linePtr -> size ;
1518015180 if (!(linePtr = TkBTreeNextLine (indexPtr -> textPtr , linePtr ))) {
1518115181 TkTextIndexSetupToEndOfText (indexPtr , indexPtr -> textPtr , indexPtr -> tree );
15182- return 0 ;
15182+ return false ;
1518315183 }
1518415184 }
1518515185
@@ -15214,7 +15214,7 @@ TkBTreeMoveForward(
1521415214 byteIndex -= linePtr -> size ;
1521515215 if (!(linePtr = TkBTreeNextLine (indexPtr -> textPtr , linePtr ))) {
1521615216 TkTextIndexSetupToEndOfText (indexPtr , indexPtr -> textPtr , indexPtr -> tree );
15217- return 0 ;
15217+ return false ;
1521815218 }
1521915219 }
1522015220 }
@@ -15225,7 +15225,7 @@ TkBTreeMoveForward(
1522515225 }
1522615226
1522715227 TkTextIndexSetupToEndOfText (indexPtr , indexPtr -> textPtr , indexPtr -> tree );
15228- return 0 ;
15228+ return false ;
1522915229}
1523015230
1523115231/*
@@ -15250,7 +15250,7 @@ TkBTreeMoveForward(
1525015250 *----------------------------------------------------------------------
1525115251 */
1525215252
15253- int
15253+ bool
1525415254TkBTreeMoveBackward (
1525515255 TkTextIndex * indexPtr ,
1525615256 unsigned byteCount )
@@ -15264,7 +15264,7 @@ TkBTreeMoveBackward(
1526415264 int byteIndex ;
1526515265
1526615266 if (byteCount == 0 ) {
15267- return 1 ;
15267+ return true ;
1526815268 }
1526915269
1527015270 linePtr = TkTextIndexGetLine (indexPtr );
@@ -15288,7 +15288,7 @@ TkBTreeMoveBackward(
1528815288 }
1528915289 if (!(linePtr = TkBTreePrevLine (indexPtr -> textPtr , linePtr ))) {
1529015290 TkTextIndexSetupToStartOfText (indexPtr , indexPtr -> textPtr , indexPtr -> tree );
15291- return 0 ;
15291+ return false ;
1529215292 }
1529315293 }
1529415294 } else {
@@ -15337,7 +15337,7 @@ TkBTreeMoveBackward(
1533715337 }
1533815338 if (!(linePtr = TkBTreePrevLine (indexPtr -> textPtr , linePtr ))) {
1533915339 TkTextIndexSetupToStartOfText (indexPtr , indexPtr -> textPtr , indexPtr -> tree );
15340- return 0 ;
15340+ return false ;
1534115341 }
1534215342 }
1534315343 }
@@ -15348,7 +15348,7 @@ TkBTreeMoveBackward(
1534815348 }
1534915349
1535015350 TkTextIndexSetupToStartOfText (indexPtr , indexPtr -> textPtr , indexPtr -> tree );
15351- return 0 ;
15351+ return false ;
1535215352}
1535315353
1535415354/*
0 commit comments