X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fcast%2F_info;h=29128b8d5cf7cff915b07fa01783c2c44727073f;hp=f5cd37fc337bf42159f3f4fa66fc846031eb6d20;hb=HEAD;hpb=291237b4fed863be74051274ac5ad9920cb33cc3 diff --git a/ccan/cast/_info b/ccan/cast/_info index f5cd37fc..29128b8d 100644 --- a/ccan/cast/_info +++ b/ccan/cast/_info @@ -20,10 +20,11 @@ * License: LGPL (v2.1 or any later version) * * Example: - * // Given "test" contains "3 t's in 'test string' + * // Given "test" output contains "3 t's in 'test string'" * #include * #include * #include + * #include * * // Find char @orig in @str, if @repl, replace them. Return number. * static size_t find_chars(char *str, char orig, char repl) @@ -53,6 +54,9 @@ * { * uint64_t hash; * + * if (argc != 2) { + * fprintf(stderr, "Needs argument\n"); exit(1); + * } * // find_chars wants a non-const string, but doesn't * // need it if repl == 0. * printf("%zu %c's in 'test string'\n",