pike.git / src / rbtree.c

version» Context lines:

pike.git/src/rbtree.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: rbtree.c,v 1.21 2002/12/19 02:40:29 mast Exp $ + || $Id: rbtree.c,v 1.22 2002/12/22 17:18:55 mast Exp $   */      /* An implementation of a threaded red/black balanced binary tree.    *    * Created 2001-04-27 by Martin Stjernholm <mast@lysator.liu.se>    */      #include "global.h"    - RCSID("$Id: rbtree.c,v 1.21 2002/12/19 02:40:29 mast Exp $"); + RCSID("$Id: rbtree.c,v 1.22 2002/12/22 17:18:55 mast Exp $");      #include "interpret.h"   #include "pike_error.h"   #include "rbtree_low.h"      #include <assert.h>   #include <stdlib.h>      #if defined (PIKE_DEBUG) || defined (TEST_MULTISET)   
pike.git/src/rbtree.c:274:    } while (0)      /* node ret    * / \ / \    * / \ / \    * ret c ==> a node    * / \ / \    * / \ / \    * a b b c    */ - static inline struct rb_node_hdr *rot_right (struct rb_node_hdr *node) + static INLINE struct rb_node_hdr *rot_right (struct rb_node_hdr *node)   {    /* Note that we don't need to do anything special to keep the    * pointers in a, b and c intact, even if they're thread    * pointers pointing back to node and ret. */    struct rb_node_hdr *ret = node->prev;    if (ret->flags & RB_THREAD_NEXT) {   #ifdef PIKE_DEBUG    if (ret->next != node) rb_fatal (node, "Bogus next thread pointer.\n");   #endif    ret->flags &= ~RB_THREAD_NEXT;
pike.git/src/rbtree.c:302:   }      /* node ret    * / \ / \    * / \ / \    * a ret ==> node c    * / \ / \    * / \ / \    * b c a b    */ - static inline struct rb_node_hdr *rot_left (struct rb_node_hdr *node) + static INLINE struct rb_node_hdr *rot_left (struct rb_node_hdr *node)   {    struct rb_node_hdr *ret = node->next;    if (ret->flags & RB_THREAD_PREV) {   #ifdef PIKE_DEBUG    if (ret->prev != node) rb_fatal (node, "Bogus prev thread pointer.\n");   #endif    ret->flags &= ~RB_THREAD_PREV;    node->flags |= RB_THREAD_NEXT;    }    else {