Verify bittorrent .torrent metainfo files.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

il y a 3 ans
123456789101112131415161718192021222324252627282930313233343536373839
  1. #include "opts.h"
  2. #include <unistd.h>
  3. int opt_silent = 0;
  4. int opt_showinfo = 0;
  5. int opt_help = 0;
  6. int opt_no_use_dir = 0;
  7. int opt_pretty_progress = 0;
  8. char* opt_data_path = NULL;
  9. int opts_parse(int argc, char** argv) {
  10. int opt;
  11. while ((opt = getopt(argc, argv, "pnihsv:")) != -1) {
  12. switch (opt) {
  13. case 'i':
  14. opt_showinfo = 1;
  15. break;
  16. case 'h':
  17. opt_help = 1;
  18. break;
  19. case 's':
  20. opt_silent = 1;
  21. break;
  22. case 'n':
  23. opt_no_use_dir = 1;
  24. break;
  25. case 'p':
  26. opt_pretty_progress = 1;
  27. break;
  28. case 'v':
  29. opt_data_path = optarg;
  30. break;
  31. default:
  32. return -1;
  33. }
  34. }
  35. return 0;
  36. }