1 #include <ccan/asearch/asearch.h>
2 #include <ccan/array_size/array_size.h>
3 #include <ccan/tap/tap.h>
6 #include <ccan/asearch/asearch.c>
8 static int cmp(const int *key, const char *const *elem, void *ctx)
10 return *key - atoi(*elem);
15 const char *args[] = { "1", "4", "7", "9" };
20 p = asearch(&key, args, ARRAY_SIZE(args), cmp, NULL);