#include <stdio.h>
#include "list.h"

struct person {
	char name[32];
	long ident;
	struct list_head list;
};

int main(void) {
	struct person alice = {"alice", 42};
	struct person bob = {"bob", 24};
	struct person *p;
	LIST_HEAD(lst);

	list_add(&alice.list, &lst);
	list_add(&bob.list, &lst);

	list_for_each_entry(p, &lst, list) {
		printf("%s:\t%ld\n", p->name, p->ident);
	}

	return 0;
}