ZE-Standard-Libraries/include/list/list_quick.h

66 lines
1.8 KiB
C
Raw Normal View History

2018-08-23 16:57:38 +00:00
#ifndef list_quick_h
#define list_quick_h
#include <list/list_type.h>
/*
*
*/
struct lst_std_id{
unsigned long long start_idx;
unsigned long long end_idx;
#ifdef id_enable
SID *sid;
#endif
};
struct list_quick;
/*
*
*/
struct index_change{
unsigned long long c_index;//偏移量,有正负之分
int f_count;//偏移量所对应的数组的节点
};
/*
*
*/
struct list_quick{
Node **fn_node;//指向链表各个节点的映射数组
unsigned long long fn_len;//映射数组的总长度
unsigned long long rlst_len;//在映射数组实际被占用的长度
_Bool if_sort;//链表是否有序
unsigned int idxc_count;//链的删减增的操作次数
struct index_change *idxc_lst[INDEX_CHANGE_MAX];//储存链表的删减增操作的记录
FILE *fp;//链表缓存文件
List *stdid_lst;
};
/***********************************************
*:,.
* ..
***********************************************/
/*
*
*: 0, -1.*/
extern int enableListQuick(List *p_list);
/*
*
*: 0, -1.*/
extern int disableListQuick(List *p_list);
extern Node *getNodeByFnNode(List *p_list, unsigned long long index);
extern void digHole(List *p_list, Node *p_node);
extern Node *findFnNode(List *p_list, Node *p_node);
extern int indexChange(List *p_list, unsigned long long c_index, int move);
//Node *getListTail(List *);
#endif /* list_quick_h */