1 /* active_list.h - the opkg package management system
3 Tick Chen <tick@openmoko.com>
5 Copyright (C) 2008 Openmoko Inc.
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2, or (at
10 your option) any later version.
12 This program is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
24 struct list_head node
;
25 struct list_head depend
;
26 struct active_list
*depended
;
30 struct active_list
* active_list_head_new();
31 void active_list_head_delete(struct active_list
*);
32 void active_list_init(struct active_list
*ptr
);
33 void active_list_clear(struct active_list
*head
);
34 void active_list_add_depend(struct active_list
*node
, struct active_list
*depend
);
35 void active_list_add(struct active_list
*head
, struct active_list
*node
);
36 struct active_list
*active_list_move_node(struct active_list
*old_head
, struct active_list
*new_head
, struct active_list
*node
);
38 struct active_list
* active_list_sort(struct active_list
*head
, int (*compare_fcn_t
)(const void *, const void *));
40 struct active_list
* active_list_next(struct active_list
*head
, struct active_list
*ptr
);
42 struct active_list
* active_list_prev(struct active_list
*head
, struct active_list
*ptr
);