Bug #760 ยป 0022-speclist.h-Mark-inline-function-headers-for-doxygen.patch
utility/speclist.h | ||
---|---|---|
typedef bool (*SPECLIST_FOO(_list_cond_fn_t)) (const SPECLIST_TYPE *);
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Create a new speclist.
|
||
****************************************************************************/
|
||
static inline SPECLIST_LIST *SPECLIST_FOO(_list_new) (void)
|
||
... | ... | |
return (SPECLIST_LIST *) genlist_new();
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Create a new speclist with a free callback.
|
||
****************************************************************************/
|
||
static inline SPECLIST_LIST *
|
||
... | ... | |
genlist_new_full((genlist_free_fn_t) free_data_func));
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Free a speclist.
|
||
****************************************************************************/
|
||
static inline void SPECLIST_FOO(_list_destroy) (SPECLIST_LIST *tthis)
|
||
... | ... | |
genlist_destroy((struct genlist *) tthis);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Duplicate a speclist.
|
||
****************************************************************************/
|
||
static inline SPECLIST_LIST *
|
||
... | ... | |
return (SPECLIST_LIST *) genlist_copy((const struct genlist *) tthis);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Duplicate a speclist with a free callback and a function to copy each
|
||
element.
|
||
****************************************************************************/
|
||
... | ... | |
(genlist_free_fn_t) free_data_func));
|
||
}
|
||
/****************************************************************************
|
||
/*************************************************************************//**
|
||
Remove all elements from the speclist.
|
||
****************************************************************************/
|
||
static inline void SPECLIST_FOO(_list_clear) (SPECLIST_LIST *tthis)
|
||
... | ... | |
genlist_clear((struct genlist *) tthis);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Remove all element duplicates (the speclist must be sorted before).
|
||
****************************************************************************/
|
||
static inline void SPECLIST_FOO(_list_unique) (SPECLIST_LIST *tthis)
|
||
... | ... | |
genlist_unique((struct genlist *) tthis);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Remove all element duplicates (the speclist must be sorted before), using
|
||
'comp_data_func' to determine if the elements are equivalents.
|
||
****************************************************************************/
|
||
... | ... | |
(genlist_comp_fn_t) comp_data_func);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Push back an element into the speclist.
|
||
****************************************************************************/
|
||
static inline void SPECLIST_FOO(_list_append) (SPECLIST_LIST *tthis,
|
||
... | ... | |
genlist_append((struct genlist *) tthis, pfoo);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Push front an element into the speclist.
|
||
****************************************************************************/
|
||
static inline void SPECLIST_FOO(_list_prepend) (SPECLIST_LIST *tthis,
|
||
... | ... | |
genlist_prepend((struct genlist *) tthis, pfoo);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Insert an element into the speclist at the given position.
|
||
****************************************************************************/
|
||
static inline void SPECLIST_FOO(_list_insert) (SPECLIST_LIST *tthis,
|
||
... | ... | |
genlist_insert((struct genlist *) tthis, pfoo, idx);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Insert an element after the specified link.
|
||
****************************************************************************/
|
||
static inline void SPECLIST_FOO(_list_insert_after) (SPECLIST_LIST *tthis,
|
||
... | ... | |
(struct genlist_link *) plink);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Insert an element before the specified link.
|
||
****************************************************************************/
|
||
static inline void SPECLIST_FOO(_list_insert_before) (SPECLIST_LIST *tthis,
|
||
... | ... | |
(struct genlist_link *) plink);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Search 'pfoo' in the speclist, and remove it. Returns TRUE on success.
|
||
****************************************************************************/
|
||
static inline bool SPECLIST_FOO(_list_remove) (SPECLIST_LIST *tthis,
|
||
... | ... | |
return genlist_remove((struct genlist *) tthis, pfoo);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Remove the first element which fit the conditional function. Returns
|
||
TRUE on success.
|
||
****************************************************************************/
|
||
... | ... | |
(genlist_cond_fn_t) cond_data_func);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Remove 'pfoo' of the whole list. Returns the number of removed elements.
|
||
****************************************************************************/
|
||
static inline int SPECLIST_FOO(_list_remove_all) (SPECLIST_LIST *tthis,
|
||
... | ... | |
return genlist_remove_all((struct genlist *) tthis, pfoo);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Remove all elements which fit the conditional function. Returns the
|
||
number of removed elements.
|
||
****************************************************************************/
|
||
... | ... | |
(genlist_cond_fn_t) cond_data_func);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Remove the elements pointed by 'plink'. Returns the next element of the
|
||
speclist.
|
||
... | ... | |
genlist_erase((struct genlist *) tthis, (struct genlist_link *) plink);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Remove the first element of the speclist.
|
||
****************************************************************************/
|
||
static inline void SPECLIST_FOO(_list_pop_front) (SPECLIST_LIST *tthis)
|
||
... | ... | |
genlist_pop_front((struct genlist *) tthis);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Remove the last element of the speclist.
|
||
****************************************************************************/
|
||
static inline void SPECLIST_FOO(_list_pop_back) (SPECLIST_LIST *tthis)
|
||
... | ... | |
genlist_pop_back((struct genlist *) tthis);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Return the number of elements inside the speclist.
|
||
****************************************************************************/
|
||
static inline int SPECLIST_FOO(_list_size) (const SPECLIST_LIST *tthis)
|
||
... | ... | |
return genlist_size((const struct genlist *) tthis);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Return the element at position in the speclist.
|
||
****************************************************************************/
|
||
static inline SPECLIST_TYPE *
|
||
... | ... | |
genlist_get((const struct genlist *) tthis, slindex));
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Return the first element of the speclist.
|
||
****************************************************************************/
|
||
static inline SPECLIST_TYPE *
|
||
... | ... | |
return (SPECLIST_TYPE *) genlist_front((const struct genlist *) tthis);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Return the last element of the speclist.
|
||
****************************************************************************/
|
||
static inline SPECLIST_TYPE *
|
||
... | ... | |
return (SPECLIST_TYPE *) genlist_back((const struct genlist *) tthis);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Return the element at position in the speclist.
|
||
****************************************************************************/
|
||
static inline SPECLIST_LINK *
|
||
... | ... | |
genlist_link_get((const struct genlist *) tthis, slindex));
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Return the head link of the speclist.
|
||
****************************************************************************/
|
||
static inline SPECLIST_LINK *
|
||
... | ... | |
return (SPECLIST_LINK *) genlist_head((const struct genlist *) tthis);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Return the tail link of the speclist.
|
||
****************************************************************************/
|
||
static inline SPECLIST_LINK *
|
||
... | ... | |
return (SPECLIST_LINK *) genlist_tail((const struct genlist *) tthis);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Return the link of the first element which match the data 'pfoo'.
|
||
****************************************************************************/
|
||
static inline SPECLIST_LINK *
|
||
... | ... | |
genlist_search((const struct genlist *) tthis, pfoo));
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Return the link of the first element which match the conditional function.
|
||
****************************************************************************/
|
||
static inline SPECLIST_LINK *
|
||
... | ... | |
(genlist_cond_fn_t) cond_data_func));
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Sort the speclist.
|
||
****************************************************************************/
|
||
static inline void
|
||
... | ... | |
(int (*)(const void *, const void *)) compar);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Shuffle the speclist.
|
||
****************************************************************************/
|
||
static inline void SPECLIST_FOO(_list_shuffle) (SPECLIST_LIST *tthis)
|
||
... | ... | |
genlist_shuffle((struct genlist *) tthis);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Reverse the order of the elements of the speclist.
|
||
****************************************************************************/
|
||
static inline void SPECLIST_FOO(_list_reverse) (SPECLIST_LIST *tthis)
|
||
... | ... | |
genlist_reverse((struct genlist *) tthis);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Allocate speclist mutex
|
||
****************************************************************************/
|
||
static inline void SPECLIST_FOO(_list_allocate_mutex) (SPECLIST_LIST *tthis)
|
||
... | ... | |
genlist_allocate_mutex((struct genlist *) tthis);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Release speclist mutex
|
||
****************************************************************************/
|
||
static inline void SPECLIST_FOO(_list_release_mutex) (SPECLIST_LIST *tthis)
|
||
... | ... | |
genlist_release_mutex((struct genlist *) tthis);
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Return the data of the link.
|
||
****************************************************************************/
|
||
static inline SPECLIST_TYPE *
|
||
... | ... | |
genlist_link_data((const struct genlist_link *) plink));
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Return the previous link.
|
||
****************************************************************************/
|
||
static inline SPECLIST_LINK *
|
||
... | ... | |
genlist_link_prev((const struct genlist_link *) plink));
|
||
}
|
||
/****************************************************************************
|
||
/************************************************************************//**
|
||
Return the next link.
|
||
****************************************************************************/
|
||
static inline SPECLIST_LINK *
|