~aw/usbs-directory/trunk

« back to all changes in this revision

Viewing changes to libraries/liblutil/tavl.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2010-02-18 00:58:13 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20100218005813-8230cn0y207m8wzy
Tags: 2.4.21-0ubuntu1
* New upstream release.
* debian/rules, debian/schema/extra/: 
  Fix get-orig-source rule to supports extra schemas shipped as part of the
  debian/schema/ directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* avl.c - routines to implement an avl tree */
2
 
/* $OpenLDAP: pkg/ldap/libraries/liblutil/tavl.c,v 1.12.2.6 2009/01/22 00:00:58 kurt Exp $ */
 
2
/* $OpenLDAP: pkg/ldap/libraries/liblutil/tavl.c,v 1.12.2.7 2009/10/30 18:55:04 quanah Exp $ */
3
3
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4
4
 *
5
5
 * Copyright 2005-2009 The OpenLDAP Foundation.
21
21
 
22
22
#include "portable.h"
23
23
 
 
24
#include <limits.h>
24
25
#include <stdio.h>
25
26
#include <ac/stdlib.h>
26
27
 
35
36
#define AVL_INTERNAL
36
37
#include "avl.h"
37
38
 
 
39
/* Maximum tree depth this host's address space could support */
 
40
#define MAX_TREE_DEPTH  (sizeof(void *) * CHAR_BIT)
 
41
 
38
42
static const int avl_bfs[] = {LH, RH};
39
43
 
40
44
/*
189
193
        int side, side_bf, shorter, nside = -1;
190
194
 
191
195
        /* parent stack */
192
 
        Avlnode *pptr[sizeof(void *)*8];
193
 
        unsigned char pdir[sizeof(void *)*8];
 
196
        Avlnode *pptr[MAX_TREE_DEPTH];
 
197
        unsigned char pdir[MAX_TREE_DEPTH];
194
198
        int depth = 0;
195
199
 
196
200
        if ( *root == NULL )