]> git.ozlabs.org Git - ccan/blobdiff - ccan/jmap/_info
ccanlint: enhance and streamline "output" testing lines.
[ccan] / ccan / jmap / _info
index 0047dc052cd087c5c969bc61c9f5d4506866a6eb..ed1947fd32cc6bd40bae836240e1c0ce93d1060c 100644 (file)
@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * jmap - map from indices to values (based on libJudy)
@@ -25,7 +25,7 @@
  * 
  * struct opt_detail {
  *     bool is_long;
- *     unsigned int length; // == 1 if !is_long.
+ *     size_t length; // == 1 if !is_long.
  * };
  * 
  * // Define map type for int -> argv.
@@ -67,7 +67,7 @@
  *     for (i = jmap_first(arg); i; i = jmap_next(arg,i)) {
  *             char *a = jmap_get(arg, i);
  *             d = jmap_get(opt, a);
- *             printf("  Arg %i ('%s') is a %s of %u chars\n",
+ *             printf("  Arg %i ('%s') is a %s of %zu chars\n",
  *                    i, a,
  *                    d == NULL ? "normal arg"
  *                    : d->is_long ? "long opt"
@@ -80,9 +80,9 @@
  *     jmap_free(arg);
  *     return 0;
  * }
- * // Given "--help" output contains "Arg 1 ('--help') is a long opt of 4 chars"
- * // Given "-h" output contains "Arg 1 ('-h') is a short opt of 1 chars"
- * // Given "foo" output contains "Arg 1 ('foo') is a normal arg of 3 chars"
+ * // Given "--help" output contains "Arg 1 ('--help') is a long opt of 4 chars\n"
+ * // Given "-h" output contains "Arg 1 ('-h') is a short opt of 1 chars\n"
+ * // Given "foo" output contains "Arg 1 ('foo') is a normal arg of 3 chars\n"
  *
  * License: LGPL (v2.1 or any later version)
  * Author: Rusty Russell <rusty@rustcorp.com.au>