开发工具:
文件大小: 179kb
下载次数: 0
上传时间: 2009-12-08
详细说明: /** * db_list.h : public header for application */ #ifndef DB_LIST_H #define DB_LIST_H #include /** * Basic structures */ typedef void info_t; typedef struct node { info_t *info; struct node *next; struct node *prev; } node_t; typedef struct list { node_t *head; node_t *tail; node_t *current; size_t info_size; unsigned long current_index; unsigned long list_size; } list_t; /** * Prototypes */ /* List initialization routines */ list_t *list_create(list_t ** list); i nt list_init(list_t * list, size_t info_size); void list_destroy(list_t ** list); /* Status and state routines */ int list_empty(list_t * list); unsigned long get_list_size(list_t * list); /* List update routines */ int list_add(list_t * list, info_t * info); int list_add_tail(list_t * list, info_t * info); int list_replace(list_t * list, node_t * new_node); int list_del(list_t * list); int list_clear(list_t * list); int list_move(list_t * list, list_t * list_a); int list_move_tail(list_t * list, list_t * list_a); /* List search routines */ int find_record(list_t * list, info_t * match, int (*cmp) (info_t *, info_t *)); info_t *get_current_record(list_t * list); info_t *get_next_record(list_t * list); info_t *get_prev_record(list_t * list); info_t *get_first_record(list_t * list); info_t *get_last_record(list_t * list); /* Input/Output routines */ int export_list(list_t * list, const char *path); int import_list(list_t * list, const char *path); #endif /* DB_LIST_H */ ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.