6 * lqueue - Simple, singly-linked-list queue implementation
8 * This code provides a simple implementation of the Queue abstract
9 * data type in terms of a singly linked (circular) list.
12 * Author: David Gibson <david@gibson.dropbear.id.au>
15 * #include <ccan/lqueue/lqueue.h>
19 * struct lqueue_link ql;
22 * int main(int argc, char *argv[])
28 * for (i = 0; i < argc; i++) {
29 * a = malloc(sizeof(*a));
31 * lqueue_enqueue(&argq, a, ql);
34 * printf("Command line arguments in order:\n");
36 * while (!lqueue_empty(&argq)) {
37 * a = lqueue_dequeue(&argq, struct arg, ql);
38 * printf("Argument: %s\n", a->arg);
45 int main(int argc, char *argv[])
47 /* Expect exactly one argument */
51 if (strcmp(argv[1], "depends") == 0) {
52 printf("ccan/container_of\n");