#ifndef pstate_H #define pstate_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 pstate_copyright_years_list_DEF #define pstate_copyright_years_list_DEF typedef struct pstate_copyright_years_list *pstate_copyright_years_list; struct pstate_copyright_years_list { size_t length; size_t maximum; long *list; }; #endif /* pstate_copyright_years_list_DEF */ extern type_ty pstate_copyright_years_list_type; void pstate_copyright_years_list_write _((struct output_ty *, char *, pstate_copyright_years_list)); #ifndef pstate_src_DEF #define pstate_src_DEF #define pstate_src_file_name_mask ((unsigned long)0) #define pstate_src_usage_mask ((unsigned long)1 << 0) #define pstate_src_edit_number_mask ((unsigned long)0) #define pstate_src_locked_by_mask ((unsigned long)1 << 1) #define pstate_src_about_to_be_created_by_mask ((unsigned long)1 << 2) #define pstate_src_deleted_by_mask ((unsigned long)1 << 3) typedef struct pstate_src *pstate_src; struct pstate_src { long reference_count; unsigned long mask; string_ty *file_name; file_usage_ty usage; string_ty *edit_number; long locked_by; long about_to_be_created_by; long deleted_by; }; #endif /* pstate_src_DEF */ extern type_ty pstate_src_type; void pstate_src_write _((struct output_ty *, char *, pstate_src)); pstate_src pstate_src_copy _((pstate_src)); #ifndef pstate_src_list_DEF #define pstate_src_list_DEF typedef struct pstate_src_list *pstate_src_list; struct pstate_src_list { size_t length; size_t maximum; pstate_src *list; }; #endif /* pstate_src_list_DEF */ extern type_ty pstate_src_list_type; void pstate_src_list_write _((struct output_ty *, char *, pstate_src_list)); #ifndef pstate_history_name_list_DEF #define pstate_history_name_list_DEF typedef struct pstate_history_name_list *pstate_history_name_list; struct pstate_history_name_list { size_t length; size_t maximum; string_ty **list; }; #endif /* pstate_history_name_list_DEF */ extern type_ty pstate_history_name_list_type; void pstate_history_name_list_write _((struct output_ty *, char *, pstate_history_name_list)); #ifndef pstate_history_DEF #define pstate_history_DEF #define pstate_history_delta_number_mask ((unsigned long)1 << 0) #define pstate_history_change_number_mask ((unsigned long)1 << 1) #define pstate_history_name_mask ((unsigned long)0) typedef struct pstate_history *pstate_history; struct pstate_history { long reference_count; unsigned long mask; long delta_number; long change_number; pstate_history_name_list name; }; #endif /* pstate_history_DEF */ extern type_ty pstate_history_type; void pstate_history_write _((struct output_ty *, char *, pstate_history)); pstate_history pstate_history_copy _((pstate_history)); #ifndef pstate_history_list_DEF #define pstate_history_list_DEF typedef struct pstate_history_list *pstate_history_list; struct pstate_history_list { size_t length; size_t maximum; pstate_history *list; }; #endif /* pstate_history_list_DEF */ extern type_ty pstate_history_list_type; void pstate_history_list_write _((struct output_ty *, char *, pstate_history_list)); #ifndef pstate_change_list_DEF #define pstate_change_list_DEF typedef struct pstate_change_list *pstate_change_list; struct pstate_change_list { size_t length; size_t maximum; long *list; }; #endif /* pstate_change_list_DEF */ extern type_ty pstate_change_list_type; void pstate_change_list_write _((struct output_ty *, char *, pstate_change_list)); #ifndef pstate_administrator_list_DEF #define pstate_administrator_list_DEF typedef struct pstate_administrator_list *pstate_administrator_list; struct pstate_administrator_list { size_t length; size_t maximum; string_ty **list; }; #endif /* pstate_administrator_list_DEF */ extern type_ty pstate_administrator_list_type; void pstate_administrator_list_write _((struct output_ty *, char *, pstate_administrator_list)); #ifndef pstate_developer_list_DEF #define pstate_developer_list_DEF typedef struct pstate_developer_list *pstate_developer_list; struct pstate_developer_list { size_t length; size_t maximum; string_ty **list; }; #endif /* pstate_developer_list_DEF */ extern type_ty pstate_developer_list_type; void pstate_developer_list_write _((struct output_ty *, char *, pstate_developer_list)); #ifndef pstate_reviewer_list_DEF #define pstate_reviewer_list_DEF typedef struct pstate_reviewer_list *pstate_reviewer_list; struct pstate_reviewer_list { size_t length; size_t maximum; string_ty **list; }; #endif /* pstate_reviewer_list_DEF */ extern type_ty pstate_reviewer_list_type; void pstate_reviewer_list_write _((struct output_ty *, char *, pstate_reviewer_list)); #ifndef pstate_integrator_list_DEF #define pstate_integrator_list_DEF typedef struct pstate_integrator_list *pstate_integrator_list; struct pstate_integrator_list { size_t length; size_t maximum; string_ty **list; }; #endif /* pstate_integrator_list_DEF */ extern type_ty pstate_integrator_list_type; void pstate_integrator_list_write _((struct output_ty *, char *, pstate_integrator_list)); #ifndef pstate_DEF #define pstate_DEF #define pstate_next_test_number_mask ((unsigned long)1 << 0) #define pstate_umask_mask ((unsigned long)1 << 1) #define pstate_description_mask ((unsigned long)0) #define pstate_owner_name_mask ((unsigned long)0) #define pstate_group_name_mask ((unsigned long)0) #define pstate_developer_may_review_mask ((unsigned long)1 << 2) #define pstate_developer_may_integrate_mask ((unsigned long)1 << 3) #define pstate_reviewer_may_integrate_mask ((unsigned long)1 << 4) #define pstate_developers_may_create_changes_mask ((unsigned long)1 << 5) #define pstate_forced_develop_begin_notify_command_mask ((unsigned long)0) #define pstate_develop_end_notify_command_mask ((unsigned long)0) #define pstate_develop_end_undo_notify_command_mask ((unsigned long)0) #define pstate_review_pass_notify_command_mask ((unsigned long)0) #define pstate_review_pass_undo_notify_command_mask ((unsigned long)0) #define pstate_review_fail_notify_command_mask ((unsigned long)0) #define pstate_integrate_pass_notify_command_mask ((unsigned long)0) #define pstate_integrate_fail_notify_command_mask ((unsigned long)0) #define pstate_default_development_directory_mask ((unsigned long)0) #define pstate_default_test_exemption_mask ((unsigned long)1 << 6) #define pstate_copyright_years_mask ((unsigned long)0) #define pstate_next_change_number_mask ((unsigned long)1 << 7) #define pstate_next_delta_number_mask ((unsigned long)1 << 8) #define pstate_src_mask ((unsigned long)0) #define pstate_history_mask ((unsigned long)0) #define pstate_change_mask ((unsigned long)0) #define pstate_administrator_mask ((unsigned long)0) #define pstate_developer_mask ((unsigned long)0) #define pstate_reviewer_mask ((unsigned long)0) #define pstate_integrator_mask ((unsigned long)0) #define pstate_currently_integrating_change_mask ((unsigned long)1 << 9) #define pstate_version_major_mask ((unsigned long)1 << 10) #define pstate_version_minor_mask ((unsigned long)1 << 11) #define pstate_version_previous_mask ((unsigned long)0) typedef struct pstate *pstate; struct pstate { long reference_count; unsigned long mask; long next_test_number; long umask; string_ty *description; string_ty *owner_name; string_ty *group_name; 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_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; boolean_ty default_test_exemption; pstate_copyright_years_list copyright_years; long next_change_number; long next_delta_number; pstate_src_list src; pstate_history_list history; pstate_change_list change; pstate_administrator_list administrator; pstate_developer_list developer; pstate_reviewer_list reviewer; pstate_integrator_list integrator; long currently_integrating_change; long version_major; long version_minor; string_ty *version_previous; }; #endif /* pstate_DEF */ extern type_ty pstate_type; void pstate_write _((struct output_ty *, pstate)); pstate pstate_copy _((pstate)); void pstate_write_file _((string_ty *filename, pstate value, int comp)); pstate pstate_read_file _((string_ty *filename)); void pstate__rpt_init _((void)); #endif /* pstate_H */