From 806f94eb6c0c3eb521458901a23e470037ede807 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 19 Aug 2014 02:13:46 +0930 Subject: [PATCH] ccan_tokenizer: switch example from grab_file to ccan/grab_file. Signed-off-by: Rusty Russell --- ccan/ccan_tokenizer/_info | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ccan/ccan_tokenizer/_info b/ccan/ccan_tokenizer/_info index aef90fb9..ee1477a9 100644 --- a/ccan/ccan_tokenizer/_info +++ b/ccan/ccan_tokenizer/_info @@ -11,7 +11,7 @@ * Example: * * #include - * #include + * #include * #include * * static void token_list_stats(const struct token_list *tl) { @@ -48,7 +48,6 @@ * } * * int main(int argc, char *argv[]) { - * size_t len; * char *file; * struct token_list *tl; * tok_message_queue mq; @@ -59,12 +58,12 @@ * fprintf(stderr, "Usage: %s source_file\n", argv[0]); * return 1; * } - * file = grab_file(NULL, argv[1], &len); + * file = grab_file(NULL, argv[1]); * if (!file) * err(1, "Could not read file %s", argv[1]); * * //tokenize the contents - * tl = tokenize(file, file, len, &mq); + * tl = tokenize(file, file, strlen(file), &mq); * * //print warnings, errors, etc. * while (queue_count(mq)) { -- 2.39.2