#ifndef __MCPU_CPP_CPP_H__ #define __MCPU_CPP_CPP_H__ 1 #include #include #include #include #include #include typedef struct mcpp_conditional mcpp_conditional; struct mcpp_conditional { const char *filename; unsigned line_number; int parent_active; int active; int branch_succeeded; int seen_else; }; typedef struct mcpp_once_file mcpp_once_file; typedef struct mcpp_dependency mcpp_dependency; typedef struct mcpp mcpp; struct mcpp { mcpp_options *options_data; mcpu_config config; mcpp_runtime_paths runtime_paths; mcpu_include_paths include_paths; enum mcpu_language lang_stack[MCPU_CPP_LANG_STACK_SIZE]; size_t lang_depth; size_t include_depth; mcpp_conditional conditional_stack[MCPU_CPP_CONDITIONAL_STACK_SIZE]; size_t conditional_depth; char *base_filename; char preprocess_date[16]; char preprocess_time[16]; int builtins_initialized; int command_line_macros_applied; mcpu_macro_table macros; mcpp_once_file *once_files; mcpp_dependency *dependencies_first; mcpp_dependency *dependencies_last; int verbose; char *output_filename; unsigned output_line; mcpu_text output; }; void mcpp_init( mcpp *cpp ); void mcpp_free( mcpp *cpp ); int mcpp_load_config( mcpp *cpp, const char *explicit_filename, int no_config ); int mcpp_prepare( mcpp *cpp ); int mcpp_process( mcpp *cpp, const char *filename ); int mcpp_process_stream( mcpp *cpp, FILE *stream, const char *name ); int mcpp_dump_macros( mcpp *cpp, FILE *stream ); int mcpp_write_output( mcpp *cpp, const char *filename ); int mcpp_write_dependencies( mcpp *cpp, FILE *stream, int include_system ); #define MCPP_OPTIONS(_cpp_) ((_cpp_)->options_data) #endif /* __MCPU_CPP_CPP_H__ */