mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-17 14:59:20 +02:00
Remove unused functions.
This commit is contained in:
@@ -312,32 +312,6 @@ hash_table_find(hash_table *t, void *candidate)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Find the next item in a hash table
|
||||
*
|
||||
* \param t Pointer to a hash table object
|
||||
* \param obj Pointer to an object that was perviously returned by
|
||||
* hash_table_find() or hash_table_find_next().
|
||||
*
|
||||
* \return A pointer to the next object matching obj, or NULL if
|
||||
* no more exist
|
||||
*/
|
||||
void *
|
||||
hash_table_find_next(hash_table *t, void *obj)
|
||||
{
|
||||
if (!obj) {
|
||||
return NULL;
|
||||
}
|
||||
void *ptr = LINK(t, obj)->next;
|
||||
while(ptr) {
|
||||
if (!t->compare(obj, ptr)) {
|
||||
return ptr;
|
||||
}
|
||||
ptr = LINK(t, ptr)->next;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Delete an item from a hash table
|
||||
*
|
||||
|
||||
@@ -64,7 +64,6 @@ size_t hash_table_num_buckets(hash_table *t);
|
||||
size_t hash_table_chain_len(hash_table *t, size_t i);
|
||||
int hash_table_insert(hash_table *t, void *item);
|
||||
void *hash_table_find(hash_table *t, void *candidate);
|
||||
void *hash_table_find_next(hash_table *t, void *obj);
|
||||
int hash_table_delete(hash_table *t, void *item);
|
||||
int hash_table_delete_no_resize(hash_table *t, void *item);
|
||||
void *hash_table_next(hash_table *t, void *cur);
|
||||
@@ -88,29 +87,3 @@ void hash_table_get_stats(hash_table *t, struct hash_table_stats *stat);
|
||||
(item); \
|
||||
(item) = hash_table_next((t), (item)))
|
||||
|
||||
/**
|
||||
* \brief Iterate over all items in a hash table that match a candidate
|
||||
*
|
||||
* This macro iterates over all items in a hash table that match a
|
||||
* candidate object. (In general, a hash table may contain multiple
|
||||
* objects with the same key.) Here is an example assuming that the hash
|
||||
* table holds objects of type struct int_object:
|
||||
*
|
||||
* struct int_object {
|
||||
* int value;
|
||||
* struct hash_link link;
|
||||
* }
|
||||
*
|
||||
* hash_table tab;
|
||||
* int_object candidate;
|
||||
*
|
||||
* candidate.value = 7;
|
||||
* int_object *item;
|
||||
* hash_table_for_each_matching(item, &candidate, &tab) {
|
||||
* // Do something with item, which will match "7"
|
||||
* }
|
||||
*/
|
||||
#define hash_table_for_each_matching(item, candidate, t) \
|
||||
for ((item) = hash_table_find((t), (candidate)); \
|
||||
(item); \
|
||||
(item) = hash_table_find_next((t), (item)))
|
||||
|
||||
@@ -229,7 +229,6 @@ void set_cloexec(FILE *fp);
|
||||
int push_call(char const *filename, char const *func, int lineno);
|
||||
void clear_callstack(void);
|
||||
int print_callstack(FILE *fp);
|
||||
int have_callstack(void);
|
||||
void pop_call(void);
|
||||
void FixSpecialType(Trigger *trig);
|
||||
void WriteJSONTrigger(Trigger const *t, int include_tags, int today);
|
||||
|
||||
@@ -268,12 +268,6 @@ print_callstack_aux(FILE *fp, cs *entry)
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
have_callstack(void)
|
||||
{
|
||||
return (callstack != NULL);
|
||||
}
|
||||
|
||||
int
|
||||
print_callstack(FILE *fp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user