Verify bittorrent .torrent metainfo files.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
785B

  1. #ifndef OPTS_H
  2. #define OPTS_H
  3. enum OPT_SCRIPTFORMAT {
  4. OPT_SCRIPTFORMAT_INVALID = -1,
  5. OPT_SCRIPTFORMAT_NONE,
  6. OPT_SCRIPTFORMAT_INFOHASH,
  7. };
  8. typedef struct {
  9. char info_char;
  10. enum OPT_SCRIPTFORMAT info;
  11. } opt_scriptformat_mapping_t;
  12. const static opt_scriptformat_mapping_t OPT_SCRIPTFORMAT_MAPPING[] = {
  13. { .info_char = 'i', .info = OPT_SCRIPTFORMAT_INFOHASH },
  14. };
  15. #define OPT_SCRIPTFORMAT_MAPPING_LEN sizeof(OPT_SCRIPTFORMAT_MAPPING)/sizeof(OPT_SCRIPTFORMAT_MAPPING[0])
  16. extern int opt_silent;
  17. extern int opt_showinfo;
  18. extern int opt_help;
  19. extern int opt_no_use_dir;
  20. extern int opt_pretty_progress;
  21. extern int opt_scriptformat_info;
  22. extern char* opt_data_path;
  23. /* Parse the given arguments. Return -1 if error */
  24. int opts_parse(int argc, char** argv);
  25. #endif