1 /* 2 * Copyright 2002 Damien Miller <djm@mindrot.org> All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. 9 * 2. Redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution. 12 * 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 */ 24 25 /* $Id$ */ 26 27 /* Select our tree types for various data structures */ 28 29 #if defined(FLOW_RB) 30 #define FLOW_HEAD RB_HEAD 31 #define FLOW_ENTRY RB_ENTRY 32 #define FLOW_PROTOTYPE RB_PROTOTYPE 33 #define FLOW_GENERATE RB_GENERATE 34 #define FLOW_INSERT RB_INSERT 35 #define FLOW_FIND RB_FIND 36 #define FLOW_REMOVE RB_REMOVE 37 #define FLOW_FOREACH RB_FOREACH 38 #define FLOW_MIN RB_MIN 39 #define FLOW_NEXT RB_NEXT 40 #define FLOW_INIT RB_INIT 41 #elif defined(FLOW_SPLAY) 42 #define FLOW_HEAD SPLAY_HEAD 43 #define FLOW_ENTRY SPLAY_ENTRY 44 #define FLOW_PROTOTYPE SPLAY_PROTOTYPE 45 #define FLOW_GENERATE SPLAY_GENERATE 46 #define FLOW_INSERT SPLAY_INSERT 47 #define FLOW_FIND SPLAY_FIND 48 #define FLOW_REMOVE SPLAY_REMOVE 49 #define FLOW_FOREACH SPLAY_FOREACH 50 #define FLOW_MIN SPLAY_MIN 51 #define FLOW_NEXT SPLAY_NEXT 52 #define FLOW_INIT SPLAY_INIT 53 #else 54 #error No flow tree type defined 55 #endif 56 57 #if defined(EXPIRY_RB) 58 #define EXPIRY_HEAD RB_HEAD 59 #define EXPIRY_ENTRY RB_ENTRY 60 #define EXPIRY_PROTOTYPE RB_PROTOTYPE 61 #define EXPIRY_GENERATE RB_GENERATE 62 #define EXPIRY_INSERT RB_INSERT 63 #define EXPIRY_FIND RB_FIND 64 #define EXPIRY_REMOVE RB_REMOVE 65 #define EXPIRY_FOREACH RB_FOREACH 66 #define EXPIRY_MIN RB_MIN 67 #define EXPIRY_NEXT RB_NEXT 68 #define EXPIRY_INIT RB_INIT 69 #elif defined(EXPIRY_SPLAY) 70 #define EXPIRY_HEAD SPLAY_HEAD 71 #define EXPIRY_ENTRY SPLAY_ENTRY 72 #define EXPIRY_PROTOTYPE SPLAY_PROTOTYPE 73 #define EXPIRY_GENERATE SPLAY_GENERATE 74 #define EXPIRY_INSERT SPLAY_INSERT 75 #define EXPIRY_FIND SPLAY_FIND 76 #define EXPIRY_REMOVE SPLAY_REMOVE 77 #define EXPIRY_FOREACH SPLAY_FOREACH 78 #define EXPIRY_MIN SPLAY_MIN 79 #define EXPIRY_NEXT SPLAY_NEXT 80 #define EXPIRY_INIT SPLAY_INIT 81 #else 82 #error No expiry tree type defined 83 #endif 84