_info 875 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #include "config.h"
  2. #include <stdio.h>
  3. #include <string.h>
  4. /**
  5. * version - helper functions for major.minor-style version numbers
  6. *
  7. * This code provides some helper functions to deal with version numbers in
  8. * the form major.minor.
  9. *
  10. * Author: Peter Hutterer <peter.hutterer@who-t.net>
  11. * Maintainer: Peter Hutterer <peter.hutterer@who-t.net>
  12. * License: BSD-MIT
  13. *
  14. * Example:
  15. * struct version a = version(1, 0);
  16. * struct version b = version(2, 2);
  17. *
  18. * if (version_cmp(a, b) < 0)
  19. * printf("Feature supported in version 2.2 but we have %d.%d\n",
  20. * version_major(a), version_minor(a));
  21. *
  22. * if (version_cmp(a, version(3, 4)) < 0)
  23. * printf("Feature only supported in version 3.4\n");
  24. *
  25. */
  26. int main(int argc, char *argv[])
  27. {
  28. /* Expect exactly one argument */
  29. if (argc != 2)
  30. return 1;
  31. if (strcmp(argv[1], "depends") == 0) {
  32. return 0;
  33. }
  34. return 1;
  35. }