#ifndef fstate_H #define fstate_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 fingerprint_DEF #define fingerprint_DEF #define fingerprint_youngest_mask ((unsigned long)1 << 0) #define fingerprint_oldest_mask ((unsigned long)1 << 1) #define fingerprint_crypto_mask ((unsigned long)0) typedef struct fingerprint *fingerprint; struct fingerprint { long reference_count; unsigned long mask; time_t youngest; time_t oldest; string_ty *crypto; }; #endif /* fingerprint_DEF */ extern type_ty fingerprint_type; void fingerprint_write _((struct output_ty *, char *, fingerprint)); fingerprint fingerprint_copy _((fingerprint)); #ifndef fstate_src_architecture_times_DEF #define fstate_src_architecture_times_DEF #define fstate_src_architecture_times_variant_mask ((unsigned long)0) #define fstate_src_architecture_times_test_time_mask ((unsigned long)1 << 0) #define fstate_src_architecture_times_test_baseline_time_mask ((unsigned long)1 << 1) typedef struct fstate_src_architecture_times *fstate_src_architecture_times; struct fstate_src_architecture_times { long reference_count; unsigned long mask; string_ty *variant; time_t test_time; time_t test_baseline_time; }; #endif /* fstate_src_architecture_times_DEF */ extern type_ty fstate_src_architecture_times_type; void fstate_src_architecture_times_write _((struct output_ty *, char *, fstate_src_architecture_times)); fstate_src_architecture_times fstate_src_architecture_times_copy _((fstate_src_architecture_times)); #ifndef fstate_src_architecture_times_list_DEF #define fstate_src_architecture_times_list_DEF typedef struct fstate_src_architecture_times_list *fstate_src_architecture_times_list; struct fstate_src_architecture_times_list { size_t length; size_t maximum; fstate_src_architecture_times *list; }; #endif /* fstate_src_architecture_times_list_DEF */ extern type_ty fstate_src_architecture_times_list_type; void fstate_src_architecture_times_list_write _((struct output_ty *, char *, fstate_src_architecture_times_list)); #ifndef fstate_src_test_list_DEF #define fstate_src_test_list_DEF typedef struct fstate_src_test_list *fstate_src_test_list; struct fstate_src_test_list { size_t length; size_t maximum; string_ty **list; }; #endif /* fstate_src_test_list_DEF */ extern type_ty fstate_src_test_list_type; void fstate_src_test_list_write _((struct output_ty *, char *, fstate_src_test_list)); #ifndef fstate_src_DEF #define fstate_src_DEF #define fstate_src_file_name_mask ((unsigned long)0) #define fstate_src_action_mask ((unsigned long)1 << 0) #define fstate_src_edit_mask ((unsigned long)0) #define fstate_src_edit_number_mask ((unsigned long)0) #define fstate_src_edit_origin_mask ((unsigned long)0) #define fstate_src_edit_number_origin_mask ((unsigned long)0) #define fstate_src_edit_origin_new_mask ((unsigned long)0) #define fstate_src_edit_number_origin_new_mask ((unsigned long)0) #define fstate_src_usage_mask ((unsigned long)1 << 1) #define fstate_src_file_fp_mask ((unsigned long)0) #define fstate_src_diff_file_fp_mask ((unsigned long)0) #define fstate_src_idiff_file_fp_mask ((unsigned long)0) #define fstate_src_architecture_times_mask ((unsigned long)0) #define fstate_src_move_mask ((unsigned long)0) #define fstate_src_locked_by_mask ((unsigned long)1 << 2) #define fstate_src_about_to_be_created_by_mask ((unsigned long)1 << 3) #define fstate_src_about_to_be_copied_by_mask ((unsigned long)1 << 4) #define fstate_src_deleted_by_mask ((unsigned long)1 << 5) #define fstate_src_test_mask ((unsigned long)0) #define fstate_src_metrics_mask ((unsigned long)0) typedef struct fstate_src *fstate_src; struct fstate_src { long reference_count; unsigned long mask; string_ty *file_name; file_action_ty action; history_version edit; string_ty *edit_number; history_version edit_origin; string_ty *edit_number_origin; history_version edit_origin_new; string_ty *edit_number_origin_new; file_usage_ty usage; fingerprint file_fp; fingerprint diff_file_fp; fingerprint idiff_file_fp; fstate_src_architecture_times_list architecture_times; string_ty *move; long locked_by; long about_to_be_created_by; long about_to_be_copied_by; long deleted_by; fstate_src_test_list test; metric_list metrics; }; #endif /* fstate_src_DEF */ extern type_ty fstate_src_type; void fstate_src_write _((struct output_ty *, char *, fstate_src)); fstate_src fstate_src_copy _((fstate_src)); #ifndef fstate_src_list_DEF #define fstate_src_list_DEF typedef struct fstate_src_list *fstate_src_list; struct fstate_src_list { size_t length; size_t maximum; fstate_src *list; }; #endif /* fstate_src_list_DEF */ extern type_ty fstate_src_list_type; void fstate_src_list_write _((struct output_ty *, char *, fstate_src_list)); #ifndef fstate_DEF #define fstate_DEF #define fstate_src_mask ((unsigned long)0) typedef struct fstate *fstate; struct fstate { long reference_count; unsigned long mask; fstate_src_list src; }; #endif /* fstate_DEF */ extern type_ty fstate_type; void fstate_write _((struct output_ty *, fstate)); fstate fstate_copy _((fstate)); void fstate_write_file _((string_ty *filename, fstate value, int comp)); fstate fstate_read_file _((string_ty *filename)); void fstate__rpt_init _((void)); #endif /* fstate_H */