Integrate test_header in test_view_mail and various coding style modifications
[rmail.git] / src / utils / list.h
blob69ec5eaf756bcb4114ca10ee3ee489dc688840c3
1 #ifndef LIST_H
2 #define LIST_H
4 #define MESSAGE_LIMIT 512
6 struct mail_entry {
7 char name[1024]; /* Filename */
8 char addr[1024]; /* From or Reply-To address */
9 char subj[1024]; /* Subject */
10 unsigned char addr_md5[16]; /* MD5 sum of addr field */
13 struct mail_list {
14 size_t n; /* Number of elements */
15 size_t nfree; /* Index ot the 1st free element */
16 struct mail_entry list[1]; /* Ptr to mail entries */
21 struct mail_list *list_create(size_t n_elem, size_t limit);
23 void list_free(struct mail_list *lst);
25 int list_add_entry(struct mail_list *lst, struct mail_entry *entry);
27 void list_print(struct mail_list *lst);
29 #endif /* LIST_H */