Changeset 2501 for trunk/src/win32k/include/avl.h
- Timestamp:
- Jan 22, 2000, 7:21:03 PM (26 years ago)
- File:
-
- 1 edited
-
trunk/src/win32k/include/avl.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/include/avl.h
r1467 r2501 1 /* $Id: avl.h,v 1. 1 1999-10-27 02:02:55bird Exp $1 /* $Id: avl.h,v 1.2 2000-01-22 18:20:59 bird Exp $ 2 2 * 3 3 * AVL-Tree (lookalike) declaration. … … 15 15 #endif 16 16 17 /* 18 * AVL configuration. PRIVATE! 19 */ 20 #define AVL_MAX_HEIGHT 19 /* Up to 2^16 nodes. */ 21 17 22 /** 18 23 * AVL key type … … 25 30 typedef struct _AVLNodeCore 26 31 { 27 unsigned char uchHeight; /* Height of this tree: max(heigth(left), heigth(right)) + 1*/32 AVLKEY Key; /* Key value. */ 28 33 struct _AVLNodeCore * pLeft; /* Pointer to left leaf node. */ 29 34 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 */ 31 36 } AVLNODECORE, *PAVLNODECORE, **PPAVLNODECORE; 32 37 38 /** 39 * AVL Enum data - All members are PRIVATE! Don't touch! 40 */ 41 typedef struct _AVLEnumData 42 { 43 char fFromLeft; 44 char cEntries; 45 char achFlags[AVL_MAX_HEIGHT]; 46 PAVLNODECORE aEntries[AVL_MAX_HEIGHT]; 47 } AVLENUMDATA, *PAVLENUMDATA; 33 48 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 */ 53 typedef unsigned ( _PAVLCALLBACK)(PAVLNODECORE, void*); 54 typedef _PAVLCALLBACK *PAVLCALLBACK; 55 56 57 void AVLInsert(PPAVLNODECORE ppTree, PAVLNODECORE pNode); 58 PAVLNODECORE AVLRemove(PPAVLNODECORE ppTree, AVLKEY Key); 59 PAVLNODECORE AVLGet(PPAVLNODECORE ppTree, AVLKEY Key); 60 PAVLNODECORE AVLGetWithParent(PPAVLNODECORE ppTree, PPAVLNODECORE ppParent, AVLKEY Key); 61 PAVLNODECORE AVLGetWithAdjecentNodes(PPAVLNODECORE ppTree, AVLKEY Key, PPAVLNODECORE ppLeft, PPAVLNODECORE ppRight); 62 unsigned AVLDoWithAll(PPAVLNODECORE ppTree, int fFromLeft, PAVLCALLBACK pfnCallBack, void *pvParam); 63 PAVLNODECORE AVLBeginEnumTree(PPAVLNODECORE ppTree, PAVLENUMDATA pEnumData, int fFromLeft); 64 PAVLNODECORE AVLGetNextNode(PAVLENUMDATA pEnumData); 65 PAVLNODECORE AVLGetBestFit(PPAVLNODECORE ppTree, AVLKEY Key, int fAbove); 66 38 67 39 68
Note:
See TracChangeset
for help on using the changeset viewer.
