X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fstrmap%2F_info;h=55319a82db53009bd3ab0b6cdd5830bd73cfd4d7;hb=e47d78e9ca621d7b5f70ef2638c177f20ea7d88e;hp=9832f80dbcf48c734f42466237352c1e35a951d5;hpb=20f3b260313fb4d5566aeb0d0c5439574e914e2d;p=ccan diff --git a/ccan/strmap/_info b/ccan/strmap/_info index 9832f80d..55319a82 100644 --- a/ccan/strmap/_info +++ b/ccan/strmap/_info @@ -1,5 +1,6 @@ -#include #include "config.h" +#include +#include /** * strmap - an ordered map of strings to values @@ -9,7 +10,7 @@ * http://cr.yp.to/critbit.html * http://github.com/agl/critbit (which this code is based on) * - * License: Public domain (but some dependencies are LGPL!) + * License: CC0 (but some dependencies are LGPL!) * Author: Rusty Russell * Ccanlint: * license_depends_compat FAIL @@ -21,8 +22,8 @@ * static bool dump(const char *member, size_t value, void *unused) * { * printf("%s at %zu. ", member, value); - * // false means keep going with iteration. - * return false; + * // true means keep going with iteration. + * return true; * } * * int main(int argc, char *argv[]) @@ -39,9 +40,9 @@ * printf("\n"); * return 0; * } - * // Given 'foo' outputs 'foo at 1. ' - * // Given 'foo bar' outputs 'bar at 2. foo at 1. ' - * // Given 'foo foo bar zebra' outputs 'bar at 3. foo at 1. zebra at 4. ' + * // Given "foo" outputs "foo at 1. \n" + * // Given "foo bar" outputs "bar at 2. foo at 1. \n" + * // Given "foo foo bar zebra" outputs "bar at 3. foo at 1. zebra at 4. \n" */ int main(int argc, char *argv[]) {