#include #include #include #include #include #include #include #include #include #include #include #include #include void cstate_architecture_list_write(fp, name, this) output_ty *fp; char *name; cstate_architecture_list this; { size_t j; if (!this) return; trace(("cstate_architecture_list_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } assert(this->length <= this->maximum); assert(!this->list == !this->maximum); output_fputs(fp, "[\n"/*]*/); for (j = 0; j < this->length; ++j) { string_write(fp, (char *)0, this->list[j]); output_fputs(fp, ",\n"); } output_fputs(fp, /*[*/"]"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *cstate_architecture_list_alloc _((void)); static void * cstate_architecture_list_alloc() { cstate_architecture_list result; trace(("cstate_architecture_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct cstate_architecture_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void cstate_architecture_list_free _((void *)); static void cstate_architecture_list_free(that) void *that; { cstate_architecture_list this = that; size_t j; if (!this) return; trace(("cstate_architecture_list_free(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); for (j = 0; j < this->length; ++j) str_free(this->list[j]); if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *cstate_architecture_list_parse _((void *, type_ty **)); static void * cstate_architecture_list_parse(that, type_pp) void *that; type_ty **type_pp; { cstate_architecture_list this = that; void *addr; trace(("cstate_architecture_list_parse(this = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)type_pp)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); *type_pp = &string_type; trace_pointer(*type_pp); if (this->length >= this->maximum) { size_t nbytes; this->maximum = this->maximum * 2 + 16; nbytes = this->maximum * sizeof(this->list[0]); this->list = mem_change_size(this->list, nbytes); } addr = &this->list[this->length++]; trace(("return %08lX;\n", (long)addr)); trace((/*{*/"}\n")); return addr; } static rpt_value_ty *cstate_architecture_list_convert _((void *)); static rpt_value_ty * cstate_architecture_list_convert(that) void *that; { cstate_architecture_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(cstate_architecture_list *)that; if (!this) return 0; trace(("cstate_architecture_list_convert(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); result = rpt_value_list(); for (j = 0; j < this->length; ++j) { vp = string_type.convert(&this->list[j]); assert(vp); rpt_value_list_append(result, vp); rpt_value_free(vp); } trace((/*{*/"}\n")); trace(("return %08lX;\n", (long)result)); return result; } type_ty cstate_architecture_list_type = { "cstate_architecture_list", cstate_architecture_list_alloc, cstate_architecture_list_free, 0, /* enum_parse */ cstate_architecture_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ cstate_architecture_list_convert, generic_struct_is_set, }; void cstate_copyright_years_list_write(fp, name, this) output_ty *fp; char *name; cstate_copyright_years_list this; { size_t j; if (!this) return; trace(("cstate_copyright_years_list_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } assert(this->length <= this->maximum); assert(!this->list == !this->maximum); output_fputs(fp, "[\n"/*]*/); for (j = 0; j < this->length; ++j) { integer_write(fp, (char *)0, this->list[j]); output_fputs(fp, ",\n"); } output_fputs(fp, /*[*/"]"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *cstate_copyright_years_list_alloc _((void)); static void * cstate_copyright_years_list_alloc() { cstate_copyright_years_list result; trace(("cstate_copyright_years_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct cstate_copyright_years_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void cstate_copyright_years_list_free _((void *)); static void cstate_copyright_years_list_free(that) void *that; { cstate_copyright_years_list this = that; size_t j; if (!this) return; trace(("cstate_copyright_years_list_free(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); for (j = 0; j < this->length; ++j) ; if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *cstate_copyright_years_list_parse _((void *, type_ty **)); static void * cstate_copyright_years_list_parse(that, type_pp) void *that; type_ty **type_pp; { cstate_copyright_years_list this = that; void *addr; trace(("cstate_copyright_years_list_parse(this = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)type_pp)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); *type_pp = &integer_type; trace_pointer(*type_pp); if (this->length >= this->maximum) { size_t nbytes; this->maximum = this->maximum * 2 + 16; nbytes = this->maximum * sizeof(this->list[0]); this->list = mem_change_size(this->list, nbytes); } addr = &this->list[this->length++]; trace(("return %08lX;\n", (long)addr)); trace((/*{*/"}\n")); return addr; } static rpt_value_ty *cstate_copyright_years_list_convert _((void *)); static rpt_value_ty * cstate_copyright_years_list_convert(that) void *that; { cstate_copyright_years_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(cstate_copyright_years_list *)that; if (!this) return 0; trace(("cstate_copyright_years_list_convert(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); result = rpt_value_list(); for (j = 0; j < this->length; ++j) { vp = integer_type.convert(&this->list[j]); assert(vp); rpt_value_list_append(result, vp); rpt_value_free(vp); } trace((/*{*/"}\n")); trace(("return %08lX;\n", (long)result)); return result; } type_ty cstate_copyright_years_list_type = { "cstate_copyright_years_list", cstate_copyright_years_list_alloc, cstate_copyright_years_list_free, 0, /* enum_parse */ cstate_copyright_years_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ cstate_copyright_years_list_convert, generic_struct_is_set, }; static char *cstate_state_s[] = { "awaiting_development", "being_developed", "awaiting_review", "being_reviewed", "awaiting_integration", "being_integrated", "completed", }; static string_ty *cstate_state_f[SIZEOF(cstate_state_s)]; char * cstate_state_ename(this) cstate_state_ty this; { static char buffer[20]; if ((int)this >= 0 && (int)this < 7) return cstate_state_s[this]; sprintf(buffer, "%d", (int)this); return buffer; } void cstate_state_write(fp, name, this) output_ty *fp; const char *name; cstate_state_ty this; { if (name) { if (this == 0 && type_enum_option_query()) return; output_fputs(fp, name); output_fputs(fp, " = "); } output_fputs(fp, cstate_state_s[this]); if (name) output_fputs(fp, ";\n"); } static int cstate_state_parse _((string_ty *)); static int cstate_state_parse(name) string_ty *name; { int j; slow_to_fast(cstate_state_s, cstate_state_f, SIZEOF(cstate_state_s)); for (j = 0; j < SIZEOF(cstate_state_f); ++j) { if (str_equal(name, cstate_state_f[j])) return j; } return -1; } static string_ty *cstate_state_fuzzy _((string_ty *)); static string_ty * cstate_state_fuzzy(name) string_ty *name; { return generic_enum_fuzzy ( name, cstate_state_f, SIZEOF(cstate_state_f) ); } static struct rpt_value_ty *cstate_state_convert _((void *)); static struct rpt_value_ty * cstate_state_convert(this) void *this; { if (!cstate_state_f[0]) slow_to_fast(cstate_state_s, cstate_state_f, SIZEOF(cstate_state_s)); return generic_enum_convert ( this, cstate_state_f, SIZEOF(cstate_state_f) ); } type_ty cstate_state_type = { "cstate_state", 0, /* alloc */ 0, /* free */ cstate_state_parse, 0, /* list_parse */ 0, /* struct_parse */ cstate_state_fuzzy, cstate_state_convert, generic_enum_is_set, }; void cstate_architecture_times_write(fp, name, this) output_ty *fp; char *name; cstate_architecture_times this; { if (!this) return; trace(("cstate_architecture_times_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); assert(((cstate_architecture_times)this)->reference_count > 0); trace(("rc = %d;\n", ((cstate_architecture_times)this)->reference_count)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } output_fputs(fp, "{\n"/*}*/); string_write(fp, "variant", this->variant); string_write(fp, "node", this->node); time_write(fp, "build_time", this->build_time); time_write(fp, "test_time", this->test_time); time_write(fp, "test_baseline_time", this->test_baseline_time); time_write(fp, "regression_test_time", this->regression_test_time); output_fputs(fp, /*{*/"}"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *cstate_architecture_times_alloc _((void)); static void * cstate_architecture_times_alloc() { cstate_architecture_times this; trace(("cstate_architecture_times_alloc()\n{\n"/*}*/)); this = mem_alloc(sizeof(struct cstate_architecture_times)); this->reference_count = 1; this->mask = 0; this->variant = 0; this->node = 0; this->build_time = 0; this->test_time = 0; this->test_baseline_time = 0; this->regression_test_time = 0; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } cstate_architecture_times cstate_architecture_times_copy(this) cstate_architecture_times this; { trace(("cstate_architecture_times_copy()\n{\n"/*}*/)); this->reference_count++; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } static void cstate_architecture_times_free _((void *)); static void cstate_architecture_times_free(that) void *that; { cstate_architecture_times this = that; if (!this) return; this->reference_count--; assert(this->reference_count >= 0); if (this->reference_count > 0) return; trace(("cstate_architecture_times_free(this = %08lX)\n{\n"/*}*/, (long)this)); str_free(this->variant); str_free(this->node); mem_free(this); trace((/*{*/"}\n")); } static type_table_ty cstate_architecture_times_table[] = { { "variant", offsetof(struct cstate_architecture_times, variant), &string_type, cstate_architecture_times_variant_mask, }, { "node", offsetof(struct cstate_architecture_times, node), &string_type, cstate_architecture_times_node_mask, }, { "build_time", offsetof(struct cstate_architecture_times, build_time), &time_type, cstate_architecture_times_build_time_mask, }, { "test_time", offsetof(struct cstate_architecture_times, test_time), &time_type, cstate_architecture_times_test_time_mask, }, { "test_baseline_time", offsetof(struct cstate_architecture_times, test_baseline_time), &time_type, cstate_architecture_times_test_baseline_time_mask, }, { "regression_test_time", offsetof(struct cstate_architecture_times, regression_test_time), &time_type, cstate_architecture_times_regression_test_time_mask, }, }; static void *cstate_architecture_times_parse _((void *, string_ty *, type_ty **, unsigned long *)); static void * cstate_architecture_times_parse(this, name, type_pp, mask_p) void *this; string_ty *name; type_ty **type_pp; unsigned long *mask_p; { void *addr; trace(("cstate_architecture_times_parse(this = %08lX, name = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)name, (long)type_pp)); assert(((cstate_architecture_times)this)->reference_count > 0); assert(sizeof(cstate_architecture_times) == sizeof(generic_struct_ty *)); addr = generic_struct_parse ( this, name, type_pp, mask_p, cstate_architecture_times_table, SIZEOF(cstate_architecture_times_table) ); trace((/*{*/"return %08lX;\n}\n", (long)addr)); return addr; } static string_ty *cstate_architecture_times_fuzzy _((string_ty *)); static string_ty * cstate_architecture_times_fuzzy(name) string_ty *name; { string_ty *result; trace(("cstate_architecture_times_fuzzy(name = %08lX)\n{\n"/*}*/, (long)name)); result = generic_struct_fuzzy ( name, cstate_architecture_times_table, SIZEOF(cstate_architecture_times_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static struct rpt_value_ty *cstate_architecture_times_convert _((void *)); static struct rpt_value_ty * cstate_architecture_times_convert(this) void *this; { struct rpt_value_ty *result; trace(("cstate_architecture_times_convert(name = %08lX)\n{\n"/*}*/, (long)this)); assert(((cstate_architecture_times)this)->reference_count > 0); result = generic_struct_convert ( this, cstate_architecture_times_table, SIZEOF(cstate_architecture_times_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } type_ty cstate_architecture_times_type = { "cstate_architecture_times", cstate_architecture_times_alloc, cstate_architecture_times_free, 0, /* enum_parse */ 0, /* list_parse */ cstate_architecture_times_parse, cstate_architecture_times_fuzzy, cstate_architecture_times_convert, generic_struct_is_set, }; void cstate_architecture_times_list_write(fp, name, this) output_ty *fp; char *name; cstate_architecture_times_list this; { size_t j; if (!this) return; trace(("cstate_architecture_times_list_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } assert(this->length <= this->maximum); assert(!this->list == !this->maximum); output_fputs(fp, "[\n"/*]*/); for (j = 0; j < this->length; ++j) { cstate_architecture_times_write(fp, (char *)0, this->list[j]); output_fputs(fp, ",\n"); } output_fputs(fp, /*[*/"]"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *cstate_architecture_times_list_alloc _((void)); static void * cstate_architecture_times_list_alloc() { cstate_architecture_times_list result; trace(("cstate_architecture_times_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct cstate_architecture_times_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void cstate_architecture_times_list_free _((void *)); static void cstate_architecture_times_list_free(that) void *that; { cstate_architecture_times_list this = that; size_t j; if (!this) return; trace(("cstate_architecture_times_list_free(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); for (j = 0; j < this->length; ++j) cstate_architecture_times_free(this->list[j]); if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *cstate_architecture_times_list_parse _((void *, type_ty **)); static void * cstate_architecture_times_list_parse(that, type_pp) void *that; type_ty **type_pp; { cstate_architecture_times_list this = that; void *addr; trace(("cstate_architecture_times_list_parse(this = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)type_pp)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); *type_pp = &cstate_architecture_times_type; trace_pointer(*type_pp); if (this->length >= this->maximum) { size_t nbytes; this->maximum = this->maximum * 2 + 16; nbytes = this->maximum * sizeof(this->list[0]); this->list = mem_change_size(this->list, nbytes); } addr = &this->list[this->length++]; trace(("return %08lX;\n", (long)addr)); trace((/*{*/"}\n")); return addr; } static rpt_value_ty *cstate_architecture_times_list_convert _((void *)); static rpt_value_ty * cstate_architecture_times_list_convert(that) void *that; { cstate_architecture_times_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(cstate_architecture_times_list *)that; if (!this) return 0; trace(("cstate_architecture_times_list_convert(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); result = rpt_value_list(); for (j = 0; j < this->length; ++j) { vp = cstate_architecture_times_type.convert(&this->list[j]); assert(vp); rpt_value_list_append(result, vp); rpt_value_free(vp); } trace((/*{*/"}\n")); trace(("return %08lX;\n", (long)result)); return result; } type_ty cstate_architecture_times_list_type = { "cstate_architecture_times_list", cstate_architecture_times_list_alloc, cstate_architecture_times_list_free, 0, /* enum_parse */ cstate_architecture_times_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ cstate_architecture_times_list_convert, generic_struct_is_set, }; static char *cstate_history_what_s[] = { "new_change", "develop_begin", "develop_begin_undo", "develop_end", "develop_end_2ar", "develop_end_2ai", "develop_end_undo", "review_begin", "review_begin_undo", "review_pass", "review_pass_undo", "review_fail", "integrate_begin", "integrate_begin_undo", "integrate_pass", "integrate_fail", }; static string_ty *cstate_history_what_f[SIZEOF(cstate_history_what_s)]; char * cstate_history_what_ename(this) cstate_history_what_ty this; { static char buffer[20]; if ((int)this >= 0 && (int)this < 16) return cstate_history_what_s[this]; sprintf(buffer, "%d", (int)this); return buffer; } void cstate_history_what_write(fp, name, this) output_ty *fp; const char *name; cstate_history_what_ty this; { if (name) { if (this == 0 && type_enum_option_query()) return; output_fputs(fp, name); output_fputs(fp, " = "); } output_fputs(fp, cstate_history_what_s[this]); if (name) output_fputs(fp, ";\n"); } static int cstate_history_what_parse _((string_ty *)); static int cstate_history_what_parse(name) string_ty *name; { int j; slow_to_fast(cstate_history_what_s, cstate_history_what_f, SIZEOF(cstate_history_what_s)); for (j = 0; j < SIZEOF(cstate_history_what_f); ++j) { if (str_equal(name, cstate_history_what_f[j])) return j; } return -1; } static string_ty *cstate_history_what_fuzzy _((string_ty *)); static string_ty * cstate_history_what_fuzzy(name) string_ty *name; { return generic_enum_fuzzy ( name, cstate_history_what_f, SIZEOF(cstate_history_what_f) ); } static struct rpt_value_ty *cstate_history_what_convert _((void *)); static struct rpt_value_ty * cstate_history_what_convert(this) void *this; { if (!cstate_history_what_f[0]) slow_to_fast(cstate_history_what_s, cstate_history_what_f, SIZEOF(cstate_history_what_s)); return generic_enum_convert ( this, cstate_history_what_f, SIZEOF(cstate_history_what_f) ); } type_ty cstate_history_what_type = { "cstate_history_what", 0, /* alloc */ 0, /* free */ cstate_history_what_parse, 0, /* list_parse */ 0, /* struct_parse */ cstate_history_what_fuzzy, cstate_history_what_convert, generic_enum_is_set, }; void cstate_history_write(fp, name, this) output_ty *fp; char *name; cstate_history this; { if (!this) return; trace(("cstate_history_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); assert(((cstate_history)this)->reference_count > 0); trace(("rc = %d;\n", ((cstate_history)this)->reference_count)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } output_fputs(fp, "{\n"/*}*/); time_write(fp, "when", this->when); cstate_history_what_write(fp, "what", this->what); string_write(fp, "who", this->who); string_write(fp, "why", this->why); output_fputs(fp, /*{*/"}"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *cstate_history_alloc _((void)); static void * cstate_history_alloc() { cstate_history this; trace(("cstate_history_alloc()\n{\n"/*}*/)); this = mem_alloc(sizeof(struct cstate_history)); this->reference_count = 1; this->mask = 0; this->when = 0; this->what = 0; this->who = 0; this->why = 0; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } cstate_history cstate_history_copy(this) cstate_history this; { trace(("cstate_history_copy()\n{\n"/*}*/)); this->reference_count++; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } static void cstate_history_free _((void *)); static void cstate_history_free(that) void *that; { cstate_history this = that; if (!this) return; this->reference_count--; assert(this->reference_count >= 0); if (this->reference_count > 0) return; trace(("cstate_history_free(this = %08lX)\n{\n"/*}*/, (long)this)); str_free(this->who); str_free(this->why); mem_free(this); trace((/*{*/"}\n")); } static type_table_ty cstate_history_table[] = { { "when", offsetof(struct cstate_history, when), &time_type, cstate_history_when_mask, }, { "what", offsetof(struct cstate_history, what), &cstate_history_what_type, cstate_history_what_mask, }, { "who", offsetof(struct cstate_history, who), &string_type, cstate_history_who_mask, }, { "why", offsetof(struct cstate_history, why), &string_type, cstate_history_why_mask, }, }; static void *cstate_history_parse _((void *, string_ty *, type_ty **, unsigned long *)); static void * cstate_history_parse(this, name, type_pp, mask_p) void *this; string_ty *name; type_ty **type_pp; unsigned long *mask_p; { void *addr; trace(("cstate_history_parse(this = %08lX, name = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)name, (long)type_pp)); assert(((cstate_history)this)->reference_count > 0); assert(sizeof(cstate_history) == sizeof(generic_struct_ty *)); addr = generic_struct_parse ( this, name, type_pp, mask_p, cstate_history_table, SIZEOF(cstate_history_table) ); trace((/*{*/"return %08lX;\n}\n", (long)addr)); return addr; } static string_ty *cstate_history_fuzzy _((string_ty *)); static string_ty * cstate_history_fuzzy(name) string_ty *name; { string_ty *result; trace(("cstate_history_fuzzy(name = %08lX)\n{\n"/*}*/, (long)name)); result = generic_struct_fuzzy ( name, cstate_history_table, SIZEOF(cstate_history_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static struct rpt_value_ty *cstate_history_convert _((void *)); static struct rpt_value_ty * cstate_history_convert(this) void *this; { struct rpt_value_ty *result; trace(("cstate_history_convert(name = %08lX)\n{\n"/*}*/, (long)this)); assert(((cstate_history)this)->reference_count > 0); result = generic_struct_convert ( this, cstate_history_table, SIZEOF(cstate_history_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } type_ty cstate_history_type = { "cstate_history", cstate_history_alloc, cstate_history_free, 0, /* enum_parse */ 0, /* list_parse */ cstate_history_parse, cstate_history_fuzzy, cstate_history_convert, generic_struct_is_set, }; void cstate_history_list_write(fp, name, this) output_ty *fp; char *name; cstate_history_list this; { size_t j; if (!this) return; trace(("cstate_history_list_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } assert(this->length <= this->maximum); assert(!this->list == !this->maximum); output_fputs(fp, "[\n"/*]*/); for (j = 0; j < this->length; ++j) { cstate_history_write(fp, (char *)0, this->list[j]); output_fputs(fp, ",\n"); } output_fputs(fp, /*[*/"]"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *cstate_history_list_alloc _((void)); static void * cstate_history_list_alloc() { cstate_history_list result; trace(("cstate_history_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct cstate_history_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void cstate_history_list_free _((void *)); static void cstate_history_list_free(that) void *that; { cstate_history_list this = that; size_t j; if (!this) return; trace(("cstate_history_list_free(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); for (j = 0; j < this->length; ++j) cstate_history_free(this->list[j]); if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *cstate_history_list_parse _((void *, type_ty **)); static void * cstate_history_list_parse(that, type_pp) void *that; type_ty **type_pp; { cstate_history_list this = that; void *addr; trace(("cstate_history_list_parse(this = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)type_pp)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); *type_pp = &cstate_history_type; trace_pointer(*type_pp); if (this->length >= this->maximum) { size_t nbytes; this->maximum = this->maximum * 2 + 16; nbytes = this->maximum * sizeof(this->list[0]); this->list = mem_change_size(this->list, nbytes); } addr = &this->list[this->length++]; trace(("return %08lX;\n", (long)addr)); trace((/*{*/"}\n")); return addr; } static rpt_value_ty *cstate_history_list_convert _((void *)); static rpt_value_ty * cstate_history_list_convert(that) void *that; { cstate_history_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(cstate_history_list *)that; if (!this) return 0; trace(("cstate_history_list_convert(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); result = rpt_value_list(); for (j = 0; j < this->length; ++j) { vp = cstate_history_type.convert(&this->list[j]); assert(vp); rpt_value_list_append(result, vp); rpt_value_free(vp); } trace((/*{*/"}\n")); trace(("return %08lX;\n", (long)result)); return result; } type_ty cstate_history_list_type = { "cstate_history_list", cstate_history_list_alloc, cstate_history_list_free, 0, /* enum_parse */ cstate_history_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ cstate_history_list_convert, generic_struct_is_set, }; static char *cstate_branch_develop_end_action_s[] = { "goto_being_reviewed", "goto_awaiting_review", "goto_awaiting_integration", }; static string_ty *cstate_branch_develop_end_action_f[SIZEOF(cstate_branch_develop_end_action_s)]; char * cstate_branch_develop_end_action_ename(this) cstate_branch_develop_end_action_ty this; { static char buffer[20]; if ((int)this >= 0 && (int)this < 3) return cstate_branch_develop_end_action_s[this]; sprintf(buffer, "%d", (int)this); return buffer; } void cstate_branch_develop_end_action_write(fp, name, this) output_ty *fp; const char *name; cstate_branch_develop_end_action_ty this; { if (name) { if (this == 0 && type_enum_option_query()) return; output_fputs(fp, name); output_fputs(fp, " = "); } output_fputs(fp, cstate_branch_develop_end_action_s[this]); if (name) output_fputs(fp, ";\n"); } static int cstate_branch_develop_end_action_parse _((string_ty *)); static int cstate_branch_develop_end_action_parse(name) string_ty *name; { int j; slow_to_fast(cstate_branch_develop_end_action_s, cstate_branch_develop_end_action_f, SIZEOF(cstate_branch_develop_end_action_s)); for (j = 0; j < SIZEOF(cstate_branch_develop_end_action_f); ++j) { if (str_equal(name, cstate_branch_develop_end_action_f[j])) return j; } return -1; } static string_ty *cstate_branch_develop_end_action_fuzzy _((string_ty *)); static string_ty * cstate_branch_develop_end_action_fuzzy(name) string_ty *name; { return generic_enum_fuzzy ( name, cstate_branch_develop_end_action_f, SIZEOF(cstate_branch_develop_end_action_f) ); } static struct rpt_value_ty *cstate_branch_develop_end_action_convert _((void *)); static struct rpt_value_ty * cstate_branch_develop_end_action_convert(this) void *this; { if (!cstate_branch_develop_end_action_f[0]) slow_to_fast(cstate_branch_develop_end_action_s, cstate_branch_develop_end_action_f, SIZEOF(cstate_branch_develop_end_action_s)); return generic_enum_convert ( this, cstate_branch_develop_end_action_f, SIZEOF(cstate_branch_develop_end_action_f) ); } type_ty cstate_branch_develop_end_action_type = { "cstate_branch_develop_end_action", 0, /* alloc */ 0, /* free */ cstate_branch_develop_end_action_parse, 0, /* list_parse */ 0, /* struct_parse */ cstate_branch_develop_end_action_fuzzy, cstate_branch_develop_end_action_convert, generic_enum_is_set, }; void cstate_branch_history_name_list_write(fp, name, this) output_ty *fp; char *name; cstate_branch_history_name_list this; { size_t j; if (!this) return; trace(("cstate_branch_history_name_list_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } assert(this->length <= this->maximum); assert(!this->list == !this->maximum); output_fputs(fp, "[\n"/*]*/); for (j = 0; j < this->length; ++j) { string_write(fp, (char *)0, this->list[j]); output_fputs(fp, ",\n"); } output_fputs(fp, /*[*/"]"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *cstate_branch_history_name_list_alloc _((void)); static void * cstate_branch_history_name_list_alloc() { cstate_branch_history_name_list result; trace(("cstate_branch_history_name_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct cstate_branch_history_name_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void cstate_branch_history_name_list_free _((void *)); static void cstate_branch_history_name_list_free(that) void *that; { cstate_branch_history_name_list this = that; size_t j; if (!this) return; trace(("cstate_branch_history_name_list_free(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); for (j = 0; j < this->length; ++j) str_free(this->list[j]); if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *cstate_branch_history_name_list_parse _((void *, type_ty **)); static void * cstate_branch_history_name_list_parse(that, type_pp) void *that; type_ty **type_pp; { cstate_branch_history_name_list this = that; void *addr; trace(("cstate_branch_history_name_list_parse(this = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)type_pp)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); *type_pp = &string_type; trace_pointer(*type_pp); if (this->length >= this->maximum) { size_t nbytes; this->maximum = this->maximum * 2 + 16; nbytes = this->maximum * sizeof(this->list[0]); this->list = mem_change_size(this->list, nbytes); } addr = &this->list[this->length++]; trace(("return %08lX;\n", (long)addr)); trace((/*{*/"}\n")); return addr; } static rpt_value_ty *cstate_branch_history_name_list_convert _((void *)); static rpt_value_ty * cstate_branch_history_name_list_convert(that) void *that; { cstate_branch_history_name_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(cstate_branch_history_name_list *)that; if (!this) return 0; trace(("cstate_branch_history_name_list_convert(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); result = rpt_value_list(); for (j = 0; j < this->length; ++j) { vp = string_type.convert(&this->list[j]); assert(vp); rpt_value_list_append(result, vp); rpt_value_free(vp); } trace((/*{*/"}\n")); trace(("return %08lX;\n", (long)result)); return result; } type_ty cstate_branch_history_name_list_type = { "cstate_branch_history_name_list", cstate_branch_history_name_list_alloc, cstate_branch_history_name_list_free, 0, /* enum_parse */ cstate_branch_history_name_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ cstate_branch_history_name_list_convert, generic_struct_is_set, }; void cstate_branch_history_write(fp, name, this) output_ty *fp; char *name; cstate_branch_history this; { if (!this) return; trace(("cstate_branch_history_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); assert(((cstate_branch_history)this)->reference_count > 0); trace(("rc = %d;\n", ((cstate_branch_history)this)->reference_count)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } output_fputs(fp, "{\n"/*}*/); integer_write(fp, "delta_number", this->delta_number); integer_write(fp, "change_number", this->change_number); cstate_branch_history_name_list_write(fp, "name", this->name); output_fputs(fp, /*{*/"}"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *cstate_branch_history_alloc _((void)); static void * cstate_branch_history_alloc() { cstate_branch_history this; trace(("cstate_branch_history_alloc()\n{\n"/*}*/)); this = mem_alloc(sizeof(struct cstate_branch_history)); this->reference_count = 1; this->mask = 0; this->delta_number = 0; this->change_number = 0; this->name = 0; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } cstate_branch_history cstate_branch_history_copy(this) cstate_branch_history this; { trace(("cstate_branch_history_copy()\n{\n"/*}*/)); this->reference_count++; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } static void cstate_branch_history_free _((void *)); static void cstate_branch_history_free(that) void *that; { cstate_branch_history this = that; if (!this) return; this->reference_count--; assert(this->reference_count >= 0); if (this->reference_count > 0) return; trace(("cstate_branch_history_free(this = %08lX)\n{\n"/*}*/, (long)this)); cstate_branch_history_name_list_free(this->name); mem_free(this); trace((/*{*/"}\n")); } static type_table_ty cstate_branch_history_table[] = { { "delta_number", offsetof(struct cstate_branch_history, delta_number), &integer_type, cstate_branch_history_delta_number_mask, }, { "change_number", offsetof(struct cstate_branch_history, change_number), &integer_type, cstate_branch_history_change_number_mask, }, { "name", offsetof(struct cstate_branch_history, name), &cstate_branch_history_name_list_type, cstate_branch_history_name_mask, }, }; static void *cstate_branch_history_parse _((void *, string_ty *, type_ty **, unsigned long *)); static void * cstate_branch_history_parse(this, name, type_pp, mask_p) void *this; string_ty *name; type_ty **type_pp; unsigned long *mask_p; { void *addr; trace(("cstate_branch_history_parse(this = %08lX, name = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)name, (long)type_pp)); assert(((cstate_branch_history)this)->reference_count > 0); assert(sizeof(cstate_branch_history) == sizeof(generic_struct_ty *)); addr = generic_struct_parse ( this, name, type_pp, mask_p, cstate_branch_history_table, SIZEOF(cstate_branch_history_table) ); trace((/*{*/"return %08lX;\n}\n", (long)addr)); return addr; } static string_ty *cstate_branch_history_fuzzy _((string_ty *)); static string_ty * cstate_branch_history_fuzzy(name) string_ty *name; { string_ty *result; trace(("cstate_branch_history_fuzzy(name = %08lX)\n{\n"/*}*/, (long)name)); result = generic_struct_fuzzy ( name, cstate_branch_history_table, SIZEOF(cstate_branch_history_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static struct rpt_value_ty *cstate_branch_history_convert _((void *)); static struct rpt_value_ty * cstate_branch_history_convert(this) void *this; { struct rpt_value_ty *result; trace(("cstate_branch_history_convert(name = %08lX)\n{\n"/*}*/, (long)this)); assert(((cstate_branch_history)this)->reference_count > 0); result = generic_struct_convert ( this, cstate_branch_history_table, SIZEOF(cstate_branch_history_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } type_ty cstate_branch_history_type = { "cstate_branch_history", cstate_branch_history_alloc, cstate_branch_history_free, 0, /* enum_parse */ 0, /* list_parse */ cstate_branch_history_parse, cstate_branch_history_fuzzy, cstate_branch_history_convert, generic_struct_is_set, }; void cstate_branch_history_list_write(fp, name, this) output_ty *fp; char *name; cstate_branch_history_list this; { size_t j; if (!this) return; trace(("cstate_branch_history_list_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } assert(this->length <= this->maximum); assert(!this->list == !this->maximum); output_fputs(fp, "[\n"/*]*/); for (j = 0; j < this->length; ++j) { cstate_branch_history_write(fp, (char *)0, this->list[j]); output_fputs(fp, ",\n"); } output_fputs(fp, /*[*/"]"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *cstate_branch_history_list_alloc _((void)); static void * cstate_branch_history_list_alloc() { cstate_branch_history_list result; trace(("cstate_branch_history_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct cstate_branch_history_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void cstate_branch_history_list_free _((void *)); static void cstate_branch_history_list_free(that) void *that; { cstate_branch_history_list this = that; size_t j; if (!this) return; trace(("cstate_branch_history_list_free(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); for (j = 0; j < this->length; ++j) cstate_branch_history_free(this->list[j]); if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *cstate_branch_history_list_parse _((void *, type_ty **)); static void * cstate_branch_history_list_parse(that, type_pp) void *that; type_ty **type_pp; { cstate_branch_history_list this = that; void *addr; trace(("cstate_branch_history_list_parse(this = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)type_pp)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); *type_pp = &cstate_branch_history_type; trace_pointer(*type_pp); if (this->length >= this->maximum) { size_t nbytes; this->maximum = this->maximum * 2 + 16; nbytes = this->maximum * sizeof(this->list[0]); this->list = mem_change_size(this->list, nbytes); } addr = &this->list[this->length++]; trace(("return %08lX;\n", (long)addr)); trace((/*{*/"}\n")); return addr; } static rpt_value_ty *cstate_branch_history_list_convert _((void *)); static rpt_value_ty * cstate_branch_history_list_convert(that) void *that; { cstate_branch_history_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(cstate_branch_history_list *)that; if (!this) return 0; trace(("cstate_branch_history_list_convert(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); result = rpt_value_list(); for (j = 0; j < this->length; ++j) { vp = cstate_branch_history_type.convert(&this->list[j]); assert(vp); rpt_value_list_append(result, vp); rpt_value_free(vp); } trace((/*{*/"}\n")); trace(("return %08lX;\n", (long)result)); return result; } type_ty cstate_branch_history_list_type = { "cstate_branch_history_list", cstate_branch_history_list_alloc, cstate_branch_history_list_free, 0, /* enum_parse */ cstate_branch_history_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ cstate_branch_history_list_convert, generic_struct_is_set, }; void cstate_branch_change_list_write(fp, name, this) output_ty *fp; char *name; cstate_branch_change_list this; { size_t j; if (!this) return; trace(("cstate_branch_change_list_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } assert(this->length <= this->maximum); assert(!this->list == !this->maximum); output_fputs(fp, "[\n"/*]*/); for (j = 0; j < this->length; ++j) { integer_write(fp, (char *)0, this->list[j]); output_fputs(fp, ",\n"); } output_fputs(fp, /*[*/"]"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *cstate_branch_change_list_alloc _((void)); static void * cstate_branch_change_list_alloc() { cstate_branch_change_list result; trace(("cstate_branch_change_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct cstate_branch_change_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void cstate_branch_change_list_free _((void *)); static void cstate_branch_change_list_free(that) void *that; { cstate_branch_change_list this = that; size_t j; if (!this) return; trace(("cstate_branch_change_list_free(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); for (j = 0; j < this->length; ++j) ; if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *cstate_branch_change_list_parse _((void *, type_ty **)); static void * cstate_branch_change_list_parse(that, type_pp) void *that; type_ty **type_pp; { cstate_branch_change_list this = that; void *addr; trace(("cstate_branch_change_list_parse(this = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)type_pp)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); *type_pp = &integer_type; trace_pointer(*type_pp); if (this->length >= this->maximum) { size_t nbytes; this->maximum = this->maximum * 2 + 16; nbytes = this->maximum * sizeof(this->list[0]); this->list = mem_change_size(this->list, nbytes); } addr = &this->list[this->length++]; trace(("return %08lX;\n", (long)addr)); trace((/*{*/"}\n")); return addr; } static rpt_value_ty *cstate_branch_change_list_convert _((void *)); static rpt_value_ty * cstate_branch_change_list_convert(that) void *that; { cstate_branch_change_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(cstate_branch_change_list *)that; if (!this) return 0; trace(("cstate_branch_change_list_convert(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); result = rpt_value_list(); for (j = 0; j < this->length; ++j) { vp = integer_type.convert(&this->list[j]); assert(vp); rpt_value_list_append(result, vp); rpt_value_free(vp); } trace((/*{*/"}\n")); trace(("return %08lX;\n", (long)result)); return result; } type_ty cstate_branch_change_list_type = { "cstate_branch_change_list", cstate_branch_change_list_alloc, cstate_branch_change_list_free, 0, /* enum_parse */ cstate_branch_change_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ cstate_branch_change_list_convert, generic_struct_is_set, }; void cstate_branch_sub_branch_list_write(fp, name, this) output_ty *fp; char *name; cstate_branch_sub_branch_list this; { size_t j; if (!this) return; trace(("cstate_branch_sub_branch_list_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } assert(this->length <= this->maximum); assert(!this->list == !this->maximum); output_fputs(fp, "[\n"/*]*/); for (j = 0; j < this->length; ++j) { integer_write(fp, (char *)0, this->list[j]); output_fputs(fp, ",\n"); } output_fputs(fp, /*[*/"]"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *cstate_branch_sub_branch_list_alloc _((void)); static void * cstate_branch_sub_branch_list_alloc() { cstate_branch_sub_branch_list result; trace(("cstate_branch_sub_branch_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct cstate_branch_sub_branch_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void cstate_branch_sub_branch_list_free _((void *)); static void cstate_branch_sub_branch_list_free(that) void *that; { cstate_branch_sub_branch_list this = that; size_t j; if (!this) return; trace(("cstate_branch_sub_branch_list_free(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); for (j = 0; j < this->length; ++j) ; if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *cstate_branch_sub_branch_list_parse _((void *, type_ty **)); static void * cstate_branch_sub_branch_list_parse(that, type_pp) void *that; type_ty **type_pp; { cstate_branch_sub_branch_list this = that; void *addr; trace(("cstate_branch_sub_branch_list_parse(this = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)type_pp)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); *type_pp = &integer_type; trace_pointer(*type_pp); if (this->length >= this->maximum) { size_t nbytes; this->maximum = this->maximum * 2 + 16; nbytes = this->maximum * sizeof(this->list[0]); this->list = mem_change_size(this->list, nbytes); } addr = &this->list[this->length++]; trace(("return %08lX;\n", (long)addr)); trace((/*{*/"}\n")); return addr; } static rpt_value_ty *cstate_branch_sub_branch_list_convert _((void *)); static rpt_value_ty * cstate_branch_sub_branch_list_convert(that) void *that; { cstate_branch_sub_branch_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(cstate_branch_sub_branch_list *)that; if (!this) return 0; trace(("cstate_branch_sub_branch_list_convert(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); result = rpt_value_list(); for (j = 0; j < this->length; ++j) { vp = integer_type.convert(&this->list[j]); assert(vp); rpt_value_list_append(result, vp); rpt_value_free(vp); } trace((/*{*/"}\n")); trace(("return %08lX;\n", (long)result)); return result; } type_ty cstate_branch_sub_branch_list_type = { "cstate_branch_sub_branch_list", cstate_branch_sub_branch_list_alloc, cstate_branch_sub_branch_list_free, 0, /* enum_parse */ cstate_branch_sub_branch_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ cstate_branch_sub_branch_list_convert, generic_struct_is_set, }; void cstate_branch_administrator_list_write(fp, name, this) output_ty *fp; char *name; cstate_branch_administrator_list this; { size_t j; if (!this) return; trace(("cstate_branch_administrator_list_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } assert(this->length <= this->maximum); assert(!this->list == !this->maximum); output_fputs(fp, "[\n"/*]*/); for (j = 0; j < this->length; ++j) { string_write(fp, (char *)0, this->list[j]); output_fputs(fp, ",\n"); } output_fputs(fp, /*[*/"]"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *cstate_branch_administrator_list_alloc _((void)); static void * cstate_branch_administrator_list_alloc() { cstate_branch_administrator_list result; trace(("cstate_branch_administrator_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct cstate_branch_administrator_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void cstate_branch_administrator_list_free _((void *)); static void cstate_branch_administrator_list_free(that) void *that; { cstate_branch_administrator_list this = that; size_t j; if (!this) return; trace(("cstate_branch_administrator_list_free(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); for (j = 0; j < this->length; ++j) str_free(this->list[j]); if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *cstate_branch_administrator_list_parse _((void *, type_ty **)); static void * cstate_branch_administrator_list_parse(that, type_pp) void *that; type_ty **type_pp; { cstate_branch_administrator_list this = that; void *addr; trace(("cstate_branch_administrator_list_parse(this = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)type_pp)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); *type_pp = &string_type; trace_pointer(*type_pp); if (this->length >= this->maximum) { size_t nbytes; this->maximum = this->maximum * 2 + 16; nbytes = this->maximum * sizeof(this->list[0]); this->list = mem_change_size(this->list, nbytes); } addr = &this->list[this->length++]; trace(("return %08lX;\n", (long)addr)); trace((/*{*/"}\n")); return addr; } static rpt_value_ty *cstate_branch_administrator_list_convert _((void *)); static rpt_value_ty * cstate_branch_administrator_list_convert(that) void *that; { cstate_branch_administrator_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(cstate_branch_administrator_list *)that; if (!this) return 0; trace(("cstate_branch_administrator_list_convert(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); result = rpt_value_list(); for (j = 0; j < this->length; ++j) { vp = string_type.convert(&this->list[j]); assert(vp); rpt_value_list_append(result, vp); rpt_value_free(vp); } trace((/*{*/"}\n")); trace(("return %08lX;\n", (long)result)); return result; } type_ty cstate_branch_administrator_list_type = { "cstate_branch_administrator_list", cstate_branch_administrator_list_alloc, cstate_branch_administrator_list_free, 0, /* enum_parse */ cstate_branch_administrator_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ cstate_branch_administrator_list_convert, generic_struct_is_set, }; void cstate_branch_developer_list_write(fp, name, this) output_ty *fp; char *name; cstate_branch_developer_list this; { size_t j; if (!this) return; trace(("cstate_branch_developer_list_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } assert(this->length <= this->maximum); assert(!this->list == !this->maximum); output_fputs(fp, "[\n"/*]*/); for (j = 0; j < this->length; ++j) { string_write(fp, (char *)0, this->list[j]); output_fputs(fp, ",\n"); } output_fputs(fp, /*[*/"]"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *cstate_branch_developer_list_alloc _((void)); static void * cstate_branch_developer_list_alloc() { cstate_branch_developer_list result; trace(("cstate_branch_developer_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct cstate_branch_developer_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void cstate_branch_developer_list_free _((void *)); static void cstate_branch_developer_list_free(that) void *that; { cstate_branch_developer_list this = that; size_t j; if (!this) return; trace(("cstate_branch_developer_list_free(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); for (j = 0; j < this->length; ++j) str_free(this->list[j]); if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *cstate_branch_developer_list_parse _((void *, type_ty **)); static void * cstate_branch_developer_list_parse(that, type_pp) void *that; type_ty **type_pp; { cstate_branch_developer_list this = that; void *addr; trace(("cstate_branch_developer_list_parse(this = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)type_pp)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); *type_pp = &string_type; trace_pointer(*type_pp); if (this->length >= this->maximum) { size_t nbytes; this->maximum = this->maximum * 2 + 16; nbytes = this->maximum * sizeof(this->list[0]); this->list = mem_change_size(this->list, nbytes); } addr = &this->list[this->length++]; trace(("return %08lX;\n", (long)addr)); trace((/*{*/"}\n")); return addr; } static rpt_value_ty *cstate_branch_developer_list_convert _((void *)); static rpt_value_ty * cstate_branch_developer_list_convert(that) void *that; { cstate_branch_developer_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(cstate_branch_developer_list *)that; if (!this) return 0; trace(("cstate_branch_developer_list_convert(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); result = rpt_value_list(); for (j = 0; j < this->length; ++j) { vp = string_type.convert(&this->list[j]); assert(vp); rpt_value_list_append(result, vp); rpt_value_free(vp); } trace((/*{*/"}\n")); trace(("return %08lX;\n", (long)result)); return result; } type_ty cstate_branch_developer_list_type = { "cstate_branch_developer_list", cstate_branch_developer_list_alloc, cstate_branch_developer_list_free, 0, /* enum_parse */ cstate_branch_developer_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ cstate_branch_developer_list_convert, generic_struct_is_set, }; void cstate_branch_reviewer_list_write(fp, name, this) output_ty *fp; char *name; cstate_branch_reviewer_list this; { size_t j; if (!this) return; trace(("cstate_branch_reviewer_list_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } assert(this->length <= this->maximum); assert(!this->list == !this->maximum); output_fputs(fp, "[\n"/*]*/); for (j = 0; j < this->length; ++j) { string_write(fp, (char *)0, this->list[j]); output_fputs(fp, ",\n"); } output_fputs(fp, /*[*/"]"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *cstate_branch_reviewer_list_alloc _((void)); static void * cstate_branch_reviewer_list_alloc() { cstate_branch_reviewer_list result; trace(("cstate_branch_reviewer_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct cstate_branch_reviewer_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void cstate_branch_reviewer_list_free _((void *)); static void cstate_branch_reviewer_list_free(that) void *that; { cstate_branch_reviewer_list this = that; size_t j; if (!this) return; trace(("cstate_branch_reviewer_list_free(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); for (j = 0; j < this->length; ++j) str_free(this->list[j]); if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *cstate_branch_reviewer_list_parse _((void *, type_ty **)); static void * cstate_branch_reviewer_list_parse(that, type_pp) void *that; type_ty **type_pp; { cstate_branch_reviewer_list this = that; void *addr; trace(("cstate_branch_reviewer_list_parse(this = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)type_pp)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); *type_pp = &string_type; trace_pointer(*type_pp); if (this->length >= this->maximum) { size_t nbytes; this->maximum = this->maximum * 2 + 16; nbytes = this->maximum * sizeof(this->list[0]); this->list = mem_change_size(this->list, nbytes); } addr = &this->list[this->length++]; trace(("return %08lX;\n", (long)addr)); trace((/*{*/"}\n")); return addr; } static rpt_value_ty *cstate_branch_reviewer_list_convert _((void *)); static rpt_value_ty * cstate_branch_reviewer_list_convert(that) void *that; { cstate_branch_reviewer_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(cstate_branch_reviewer_list *)that; if (!this) return 0; trace(("cstate_branch_reviewer_list_convert(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); result = rpt_value_list(); for (j = 0; j < this->length; ++j) { vp = string_type.convert(&this->list[j]); assert(vp); rpt_value_list_append(result, vp); rpt_value_free(vp); } trace((/*{*/"}\n")); trace(("return %08lX;\n", (long)result)); return result; } type_ty cstate_branch_reviewer_list_type = { "cstate_branch_reviewer_list", cstate_branch_reviewer_list_alloc, cstate_branch_reviewer_list_free, 0, /* enum_parse */ cstate_branch_reviewer_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ cstate_branch_reviewer_list_convert, generic_struct_is_set, }; void cstate_branch_integrator_list_write(fp, name, this) output_ty *fp; char *name; cstate_branch_integrator_list this; { size_t j; if (!this) return; trace(("cstate_branch_integrator_list_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } assert(this->length <= this->maximum); assert(!this->list == !this->maximum); output_fputs(fp, "[\n"/*]*/); for (j = 0; j < this->length; ++j) { string_write(fp, (char *)0, this->list[j]); output_fputs(fp, ",\n"); } output_fputs(fp, /*[*/"]"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *cstate_branch_integrator_list_alloc _((void)); static void * cstate_branch_integrator_list_alloc() { cstate_branch_integrator_list result; trace(("cstate_branch_integrator_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct cstate_branch_integrator_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void cstate_branch_integrator_list_free _((void *)); static void cstate_branch_integrator_list_free(that) void *that; { cstate_branch_integrator_list this = that; size_t j; if (!this) return; trace(("cstate_branch_integrator_list_free(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); for (j = 0; j < this->length; ++j) str_free(this->list[j]); if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *cstate_branch_integrator_list_parse _((void *, type_ty **)); static void * cstate_branch_integrator_list_parse(that, type_pp) void *that; type_ty **type_pp; { cstate_branch_integrator_list this = that; void *addr; trace(("cstate_branch_integrator_list_parse(this = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)type_pp)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); *type_pp = &string_type; trace_pointer(*type_pp); if (this->length >= this->maximum) { size_t nbytes; this->maximum = this->maximum * 2 + 16; nbytes = this->maximum * sizeof(this->list[0]); this->list = mem_change_size(this->list, nbytes); } addr = &this->list[this->length++]; trace(("return %08lX;\n", (long)addr)); trace((/*{*/"}\n")); return addr; } static rpt_value_ty *cstate_branch_integrator_list_convert _((void *)); static rpt_value_ty * cstate_branch_integrator_list_convert(that) void *that; { cstate_branch_integrator_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(cstate_branch_integrator_list *)that; if (!this) return 0; trace(("cstate_branch_integrator_list_convert(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); result = rpt_value_list(); for (j = 0; j < this->length; ++j) { vp = string_type.convert(&this->list[j]); assert(vp); rpt_value_list_append(result, vp); rpt_value_free(vp); } trace((/*{*/"}\n")); trace(("return %08lX;\n", (long)result)); return result; } type_ty cstate_branch_integrator_list_type = { "cstate_branch_integrator_list", cstate_branch_integrator_list_alloc, cstate_branch_integrator_list_free, 0, /* enum_parse */ cstate_branch_integrator_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ cstate_branch_integrator_list_convert, generic_struct_is_set, }; void cstate_branch_write(fp, name, this) output_ty *fp; char *name; cstate_branch this; { if (!this) return; trace(("cstate_branch_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); assert(((cstate_branch)this)->reference_count > 0); trace(("rc = %d;\n", ((cstate_branch)this)->reference_count)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } output_fputs(fp, "{\n"/*}*/); integer_write(fp, "umask", this->umask); boolean_write(fp, "developer_may_review", this->developer_may_review); boolean_write(fp, "developer_may_integrate", this->developer_may_integrate); boolean_write(fp, "reviewer_may_integrate", this->reviewer_may_integrate); boolean_write(fp, "developers_may_create_changes", this->developers_may_create_changes); string_write(fp, "forced_develop_begin_notify_command", this->forced_develop_begin_notify_command); string_write(fp, "develop_end_notify_command", this->develop_end_notify_command); string_write(fp, "develop_end_undo_notify_command", this->develop_end_undo_notify_command); string_write(fp, "review_begin_notify_command", this->review_begin_notify_command); string_write(fp, "review_begin_undo_notify_command", this->review_begin_undo_notify_command); string_write(fp, "review_pass_notify_command", this->review_pass_notify_command); string_write(fp, "review_pass_undo_notify_command", this->review_pass_undo_notify_command); string_write(fp, "review_fail_notify_command", this->review_fail_notify_command); string_write(fp, "integrate_pass_notify_command", this->integrate_pass_notify_command); string_write(fp, "integrate_fail_notify_command", this->integrate_fail_notify_command); boolean_write(fp, "default_test_exemption", this->default_test_exemption); boolean_write(fp, "skip_unlucky", this->skip_unlucky); boolean_write(fp, "compress_database", this->compress_database); cstate_branch_develop_end_action_write(fp, "develop_end_action", this->develop_end_action); cstate_branch_history_list_write(fp, "history", this->history); cstate_branch_change_list_write(fp, "change", this->change); cstate_branch_sub_branch_list_write(fp, "sub_branch", this->sub_branch); cstate_branch_administrator_list_write(fp, "administrator", this->administrator); cstate_branch_developer_list_write(fp, "developer", this->developer); cstate_branch_reviewer_list_write(fp, "reviewer", this->reviewer); cstate_branch_integrator_list_write(fp, "integrator", this->integrator); integer_write(fp, "currently_integrating_change", this->currently_integrating_change); string_write(fp, "default_development_directory", this->default_development_directory); integer_write(fp, "minimum_change_number", this->minimum_change_number); boolean_write(fp, "reuse_change_numbers", this->reuse_change_numbers); integer_write(fp, "minimum_branch_number", this->minimum_branch_number); output_fputs(fp, /*{*/"}"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *cstate_branch_alloc _((void)); static void * cstate_branch_alloc() { cstate_branch this; trace(("cstate_branch_alloc()\n{\n"/*}*/)); this = mem_alloc(sizeof(struct cstate_branch)); this->reference_count = 1; this->mask = 0; this->umask = 0; this->developer_may_review = 0; this->developer_may_integrate = 0; this->reviewer_may_integrate = 0; this->developers_may_create_changes = 0; this->forced_develop_begin_notify_command = 0; this->develop_end_notify_command = 0; this->develop_end_undo_notify_command = 0; this->review_begin_notify_command = 0; this->review_begin_undo_notify_command = 0; this->review_pass_notify_command = 0; this->review_pass_undo_notify_command = 0; this->review_fail_notify_command = 0; this->integrate_pass_notify_command = 0; this->integrate_fail_notify_command = 0; this->default_test_exemption = 0; this->skip_unlucky = 0; this->compress_database = 0; this->develop_end_action = 0; this->history = 0; this->change = 0; this->sub_branch = 0; this->administrator = 0; this->developer = 0; this->reviewer = 0; this->integrator = 0; this->currently_integrating_change = 0; this->default_development_directory = 0; this->minimum_change_number = 0; this->reuse_change_numbers = 0; this->minimum_branch_number = 0; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } cstate_branch cstate_branch_copy(this) cstate_branch this; { trace(("cstate_branch_copy()\n{\n"/*}*/)); this->reference_count++; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } static void cstate_branch_free _((void *)); static void cstate_branch_free(that) void *that; { cstate_branch this = that; if (!this) return; this->reference_count--; assert(this->reference_count >= 0); if (this->reference_count > 0) return; trace(("cstate_branch_free(this = %08lX)\n{\n"/*}*/, (long)this)); str_free(this->forced_develop_begin_notify_command); str_free(this->develop_end_notify_command); str_free(this->develop_end_undo_notify_command); str_free(this->review_begin_notify_command); str_free(this->review_begin_undo_notify_command); str_free(this->review_pass_notify_command); str_free(this->review_pass_undo_notify_command); str_free(this->review_fail_notify_command); str_free(this->integrate_pass_notify_command); str_free(this->integrate_fail_notify_command); cstate_branch_history_list_free(this->history); cstate_branch_change_list_free(this->change); cstate_branch_sub_branch_list_free(this->sub_branch); cstate_branch_administrator_list_free(this->administrator); cstate_branch_developer_list_free(this->developer); cstate_branch_reviewer_list_free(this->reviewer); cstate_branch_integrator_list_free(this->integrator); str_free(this->default_development_directory); mem_free(this); trace((/*{*/"}\n")); } static type_table_ty cstate_branch_table[] = { { "umask", offsetof(struct cstate_branch, umask), &integer_type, cstate_branch_umask_mask, }, { "developer_may_review", offsetof(struct cstate_branch, developer_may_review), &boolean_type, cstate_branch_developer_may_review_mask, }, { "developer_may_integrate", offsetof(struct cstate_branch, developer_may_integrate), &boolean_type, cstate_branch_developer_may_integrate_mask, }, { "reviewer_may_integrate", offsetof(struct cstate_branch, reviewer_may_integrate), &boolean_type, cstate_branch_reviewer_may_integrate_mask, }, { "developers_may_create_changes", offsetof(struct cstate_branch, developers_may_create_changes), &boolean_type, cstate_branch_developers_may_create_changes_mask, }, { "forced_develop_begin_notify_command", offsetof(struct cstate_branch, forced_develop_begin_notify_command), &string_type, cstate_branch_forced_develop_begin_notify_command_mask, }, { "develop_end_notify_command", offsetof(struct cstate_branch, develop_end_notify_command), &string_type, cstate_branch_develop_end_notify_command_mask, }, { "develop_end_undo_notify_command", offsetof(struct cstate_branch, develop_end_undo_notify_command), &string_type, cstate_branch_develop_end_undo_notify_command_mask, }, { "review_begin_notify_command", offsetof(struct cstate_branch, review_begin_notify_command), &string_type, cstate_branch_review_begin_notify_command_mask, }, { "review_begin_undo_notify_command", offsetof(struct cstate_branch, review_begin_undo_notify_command), &string_type, cstate_branch_review_begin_undo_notify_command_mask, }, { "review_pass_notify_command", offsetof(struct cstate_branch, review_pass_notify_command), &string_type, cstate_branch_review_pass_notify_command_mask, }, { "review_pass_undo_notify_command", offsetof(struct cstate_branch, review_pass_undo_notify_command), &string_type, cstate_branch_review_pass_undo_notify_command_mask, }, { "review_fail_notify_command", offsetof(struct cstate_branch, review_fail_notify_command), &string_type, cstate_branch_review_fail_notify_command_mask, }, { "integrate_pass_notify_command", offsetof(struct cstate_branch, integrate_pass_notify_command), &string_type, cstate_branch_integrate_pass_notify_command_mask, }, { "integrate_fail_notify_command", offsetof(struct cstate_branch, integrate_fail_notify_command), &string_type, cstate_branch_integrate_fail_notify_command_mask, }, { "default_test_exemption", offsetof(struct cstate_branch, default_test_exemption), &boolean_type, cstate_branch_default_test_exemption_mask, }, { "skip_unlucky", offsetof(struct cstate_branch, skip_unlucky), &boolean_type, cstate_branch_skip_unlucky_mask, }, { "compress_database", offsetof(struct cstate_branch, compress_database), &boolean_type, cstate_branch_compress_database_mask, }, { "develop_end_action", offsetof(struct cstate_branch, develop_end_action), &cstate_branch_develop_end_action_type, cstate_branch_develop_end_action_mask, }, { "history", offsetof(struct cstate_branch, history), &cstate_branch_history_list_type, cstate_branch_history_mask, }, { "change", offsetof(struct cstate_branch, change), &cstate_branch_change_list_type, cstate_branch_change_mask, }, { "sub_branch", offsetof(struct cstate_branch, sub_branch), &cstate_branch_sub_branch_list_type, cstate_branch_sub_branch_mask, }, { "administrator", offsetof(struct cstate_branch, administrator), &cstate_branch_administrator_list_type, cstate_branch_administrator_mask, }, { "developer", offsetof(struct cstate_branch, developer), &cstate_branch_developer_list_type, cstate_branch_developer_mask, }, { "reviewer", offsetof(struct cstate_branch, reviewer), &cstate_branch_reviewer_list_type, cstate_branch_reviewer_mask, }, { "integrator", offsetof(struct cstate_branch, integrator), &cstate_branch_integrator_list_type, cstate_branch_integrator_mask, }, { "currently_integrating_change", offsetof(struct cstate_branch, currently_integrating_change), &integer_type, cstate_branch_currently_integrating_change_mask, }, { "default_development_directory", offsetof(struct cstate_branch, default_development_directory), &string_type, cstate_branch_default_development_directory_mask, }, { "minimum_change_number", offsetof(struct cstate_branch, minimum_change_number), &integer_type, cstate_branch_minimum_change_number_mask, }, { "reuse_change_numbers", offsetof(struct cstate_branch, reuse_change_numbers), &boolean_type, cstate_branch_reuse_change_numbers_mask, }, { "minimum_branch_number", offsetof(struct cstate_branch, minimum_branch_number), &integer_type, cstate_branch_minimum_branch_number_mask, }, }; static void *cstate_branch_parse _((void *, string_ty *, type_ty **, unsigned long *)); static void * cstate_branch_parse(this, name, type_pp, mask_p) void *this; string_ty *name; type_ty **type_pp; unsigned long *mask_p; { void *addr; trace(("cstate_branch_parse(this = %08lX, name = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)name, (long)type_pp)); assert(((cstate_branch)this)->reference_count > 0); assert(sizeof(cstate_branch) == sizeof(generic_struct_ty *)); addr = generic_struct_parse ( this, name, type_pp, mask_p, cstate_branch_table, SIZEOF(cstate_branch_table) ); trace((/*{*/"return %08lX;\n}\n", (long)addr)); return addr; } static string_ty *cstate_branch_fuzzy _((string_ty *)); static string_ty * cstate_branch_fuzzy(name) string_ty *name; { string_ty *result; trace(("cstate_branch_fuzzy(name = %08lX)\n{\n"/*}*/, (long)name)); result = generic_struct_fuzzy ( name, cstate_branch_table, SIZEOF(cstate_branch_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static struct rpt_value_ty *cstate_branch_convert _((void *)); static struct rpt_value_ty * cstate_branch_convert(this) void *this; { struct rpt_value_ty *result; trace(("cstate_branch_convert(name = %08lX)\n{\n"/*}*/, (long)this)); assert(((cstate_branch)this)->reference_count > 0); result = generic_struct_convert ( this, cstate_branch_table, SIZEOF(cstate_branch_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } type_ty cstate_branch_type = { "cstate_branch", cstate_branch_alloc, cstate_branch_free, 0, /* enum_parse */ 0, /* list_parse */ cstate_branch_parse, cstate_branch_fuzzy, cstate_branch_convert, generic_struct_is_set, }; void cstate_src_write(fp, name, this) output_ty *fp; char *name; cstate_src this; { if (!this) return; trace(("cstate_src_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); assert(((cstate_src)this)->reference_count > 0); trace(("rc = %d;\n", ((cstate_src)this)->reference_count)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } output_fputs(fp, "{\n"/*}*/); string_write(fp, "file_name", this->file_name); file_action_write(fp, "action", this->action); string_write(fp, "edit_number", this->edit_number); file_usage_write(fp, "usage", this->usage); time_write(fp, "diff_time", this->diff_time); time_write(fp, "diff_file_time", this->diff_file_time); string_write(fp, "move", this->move); output_fputs(fp, /*{*/"}"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *cstate_src_alloc _((void)); static void * cstate_src_alloc() { cstate_src this; trace(("cstate_src_alloc()\n{\n"/*}*/)); this = mem_alloc(sizeof(struct cstate_src)); this->reference_count = 1; this->mask = 0; this->file_name = 0; this->action = 0; this->edit_number = 0; this->usage = 0; this->diff_time = 0; this->diff_file_time = 0; this->move = 0; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } cstate_src cstate_src_copy(this) cstate_src this; { trace(("cstate_src_copy()\n{\n"/*}*/)); this->reference_count++; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } static void cstate_src_free _((void *)); static void cstate_src_free(that) void *that; { cstate_src this = that; if (!this) return; this->reference_count--; assert(this->reference_count >= 0); if (this->reference_count > 0) return; trace(("cstate_src_free(this = %08lX)\n{\n"/*}*/, (long)this)); str_free(this->file_name); str_free(this->edit_number); str_free(this->move); mem_free(this); trace((/*{*/"}\n")); } static type_table_ty cstate_src_table[] = { { "file_name", offsetof(struct cstate_src, file_name), &string_type, cstate_src_file_name_mask, }, { "action", offsetof(struct cstate_src, action), &file_action_type, cstate_src_action_mask, }, { "edit_number", offsetof(struct cstate_src, edit_number), &string_type, cstate_src_edit_number_mask, }, { "usage", offsetof(struct cstate_src, usage), &file_usage_type, cstate_src_usage_mask, }, { "diff_time", offsetof(struct cstate_src, diff_time), &time_type, cstate_src_diff_time_mask, }, { "diff_file_time", offsetof(struct cstate_src, diff_file_time), &time_type, cstate_src_diff_file_time_mask, }, { "move", offsetof(struct cstate_src, move), &string_type, cstate_src_move_mask, }, }; static void *cstate_src_parse _((void *, string_ty *, type_ty **, unsigned long *)); static void * cstate_src_parse(this, name, type_pp, mask_p) void *this; string_ty *name; type_ty **type_pp; unsigned long *mask_p; { void *addr; trace(("cstate_src_parse(this = %08lX, name = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)name, (long)type_pp)); assert(((cstate_src)this)->reference_count > 0); assert(sizeof(cstate_src) == sizeof(generic_struct_ty *)); addr = generic_struct_parse ( this, name, type_pp, mask_p, cstate_src_table, SIZEOF(cstate_src_table) ); trace((/*{*/"return %08lX;\n}\n", (long)addr)); return addr; } static string_ty *cstate_src_fuzzy _((string_ty *)); static string_ty * cstate_src_fuzzy(name) string_ty *name; { string_ty *result; trace(("cstate_src_fuzzy(name = %08lX)\n{\n"/*}*/, (long)name)); result = generic_struct_fuzzy ( name, cstate_src_table, SIZEOF(cstate_src_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static struct rpt_value_ty *cstate_src_convert _((void *)); static struct rpt_value_ty * cstate_src_convert(this) void *this; { struct rpt_value_ty *result; trace(("cstate_src_convert(name = %08lX)\n{\n"/*}*/, (long)this)); assert(((cstate_src)this)->reference_count > 0); result = generic_struct_convert ( this, cstate_src_table, SIZEOF(cstate_src_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } type_ty cstate_src_type = { "cstate_src", cstate_src_alloc, cstate_src_free, 0, /* enum_parse */ 0, /* list_parse */ cstate_src_parse, cstate_src_fuzzy, cstate_src_convert, generic_struct_is_set, }; void cstate_src_list_write(fp, name, this) output_ty *fp; char *name; cstate_src_list this; { size_t j; if (!this) return; trace(("cstate_src_list_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } assert(this->length <= this->maximum); assert(!this->list == !this->maximum); output_fputs(fp, "[\n"/*]*/); for (j = 0; j < this->length; ++j) { cstate_src_write(fp, (char *)0, this->list[j]); output_fputs(fp, ",\n"); } output_fputs(fp, /*[*/"]"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *cstate_src_list_alloc _((void)); static void * cstate_src_list_alloc() { cstate_src_list result; trace(("cstate_src_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct cstate_src_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void cstate_src_list_free _((void *)); static void cstate_src_list_free(that) void *that; { cstate_src_list this = that; size_t j; if (!this) return; trace(("cstate_src_list_free(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); for (j = 0; j < this->length; ++j) cstate_src_free(this->list[j]); if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *cstate_src_list_parse _((void *, type_ty **)); static void * cstate_src_list_parse(that, type_pp) void *that; type_ty **type_pp; { cstate_src_list this = that; void *addr; trace(("cstate_src_list_parse(this = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)type_pp)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); *type_pp = &cstate_src_type; trace_pointer(*type_pp); if (this->length >= this->maximum) { size_t nbytes; this->maximum = this->maximum * 2 + 16; nbytes = this->maximum * sizeof(this->list[0]); this->list = mem_change_size(this->list, nbytes); } addr = &this->list[this->length++]; trace(("return %08lX;\n", (long)addr)); trace((/*{*/"}\n")); return addr; } static rpt_value_ty *cstate_src_list_convert _((void *)); static rpt_value_ty * cstate_src_list_convert(that) void *that; { cstate_src_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(cstate_src_list *)that; if (!this) return 0; trace(("cstate_src_list_convert(this = %08lX)\n{\n"/*}*/, (long)this)); assert(this->length <= this->maximum); assert(!this->list == !this->maximum); result = rpt_value_list(); for (j = 0; j < this->length; ++j) { vp = cstate_src_type.convert(&this->list[j]); assert(vp); rpt_value_list_append(result, vp); rpt_value_free(vp); } trace((/*{*/"}\n")); trace(("return %08lX;\n", (long)result)); return result; } type_ty cstate_src_list_type = { "cstate_src_list", cstate_src_list_alloc, cstate_src_list_free, 0, /* enum_parse */ cstate_src_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ cstate_src_list_convert, generic_struct_is_set, }; void cstate_write(fp, this) output_ty *fp; cstate this; { if (!this) return; trace(("cstate_write(this = %08lX)\n{\n"/*}*/, this)); assert(((cstate)this)->reference_count > 0); trace(("rc = %d;\n", ((cstate)this)->reference_count)); string_write(fp, "brief_description", this->brief_description); string_write(fp, "description", this->description); change_cause_write(fp, "cause", this->cause); boolean_write(fp, "test_exempt", this->test_exempt); boolean_write(fp, "test_baseline_exempt", this->test_baseline_exempt); boolean_write(fp, "regression_test_exempt", this->regression_test_exempt); cstate_architecture_list_write(fp, "architecture", this->architecture); cstate_copyright_years_list_write(fp, "copyright_years", this->copyright_years); string_write(fp, "version_previous", this->version_previous); cstate_state_write(fp, "state", this->state); integer_write(fp, "delta_number", this->delta_number); integer_write(fp, "project_file_command_sync", this->project_file_command_sync); time_write(fp, "build_time", this->build_time); time_write(fp, "test_time", this->test_time); time_write(fp, "test_baseline_time", this->test_baseline_time); time_write(fp, "regression_test_time", this->regression_test_time); cstate_architecture_times_list_write(fp, "architecture_times", this->architecture_times); string_write(fp, "development_directory", this->development_directory); string_write(fp, "integration_directory", this->integration_directory); cstate_history_list_write(fp, "history", this->history); cstate_branch_write(fp, "branch", this->branch); cstate_src_list_write(fp, "src", this->src); trace((/*{*/"}\n")); } static void *cstate_alloc _((void)); static void * cstate_alloc() { cstate this; trace(("cstate_alloc()\n{\n"/*}*/)); this = mem_alloc(sizeof(struct cstate)); this->reference_count = 1; this->mask = 0; this->brief_description = 0; this->description = 0; this->cause = 0; this->test_exempt = 0; this->test_baseline_exempt = 0; this->regression_test_exempt = 0; this->architecture = 0; this->copyright_years = 0; this->version_previous = 0; this->state = 0; this->delta_number = 0; this->project_file_command_sync = 0; this->build_time = 0; this->test_time = 0; this->test_baseline_time = 0; this->regression_test_time = 0; this->architecture_times = 0; this->development_directory = 0; this->integration_directory = 0; this->history = 0; this->branch = 0; this->src = 0; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } cstate cstate_copy(this) cstate this; { trace(("cstate_copy()\n{\n"/*}*/)); this->reference_count++; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } static void cstate_free _((void *)); static void cstate_free(that) void *that; { cstate this = that; if (!this) return; this->reference_count--; assert(this->reference_count >= 0); if (this->reference_count > 0) return; trace(("cstate_free(this = %08lX)\n{\n"/*}*/, (long)this)); str_free(this->brief_description); str_free(this->description); cstate_architecture_list_free(this->architecture); cstate_copyright_years_list_free(this->copyright_years); str_free(this->version_previous); cstate_architecture_times_list_free(this->architecture_times); str_free(this->development_directory); str_free(this->integration_directory); cstate_history_list_free(this->history); cstate_branch_free(this->branch); cstate_src_list_free(this->src); mem_free(this); trace((/*{*/"}\n")); } static type_table_ty cstate_table[] = { { "brief_description", offsetof(struct cstate, brief_description), &string_type, cstate_brief_description_mask, }, { "description", offsetof(struct cstate, description), &string_type, cstate_description_mask, }, { "cause", offsetof(struct cstate, cause), &change_cause_type, cstate_cause_mask, }, { "test_exempt", offsetof(struct cstate, test_exempt), &boolean_type, cstate_test_exempt_mask, }, { "test_baseline_exempt", offsetof(struct cstate, test_baseline_exempt), &boolean_type, cstate_test_baseline_exempt_mask, }, { "regression_test_exempt", offsetof(struct cstate, regression_test_exempt), &boolean_type, cstate_regression_test_exempt_mask, }, { "architecture", offsetof(struct cstate, architecture), &cstate_architecture_list_type, cstate_architecture_mask, }, { "copyright_years", offsetof(struct cstate, copyright_years), &cstate_copyright_years_list_type, cstate_copyright_years_mask, }, { "version_previous", offsetof(struct cstate, version_previous), &string_type, cstate_version_previous_mask, }, { "state", offsetof(struct cstate, state), &cstate_state_type, cstate_state_mask, }, { "delta_number", offsetof(struct cstate, delta_number), &integer_type, cstate_delta_number_mask, }, { "project_file_command_sync", offsetof(struct cstate, project_file_command_sync), &integer_type, cstate_project_file_command_sync_mask, }, { "build_time", offsetof(struct cstate, build_time), &time_type, cstate_build_time_mask, }, { "test_time", offsetof(struct cstate, test_time), &time_type, cstate_test_time_mask, }, { "test_baseline_time", offsetof(struct cstate, test_baseline_time), &time_type, cstate_test_baseline_time_mask, }, { "regression_test_time", offsetof(struct cstate, regression_test_time), &time_type, cstate_regression_test_time_mask, }, { "architecture_times", offsetof(struct cstate, architecture_times), &cstate_architecture_times_list_type, cstate_architecture_times_mask, }, { "development_directory", offsetof(struct cstate, development_directory), &string_type, cstate_development_directory_mask, }, { "integration_directory", offsetof(struct cstate, integration_directory), &string_type, cstate_integration_directory_mask, }, { "history", offsetof(struct cstate, history), &cstate_history_list_type, cstate_history_mask, }, { "branch", offsetof(struct cstate, branch), &cstate_branch_type, cstate_branch_mask, }, { "src", offsetof(struct cstate, src), &cstate_src_list_type, cstate_src_mask, }, }; static void *cstate_parse _((void *, string_ty *, type_ty **, unsigned long *)); static void * cstate_parse(this, name, type_pp, mask_p) void *this; string_ty *name; type_ty **type_pp; unsigned long *mask_p; { void *addr; trace(("cstate_parse(this = %08lX, name = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)name, (long)type_pp)); assert(((cstate)this)->reference_count > 0); assert(sizeof(cstate) == sizeof(generic_struct_ty *)); addr = generic_struct_parse ( this, name, type_pp, mask_p, cstate_table, SIZEOF(cstate_table) ); trace((/*{*/"return %08lX;\n}\n", (long)addr)); return addr; } static string_ty *cstate_fuzzy _((string_ty *)); static string_ty * cstate_fuzzy(name) string_ty *name; { string_ty *result; trace(("cstate_fuzzy(name = %08lX)\n{\n"/*}*/, (long)name)); result = generic_struct_fuzzy ( name, cstate_table, SIZEOF(cstate_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static struct rpt_value_ty *cstate_convert _((void *)); static struct rpt_value_ty * cstate_convert(this) void *this; { struct rpt_value_ty *result; trace(("cstate_convert(name = %08lX)\n{\n"/*}*/, (long)this)); assert(((cstate)this)->reference_count > 0); result = generic_struct_convert ( this, cstate_table, SIZEOF(cstate_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } type_ty cstate_type = { "cstate", cstate_alloc, cstate_free, 0, /* enum_parse */ 0, /* list_parse */ cstate_parse, cstate_fuzzy, cstate_convert, generic_struct_is_set, }; cstate cstate_read_file(filename) string_ty *filename; { cstate result; trace(("cstate_read_file(filename = \"%s\")\n{\n"/*}*/, (filename ? filename->str_text : ""))); os_become_must_be_active(); result = parse(filename, &cstate_type); trace(("return %08lX;\n", result)); trace((/*{*/"}\n")); return result; } void cstate_write_file(filename, value, compress) string_ty *filename; cstate value; int compress; { output_ty *fp; trace(("cstate_write_file(filename = \"%s\", value = %08lX)\n{\n"/*}*/, (filename ? filename->str_text : ""), (long)value)); if (filename) os_become_must_be_active(); if (compress) { fp = output_file_binary_open(filename); fp = output_gzip(fp); } else { fp = output_file_text_open(filename); } fp = output_indent(fp); io_comment_emit(fp); cstate_write(fp, value); type_enum_option_clear(); output_delete(fp); trace((/*{*/"}\n")); } void cstate__rpt_init() { trace(("cstate__rpt_init()\n{\n"/*}*/)); generic_enum__init(cstate_state_s, SIZEOF(cstate_state_s)); generic_enum__init(cstate_history_what_s, SIZEOF(cstate_history_what_s)); generic_enum__init(cstate_branch_develop_end_action_s, SIZEOF(cstate_branch_develop_end_action_s)); trace((/*{*/"}\n")); }