summaryrefslogtreecommitdiff
path: root/ccan/order/_info
blob: b5df2378a7974d7463c8f3de0c6c419a13bf41bf (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
#include "config.h"
#include <stdio.h>
#include <string.h>

/**
 * order - Simple, common value comparison functions
 *
 * This implements a number of commonly useful comparison functions in
 * a form which can be used with qsort() and bsearch() in the standard
 * library, or asort() and asearch() in ccan amongst other places.
 *
 * License: CC0
 * 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/typesafe_cb\n");
		printf("ccan/ptrint\n");
		return 0;
	}
	if (strcmp(argv[1], "testdepends") == 0) {
		printf("ccan/array_size\n");
		printf("ccan/asort\n");
		return 0;
	}

	return 1;
}