summaryrefslogtreecommitdiff
path: root/src/common/container.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-09-09 23:12:54 +0000
committerNick Mathewson <nickm@torproject.org>2005-09-09 23:12:54 +0000
commit035b1953eba11febfd975727b7101f7bd423c3fc (patch)
treecd6dc1afe3e89b6afd390771d5b742a8bbfe0ef0 /src/common/container.h
parent67b27f566c1ebb516be8bc6f411a5f502d555cc9 (diff)
downloadtor-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.h4
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