_info.c 703 B

1234567891011121314151617181920212223242526272829303132333435
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include "config.h"
  4. /**
  5. * string - string helper routines
  6. *
  7. * This is a grab bag of modules for string comparisons, designed to enhance
  8. * the standard string.h.
  9. *
  10. * Example:
  11. * #include "ccan/string.h"
  12. *
  13. * int main(int argc, char *argv[])
  14. * {
  15. * if (argv[1] && streq(argv[1], "--verbose"))
  16. * printf("verbose set\n");
  17. * if (argv[1] && strstarts(argv[1], "--"))
  18. * printf("Some option set\n");
  19. * if (argv[1] && strends(argv[1], "cow-powers"))
  20. * printf("Magic option set\n");
  21. * return 0;
  22. * }
  23. */
  24. int main(int argc, char *argv[])
  25. {
  26. if (argc != 2)
  27. return 1;
  28. if (strcmp(argv[1], "depends") == 0)
  29. /* Nothing. */
  30. return 0;
  31. return 1;
  32. }