#ifndef cattr_H #define cattr_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 cattr_architecture_list_DEF #define cattr_architecture_list_DEF typedef struct cattr_architecture_list *cattr_architecture_list; struct cattr_architecture_list { size_t length; size_t maximum; string_ty **list; }; #endif /* cattr_architecture_list_DEF */ extern type_ty cattr_architecture_list_type; void cattr_architecture_list_write _((struct output_ty *, char *, cattr_architecture_list)); #ifndef cattr_copyright_years_list_DEF #define cattr_copyright_years_list_DEF typedef struct cattr_copyright_years_list *cattr_copyright_years_list; struct cattr_copyright_years_list { size_t length; size_t maximum; long *list; }; #endif /* cattr_copyright_years_list_DEF */ extern type_ty cattr_copyright_years_list_type; void cattr_copyright_years_list_write _((struct output_ty *, char *, cattr_copyright_years_list)); #ifndef cattr_DEF #define cattr_DEF #define cattr_brief_description_mask ((unsigned long)0) #define cattr_description_mask ((unsigned long)0) #define cattr_cause_mask ((unsigned long)1 << 0) #define cattr_test_exempt_mask ((unsigned long)1 << 1) #define cattr_test_baseline_exempt_mask ((unsigned long)1 << 2) #define cattr_regression_test_exempt_mask ((unsigned long)1 << 3) #define cattr_architecture_mask ((unsigned long)0) #define cattr_copyright_years_mask ((unsigned long)0) #define cattr_version_previous_mask ((unsigned long)0) typedef struct cattr *cattr; struct cattr { 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; cattr_architecture_list architecture; cattr_copyright_years_list copyright_years; string_ty *version_previous; }; #endif /* cattr_DEF */ extern type_ty cattr_type; void cattr_write _((struct output_ty *, cattr)); cattr cattr_copy _((cattr)); void cattr_write_file _((string_ty *filename, cattr value, int comp)); cattr cattr_read_file _((string_ty *filename)); void cattr__rpt_init _((void)); #endif /* cattr_H */