Ignore:
Timestamp:
Aug 27, 2007, 12:31:38 AM (18 years ago)
Author:
bird
Message:

Made is possible to redefine the AVLNODE members, thus allowing a structure to be used by more than one kAvl instance (i.e. be in more than one tree). Define the callback and enumdata our selves.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kStuff/include/k/kAvlrU32.h

    r3561 r3562  
    3030typedef struct KAVLRU32
    3131{
    32     KU32                Key;
    33     KU32                KeyLast;
    34     struct KAVLRU32    *pLeft;
    35     struct KAVLRU32    *pRight;
    36     KU8                 uchHeight;
     32    KU32                u32Start;
     33    KU32                u32Last;
     34    struct KAVLRU32    *mpLeft;
     35    struct KAVLRU32    *mpRight;
     36    KU8                 mHeight;
    3737} KAVLRU32, *PKAVLRU32, **PPKAVLRU32;
    3838
    39 typedef struct
    40 {
    41     KBOOL               fFromLeft;
    42     KI8                 cEntries;
    43     KU8                 achFlags[32];
    44     PKAVLRU32           aEntries[32];
    45 } KAVLRU32ENUMDATA, *PKAVLRU32ENUMDATA;
    46 
    47 typedef int (* PFNKAVLRU32CALLBACK)(KAVLRU32 *, void *);
     39#define mKey                    u32Start
     40#define mKeyLast                u32Last
    4841
    4942/*#define KAVL_EQUAL_ALLOWED*/
     
    5447#define KAVL_STD_KEY_COMP
    5548#define KAVLKEY                 KU32
    56 #define KAVLNODECORE            KAVLRU32
     49#define KAVLNODE                KAVLRU32
    5750#define KAVL_FN(name)           kAvlrU32 ## name
    5851#define KAVL_TYPE(prefix,name)  prefix ## KAVLRU32 ## name
Note: See TracChangeset for help on using the changeset viewer.