X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fstringmap%2F_info;h=49eff19cf359da262c25a5fda440410b28d24fa1;hp=38f3067826194ecd39e1bad0daf5fb2908f7636e;hb=c438ec17d7b2efe76e56e5fc5ab88bd4a02735e8;hpb=3c81225fc0a4fb99d10282ebf11b7ec6ae1eabdd diff --git a/ccan/stringmap/_info b/ccan/stringmap/_info index 38f30678..49eff19c 100644 --- a/ccan/stringmap/_info +++ b/ccan/stringmap/_info @@ -5,28 +5,29 @@ /** * stringmap - Macros for mapping strings to things * - * stringmap provides a generic string map via macros. + * stringmap provides a generic string map via macros. It also supports byte + * strings with null characters. * * Features which are sorely lacking in this version of stringmap are deletion and traversal. * * Example: * - * #include + * #include * - * static const char *get_string(void) { - * static char buffer[4096]; - * char *tail; - * if (!fgets(buffer, sizeof(buffer), stdin)) - * return NULL; - * tail = strchr(buffer, 0); - * if (tail>buffer && tail[-1]=='\n') - * *--tail = 0; - * if (!*buffer) - * return NULL; - * return buffer; - * } + * static const char *get_string(void) { + * static char buffer[4096]; + * char *tail; + * if (!fgets(buffer, sizeof(buffer), stdin)) + * return NULL; + * tail = strchr(buffer, 0); + * if (tail>buffer && tail[-1]=='\n') + * *--tail = 0; + * if (!*buffer) + * return NULL; + * return buffer; + * } * - * int main(void) { + * int main(void) { * stringmap(int) map = stringmap_new(NULL); * const char *string; * @@ -48,8 +49,12 @@ * return 0; * } * - * Authors: Joey Adams, Anders Magnusson - * License: BSD + * Authors: Joey Adams, Anders Magnusson + * License: BSD (3 clause) + * Version: 0.2 + * Ccanlint: + * // We actually depend (indirectly) on the LGPL talloc + * license_depends_compat FAIL */ int main(int argc, char *argv[]) {