diff options
Diffstat (limited to 'Utilities/cmcurl/hash.h')
-rw-r--r-- | Utilities/cmcurl/hash.h | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/Utilities/cmcurl/hash.h b/Utilities/cmcurl/hash.h index 7814674..ceebb52 100644 --- a/Utilities/cmcurl/hash.h +++ b/Utilities/cmcurl/hash.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2005, 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 @@ -31,30 +31,31 @@ typedef void (*curl_hash_dtor)(void *); -typedef struct _curl_hash { - curl_llist **table; +struct curl_hash { + struct curl_llist **table; curl_hash_dtor dtor; - int slots; - size_t size; -} curl_hash; + int slots; + size_t size; +}; -typedef struct _curl_hash_element { +struct curl_hash_element { void *ptr; char *key; size_t key_len; -} curl_hash_element; +}; -int Curl_hash_init(curl_hash *, int, curl_hash_dtor); -curl_hash *Curl_hash_alloc(int, curl_hash_dtor); -void *Curl_hash_add(curl_hash *, char *, size_t, void *); -int Curl_hash_delete(curl_hash *h, char *key, size_t key_len); -void *Curl_hash_pick(curl_hash *, char *, size_t); -void Curl_hash_apply(curl_hash *h, void *user, +int Curl_hash_init(struct curl_hash *, int, curl_hash_dtor); +struct curl_hash *Curl_hash_alloc(int, curl_hash_dtor); +void *Curl_hash_add(struct curl_hash *, char *, size_t, void *); +int Curl_hash_delete(struct curl_hash *h, char *key, size_t key_len); +void *Curl_hash_pick(struct curl_hash *, char *, size_t); +void Curl_hash_apply(struct curl_hash *h, void *user, void (*cb)(void *user, void *ptr)); -int Curl_hash_count(curl_hash *h); -void Curl_hash_clean(curl_hash *h); -void Curl_hash_clean_with_criterium(curl_hash *h, void *user, int (*comp)(void *, void *)); -void Curl_hash_destroy(curl_hash *h); +int Curl_hash_count(struct curl_hash *h); +void Curl_hash_clean(struct curl_hash *h); +void Curl_hash_clean_with_criterium(struct curl_hash *h, void *user, + int (*comp)(void *, void *)); +void Curl_hash_destroy(struct curl_hash *h); #endif |