+#include "config.h"
#include <stdio.h>
#include <string.h>
-#include "config.h"
/**
* tal/str - string helper routines which use tal
*
* Example:
* #include <ccan/tal/str/str.h>
- * #include <ccan/grab_file/grab_file.h>
+ * #include <ccan/tal/grab_file/grab_file.h>
* #include <err.h>
*
* // Dumb demo program to double-linespace a file.
* char **lines;
*
* // Grab lines in file.
- * textfile = grab_file(NULL, argv[1], NULL);
+ * textfile = grab_file(NULL, argv[1]);
* if (!textfile)
* err(1, "Failed reading %s", argv[1]);
- * lines = strsplit(textfile, textfile, "\n", STR_EMPTY_OK);
+ * lines = tal_strsplit(textfile, textfile, "\n", STR_EMPTY_OK);
*
* // Join them back together with two linefeeds.
- * printf("%s", strjoin(textfile, lines, "\n\n", STR_TRAIL));
+ * printf("%s", tal_strjoin(textfile, lines, "\n\n", STR_TRAIL));
*
* // Free everything, just because we can.
* tal_free(textfile);
if (strcmp(argv[1], "depends") == 0) {
printf("ccan/str\n");
+#ifdef TAL_USE_TALLOC
+ printf("ccan/tal/talloc\n");
+#else
printf("ccan/tal\n");
+#endif
printf("ccan/take\n");
return 0;
}