4 #include "ccan/darray/darray.h"
7 * darray - Generic resizable arrays
9 * darray is a set of macros for managing dynamically-allocated arrays.
10 * It removes the tedium of managing realloc'd arrays with pointer, size, and
14 * #include <ccan/darray/darray.h>
18 * darray(int) numbers = darray_new();
23 * darray_foreach(i, numbers)
25 * if (darray_size(numbers) > 0)
29 * fgets(buffer, sizeof(buffer), stdin);
30 * if (*buffer == '\0' || *buffer == '\n')
33 * darray_append(numbers, atoi(buffer));
36 * darray_free(numbers);
41 * Author: Joey Adams <joeyadams3.14159@gmail.com>
45 int main(int argc, char *argv[])
50 if (strcmp(argv[1], "depends") == 0) {