Changeset 18b6a88 in mainline for uspace/lib/c/generic/adt/odict.c
- Timestamp:
- 2018-04-15T09:35:04Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c1f44ca
- Parents:
- 8ebe212
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/adt/odict.c
r8ebe212 r18b6a88 75 75 printf("[%p/%c", cur, cur->color == odc_red ? 'r' : 'b'); 76 76 if (cur->a != NULL || cur->b != NULL) { 77 putchar(' ' 77 putchar(' '); 78 78 odict_print_tree(cur->a); 79 79 putchar(','); … … 254 254 if (cur->a == NULL) { 255 255 odict_link_child_a(odlink, cur); 256 256 break; 257 257 } 258 258 cur = cur->a; … … 923 923 b->b->up = a; 924 924 925 /* Swap links going out of A and out of B */ 926 n = a->up; a->up = b->up; b->up = n; 927 n = a->a; a->a = b->a; b->a = n; 928 n = a->b; a->b = b->b; b->b = n; 929 c = a->color; a->color = b->color; b->color = c; 925 /* 926 * Swap links going out of A and out of B 927 */ 928 n = a->up; 929 a->up = b->up; 930 b->up = n; 931 932 n = a->a; 933 a->a = b->a; 934 b->a = n; 935 936 n = a->b; 937 a->b = b->b; 938 b->b = n; 939 940 c = a->color; 941 a->color = b->color; 942 b->color = c; 930 943 931 944 /* When A and B are adjacent, fix self-loops that might have arisen */
Note:
See TracChangeset
for help on using the changeset viewer.