+/* Licensed under LGPLv2+ - see LICENSE file for details */
#ifndef CCAN_GRAB_FILE_H
#define CCAN_GRAB_FILE_H
#include <stdio.h> // For size_t
* byte after the end of the content will always be NUL.
*
* Example:
+ * #include <ccan/str_talloc/str_talloc.h>
+ * #include <ccan/talloc/talloc.h>
+ * ...
* // Return all of standard input, as lines.
- * char **read_as_lines(void)
+ * static char **read_stdin_as_lines(void)
* {
* char **lines, *all;
*
* all = grab_fd(NULL, 0, NULL);
* if (!all)
* return NULL;
- * lines = strsplit(NULL, all, "\n", NULL);
+ * lines = strsplit(NULL, all, "\n");
* talloc_free(all);
* return lines;
* }
*
* Example:
* // Return all of a given file, as lines.
- * char **read_as_lines(const char *filename)
+ * static char **read_file_as_lines(const char *filename)
* {
* char **lines, *all;
*
* all = grab_file(NULL, filename, NULL);
* if (!all)
* return NULL;
- * lines = strsplit(NULL, all, "\n", NULL);
+ * lines = strsplit(NULL, all, "\n");
* talloc_free(all);
* return lines;
* }