mei_rt2mei_rt2_fix_1
Last change
on this file since ba75224 was
abf8d5d,
checked in by Mei <mei@…>, 12 years ago
|
1) add backtrack/multiple solutions proof code changes and new
examples.
|
-
Property mode set to
100644
|
File size:
985 bytes
|
Rev | Line | |
---|
[6d5623e] | 1 | #ifndef __LIST_H__ |
---|
| 2 | #define __LIST_H__ |
---|
| 3 | |
---|
| 4 | #include "utlist.h" |
---|
| 5 | |
---|
| 6 | typedef struct _abac_list_t abac_list_t; |
---|
| 7 | typedef struct _abac_list_element_t abac_list_element_t; |
---|
| 8 | |
---|
| 9 | struct _abac_list_element_t { |
---|
| 10 | void *ptr; |
---|
| 11 | abac_list_element_t *prev, *next; |
---|
| 12 | }; |
---|
| 13 | |
---|
| 14 | struct _abac_list_t { |
---|
| 15 | abac_list_element_t *elts; |
---|
| 16 | int size; |
---|
| 17 | }; |
---|
| 18 | |
---|
| 19 | abac_list_t *abac_list_new(void); |
---|
| 20 | void abac_list_add(abac_list_t *list, void *elt); |
---|
[abf8d5d] | 21 | int abac_list_unique_add(abac_list_t *list, void *elt); |
---|
[202a7f9] | 22 | void abac_list_prepend(abac_list_t *list, void *elt); |
---|
[6d5623e] | 23 | int abac_list_remove(abac_list_t *list, void *elt); |
---|
| 24 | int abac_list_size(abac_list_t *list); |
---|
| 25 | void abac_list_free(abac_list_t *list); |
---|
| 26 | |
---|
| 27 | #define abac_list_foreach(LIST, CURRENT, BODY) do { \ |
---|
| 28 | abac_list_element_t *_elt; \ |
---|
| 29 | DL_FOREACH(LIST->elts, _elt) { \ |
---|
| 30 | CURRENT = (typeof(CURRENT))_elt->ptr; \ |
---|
| 31 | BODY \ |
---|
| 32 | } \ |
---|
| 33 | } while (0) |
---|
| 34 | |
---|
| 35 | #endif /* __LIST_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.