summaryrefslogtreecommitdiff
path: root/src/tc-list2.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-02-04 14:09:54 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-02-04 14:09:54 +0100
commitbd82d030011cd8b9655e5ded6b6df9343b42a6bd (patch)
treede82d886dfea0cb7dbb6e80436218a25cb211bc3 /src/tc-list2.c
Imported Upstream version 3.22upstream/3.22
Diffstat (limited to 'src/tc-list2.c')
-rw-r--r--src/tc-list2.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/tc-list2.c b/src/tc-list2.c
new file mode 100644
index 0000000..f41861b
--- /dev/null
+++ b/src/tc-list2.c
@@ -0,0 +1,31 @@
+/*
+ * Copyright Jan Engelhardt
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the WTF Public License version 2 or
+ * (at your option) any later version.
+ */
+#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;
+}