📄 ds_list.h
字号:
#ifndef __DS_LIST_H__
#define __DS_LIST_H__
#define FLAG_RELEASE 0x0001
typedef struct LNode{
void *data;
struct LNode *next;
struct LNode *prev;
} *LPOSITION;
typedef struct {
LPOSITION head, tail;
UINT size;
UINT count;
} DS_LIST;
void DSL_InitList( DS_LIST* pList, UINT size );
void* DSL_GetAt( LPOSITION pos );
BOOL DSL_IsEmpty( DS_LIST* pList );
int DSL_GetCount( DS_LIST* pList );
LPOSITION DSL_NextPos( LPOSITION pos);
LPOSITION DSL_PrevPos( LPOSITION pos );
LPOSITION DSL_GetHead( DS_LIST* pList );
LPOSITION DSL_GetLast( DS_LIST* pList );
BOOL DSL_SetAt( DS_LIST* pList, LPOSITION pos, void* elem );
void DSL_ClearList( DS_LIST* pList );
LPOSITION DSL_AddHead( DS_LIST* pList, void* node );
LPOSITION DSL_AddTail( DS_LIST* pList, void* node );
BOOL DSL_RemoveAt( DS_LIST* pList, LPOSITION pos );
BOOL DSL_RemoveTail( DS_LIST* pList );
LPOSITION DSL_AddTail( DS_LIST* pList, void* node );
BOOL DSL_IsEOF( DS_LIST* pList, LPOSITION pos );
BOOL DSL_IsBOF( DS_LIST* pList, LPOSITION pos );
LPOSITION DSL_InsertBefore( DS_LIST* pList, LPOSITION pos, void* elem );
LPOSITION DSL_InsertAfter( DS_LIST* pList, LPOSITION pos, void* elem );
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -