#ifndef pattr_H #define pattr_H #include #include #include struct output_ty; /* existence */ #ifndef boolean_DEF #define boolean_DEF enum boolean_ty { boolean_false, boolean_true }; #ifdef CONF_enum_is_int typedef enum boolean_ty boolean_ty; #else typedef int boolean_ty; #endif #endif /* boolean_DEF */ extern type_ty boolean_type; void boolean_write _((struct output_ty *, const char *, boolean_ty)); char *boolean_ename _((boolean_ty)); #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 }; #ifdef CONF_enum_is_int typedef enum change_cause_ty change_cause_ty; #else typedef int change_cause_ty; #endif #endif /* change_cause_DEF */ extern type_ty change_cause_type; void change_cause_write _((struct output_ty *, const char *, change_cause_ty)); 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 }; #ifdef CONF_enum_is_int typedef enum file_action_ty file_action_ty; #else typedef int file_action_ty; #endif #endif /* file_action_DEF */ extern type_ty file_action_type; void file_action_write _((struct output_ty *, const char *, file_action_ty)); char *file_action_ename _((file_action_ty)); #ifndef file_usage_DEF #define file_usage_DEF enum file_usage_ty { file_usage_source, file_usage_build, file_usage_test, file_usage_manual_test }; #ifdef CONF_enum_is_int typedef enum file_usage_ty file_usage_ty; #else typedef int file_usage_ty; #endif #endif /* file_usage_DEF */ extern type_ty file_usage_type; void file_usage_write _((struct output_ty *, const char *, file_usage_ty)); 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) typedef struct metric *metric; struct metric { long reference_count; unsigned long mask; string_ty *name; double value; }; #endif /* metric_DEF */ extern type_ty metric_type; void metric_write _((struct output_ty *, char *, metric)); metric metric_copy _((metric)); #ifndef metric_list_DEF #define metric_list_DEF typedef struct metric_list *metric_list; struct metric_list { size_t length; size_t maximum; metric *list; }; #endif /* metric_list_DEF */ extern type_ty metric_list_type; void metric_list_write _((struct output_ty *, char *, metric_list)); #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 }; #ifdef CONF_enum_is_int typedef enum history_version_encoding_ty history_version_encoding_ty; #else typedef int history_version_encoding_ty; #endif #endif /* history_version_encoding_DEF */ extern type_ty history_version_encoding_type; void history_version_encoding_write _((struct output_ty *, const char *, history_version_encoding_ty)); 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) typedef struct history_version *history_version; struct history_version { long reference_count; unsigned long mask; string_ty *revision; history_version_encoding_ty encoding; }; #endif /* history_version_DEF */ extern type_ty history_version_type; void history_version_write _((struct output_ty *, char *, history_version)); history_version history_version_copy _((history_version)); #ifndef pattr_copyright_years_list_DEF #define pattr_copyright_years_list_DEF typedef struct pattr_copyright_years_list *pattr_copyright_years_list; struct pattr_copyright_years_list { size_t length; size_t maximum; long *list; }; #endif /* pattr_copyright_years_list_DEF */ extern type_ty pattr_copyright_years_list_type; void pattr_copyright_years_list_write _((struct output_ty *, char *, pattr_copyright_years_list)); #ifndef pattr_develop_end_action_DEF #define pattr_develop_end_action_DEF enum pattr_develop_end_action_ty { pattr_develop_end_action_goto_being_reviewed, pattr_develop_end_action_goto_awaiting_review, pattr_develop_end_action_goto_awaiting_integration }; #ifdef CONF_enum_is_int typedef enum pattr_develop_end_action_ty pattr_develop_end_action_ty; #else typedef int pattr_develop_end_action_ty; #endif #endif /* pattr_develop_end_action_DEF */ extern type_ty pattr_develop_end_action_type; void pattr_develop_end_action_write _((struct output_ty *, const char *, pattr_develop_end_action_ty)); char *pattr_develop_end_action_ename _((pattr_develop_end_action_ty)); #ifndef pattr_DEF #define pattr_DEF #define pattr_description_mask ((unsigned long)0) #define pattr_developer_may_review_mask ((unsigned long)1 << 0) #define pattr_developer_may_integrate_mask ((unsigned long)1 << 1) #define pattr_reviewer_may_integrate_mask ((unsigned long)1 << 2) #define pattr_developers_may_create_changes_mask ((unsigned long)1 << 3) #define pattr_forced_develop_begin_notify_command_mask ((unsigned long)0) #define pattr_develop_end_notify_command_mask ((unsigned long)0) #define pattr_develop_end_undo_notify_command_mask ((unsigned long)0) #define pattr_review_begin_notify_command_mask ((unsigned long)0) #define pattr_review_begin_undo_notify_command_mask ((unsigned long)0) #define pattr_review_pass_notify_command_mask ((unsigned long)0) #define pattr_review_pass_undo_notify_command_mask ((unsigned long)0) #define pattr_review_fail_notify_command_mask ((unsigned long)0) #define pattr_integrate_pass_notify_command_mask ((unsigned long)0) #define pattr_integrate_fail_notify_command_mask ((unsigned long)0) #define pattr_default_development_directory_mask ((unsigned long)0) #define pattr_umask_mask ((unsigned long)1 << 4) #define pattr_default_test_exemption_mask ((unsigned long)1 << 5) #define pattr_copyright_years_mask ((unsigned long)0) #define pattr_minimum_change_number_mask ((unsigned long)1 << 6) #define pattr_reuse_change_numbers_mask ((unsigned long)1 << 7) #define pattr_minimum_branch_number_mask ((unsigned long)1 << 8) #define pattr_skip_unlucky_mask ((unsigned long)1 << 9) #define pattr_compress_database_mask ((unsigned long)1 << 10) #define pattr_develop_end_action_mask ((unsigned long)1 << 11) typedef struct pattr *pattr; struct pattr { long reference_count; unsigned long mask; string_ty *description; boolean_ty developer_may_review; boolean_ty developer_may_integrate; boolean_ty reviewer_may_integrate; boolean_ty developers_may_create_changes; string_ty *forced_develop_begin_notify_command; string_ty *develop_end_notify_command; string_ty *develop_end_undo_notify_command; string_ty *review_begin_notify_command; string_ty *review_begin_undo_notify_command; string_ty *review_pass_notify_command; string_ty *review_pass_undo_notify_command; string_ty *review_fail_notify_command; string_ty *integrate_pass_notify_command; string_ty *integrate_fail_notify_command; string_ty *default_development_directory; long umask; boolean_ty default_test_exemption; pattr_copyright_years_list copyright_years; long minimum_change_number; boolean_ty reuse_change_numbers; long minimum_branch_number; boolean_ty skip_unlucky; boolean_ty compress_database; pattr_develop_end_action_ty develop_end_action; }; #endif /* pattr_DEF */ extern type_ty pattr_type; void pattr_write _((struct output_ty *, pattr)); pattr pattr_copy _((pattr)); void pattr_write_file _((string_ty *filename, pattr value, int comp)); pattr pattr_read_file _((string_ty *filename)); void pattr__rpt_init _((void)); #endif /* pattr_H */