Ignore:
Timestamp:
Mar 19, 2000, 5:00:11 PM (25 years ago)
Author:
bird
Message:

Synced with \tools\fastdep\avl.*

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/win32k/include/avl.h

    r2501 r3168  
    1 /* $Id: avl.h,v 1.2 2000-01-22 18:20:59 bird Exp $
     1/* $Id: avl.h,v 1.3 2000-03-19 16:00:10 bird Exp $
    22 *
    33 * AVL-Tree (lookalike) declaration.
    44 *
    5  * Copyright (c) 1999 knut st. osmundsen
     5 * This AVL implementation is configurable from this headerfile. By
     6 * for example alterning the AVLKEY typedefinition an the AVL_<L|G|E|N>[E]
     7 * macros you are able to create different trees. Currently you may only have
     8 * one type of trees within one program (module).
     9 *
     10 * TREETYPE: unsigned long key.
     11 *
     12 *
     13 * Copyright (c) 1999-2000 knut st. osmundsen
    614 *
    715 * Project Odin Software License can be found in LICENSE.TXT
     
    1826 * AVL configuration. PRIVATE!
    1927 */
    20 #define AVL_MAX_HEIGHT      19          /* Up to 2^16 nodes. */
     28#define AVL_MAX_HEIGHT              19          /* Up to 2^16 nodes. */
     29#undef AVL_MAY_TRY_INSERT_EQUAL                 /* No duplicate key! */
     30
     31
     32/*
     33 * AVL Compare macros
     34 */
     35#define AVL_L(key1, key2)  ((key1) <  (key2))
     36#define AVL_LE(key1, key2) ((key1) <= (key2))
     37#define AVL_G(key1, key2)  ((key1) >  (key2))
     38#define AVL_GE(key1, key2) ((key1) >= (key2))
     39#define AVL_E(key1, key2)  ((key1) == (key2))
     40#define AVL_NE(key1, key2) ((key1) != (key2))
     41
    2142
    2243/**
     
    2445 */
    2546typedef unsigned long AVLKEY;
     47
    2648
    2749/**
     
    3557    unsigned char           uchHeight; /* Height of this tree: max(heigth(left), heigth(right)) + 1 */
    3658} AVLNODECORE, *PAVLNODECORE, **PPAVLNODECORE;
     59
    3760
    3861/**
     
    5578
    5679
    57 void            AVLInsert(PPAVLNODECORE ppTree, PAVLNODECORE pNode);
     80BOOL            AVLInsert(PPAVLNODECORE ppTree, PAVLNODECORE pNode);
    5881PAVLNODECORE    AVLRemove(PPAVLNODECORE ppTree, AVLKEY Key);
    5982PAVLNODECORE    AVLGet(PPAVLNODECORE ppTree, AVLKEY Key);
Note: See TracChangeset for help on using the changeset viewer.