summaryrefslogtreecommitdiff
path: root/ccan/aga/_info
blob: fa5e8fe9f4b524ea75916911eb92013826c15523 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include "config.h"
#include <stdio.h>
#include <string.h>

/**
 * aga - Abstract Graph Algorithms
 *
 * This modules contains several standard graph algorithms,
 * implemented so that they don't rely on a specific representation of
 * the graph structure.  Instead, user supplied callbacks can compute
 * the graph's edges as required.  Graph nodes can even be constructed
 * on the fly as they're discovered by edge traversal.
 *
 * The algorithms do require a certain amount of persistent data
 * per-node.  The module doesn't allocate, so the callbacks are
 * required to include an aga_node field inside new nodes when they're
 * discovered.  Because this relies on a structure embedded within the
 * caller's representation of the graph nodes/states, it's not
 * re-entrant - only one aga algorithm can be running at a time (per
 * aga_node instance).
 *
 * License: LGPL (v2.1 or any later version)
 * Author: David Gibson <david@gibson.dropbear.id.au>
 */
int main(int argc, char *argv[])
{
	/* Expect exactly one argument */
	if (argc != 2)
		return 1;

	if (strcmp(argv[1], "depends") == 0) {
		printf("ccan/build_assert\n");
		printf("ccan/check_type\n");
		printf("ccan/lstack\n");
		printf("ccan/lqueue\n");
		return 0;
	}

	if (strcmp(argv[1], "testdepends") == 0) {
		printf("ccan/container_of\n");
		printf("ccan/ptrint\n");
		printf("ccan/array_size\n");
		printf("ccan/tal\n");
		printf("ccan/tal/str\n");
		printf("ccan/tal/grab_file\n");
		printf("ccan/take\n");
		return 0;
	}

	return 1;
}