diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-09-09 23:12:54 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-09-09 23:12:54 +0000 |
commit | 035b1953eba11febfd975727b7101f7bd423c3fc (patch) | |
tree | cd6dc1afe3e89b6afd390771d5b742a8bbfe0ef0 /src/common/container.h | |
parent | 67b27f566c1ebb516be8bc6f411a5f502d555cc9 (diff) | |
download | tor-035b1953eba11febfd975727b7101f7bd423c3fc.tar.gz tor-035b1953eba11febfd975727b7101f7bd423c3fc.zip |
Add sorting/searching to smartlist
svn:r4977
Diffstat (limited to 'src/common/container.h')
-rw-r--r-- | src/common/container.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/container.h b/src/common/container.h index 260177767a..98b8ab1a8e 100644 --- a/src/common/container.h +++ b/src/common/container.h @@ -50,6 +50,10 @@ int smartlist_len(const smartlist_t *sl); void smartlist_del(smartlist_t *sl, int idx); void smartlist_del_keeporder(smartlist_t *sl, int idx); void smartlist_insert(smartlist_t *sl, int idx, void *val); +void smartlist_sort(smartlist_t *sl, + int (*compare)(const void **a, const void **b)); +void *smartlist_bsearch(smartlist_t *sl, const void *key, + int (*compare)(const void *key, const void **member)); #define SPLIT_SKIP_SPACE 0x01 #define SPLIT_IGNORE_BLANK 0x02 |