Lines Matching defs:red
52 * lines. Each range is stored as a node within a red-black tree, and we
57 * on top of the red-black tree so we can find the preceding/succeeding
78 int red;
872 n->red = 1;
878 * standard red-black tree constraints and operations.
885 n->red = 0;
889 /* case 2 - parent is black, we can always be red */
890 if (!n->parent->red)
895 * parent is red it cannot be the root therefore we must
900 * case 3 - parent and uncle are red, repaint them black,
901 * the grandparent red, and start again at the grandparent.
906 if (u != NULL && u->red)
908 n->parent->red = 0;
909 u->red = 0;
911 n->red = 1;
916 * case 4 - parent is red but uncle is black, parent and
935 * case 5 - parent is red but uncle is black, parent and
938 n->parent->red = 0;
939 n->parent->parent->red = 1;