#ifndef __MCPU_CPP_OPTIONS_H__ #define __MCPU_CPP_OPTIONS_H__ 1 enum mcpp_dump_macros { MCPP_DUMP_NONE = 0, MCPP_DUMP_ONLY, MCPP_DUMP_DEFINITIONS }; enum mcpp_option_action_kind { MCPP_ACTION_DEFINE = 0, MCPP_ACTION_UNDEF, MCPP_ACTION_INCLUDE, MCPP_ACTION_IMACROS, MCPP_ACTION_INCLUDE_USER, MCPP_ACTION_INCLUDE_SYSTEM, MCPP_ACTION_INCLUDE_AFTER, MCPP_ACTION_DEP_TARGET, MCPP_ACTION_DEP_TARGET_QUOTED }; typedef struct mcpp_option_action mcpp_option_action; struct mcpp_option_action { enum mcpp_option_action_kind kind; const char *option; const char *argument; }; typedef struct mcpp_options mcpp_options; struct mcpp_options { const char *progname; const char *in_fname; const char *out_fname; const char *config_fname; const char *sys_root; const char *deps_file; const char *deps_target; const char *object_suffix; int help; int version; int verbose; int no_config; int dump_config; int dump_search_dirs; int no_standard_includes; int no_standard_kplusplus_includes; int inhibit_output; int no_output; int print_deps; int print_deps_missing_files; int inhibit_warnings; int warn_comments; int warn_comments_explicit; int warnings_are_errors; int for_lint; enum mcpp_dump_macros dump_macros; int dump_only_plus_predefined; mcpp_option_action *actions; size_t action_count; size_t action_capacity; }; void mcpp_options_init( mcpp_options *opts, int argc ); void mcpp_options_free( mcpp_options *opts ); int mcpp_handle_options( mcpp_options *opts, int argc, char **argv ); int mcpp_options_dump( const mcpp_options *opts, FILE *stream ); int mcpp_options_has_unimplemented( const mcpp_options *opts ); #endif