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.17 2002/12/07 22:46:52 mast Exp $ + || $Id: rbtree.c,v 1.18 2002/12/07 22:53:07 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.17 2002/12/07 22:46:52 mast Exp $"); + RCSID("$Id: rbtree.c,v 1.18 2002/12/07 22:53:07 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:1439:    do {    depth = (l + h) >> 1;    if ((size_t) 1 << depth <= length)    l = depth + 1;    else    h = depth;    } while (l < h);    if ((size_t) 1 << depth <= length) depth++;    }    -  deep_end = (length - (1 << (depth - 1))) << 1; +  deep_end = (length - ((size_t) 1 << (depth - 1))) << 1;    if (!(length & 1)) deep_end |= 1;       {    size_t stack_size =    depth * sizeof (struct rb_node_hdr *) +    (depth + 1) * sizeof (unsigned);   #ifdef HAVE_ALLOCA    stack = alloca (stack_size);    if (!stack)   #endif