Changeset 3168 for trunk/src/win32k/include/avl.h
- Timestamp:
- Mar 19, 2000, 5:00:11 PM (25 years ago)
- 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:59bird Exp $1 /* $Id: avl.h,v 1.3 2000-03-19 16:00:10 bird Exp $ 2 2 * 3 3 * AVL-Tree (lookalike) declaration. 4 4 * 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 6 14 * 7 15 * Project Odin Software License can be found in LICENSE.TXT … … 18 26 * AVL configuration. PRIVATE! 19 27 */ 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 21 42 22 43 /** … … 24 45 */ 25 46 typedef unsigned long AVLKEY; 47 26 48 27 49 /** … … 35 57 unsigned char uchHeight; /* Height of this tree: max(heigth(left), heigth(right)) + 1 */ 36 58 } AVLNODECORE, *PAVLNODECORE, **PPAVLNODECORE; 59 37 60 38 61 /** … … 55 78 56 79 57 voidAVLInsert(PPAVLNODECORE ppTree, PAVLNODECORE pNode);80 BOOL AVLInsert(PPAVLNODECORE ppTree, PAVLNODECORE pNode); 58 81 PAVLNODECORE AVLRemove(PPAVLNODECORE ppTree, AVLKEY Key); 59 82 PAVLNODECORE AVLGet(PPAVLNODECORE ppTree, AVLKEY Key);
Note:
See TracChangeset
for help on using the changeset viewer.