version 1.1.2.1, 2022/01/04 22:32:34
|
version 1.1.2.2, 2022/01/05 23:03:40
|
Line 61 struct tagIndex {
|
Line 61 struct tagIndex {
|
typedef struct tagIndex index_t; |
typedef struct tagIndex index_t; |
|
|
/* |
/* |
* index_get() - Get hash like list or first pointer | * index_getList() - Get hash like list or first pointer |
*/ |
*/ |
#define index_get(x, k) (x)->i_hash[(k)] | #define index_getList(x, k) (x)->i_hash[(k)] |
| #define index_Next(x) (x)->il_next |
#define index_Hash(x) (x)->il_hash |
#define index_Hash(x) (x)->il_hash |
#define index_Len(x) (x)->il_len |
#define index_Len(x) (x)->il_len |
#define index_Ptr(x) (x)->il_ptr |
#define index_Ptr(x) (x)->il_ptr |
Line 80 index_t *index_Init(index_t * __restrict idx);
|
Line 81 index_t *index_Init(index_t * __restrict idx);
|
* index_FreeLists() - Free linked lists with data |
* index_FreeLists() - Free linked lists with data |
* |
* |
* @idx = index |
* @idx = index |
* return: no result | * return: none |
*/ |
*/ |
void index_FreeLists(index_t *idx); |
void index_FreeLists(index_t *idx); |
/* |
/* |
* index_Destroy() - Destroy index |
* index_Destroy() - Destroy index |
* |
* |
* @idx = index |
* @idx = index |
* return: no result | * return: none |
*/ |
*/ |
void index_Destroy(index_t **idx); |
void index_Destroy(index_t **idx); |
|
|
Line 114 int index_add(index_t *idx, unsigned short key, void *
|
Line 115 int index_add(index_t *idx, unsigned short key, void *
|
*/ |
*/ |
int index_del(index_t *idx, unsigned short key, void *data, int datlen); |
int index_del(index_t *idx, unsigned short key, void *data, int datlen); |
/* |
/* |
|
* index_del2() - Dels item with index key and hash |
|
* |
|
* @idx = index |
|
* @key = hash key |
|
* @hash = calculated hash of item when its added to index |
|
* return: -1 error, 0 nothing deleted and 1 item deleted |
|
*/ |
|
int index_del2(index_t *idx, unsigned short key, unsigned int hash); |
|
/* |
* index_delList() - Delete list behind key |
* index_delList() - Delete list behind key |
* |
* |
* @idx = index |
* @idx = index |
Line 148 index_list_t index_get2(index_t *idx, unsigned short k
|
Line 158 index_list_t index_get2(index_t *idx, unsigned short k
|
* return: NULL error or not found and !=NULL returned variable. Must be free after use! |
* return: NULL error or not found and !=NULL returned variable. Must be free after use! |
*/ |
*/ |
ait_val_t *index_getVar(index_t *idx, u_short key, u_int hash); |
ait_val_t *index_getVar(index_t *idx, u_short key, u_int hash); |
|
|
|
|
|
/* |
|
* index_dump() - Debug routine about index hashes |
|
* |
|
* @idx = index |
|
* return: none |
|
*/ |
|
void index_dump(index_t *idx); |
|
|
|
|
#endif |
#endif |