]> git.ozlabs.org Git - ccan/blob - ccan/aga/_info
tal: allow notifiers on NULL.
[ccan] / ccan / aga / _info
1 #include "config.h"
2 #include <stdio.h>
3 #include <string.h>
4
5 /**
6  * aga - Abstract Graph Algorithms
7  *
8  * This modules contains several standard graph algorithms,
9  * implemented so that they don't rely on a specific representation of
10  * the graph structure.  Instead, user supplied callbacks can compute
11  * the graph's edges as required.  Graph nodes can even be constructed
12  * on the fly as they're discovered by edge traversal.
13  *
14  * The algorithms do require a certain amount of persistent data
15  * per-node.  The module doesn't allocate, so the callbacks are
16  * required to include an aga_node field inside new nodes when they're
17  * discovered.  Because this relies on a structure embedded within the
18  * caller's representation of the graph nodes/states, it's not
19  * re-entrant - only one aga algorithm can be running at a time (per
20  * aga_node instance).
21  *
22  * License: LGPL (v2.1 or any later version)
23  * Author: David Gibson <david@gibson.dropbear.id.au>
24  */
25 int main(int argc, char *argv[])
26 {
27         /* Expect exactly one argument */
28         if (argc != 2)
29                 return 1;
30
31         if (strcmp(argv[1], "depends") == 0) {
32                 printf("ccan/build_assert\n");
33                 printf("ccan/check_type\n");
34                 printf("ccan/lstack\n");
35                 printf("ccan/lqueue\n");
36                 printf("ccan/order\n");
37                 printf("ccan/lpq\n");
38                 return 0;
39         }
40
41         if (strcmp(argv[1], "testdepends") == 0) {
42                 printf("ccan/container_of\n");
43                 printf("ccan/ptrint\n");
44                 printf("ccan/array_size\n");
45                 printf("ccan/tal\n");
46                 printf("ccan/tal/str\n");
47                 printf("ccan/tal/grab_file\n");
48                 printf("ccan/take\n");
49                 return 0;
50         }
51
52         return 1;
53 }