#ifndef cstate_H #define cstate_H #include #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 cstate_architecture_list_DEF #define cstate_architecture_list_DEF typedef struct cstate_architecture_list *cstate_architecture_list; struct cstate_architecture_list { size_t length; size_t maximum; string_ty **list; }; #endif /* cstate_architecture_list_DEF */ extern type_ty cstate_architecture_list_type; void cstate_architecture_list_write _((struct output_ty *, char *, cstate_architecture_list)); #ifndef cstate_copyright_years_list_DEF #define cstate_copyright_years_list_DEF typedef struct cstate_copyright_years_list *cstate_copyright_years_list; struct cstate_copyright_years_list { size_t length; size_t maximum; long *list; }; #endif /* cstate_copyright_years_list_DEF */ extern type_ty cstate_copyright_years_list_type; void cstate_copyright_years_list_write _((struct output_ty *, char *, cstate_copyright_years_list)); #ifndef cstate_state_DEF #define cstate_state_DEF enum cstate_state_ty { cstate_state_awaiting_development, cstate_state_being_developed, cstate_state_awaiting_review, cstate_state_being_reviewed, cstate_state_awaiting_integration, cstate_state_being_integrated, cstate_state_completed }; #ifdef CONF_enum_is_int typedef enum cstate_state_ty cstate_state_ty; #else typedef int cstate_state_ty; #endif #endif /* cstate_state_DEF */ extern type_ty cstate_state_type; void cstate_state_write _((struct output_ty *, const char *, cstate_state_ty)); char *cstate_state_ename _((cstate_state_ty)); #ifndef cstate_architecture_times_DEF #define cstate_architecture_times_DEF #define cstate_architecture_times_variant_mask ((unsigned long)0) #define cstate_architecture_times_node_mask ((unsigned long)0) #define cstate_architecture_times_build_time_mask ((unsigned long)1 << 0) #define cstate_architecture_times_test_time_mask ((unsigned long)1 << 1) #define cstate_architecture_times_test_baseline_time_mask ((unsigned long)1 << 2) #define cstate_architecture_times_regression_test_time_mask ((unsigned long)1 << 3) typedef struct cstate_architecture_times *cstate_architecture_times; struct cstate_architecture_times { long reference_count; unsigned long mask; string_ty *variant; string_ty *node; time_t build_time; time_t test_time; time_t test_baseline_time; time_t regression_test_time; }; #endif /* cstate_architecture_times_DEF */ extern type_ty cstate_architecture_times_type; void cstate_architecture_times_write _((struct output_ty *, char *, cstate_architecture_times)); cstate_architecture_times cstate_architecture_times_copy _((cstate_architecture_times)); #ifndef cstate_architecture_times_list_DEF #define cstate_architecture_times_list_DEF typedef struct cstate_architecture_times_list *cstate_architecture_times_list; struct cstate_architecture_times_list { size_t length; size_t maximum; cstate_architecture_times *list; }; #endif /* cstate_architecture_times_list_DEF */ extern type_ty cstate_architecture_times_list_type; void cstate_architecture_times_list_write _((struct output_ty *, char *, cstate_architecture_times_list)); #ifndef cstate_history_what_DEF #define cstate_history_what_DEF enum cstate_history_what_ty { cstate_history_what_new_change, cstate_history_what_develop_begin, cstate_history_what_develop_begin_undo, cstate_history_what_develop_end, cstate_history_what_develop_end_2ar, cstate_history_what_develop_end_2ai, cstate_history_what_develop_end_undo, cstate_history_what_review_begin, cstate_history_what_review_begin_undo, cstate_history_what_review_pass, cstate_history_what_review_pass_undo, cstate_history_what_review_fail, cstate_history_what_integrate_begin, cstate_history_what_integrate_begin_undo, cstate_history_what_integrate_pass, cstate_history_what_integrate_fail }; #ifdef CONF_enum_is_int typedef enum cstate_history_what_ty cstate_history_what_ty; #else typedef int cstate_history_what_ty; #endif #endif /* cstate_history_what_DEF */ extern type_ty cstate_history_what_type; void cstate_history_what_write _((struct output_ty *, const char *, cstate_history_what_ty)); char *cstate_history_what_ename _((cstate_history_what_ty)); #ifndef cstate_history_DEF #define cstate_history_DEF #define cstate_history_when_mask ((unsigned long)1 << 0) #define cstate_history_what_mask ((unsigned long)1 << 1) #define cstate_history_who_mask ((unsigned long)0) #define cstate_history_why_mask ((unsigned long)0) typedef struct cstate_history *cstate_history; struct cstate_history { long reference_count; unsigned long mask; time_t when; cstate_history_what_ty what; string_ty *who; string_ty *why; }; #endif /* cstate_history_DEF */ extern type_ty cstate_history_type; void cstate_history_write _((struct output_ty *, char *, cstate_history)); cstate_history cstate_history_copy _((cstate_history)); #ifndef cstate_history_list_DEF #define cstate_history_list_DEF typedef struct cstate_history_list *cstate_history_list; struct cstate_history_list { size_t length; size_t maximum; cstate_history *list; }; #endif /* cstate_history_list_DEF */ extern type_ty cstate_history_list_type; void cstate_history_list_write _((struct output_ty *, char *, cstate_history_list)); #ifndef cstate_branch_develop_end_action_DEF #define cstate_branch_develop_end_action_DEF enum cstate_branch_develop_end_action_ty { cstate_branch_develop_end_action_goto_being_reviewed, cstate_branch_develop_end_action_goto_awaiting_review, cstate_branch_develop_end_action_goto_awaiting_integration }; #ifdef CONF_enum_is_int typedef enum cstate_branch_develop_end_action_ty cstate_branch_develop_end_action_ty; #else typedef int cstate_branch_develop_end_action_ty; #endif #endif /* cstate_branch_develop_end_action_DEF */ extern type_ty cstate_branch_develop_end_action_type; void cstate_branch_develop_end_action_write _((struct output_ty *, const char *, cstate_branch_develop_end_action_ty)); char *cstate_branch_develop_end_action_ename _((cstate_branch_develop_end_action_ty)); #ifndef cstate_branch_history_name_list_DEF #define cstate_branch_history_name_list_DEF typedef struct cstate_branch_history_name_list *cstate_branch_history_name_list; struct cstate_branch_history_name_list { size_t length; size_t maximum; string_ty **list; }; #endif /* cstate_branch_history_name_list_DEF */ extern type_ty cstate_branch_history_name_list_type; void cstate_branch_history_name_list_write _((struct output_ty *, char *, cstate_branch_history_name_list)); #ifndef cstate_branch_history_DEF #define cstate_branch_history_DEF #define cstate_branch_history_delta_number_mask ((unsigned long)1 << 0) #define cstate_branch_history_change_number_mask ((unsigned long)1 << 1) #define cstate_branch_history_name_mask ((unsigned long)0) typedef struct cstate_branch_history *cstate_branch_history; struct cstate_branch_history { long reference_count; unsigned long mask; long delta_number; long change_number; cstate_branch_history_name_list name; }; #endif /* cstate_branch_history_DEF */ extern type_ty cstate_branch_history_type; void cstate_branch_history_write _((struct output_ty *, char *, cstate_branch_history)); cstate_branch_history cstate_branch_history_copy _((cstate_branch_history)); #ifndef cstate_branch_history_list_DEF #define cstate_branch_history_list_DEF typedef struct cstate_branch_history_list *cstate_branch_history_list; struct cstate_branch_history_list { size_t length; size_t maximum; cstate_branch_history *list; }; #endif /* cstate_branch_history_list_DEF */ extern type_ty cstate_branch_history_list_type; void cstate_branch_history_list_write _((struct output_ty *, char *, cstate_branch_history_list)); #ifndef cstate_branch_change_list_DEF #define cstate_branch_change_list_DEF typedef struct cstate_branch_change_list *cstate_branch_change_list; struct cstate_branch_change_list { size_t length; size_t maximum; long *list; }; #endif /* cstate_branch_change_list_DEF */ extern type_ty cstate_branch_change_list_type; void cstate_branch_change_list_write _((struct output_ty *, char *, cstate_branch_change_list)); #ifndef cstate_branch_sub_branch_list_DEF #define cstate_branch_sub_branch_list_DEF typedef struct cstate_branch_sub_branch_list *cstate_branch_sub_branch_list; struct cstate_branch_sub_branch_list { size_t length; size_t maximum; long *list; }; #endif /* cstate_branch_sub_branch_list_DEF */ extern type_ty cstate_branch_sub_branch_list_type; void cstate_branch_sub_branch_list_write _((struct output_ty *, char *, cstate_branch_sub_branch_list)); #ifndef cstate_branch_administrator_list_DEF #define cstate_branch_administrator_list_DEF typedef struct cstate_branch_administrator_list *cstate_branch_administrator_list; struct cstate_branch_administrator_list { size_t length; size_t maximum; string_ty **list; }; #endif /* cstate_branch_administrator_list_DEF */ extern type_ty cstate_branch_administrator_list_type; void cstate_branch_administrator_list_write _((struct output_ty *, char *, cstate_branch_administrator_list)); #ifndef cstate_branch_developer_list_DEF #define cstate_branch_developer_list_DEF typedef struct cstate_branch_developer_list *cstate_branch_developer_list; struct cstate_branch_developer_list { size_t length; size_t maximum; string_ty **list; }; #endif /* cstate_branch_developer_list_DEF */ extern type_ty cstate_branch_developer_list_type; void cstate_branch_developer_list_write _((struct output_ty *, char *, cstate_branch_developer_list)); #ifndef cstate_branch_reviewer_list_DEF #define cstate_branch_reviewer_list_DEF typedef struct cstate_branch_reviewer_list *cstate_branch_reviewer_list; struct cstate_branch_reviewer_list { size_t length; size_t maximum; string_ty **list; }; #endif /* cstate_branch_reviewer_list_DEF */ extern type_ty cstate_branch_reviewer_list_type; void cstate_branch_reviewer_list_write _((struct output_ty *, char *, cstate_branch_reviewer_list)); #ifndef cstate_branch_integrator_list_DEF #define cstate_branch_integrator_list_DEF typedef struct cstate_branch_integrator_list *cstate_branch_integrator_list; struct cstate_branch_integrator_list { size_t length; size_t maximum; string_ty **list; }; #endif /* cstate_branch_integrator_list_DEF */ extern type_ty cstate_branch_integrator_list_type; void cstate_branch_integrator_list_write _((struct output_ty *, char *, cstate_branch_integrator_list)); #ifndef cstate_branch_DEF #define cstate_branch_DEF #define cstate_branch_umask_mask ((unsigned long)1 << 0) #define cstate_branch_developer_may_review_mask ((unsigned long)1 << 1) #define cstate_branch_developer_may_integrate_mask ((unsigned long)1 << 2) #define cstate_branch_reviewer_may_integrate_mask ((unsigned long)1 << 3) #define cstate_branch_developers_may_create_changes_mask ((unsigned long)1 << 4) #define cstate_branch_forced_develop_begin_notify_command_mask ((unsigned long)0) #define cstate_branch_develop_end_notify_command_mask ((unsigned long)0) #define cstate_branch_develop_end_undo_notify_command_mask ((unsigned long)0) #define cstate_branch_review_begin_notify_command_mask ((unsigned long)0) #define cstate_branch_review_begin_undo_notify_command_mask ((unsigned long)0) #define cstate_branch_review_pass_notify_command_mask ((unsigned long)0) #define cstate_branch_review_pass_undo_notify_command_mask ((unsigned long)0) #define cstate_branch_review_fail_notify_command_mask ((unsigned long)0) #define cstate_branch_integrate_pass_notify_command_mask ((unsigned long)0) #define cstate_branch_integrate_fail_notify_command_mask ((unsigned long)0) #define cstate_branch_default_test_exemption_mask ((unsigned long)1 << 5) #define cstate_branch_skip_unlucky_mask ((unsigned long)1 << 6) #define cstate_branch_compress_database_mask ((unsigned long)1 << 7) #define cstate_branch_develop_end_action_mask ((unsigned long)1 << 8) #define cstate_branch_history_mask ((unsigned long)0) #define cstate_branch_change_mask ((unsigned long)0) #define cstate_branch_sub_branch_mask ((unsigned long)0) #define cstate_branch_administrator_mask ((unsigned long)0) #define cstate_branch_developer_mask ((unsigned long)0) #define cstate_branch_reviewer_mask ((unsigned long)0) #define cstate_branch_integrator_mask ((unsigned long)0) #define cstate_branch_currently_integrating_change_mask ((unsigned long)1 << 9) #define cstate_branch_default_development_directory_mask ((unsigned long)0) #define cstate_branch_minimum_change_number_mask ((unsigned long)1 << 10) #define cstate_branch_reuse_change_numbers_mask ((unsigned long)1 << 11) #define cstate_branch_minimum_branch_number_mask ((unsigned long)1 << 12) typedef struct cstate_branch *cstate_branch; struct cstate_branch { long reference_count; unsigned long mask; long umask; 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; boolean_ty default_test_exemption; boolean_ty skip_unlucky; boolean_ty compress_database; cstate_branch_develop_end_action_ty develop_end_action; cstate_branch_history_list history; cstate_branch_change_list change; cstate_branch_sub_branch_list sub_branch; cstate_branch_administrator_list administrator; cstate_branch_developer_list developer; cstate_branch_reviewer_list reviewer; cstate_branch_integrator_list integrator; long currently_integrating_change; string_ty *default_development_directory; long minimum_change_number; boolean_ty reuse_change_numbers; long minimum_branch_number; }; #endif /* cstate_branch_DEF */ extern type_ty cstate_branch_type; void cstate_branch_write _((struct output_ty *, char *, cstate_branch)); cstate_branch cstate_branch_copy _((cstate_branch)); #ifndef cstate_src_DEF #define cstate_src_DEF #define cstate_src_file_name_mask ((unsigned long)0) #define cstate_src_action_mask ((unsigned long)1 << 0) #define cstate_src_edit_number_mask ((unsigned long)0) #define cstate_src_usage_mask ((unsigned long)1 << 1) #define cstate_src_diff_time_mask ((unsigned long)1 << 2) #define cstate_src_diff_file_time_mask ((unsigned long)1 << 3) #define cstate_src_move_mask ((unsigned long)0) typedef struct cstate_src *cstate_src; struct cstate_src { long reference_count; unsigned long mask; string_ty *file_name; file_action_ty action; string_ty *edit_number; file_usage_ty usage; time_t diff_time; time_t diff_file_time; string_ty *move; }; #endif /* cstate_src_DEF */ extern type_ty cstate_src_type; void cstate_src_write _((struct output_ty *, char *, cstate_src)); cstate_src cstate_src_copy _((cstate_src)); #ifndef cstate_src_list_DEF #define cstate_src_list_DEF typedef struct cstate_src_list *cstate_src_list; struct cstate_src_list { size_t length; size_t maximum; cstate_src *list; }; #endif /* cstate_src_list_DEF */ extern type_ty cstate_src_list_type; void cstate_src_list_write _((struct output_ty *, char *, cstate_src_list)); #ifndef cstate_DEF #define cstate_DEF #define cstate_brief_description_mask ((unsigned long)0) #define cstate_description_mask ((unsigned long)0) #define cstate_cause_mask ((unsigned long)1 << 0) #define cstate_test_exempt_mask ((unsigned long)1 << 1) #define cstate_test_baseline_exempt_mask ((unsigned long)1 << 2) #define cstate_regression_test_exempt_mask ((unsigned long)1 << 3) #define cstate_architecture_mask ((unsigned long)0) #define cstate_copyright_years_mask ((unsigned long)0) #define cstate_version_previous_mask ((unsigned long)0) #define cstate_state_mask ((unsigned long)1 << 4) #define cstate_delta_number_mask ((unsigned long)1 << 5) #define cstate_project_file_command_sync_mask ((unsigned long)1 << 6) #define cstate_build_time_mask ((unsigned long)1 << 7) #define cstate_test_time_mask ((unsigned long)1 << 8) #define cstate_test_baseline_time_mask ((unsigned long)1 << 9) #define cstate_regression_test_time_mask ((unsigned long)1 << 10) #define cstate_architecture_times_mask ((unsigned long)0) #define cstate_development_directory_mask ((unsigned long)0) #define cstate_integration_directory_mask ((unsigned long)0) #define cstate_history_mask ((unsigned long)0) #define cstate_branch_mask ((unsigned long)0) #define cstate_src_mask ((unsigned long)0) typedef struct cstate *cstate; struct cstate { long reference_count; unsigned long mask; string_ty *brief_description; string_ty *description; change_cause_ty cause; boolean_ty test_exempt; boolean_ty test_baseline_exempt; boolean_ty regression_test_exempt; cstate_architecture_list architecture; cstate_copyright_years_list copyright_years; string_ty *version_previous; cstate_state_ty state; long delta_number; long project_file_command_sync; time_t build_time; time_t test_time; time_t test_baseline_time; time_t regression_test_time; cstate_architecture_times_list architecture_times; string_ty *development_directory; string_ty *integration_directory; cstate_history_list history; cstate_branch branch; cstate_src_list src; }; #endif /* cstate_DEF */ extern type_ty cstate_type; void cstate_write _((struct output_ty *, cstate)); cstate cstate_copy _((cstate)); void cstate_write_file _((string_ty *filename, cstate value, int comp)); cstate cstate_read_file _((string_ty *filename)); void cstate__rpt_init _((void)); #endif /* cstate_H */