5 * asprintf - asprintf wrapper (and if necessary, implementation).
7 * This provides a convenient wrapper for asprintf, and also implements
8 * asprintf if necessary.
10 * Author: Rusty Russell <rusty@rustcorp.com.au>
15 * #include <ccan/asprintf/asprintf.h>
19 * int main(int argc, char *argv[])
21 * char *p = afmt("This program has %i arguments", argc);
24 * while ((ret = write(STDOUT_FILENO, p, strlen(p))) > 0) {
29 * err(1, "Writing to stdout");
32 int main(int argc, char *argv[])
34 /* Expect exactly one argument */
38 if (strcmp(argv[1], "depends") == 0) {
39 printf("ccan/compiler\n");