_info.c 757 B

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