|
11 | 11 | #include "rangeset.h"
|
12 | 12 |
|
13 | 13 |
|
| 14 | +static IndexRange irange_handle_cover_internal(IndexRange ir_covering, |
| 15 | + IndexRange ir_inner, |
| 16 | + List **new_iranges); |
| 17 | + |
| 18 | +static IndexRange irange_union_internal(IndexRange first, |
| 19 | + IndexRange second, |
| 20 | + List **new_iranges); |
| 21 | + |
| 22 | + |
14 | 23 | /* Check if two ranges intersect */
|
15 | 24 | bool
|
16 | 25 | iranges_intersect(IndexRange a, IndexRange b)
|
@@ -175,13 +184,13 @@ irange_union_internal(IndexRange first,
|
175 | 184 | /* range 'first' covers 'second' */
|
176 | 185 | if (irange_eq_bounds(ir_union, first))
|
177 | 186 | {
|
178 |
| - /* Save rightmost IndexRange to 'ret' */ |
| 187 | + /* Return rightmost IndexRange, save others to 'new_iranges' */ |
179 | 188 | return irange_handle_cover_internal(first, second, new_iranges);
|
180 | 189 | }
|
181 | 190 | /* range 'second' covers 'first' */
|
182 | 191 | else if (irange_eq_bounds(ir_union, second))
|
183 | 192 | {
|
184 |
| - /* Save rightmost IndexRange to 'ret' */ |
| 193 | + /* Retun rightmost IndexRange, save others to 'new_iranges' */ |
185 | 194 | return irange_handle_cover_internal(second, first, new_iranges);
|
186 | 195 | }
|
187 | 196 | /* No obvious leader, lossiness differs */
|
@@ -242,9 +251,7 @@ irange_union_internal(IndexRange first,
|
242 | 251 | }
|
243 | 252 | }
|
244 | 253 |
|
245 |
| -/* |
246 |
| - * Make union of two index rage lists. |
247 |
| - */ |
| 254 | +/* Make union of two index rage lists */ |
248 | 255 | List *
|
249 | 256 | irange_list_union(List *a, List *b)
|
250 | 257 | {
|
@@ -307,9 +314,7 @@ irange_list_union(List *a, List *b)
|
307 | 314 | return result;
|
308 | 315 | }
|
309 | 316 |
|
310 |
| -/* |
311 |
| - * Find intersection of two range lists. |
312 |
| - */ |
| 317 | +/* Find intersection of two range lists */ |
313 | 318 | List *
|
314 | 319 | irange_list_intersection(List *a, List *b)
|
315 | 320 | {
|
|
0 commit comments