X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fopt%2F_info;h=103962069b6b4c813fe45fbe2a02006e72128a77;hb=a7b9ba000dff7b1fcc96dbdf4ae743a4552af560;hp=a051832408738416bdbc5121522b7c6d6491ee03;hpb=59d2b90f59df57007c97cd8f8dc3db9e24781e06;p=ccan diff --git a/ccan/opt/_info b/ccan/opt/_info index a0518324..10396206 100644 --- a/ccan/opt/_info +++ b/ccan/opt/_info @@ -1,12 +1,15 @@ +#include "config.h" #include #include -#include "config.h" /** * opt - simple command line parsing * * Simple but powerful command line parsing. * + * See Also: + * ccan/autodata + * * Example: * #include * #include @@ -17,13 +20,13 @@ * static char *somestring; * * static struct opt_table opts[] = { - * OPT_WITHOUT_ARG("--verbose/-v", opt_inc_intval, &verbose, + * OPT_WITHOUT_ARG("--verbose|-v", opt_inc_intval, &verbose, * "Verbose mode (can be specified more than once)"), * OPT_WITHOUT_ARG("--someflag", opt_set_bool, &someflag, * "Set someflag"), * OPT_WITH_ARG("--somefile=", opt_set_charp, opt_show_charp, * &somestring, "Set somefile to "), - * OPT_WITHOUT_ARG("--usage/--help/-h", opt_usage_and_exit, + * OPT_WITHOUT_ARG("--usage|--help|-h", opt_usage_and_exit, * "args...\nA silly test program.", * "Print this message."), * OPT_ENDTABLE @@ -49,7 +52,7 @@ * return 0; * } * - * License: GPL (3 or any later version) + * License: GPL (v2 or any later version) * Author: Rusty Russell */ int main(int argc, char *argv[]) @@ -58,8 +61,9 @@ int main(int argc, char *argv[]) return 1; if (strcmp(argv[1], "depends") == 0) { - printf("ccan/typesafe_cb\n"); + printf("ccan/cast\n"); printf("ccan/compiler\n"); + printf("ccan/typesafe_cb\n"); return 0; }