X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fcrcsync%2F_info;h=9ebb8bd8a01e7e844ccc62e90bc0454d11904781;hp=79368c1d60b3dd091d4a1bd256e04fd7d5f83456;hb=291237b4fed863be74051274ac5ad9920cb33cc3;hpb=18636637ee013ef828cb04b2b7bb4a4922324475 diff --git a/ccan/crcsync/_info b/ccan/crcsync/_info index 79368c1d..9ebb8bd8 100644 --- a/ccan/crcsync/_info +++ b/ccan/crcsync/_info @@ -1,6 +1,6 @@ +#include "config.h" #include #include -#include "config.h" /** * crcsync - routines to use crc for an rsync-like protocol. @@ -12,7 +12,8 @@ * // Calculate checksums of file (3-arg mode) * // Or print differences between file and checksums (4+ arg mode) * #include - * #include + * #include + * #include * #include * #include * #include @@ -37,10 +38,11 @@ * errx(1, "Usage: %s ...\n" * "OR: %s ", argv[0], argv[0]); * - * file = grab_file(NULL, argv[2], &len); + * file = grab_file(NULL, argv[2]); * if (!file) * err(1, "Opening file %s", argv[2]); - * + * len = tal_count(file) - 1; + * * if (argc == 3) { * // Short form prints CRCs of file for use in long form. * used = (len + blocksize - 1) / blocksize; @@ -67,8 +69,11 @@ * return 0; * } * - * Licence: LGPL (v2 or any later version) + * License: LGPL (v2.1 or any later version) * Author: Rusty Russell + * Ccanlint: + * // We actually depend on the GPL crc routines, so not really LGPL :( + * license_depends_compat FAIL */ int main(int argc, char *argv[]) { @@ -77,6 +82,9 @@ int main(int argc, char *argv[]) if (strcmp(argv[1], "depends") == 0) { printf("ccan/crc\n"); + return 0; + } + if (strcmp(argv[1], "testdepends") == 0) { printf("ccan/array_size\n"); return 0; }