diff options
author | Curl Upstream <curl-library@cool.haxx.se> | 2014-09-10 06:07:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-10-08 19:53:25 (GMT) |
commit | 3fe5d9bff98b4716e219516c30d71462495324f4 (patch) | |
tree | cd369c3f671882cefde2f68a1ac8146f97c6bc84 /lib/splay.h | |
parent | f086cb372e41035260fcd9b4ed3d2cfb272f138f (diff) | |
download | CMake-3fe5d9bff98b4716e219516c30d71462495324f4.zip CMake-3fe5d9bff98b4716e219516c30d71462495324f4.tar.gz CMake-3fe5d9bff98b4716e219516c30d71462495324f4.tar.bz2 |
curl 7.38.0 (reduced)
Extract upstream curl using the following shell code.
url=git://github.com/bagder/curl.git &&
v=7.38.0 &&
r=202aa9f7 &&
paths="
CMake/*
CMakeLists.txt
COPYING
include/curl/*.h
include/curl/curlbuild.h.cmake
lib/*.c
lib/*.h
lib/CMakeLists.txt
lib/Makefile.inc
lib/curl_config.h.cmake
lib/libcurl.rc
lib/vtls/*.c
lib/vtls/*.h
" &&
mkdir curl-$v-g$r-reduced &&
git clone $url curl-git &&
date=$(cd curl-git && git log -n 1 --format='%cd' $r) &&
(cd curl-git && git checkout $r &&
git archive --format=tar $r -- $paths) |
(cd curl-$v-g$r-reduced && tar xv &&
rm lib/config-*.h) &&
echo "g$r date: $date"
Diffstat (limited to 'lib/splay.h')
-rw-r--r-- | lib/splay.h | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/lib/splay.h b/lib/splay.h index 1674534..5f9ef24 100644 --- a/lib/splay.h +++ b/lib/splay.h @@ -1,5 +1,5 @@ -#ifndef __SPLAY_H -#define __SPLAY_H +#ifndef HEADER_CURL_SPLAY_H +#define HEADER_CURL_SPLAY_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1997 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1997 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -20,35 +20,47 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ +#include "curl_setup.h" struct Curl_tree { struct Curl_tree *smaller; /* smaller node */ struct Curl_tree *larger; /* larger node */ struct Curl_tree *same; /* points to a node with identical key */ - int key; /* the "sort" key */ + struct timeval key; /* this node's "sort" key */ void *payload; /* data the splay code doesn't care about */ }; -struct Curl_tree *Curl_splay(int i, struct Curl_tree *t); -struct Curl_tree *Curl_splayinsert(int key, struct Curl_tree *t, +struct Curl_tree *Curl_splay(struct timeval i, + struct Curl_tree *t); + +struct Curl_tree *Curl_splayinsert(struct timeval key, + struct Curl_tree *t, struct Curl_tree *newnode); + #if 0 -struct Curl_tree *Curl_splayremove(int key, struct Curl_tree *t, +struct Curl_tree *Curl_splayremove(struct timeval key, + struct Curl_tree *t, struct Curl_tree **removed); #endif -struct Curl_tree *Curl_splaygetbest(int key, struct Curl_tree *t, +struct Curl_tree *Curl_splaygetbest(struct timeval key, + struct Curl_tree *t, struct Curl_tree **removed); + int Curl_splayremovebyaddr(struct Curl_tree *t, - struct Curl_tree *remove, + struct Curl_tree *removenode, struct Curl_tree **newroot); -#ifdef CURLDEBUG +#define Curl_splaycomparekeys(i,j) ( ((i.tv_sec) < (j.tv_sec)) ? -1 : \ + ( ((i.tv_sec) > (j.tv_sec)) ? 1 : \ + ( ((i.tv_usec) < (j.tv_usec)) ? -1 : \ + ( ((i.tv_usec) > (j.tv_usec)) ? 1 : 0 )))) + +#ifdef DEBUGBUILD void Curl_splayprint(struct Curl_tree * t, int d, char output); #else -#define Curl_splayprint(x,y,z) +#define Curl_splayprint(x,y,z) Curl_nop_stmt #endif -#endif +#endif /* HEADER_CURL_SPLAY_H */ |