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