2 Star 0 Fork 0

付少爷/gtk_downlader

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
list.h 2.97 KB
一键复制 编辑 原始数据 按行查看 历史
fulingjun 提交于 2021-07-31 09:50 . SRC 实现停止删除任务
/* list.h -- header file for a simple list type */
#ifndef LIST_H_
#define LIST_H_
#include <stdbool.h> /* C99 feature */
#include<taskinfo.h>
/* program-specific declarations */
#define TSIZE 45 /* size of array to hold title */
/* general type definitions */
typedef Taskinfo Item;
typedef struct node
{
Item item;
struct node * next;
} Node;
typedef Node * List;
/* function prototypes */
/* operation: initialize a list��ʼ���б� */
/* preconditions: plist points to a list */
/* postconditions: the list is initialized to empty */
void InitList(void);
/* operation: determine if list is emptyȷ���б��Ƿ�Ϊ�� */
/* plist points to an initialized list */
/* postconditions: function returns True if list is empty */
/* and returns False otherwise */
bool ListIsEmpty(void);
/* operation: determine if list is fullȷ���б��Ƿ����� */
/* plist points to an initialized list */
/* postconditions: function returns True if list is full */
/* and returns False otherwise */
//bool ListIsFull(const List *plist);
/* operation: determine number of items in list ȷ���б�����Ŀ�ĸ���*/
/* plist points to an initialized list */
/* postconditions: function returns number of items in list */
unsigned int ListItemCount(void);
/* operation: add item to end of list ���б�β����һ����Ŀ*/
/* preconditions: item is an item to be added to list */
/* plist points to an initialized list */
/* postconditions: if possible, function adds item to end */
/* of list and returns True; otherwise the */
/* function returns False */
bool AddItem(Item *item);
/*��һ�����������б��е�ÿ����Ŀ*/
/* operation: apply a function to each item in list */
/* plist points to an initialized list */
/* pfun points to a function that takes an */
/* Item argument and has no return value */
/* postcondition: the function pointed to by pfun is */
/* executed once for each item in the list */
void Traverse (void (* pfun)(Item *item) );
//找到链表中index的taskinfo
int GetTaskinfoByFilename(Taskinfo *taskinfo, char *filename);
//从链表中删除内容
int RemoveListItem(Taskinfo *taskinfo);
/* operation: free allocated memory, if any�ͷ��ڴ� */
/* plist points to an initialized list */
/* postconditions: any memory allocated for the list is freed */
/* and the list is set to empty */
void EmptyTheList(void);
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lingjiao0710/gtk_downlader.git
git@gitee.com:lingjiao0710/gtk_downlader.git
lingjiao0710
gtk_downlader
gtk_downlader
master

搜索帮助