source: trunk/include/k/kAvlrU32.h@ 2

Last change on this file since 2 was 2, checked in by bird, 18 years ago

Imported http://svn.netlabs.org/repos/libc/trunk/kStuff, revision 3612.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 2.0 KB
Line 
1/* $Id: kAvlrU32.h 2 2007-11-16 16:07:14Z bird $ */
2/** @file
3 * kAvl - AVL Tree Implementation, KU32 key ranges.
4 */
5
6/*
7 * Copyright (c) 2007 knut st. osmundsen <bird-src-spam@anduin.net>
8 *
9 * This file is part of kStuff.
10 *
11 * kStuff is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
15 *
16 * kStuff is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with kStuff; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 *
25 */
26
27#ifndef ___k_kAvlrU32_h___
28#define ___k_kAvlrU32_h___
29
30typedef struct KAVLRU32
31{
32 KU32 u32Start;
33 KU32 u32Last;
34 struct KAVLRU32 *mpLeft;
35 struct KAVLRU32 *mpRight;
36 KU8 mHeight;
37} KAVLRU32, *PKAVLRU32, **PPKAVLRU32;
38
39#define mKey u32Start
40#define mKeyLast u32Last
41
42/*#define KAVL_EQUAL_ALLOWED*/
43#define KAVL_CHECK_FOR_EQUAL_INSERT
44#define KAVL_MAX_STACK 32
45#define KAVL_RANGE
46/*#define KAVL_OFFSET */
47#define KAVL_STD_KEY_COMP
48#define KAVLKEY KU32
49#define KAVLNODE KAVLRU32
50#define KAVL_FN(name) kAvlrU32 ## name
51#define KAVL_TYPE(prefix,name) prefix ## KAVLRU32 ## name
52#define KAVL_INT(name) KAVLRU32INT ## name
53#define KAVL_DECL(rettype) K_DECL_INLINE(rettype)
54
55#include <k/kAvlTmpl/kAvlBase.h>
56#include <k/kAvlTmpl/kAvlDoWithAll.h>
57#include <k/kAvlTmpl/kAvlEnum.h>
58#include <k/kAvlTmpl/kAvlGet.h>
59#include <k/kAvlTmpl/kAvlGetBestFit.h>
60#include <k/kAvlTmpl/kAvlGetWithParent.h>
61#include <k/kAvlTmpl/kAvlRemove2.h>
62#include <k/kAvlTmpl/kAvlRemoveBestFit.h>
63#include <k/kAvlTmpl/kAvlUndef.h>
64
65#endif
66
67
Note: See TracBrowser for help on using the repository browser.