summaryrefslogtreecommitdiff
path: root/src/tc-list2.c
blob: d70ada236fbf60e4eeacedbce8406858afa6680e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// SPDX-License-Identifier: MIT
#include <stdio.h>
#include <stdlib.h>
#include <libHX/list.h>

struct item {
	struct HXlist_head list;
};

int main(void)
{
	HXLIST_HEAD(clh);
	struct item lh;
	struct item *pos;

	HXlist_init(&lh.list);
	HXlist_add_tail(&clh, &lh.list);
	HXlist_for_each_entry(pos, &clh, list)
#ifdef OK
		printf("%p\n", pos);
#else
		;
#endif
	return EXIT_SUCCESS;
}