Ignore:
Timestamp:
Jan 22, 2000, 7:21:03 PM (26 years ago)
Author:
bird
Message:

Temporary backup checkin.

File:
1 edited

Legend:

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

    r1467 r2501  
    1 /* $Id: avl.h,v 1.1 1999-10-27 02:02:55 bird Exp $
     1/* $Id: avl.h,v 1.2 2000-01-22 18:20:59 bird Exp $
    22 *
    33 * AVL-Tree (lookalike) declaration.
     
    1515#endif
    1616
     17/*
     18 * AVL configuration. PRIVATE!
     19 */
     20#define AVL_MAX_HEIGHT      19          /* Up to 2^16 nodes. */
     21
    1722/**
    1823 * AVL key type
     
    2530typedef struct _AVLNodeCore
    2631{
    27     unsigned char           uchHeight; /* Height of this tree: max(heigth(left), heigth(right)) + 1 */
     32    AVLKEY                  Key;       /* Key value. */
    2833    struct  _AVLNodeCore *  pLeft;     /* Pointer to left leaf node. */
    2934    struct  _AVLNodeCore *  pRight;    /* Pointer to right leaf node. */
    30     AVLKEY                  Key;       /* Key value. */
     35    unsigned char           uchHeight; /* Height of this tree: max(heigth(left), heigth(right)) + 1 */
    3136} AVLNODECORE, *PAVLNODECORE, **PPAVLNODECORE;
    3237
     38/**
     39 * AVL Enum data - All members are PRIVATE! Don't touch!
     40 */
     41typedef struct _AVLEnumData
     42{
     43    char         fFromLeft;
     44    char         cEntries;
     45    char         achFlags[AVL_MAX_HEIGHT];
     46    PAVLNODECORE aEntries[AVL_MAX_HEIGHT];
     47} AVLENUMDATA, *PAVLENUMDATA;
    3348
    34 void AVLInsert(PPAVLNODECORE ppTree, PAVLNODECORE pNode);
    35 PAVLNODECORE AVLRemove(PPAVLNODECORE ppTree, AVLKEY Key);
    36 PAVLNODECORE AVLGet(PPAVLNODECORE ppTree, AVLKEY Key);
    37 PAVLNODECORE AVLGetWithAdjecentNodes(PPAVLNODECORE ppTree, AVLKEY Key, PPAVLNODECORE ppLeft, PPAVLNODECORE ppRight);
     49
     50/*
     51 * callback type
     52 */
     53typedef unsigned ( _PAVLCALLBACK)(PAVLNODECORE, void*);
     54typedef _PAVLCALLBACK *PAVLCALLBACK;
     55
     56
     57void            AVLInsert(PPAVLNODECORE ppTree, PAVLNODECORE pNode);
     58PAVLNODECORE    AVLRemove(PPAVLNODECORE ppTree, AVLKEY Key);
     59PAVLNODECORE    AVLGet(PPAVLNODECORE ppTree, AVLKEY Key);
     60PAVLNODECORE    AVLGetWithParent(PPAVLNODECORE ppTree, PPAVLNODECORE ppParent, AVLKEY Key);
     61PAVLNODECORE    AVLGetWithAdjecentNodes(PPAVLNODECORE ppTree, AVLKEY Key, PPAVLNODECORE ppLeft, PPAVLNODECORE ppRight);
     62unsigned        AVLDoWithAll(PPAVLNODECORE ppTree, int fFromLeft, PAVLCALLBACK pfnCallBack, void *pvParam);
     63PAVLNODECORE    AVLBeginEnumTree(PPAVLNODECORE ppTree, PAVLENUMDATA pEnumData, int fFromLeft);
     64PAVLNODECORE    AVLGetNextNode(PAVLENUMDATA pEnumData);
     65PAVLNODECORE    AVLGetBestFit(PPAVLNODECORE ppTree, AVLKEY Key, int fAbove);
     66
    3867
    3968
Note: See TracChangeset for help on using the changeset viewer.