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