Mercurial > emacs
comparison src/intervals.c @ 1316:f09c5c6563b8
* intervals.c: `copy_intervals()' no longer static.
author | Joseph Arceneaux <jla@gnu.org> |
---|---|
date | Sat, 03 Oct 1992 00:05:48 +0000 |
parents | b469633740b3 |
children | 6097878fbd46 |
comparison
equal
deleted
inserted
replaced
1315:884c3d7e7172 | 1316:f09c5c6563b8 |
---|---|
653 register INTERVAL prev = previous_interval (i); | 653 register INTERVAL prev = previous_interval (i); |
654 | 654 |
655 /* If both intervals are sticky here, then default to the | 655 /* If both intervals are sticky here, then default to the |
656 left-most one. But perhaps we should create a new | 656 left-most one. But perhaps we should create a new |
657 interval here instead... */ | 657 interval here instead... */ |
658 if (END_STICKY (prev)) | 658 if (END_STICKY_P (prev)) |
659 i = prev; | 659 i = prev; |
660 } | 660 } |
661 | 661 |
662 while (! NULL_INTERVAL_P (i)) | 662 while (! NULL_INTERVAL_P (i)) |
663 { | 663 { |
1165 if (position == under->position) | 1165 if (position == under->position) |
1166 { | 1166 { |
1167 /* First interval -- none precede it. */ | 1167 /* First interval -- none precede it. */ |
1168 if (position == 1) | 1168 if (position == 1) |
1169 { | 1169 { |
1170 if (! FRONT_STICKY (under)) | 1170 if (! FRONT_STICKY_P (under)) |
1171 /* The inserted string keeps its own properties. */ | 1171 /* The inserted string keeps its own properties. */ |
1172 while (! NULL_INTERVAL_P (over)) | 1172 while (! NULL_INTERVAL_P (over)) |
1173 { | 1173 { |
1174 position = LENGTH (over) + 1; | 1174 position = LENGTH (over) + 1; |
1175 this = split_interval_left (this, position); | 1175 this = split_interval_left (this, position); |
1193 { | 1193 { |
1194 INTERVAL prev = previous_interval (under); | 1194 INTERVAL prev = previous_interval (under); |
1195 if (NULL_INTERVAL_P (prev)) | 1195 if (NULL_INTERVAL_P (prev)) |
1196 abort (); | 1196 abort (); |
1197 | 1197 |
1198 if (END_STICKY (prev)) | 1198 if (END_STICKY_P (prev)) |
1199 { | 1199 { |
1200 if (FRONT_STICKY (under)) | 1200 if (FRONT_STICKY_P (under)) |
1201 /* The intervals go inbetween as the two sticky | 1201 /* The intervals go inbetween as the two sticky |
1202 properties cancel each other. Should we change | 1202 properties cancel each other. Should we change |
1203 this policy? */ | 1203 this policy? */ |
1204 while (! NULL_INTERVAL_P (over)) | 1204 while (! NULL_INTERVAL_P (over)) |
1205 { | 1205 { |
1220 over = next_interval (over); | 1220 over = next_interval (over); |
1221 } | 1221 } |
1222 } | 1222 } |
1223 else | 1223 else |
1224 { | 1224 { |
1225 if (FRONT_STICKY (under)) | 1225 if (FRONT_STICKY_P (under)) |
1226 /* The inserted text "sticks" to the interval `under', | 1226 /* The inserted text "sticks" to the interval `under', |
1227 which means it gets those properties. */ | 1227 which means it gets those properties. */ |
1228 while (! NULL_INTERVAL_P (over)) | 1228 while (! NULL_INTERVAL_P (over)) |
1229 { | 1229 { |
1230 position = LENGTH (over) + 1; | 1230 position = LENGTH (over) + 1; |
1505 } | 1505 } |
1506 | 1506 |
1507 /* Produce an interval tree reflecting the intervals in | 1507 /* Produce an interval tree reflecting the intervals in |
1508 TREE from START to START + LENGTH. */ | 1508 TREE from START to START + LENGTH. */ |
1509 | 1509 |
1510 static INTERVAL | 1510 INTERVAL |
1511 copy_intervals (tree, start, length) | 1511 copy_intervals (tree, start, length) |
1512 INTERVAL tree; | 1512 INTERVAL tree; |
1513 int start, length; | 1513 int start, length; |
1514 { | 1514 { |
1515 register INTERVAL i, new, t; | 1515 register INTERVAL i, new, t; |