Check for SYS/GL during library init. Reason is that
[AROS.git] / test / exec / enqueue.c
blobaa4cb5dd464bbcce83648d7af3af8eda376d2259
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <exec/lists.h>
7 #include <proto/exec.h>
9 #include <stdio.h>
11 struct Node node1,node2,node3,node4;
12 struct List list;
14 int main(void)
16 struct Node *n;
18 NEWLIST(&list);
20 node1.ln_Pri = 3;
21 node1.ln_Name = "Eins";
23 node2.ln_Pri = 2;
24 node2.ln_Name = "Zwei";
26 node3.ln_Pri = 1;
27 node3.ln_Name = "Drei";
29 node4.ln_Pri = 3;
30 node4.ln_Name = "Vier";
32 Enqueue(&list, &node1);
33 Enqueue(&list, &node2);
34 Enqueue(&list, &node3);
35 Enqueue(&list, &node4);
37 ForeachNode(&list, n)
39 printf("%s %d\n", n->ln_Name, n->ln_Pri);
42 return 0;