cli.h 734 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef CLI_H
  2. #define CLI_H
  3. #include "common.h"
  4. #ifndef CLI_NAME
  5. #define CLI_NAME "fsevent_watch"
  6. #endif /* CLI_NAME */
  7. struct cli_info {
  8. UInt64 since_when_arg;
  9. double latency_arg;
  10. bool no_defer_flag;
  11. bool watch_root_flag;
  12. bool ignore_self_flag;
  13. bool file_events_flag;
  14. bool mark_self_flag;
  15. int format_arg;
  16. char** inputs;
  17. unsigned inputs_num;
  18. };
  19. extern const char* cli_info_purpose;
  20. extern const char* cli_info_usage;
  21. extern const char* cli_info_help[];
  22. void cli_print_help(void);
  23. void cli_print_version(void);
  24. int cli_parser (int argc, const char** argv, struct cli_info* args_info);
  25. void cli_parser_init (struct cli_info* args_info);
  26. void cli_parser_free (struct cli_info* args_info);
  27. #endif /* CLI_H */