X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fendian%2F_info;h=efe5a8bbde753164ea206d0b4d82c9bc4a9f1763;hp=ae63e14eb53c0840860a9a5b3c833522b23c13ab;hb=7d1f0c73e4d321561abb74f82c8be97f10d69836;hpb=570c9c555f076e74f46141bb42b5d1d7ac89f632 diff --git a/ccan/endian/_info b/ccan/endian/_info index ae63e14e..efe5a8bb 100644 --- a/ccan/endian/_info +++ b/ccan/endian/_info @@ -1,6 +1,6 @@ +#include "config.h" #include #include -#include "config.h" /** * endian - endian conversion macros for simple types @@ -15,6 +15,8 @@ * order (almost everyone else). * * This module provides conversion routines, inspired by the linux kernel. + * It also provides leint32_t, beint32_t etc typedefs, which are annotated for + * the sparse checker. * * Example: * #include @@ -29,14 +31,16 @@ * if (argc != 2) * errx(1, "Usage: %s ", argv[0]); * + * value = atoi(argv[1]); * printf("native: %08x\n", value); * printf("little-endian: %08x\n", cpu_to_le32(value)); * printf("big-endian: %08x\n", cpu_to_be32(value)); - * printf("byte-reversed: %08x\n", swab_u32(value)); + * printf("byte-reversed: %08x\n", bswap_32(value)); * exit(0); * } * - * Licence: LGPL (2 or any later version) + * License: License: CC0 (Public domain) + * Author: Rusty Russell */ int main(int argc, char *argv[]) {