compile_ok-const-arg.c 628 B

12345678910111213141516171819202122
  1. /*
  2. * Copyright 2011 Rusty Russell
  3. *
  4. * This program is free software; you can redistribute it and/or modify it under
  5. * the terms of the GNU General Public License as published by the Free Software
  6. * Foundation; either version 2 of the License, or (at your option) any later
  7. * version. See LICENSE for more details.
  8. */
  9. #include <ccan/opt/opt.h>
  10. #include <ccan/opt/opt.c>
  11. #include <ccan/opt/helpers.c>
  12. #include <ccan/opt/parse.c>
  13. #include <ccan/opt/usage.c>
  14. int main(int argc, char *argv[])
  15. {
  16. opt_register_noarg("-v", opt_version_and_exit,
  17. (const char *)"1.2.3",
  18. (const char *)"Print version");
  19. return 0;
  20. }