// // This file is generated by fmtgen from "libaegis/uconf.def". // If you want to change the contents of this file // you need to edit libaegis/uconf.def // or you need to enhance fmtgen. // #ifndef LIBAEGIS_UCONF_H #define LIBAEGIS_UCONF_H #include #include #include #include #include class nstring; // forward #ifndef change_cause_DEF #define change_cause_DEF enum change_cause_ty { change_cause_external_bug, change_cause_external_enhancement, change_cause_external_improvement, change_cause_internal_bug, change_cause_internal_enhancement, change_cause_internal_improvement, change_cause_chain }; #define change_cause_max 7 #endif // change_cause_DEF extern meta_type change_cause_type; void change_cause_write(const output::pointer &fp, const char *name, change_cause_ty value, bool show); void change_cause_write_xml(const output::pointer &fp, const char *name, change_cause_ty value, bool show); const char *change_cause_ename(change_cause_ty); #ifndef file_action_DEF #define file_action_DEF enum file_action_ty { file_action_create, file_action_modify, file_action_remove, file_action_insulate, file_action_transparent }; #define file_action_max 5 #endif // file_action_DEF extern meta_type file_action_type; void file_action_write(const output::pointer &fp, const char *name, file_action_ty value, bool show); void file_action_write_xml(const output::pointer &fp, const char *name, file_action_ty value, bool show); const char *file_action_ename(file_action_ty); #ifndef file_usage_DEF #define file_usage_DEF enum file_usage_ty { file_usage_source, file_usage_config, file_usage_build, file_usage_test, file_usage_manual_test }; #define file_usage_max 5 #endif // file_usage_DEF extern meta_type file_usage_type; void file_usage_write(const output::pointer &fp, const char *name, file_usage_ty value, bool show); void file_usage_write_xml(const output::pointer &fp, const char *name, file_usage_ty value, bool show); const char *file_usage_ename(file_usage_ty); #ifndef metric_DEF #define metric_DEF #define metric_name_mask ((unsigned long)0) #define metric_value_mask ((unsigned long)1 << 0) struct metric_ty { long reference_count; unsigned long mask; string_ty *errpos; string_ty *name; double value; }; #endif // metric_DEF extern meta_type metric_type; void metric_write(const output::pointer &fp, const char *name, metric_ty *value); void metric_write_xml(const output::pointer &fp, const char *name, metric_ty *value); metric_ty *metric_copy(metric_ty *); metric_ty *metric_clone(metric_ty *); #ifdef DEBUG void metric_trace_real(const char *name, const metric_ty *value); #define metric_trace(x) ((void)(trace_pretest_ && (trace_where_, metric_trace_real(trace_stringize(x), x), 0))) #else #define metric_trace(x) #endif #ifndef metric_list_DEF #define metric_list_DEF struct metric_list_ty { size_t length; size_t maximum; metric_ty **list; }; #endif // metric_list_DEF extern meta_type metric_list_type; metric_list_ty *metric_list_copy(metric_list_ty *); metric_list_ty *metric_list_clone(metric_list_ty *); void metric_list_write(const output::pointer &fp, const char *name, metric_list_ty *value); void metric_list_write_xml(const output::pointer &fp, const char *name, metric_list_ty *value); #ifdef DEBUG void metric_list_trace_real(const char *name, const metric_list_ty *value); #define metric_list_trace(x) ((void)(trace_pretest_ && (trace_where_, metric_list_trace_real(trace_stringize(x), x), 0))) #else #define metric_list_trace(x) #endif #ifndef history_version_encoding_DEF #define history_version_encoding_DEF enum history_version_encoding_ty { history_version_encoding_none, history_version_encoding_quoted_printable, history_version_encoding_base64 }; #define history_version_encoding_max 3 #endif // history_version_encoding_DEF extern meta_type history_version_encoding_type; void history_version_encoding_write(const output::pointer &fp, const char *name, history_version_encoding_ty value, bool show); void history_version_encoding_write_xml(const output::pointer &fp, const char *name, history_version_encoding_ty value, bool show); const char *history_version_encoding_ename(history_version_encoding_ty); #ifndef history_version_DEF #define history_version_DEF #define history_version_revision_mask ((unsigned long)0) #define history_version_encoding_mask ((unsigned long)1 << 0) struct history_version_ty { long reference_count; unsigned long mask; string_ty *errpos; string_ty *revision; history_version_encoding_ty encoding; }; #endif // history_version_DEF extern meta_type history_version_type; void history_version_write(const output::pointer &fp, const char *name, history_version_ty *value); void history_version_write_xml(const output::pointer &fp, const char *name, history_version_ty *value); history_version_ty *history_version_copy(history_version_ty *); history_version_ty *history_version_clone(history_version_ty *); #ifdef DEBUG void history_version_trace_real(const char *name, const history_version_ty *value); #define history_version_trace(x) ((void)(trace_pretest_ && (trace_where_, history_version_trace_real(trace_stringize(x), x), 0))) #else #define history_version_trace(x) #endif #ifndef attributes_DEF #define attributes_DEF #define attributes_name_mask ((unsigned long)0) #define attributes_value_mask ((unsigned long)0) struct attributes_ty { long reference_count; unsigned long mask; string_ty *errpos; string_ty *name; string_ty *value; }; #endif // attributes_DEF extern meta_type attributes_type; void attributes_write(const output::pointer &fp, const char *name, attributes_ty *value); void attributes_write_xml(const output::pointer &fp, const char *name, attributes_ty *value); attributes_ty *attributes_copy(attributes_ty *); attributes_ty *attributes_clone(attributes_ty *); #ifdef DEBUG void attributes_trace_real(const char *name, const attributes_ty *value); #define attributes_trace(x) ((void)(trace_pretest_ && (trace_where_, attributes_trace_real(trace_stringize(x), x), 0))) #else #define attributes_trace(x) #endif #ifndef attributes_list_DEF #define attributes_list_DEF struct attributes_list_ty { size_t length; size_t maximum; attributes_ty **list; }; #endif // attributes_list_DEF extern meta_type attributes_list_type; attributes_list_ty *attributes_list_copy(attributes_list_ty *); attributes_list_ty *attributes_list_clone(attributes_list_ty *); void attributes_list_write(const output::pointer &fp, const char *name, attributes_list_ty *value); void attributes_list_write_xml(const output::pointer &fp, const char *name, attributes_list_ty *value); #ifdef DEBUG void attributes_list_trace_real(const char *name, const attributes_list_ty *value); #define attributes_list_trace(x) ((void)(trace_pretest_ && (trace_where_, attributes_list_trace_real(trace_stringize(x), x), 0))) #else #define attributes_list_trace(x) #endif #ifndef uconf_delete_file_preference_DEF #define uconf_delete_file_preference_DEF enum uconf_delete_file_preference_ty { uconf_delete_file_preference_no_keep, uconf_delete_file_preference_interactive, uconf_delete_file_preference_keep }; #define uconf_delete_file_preference_max 3 #endif // uconf_delete_file_preference_DEF extern meta_type uconf_delete_file_preference_type; void uconf_delete_file_preference_write(const output::pointer &fp, const char *name, uconf_delete_file_preference_ty value, bool show); void uconf_delete_file_preference_write_xml(const output::pointer &fp, const char *name, uconf_delete_file_preference_ty value, bool show); const char *uconf_delete_file_preference_ename(uconf_delete_file_preference_ty); #ifndef uconf_diff_preference_DEF #define uconf_diff_preference_DEF enum uconf_diff_preference_ty { uconf_diff_preference_automatic_merge, uconf_diff_preference_no_merge, uconf_diff_preference_only_merge }; #define uconf_diff_preference_max 3 #endif // uconf_diff_preference_DEF extern meta_type uconf_diff_preference_type; void uconf_diff_preference_write(const output::pointer &fp, const char *name, uconf_diff_preference_ty value, bool show); void uconf_diff_preference_write_xml(const output::pointer &fp, const char *name, uconf_diff_preference_ty value, bool show); const char *uconf_diff_preference_ename(uconf_diff_preference_ty); #ifndef uconf_pager_preference_DEF #define uconf_pager_preference_DEF enum uconf_pager_preference_ty { uconf_pager_preference_foreground, uconf_pager_preference_never }; #define uconf_pager_preference_max 2 #endif // uconf_pager_preference_DEF extern meta_type uconf_pager_preference_type; void uconf_pager_preference_write(const output::pointer &fp, const char *name, uconf_pager_preference_ty value, bool show); void uconf_pager_preference_write_xml(const output::pointer &fp, const char *name, uconf_pager_preference_ty value, bool show); const char *uconf_pager_preference_ename(uconf_pager_preference_ty); #ifndef uconf_persevere_preference_DEF #define uconf_persevere_preference_DEF enum uconf_persevere_preference_ty { uconf_persevere_preference_all, uconf_persevere_preference_stop }; #define uconf_persevere_preference_max 2 #endif // uconf_persevere_preference_DEF extern meta_type uconf_persevere_preference_type; void uconf_persevere_preference_write(const output::pointer &fp, const char *name, uconf_persevere_preference_ty value, bool show); void uconf_persevere_preference_write_xml(const output::pointer &fp, const char *name, uconf_persevere_preference_ty value, bool show); const char *uconf_persevere_preference_ename(uconf_persevere_preference_ty); #ifndef uconf_log_file_preference_DEF #define uconf_log_file_preference_DEF enum uconf_log_file_preference_ty { uconf_log_file_preference_snuggle, uconf_log_file_preference_append, uconf_log_file_preference_replace, uconf_log_file_preference_never }; #define uconf_log_file_preference_max 4 #endif // uconf_log_file_preference_DEF extern meta_type uconf_log_file_preference_type; void uconf_log_file_preference_write(const output::pointer &fp, const char *name, uconf_log_file_preference_ty value, bool show); void uconf_log_file_preference_write_xml(const output::pointer &fp, const char *name, uconf_log_file_preference_ty value, bool show); const char *uconf_log_file_preference_ename(uconf_log_file_preference_ty); #ifndef uconf_lock_wait_preference_DEF #define uconf_lock_wait_preference_DEF enum uconf_lock_wait_preference_ty { uconf_lock_wait_preference_always, uconf_lock_wait_preference_background, uconf_lock_wait_preference_never }; #define uconf_lock_wait_preference_max 3 #endif // uconf_lock_wait_preference_DEF extern meta_type uconf_lock_wait_preference_type; void uconf_lock_wait_preference_write(const output::pointer &fp, const char *name, uconf_lock_wait_preference_ty value, bool show); void uconf_lock_wait_preference_write_xml(const output::pointer &fp, const char *name, uconf_lock_wait_preference_ty value, bool show); const char *uconf_lock_wait_preference_ename(uconf_lock_wait_preference_ty); #ifndef uconf_symbolic_link_preference_DEF #define uconf_symbolic_link_preference_DEF enum uconf_symbolic_link_preference_ty { uconf_symbolic_link_preference_verify, uconf_symbolic_link_preference_assume }; #define uconf_symbolic_link_preference_max 2 #endif // uconf_symbolic_link_preference_DEF extern meta_type uconf_symbolic_link_preference_type; void uconf_symbolic_link_preference_write(const output::pointer &fp, const char *name, uconf_symbolic_link_preference_ty value, bool show); void uconf_symbolic_link_preference_write_xml(const output::pointer &fp, const char *name, uconf_symbolic_link_preference_ty value, bool show); const char *uconf_symbolic_link_preference_ename(uconf_symbolic_link_preference_ty); #ifndef uconf_relative_filename_preference_DEF #define uconf_relative_filename_preference_DEF enum uconf_relative_filename_preference_ty { uconf_relative_filename_preference_current, uconf_relative_filename_preference_base }; #define uconf_relative_filename_preference_max 2 #endif // uconf_relative_filename_preference_DEF extern meta_type uconf_relative_filename_preference_type; void uconf_relative_filename_preference_write(const output::pointer &fp, const char *name, uconf_relative_filename_preference_ty value, bool show); void uconf_relative_filename_preference_write_xml(const output::pointer &fp, const char *name, uconf_relative_filename_preference_ty value, bool show); const char *uconf_relative_filename_preference_ename(uconf_relative_filename_preference_ty); #ifndef uconf_whiteout_preference_DEF #define uconf_whiteout_preference_DEF enum uconf_whiteout_preference_ty { uconf_whiteout_preference_always, uconf_whiteout_preference_never }; #define uconf_whiteout_preference_max 2 #endif // uconf_whiteout_preference_DEF extern meta_type uconf_whiteout_preference_type; void uconf_whiteout_preference_write(const output::pointer &fp, const char *name, uconf_whiteout_preference_ty value, bool show); void uconf_whiteout_preference_write_xml(const output::pointer &fp, const char *name, uconf_whiteout_preference_ty value, bool show); const char *uconf_whiteout_preference_ename(uconf_whiteout_preference_ty); #ifndef uconf_DEF #define uconf_DEF #define uconf_default_project_name_mask ((unsigned long)0) #define uconf_default_change_number_mask ((unsigned long)1 << 0) #define uconf_default_development_directory_mask ((unsigned long)0) #define uconf_default_project_directory_mask ((unsigned long)0) #define uconf_delete_file_preference_mask ((unsigned long)1 << 1) #define uconf_diff_preference_mask ((unsigned long)1 << 2) #define uconf_pager_preference_mask ((unsigned long)1 << 3) #define uconf_persevere_preference_mask ((unsigned long)1 << 4) #define uconf_log_file_preference_mask ((unsigned long)1 << 5) #define uconf_lock_wait_preference_mask ((unsigned long)1 << 6) #define uconf_symbolic_link_preference_mask ((unsigned long)1 << 7) #define uconf_relative_filename_preference_mask ((unsigned long)1 << 8) #define uconf_email_address_mask ((unsigned long)0) #define uconf_whiteout_preference_mask ((unsigned long)1 << 9) #define uconf_editor_command_mask ((unsigned long)0) #define uconf_visual_command_mask ((unsigned long)0) #define uconf_pager_command_mask ((unsigned long)0) #define uconf_attribute_mask ((unsigned long)0) struct uconf_ty { long reference_count; unsigned long mask; string_ty *errpos; string_ty *default_project_name; long default_change_number; string_ty *default_development_directory; string_ty *default_project_directory; uconf_delete_file_preference_ty delete_file_preference; uconf_diff_preference_ty diff_preference; uconf_pager_preference_ty pager_preference; uconf_persevere_preference_ty persevere_preference; uconf_log_file_preference_ty log_file_preference; uconf_lock_wait_preference_ty lock_wait_preference; uconf_symbolic_link_preference_ty symbolic_link_preference; uconf_relative_filename_preference_ty relative_filename_preference; string_ty *email_address; uconf_whiteout_preference_ty whiteout_preference; string_ty *editor_command; string_ty *visual_command; string_ty *pager_command; attributes_list_ty *attribute; }; #endif // uconf_DEF extern meta_type uconf_type; void uconf_write(const output::pointer &fp, uconf_ty *value); void uconf_write_xml(const output::pointer &fp, uconf_ty *value); uconf_ty *uconf_copy(uconf_ty *); uconf_ty *uconf_clone(uconf_ty *); #ifdef DEBUG void uconf_trace_real(const char *name, const uconf_ty *value); #define uconf_trace(x) ((void)(trace_pretest_ && (trace_where_, uconf_trace_real(trace_stringize(x), x), 0))) #else #define uconf_trace(x) #endif /** * The uconf_write_file function is used to * write uconf meta data to the named file. * * @param filename * The name of the file to be written. * @param value * The value of the meta-data to be written. * @param comp * true (non-zero) if data should be compressed. * @note * If any errors are encountered, this * function will not return. All errors * will print a fatal error message, and * exit with an exit status of 1. */ void uconf_write_file(string_ty *filename, uconf_ty *value, int comp); /** * The uconf_write_file function is used to * write uconf meta data to the named file. * * @param filnam * The name of the file to be written. * @param value * The value of the meta-data to be written. * @param comp * true if data should be compressed. * @note * If any errors are encountered, this * function will not return. All errors * will print a fatal error message, and * exit with an exit status of 1. */ void uconf_write_file(const nstring &filnam, uconf_ty *value, bool comp); /** * The uconf_read_file function is used to * read uconf meta data from the named file. * * @param filename * The name of the file to be read. * @returns * a pointer to a dynamically allocated * value read from the file. * @note * If any errors are encountered, this * function will not return. All errors * (including syntax errors) will print a * fatal error message, and exit with an * exit status of 1. */ uconf_ty *uconf_read_file(string_ty *filename); /** * The uconf_read_file function is used to * read uconf meta data from the named file. * * @param filename * The name of the file to be read. * @returns * a pointer to a dynamically allocated * value read from the file. * @note * If any errors are encountered, this * function will not return. All errors * (including syntax errors) will print a * fatal error message, and exit with an * exit status of 1. */ uconf_ty *uconf_read_file(const nstring &filename); void uconf__rpt_init(void); #endif // LIBAEGIS_UCONF_H