Lines Matching full:sl

1237 sub_list_swap(struct sort_list **sl, size_t i1, size_t i2)  in sub_list_swap()  argument
1241 tmp = sl[i1]; in sub_list_swap()
1242 sl[i1] = sl[i2]; in sub_list_swap()
1243 sl[i2] = tmp; in sub_list_swap()
1253 sub_list_swim(struct sort_list **sl, size_t indx) in sub_list_swim() argument
1261 if (sub_list_cmp(sl[indx], sl[parent_index]) < 0) { in sub_list_swim()
1263 sub_list_swap(sl, indx, parent_index); in sub_list_swim()
1264 sub_list_swim(sl, parent_index); in sub_list_swim()
1273 sub_list_sink(struct sort_list **sl, size_t indx, size_t size) in sub_list_sink() argument
1287 (sub_list_cmp(sl[left_child_index], in sub_list_sink()
1288 sl[right_child_index]) > 0)) in sub_list_sink()
1290 if (sub_list_cmp(sl[indx], sl[min_child_index]) > 0) { in sub_list_sink()
1291 sub_list_swap(sl, indx, min_child_index); in sub_list_sink()
1292 sub_list_sink(sl, min_child_index, size); in sub_list_sink()
1303 sub_list_push(struct sort_list *s, struct sort_list **sl, size_t size) in sub_list_push() argument
1306 sl[size++] = s; in sub_list_push()
1307 sub_list_swim(sl, size - 1); in sub_list_push()
1319 sub_list_header_print(struct sort_list *sl, FILE *f_out, in sub_list_header_print() argument
1323 if (sl && sl->count && f_out && sl->list[0]->str) { in sub_list_header_print()
1326 &(sl->list[0])))) { in sub_list_header_print()
1327 bwsfwrite(sl->list[0]->str, f_out, in sub_list_header_print()
1329 lp->item = sl->list[0]; in sub_list_header_print()
1332 bwsfwrite(sl->list[0]->str, f_out, in sub_list_header_print()
1341 sub_list_next(struct sort_list *sl) in sub_list_next() argument
1344 if (sl && sl->count) { in sub_list_next()
1345 sl->list += 1; in sub_list_next()
1346 sl->count -= 1; in sub_list_next()
1354 merge_sub_lists(struct sort_list **sl, size_t n, FILE* f_out) in merge_sub_lists() argument
1363 sub_list_push(sl[i], sl, i); in merge_sub_lists()
1365 while (sl[0]->count) { /* unfinished lists are always in front */ in merge_sub_lists()
1367 sub_list_header_print(sl[0], f_out, &lp); in merge_sub_lists()
1369 sub_list_next(sl[0]); in merge_sub_lists()
1371 sub_list_sink(sl, 0, n); in merge_sub_lists()