#include #include #include #include #include #include #include #include #include #include #include #include #include void pstate_copyright_years_list_write(fp, name, this) output_ty *fp; char *name; pstate_copyright_years_list this; { size_t j; if (!this) return; trace(("pstate_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 *pstate_copyright_years_list_alloc _((void)); static void * pstate_copyright_years_list_alloc() { pstate_copyright_years_list result; trace(("pstate_copyright_years_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pstate_copyright_years_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pstate_copyright_years_list_free _((void *)); static void pstate_copyright_years_list_free(that) void *that; { pstate_copyright_years_list this = that; size_t j; if (!this) return; trace(("pstate_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 *pstate_copyright_years_list_parse _((void *, type_ty **)); static void * pstate_copyright_years_list_parse(that, type_pp) void *that; type_ty **type_pp; { pstate_copyright_years_list this = that; void *addr; trace(("pstate_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 *pstate_copyright_years_list_convert _((void *)); static rpt_value_ty * pstate_copyright_years_list_convert(that) void *that; { pstate_copyright_years_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pstate_copyright_years_list *)that; if (!this) return 0; trace(("pstate_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 pstate_copyright_years_list_type = { "pstate_copyright_years_list", pstate_copyright_years_list_alloc, pstate_copyright_years_list_free, 0, /* enum_parse */ pstate_copyright_years_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pstate_copyright_years_list_convert, generic_struct_is_set, }; void pstate_src_write(fp, name, this) output_ty *fp; char *name; pstate_src this; { if (!this) return; trace(("pstate_src_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); assert(((pstate_src)this)->reference_count > 0); trace(("rc = %d;\n", ((pstate_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_usage_write(fp, "usage", this->usage); string_write(fp, "edit_number", this->edit_number); integer_write(fp, "locked_by", this->locked_by); integer_write(fp, "about_to_be_created_by", this->about_to_be_created_by); integer_write(fp, "deleted_by", this->deleted_by); output_fputs(fp, /*{*/"}"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *pstate_src_alloc _((void)); static void * pstate_src_alloc() { pstate_src this; trace(("pstate_src_alloc()\n{\n"/*}*/)); this = mem_alloc(sizeof(struct pstate_src)); this->reference_count = 1; this->mask = 0; this->file_name = 0; this->usage = 0; this->edit_number = 0; this->locked_by = 0; this->about_to_be_created_by = 0; this->deleted_by = 0; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } pstate_src pstate_src_copy(this) pstate_src this; { trace(("pstate_src_copy()\n{\n"/*}*/)); this->reference_count++; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } static void pstate_src_free _((void *)); static void pstate_src_free(that) void *that; { pstate_src this = that; if (!this) return; this->reference_count--; assert(this->reference_count >= 0); if (this->reference_count > 0) return; trace(("pstate_src_free(this = %08lX)\n{\n"/*}*/, (long)this)); str_free(this->file_name); str_free(this->edit_number); mem_free(this); trace((/*{*/"}\n")); } static type_table_ty pstate_src_table[] = { { "file_name", offsetof(struct pstate_src, file_name), &string_type, pstate_src_file_name_mask, }, { "usage", offsetof(struct pstate_src, usage), &file_usage_type, pstate_src_usage_mask, }, { "edit_number", offsetof(struct pstate_src, edit_number), &string_type, pstate_src_edit_number_mask, }, { "locked_by", offsetof(struct pstate_src, locked_by), &integer_type, pstate_src_locked_by_mask, }, { "about_to_be_created_by", offsetof(struct pstate_src, about_to_be_created_by), &integer_type, pstate_src_about_to_be_created_by_mask, }, { "deleted_by", offsetof(struct pstate_src, deleted_by), &integer_type, pstate_src_deleted_by_mask, }, }; static void *pstate_src_parse _((void *, string_ty *, type_ty **, unsigned long *)); static void * pstate_src_parse(this, name, type_pp, mask_p) void *this; string_ty *name; type_ty **type_pp; unsigned long *mask_p; { void *addr; trace(("pstate_src_parse(this = %08lX, name = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)name, (long)type_pp)); assert(((pstate_src)this)->reference_count > 0); assert(sizeof(pstate_src) == sizeof(generic_struct_ty *)); addr = generic_struct_parse ( this, name, type_pp, mask_p, pstate_src_table, SIZEOF(pstate_src_table) ); trace((/*{*/"return %08lX;\n}\n", (long)addr)); return addr; } static string_ty *pstate_src_fuzzy _((string_ty *)); static string_ty * pstate_src_fuzzy(name) string_ty *name; { string_ty *result; trace(("pstate_src_fuzzy(name = %08lX)\n{\n"/*}*/, (long)name)); result = generic_struct_fuzzy ( name, pstate_src_table, SIZEOF(pstate_src_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static struct rpt_value_ty *pstate_src_convert _((void *)); static struct rpt_value_ty * pstate_src_convert(this) void *this; { struct rpt_value_ty *result; trace(("pstate_src_convert(name = %08lX)\n{\n"/*}*/, (long)this)); assert(((pstate_src)this)->reference_count > 0); result = generic_struct_convert ( this, pstate_src_table, SIZEOF(pstate_src_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } type_ty pstate_src_type = { "pstate_src", pstate_src_alloc, pstate_src_free, 0, /* enum_parse */ 0, /* list_parse */ pstate_src_parse, pstate_src_fuzzy, pstate_src_convert, generic_struct_is_set, }; void pstate_src_list_write(fp, name, this) output_ty *fp; char *name; pstate_src_list this; { size_t j; if (!this) return; trace(("pstate_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) { pstate_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 *pstate_src_list_alloc _((void)); static void * pstate_src_list_alloc() { pstate_src_list result; trace(("pstate_src_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pstate_src_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pstate_src_list_free _((void *)); static void pstate_src_list_free(that) void *that; { pstate_src_list this = that; size_t j; if (!this) return; trace(("pstate_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) pstate_src_free(this->list[j]); if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *pstate_src_list_parse _((void *, type_ty **)); static void * pstate_src_list_parse(that, type_pp) void *that; type_ty **type_pp; { pstate_src_list this = that; void *addr; trace(("pstate_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 = &pstate_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 *pstate_src_list_convert _((void *)); static rpt_value_ty * pstate_src_list_convert(that) void *that; { pstate_src_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pstate_src_list *)that; if (!this) return 0; trace(("pstate_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 = pstate_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 pstate_src_list_type = { "pstate_src_list", pstate_src_list_alloc, pstate_src_list_free, 0, /* enum_parse */ pstate_src_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pstate_src_list_convert, generic_struct_is_set, }; void pstate_history_name_list_write(fp, name, this) output_ty *fp; char *name; pstate_history_name_list this; { size_t j; if (!this) return; trace(("pstate_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 *pstate_history_name_list_alloc _((void)); static void * pstate_history_name_list_alloc() { pstate_history_name_list result; trace(("pstate_history_name_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pstate_history_name_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pstate_history_name_list_free _((void *)); static void pstate_history_name_list_free(that) void *that; { pstate_history_name_list this = that; size_t j; if (!this) return; trace(("pstate_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 *pstate_history_name_list_parse _((void *, type_ty **)); static void * pstate_history_name_list_parse(that, type_pp) void *that; type_ty **type_pp; { pstate_history_name_list this = that; void *addr; trace(("pstate_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 *pstate_history_name_list_convert _((void *)); static rpt_value_ty * pstate_history_name_list_convert(that) void *that; { pstate_history_name_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pstate_history_name_list *)that; if (!this) return 0; trace(("pstate_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 pstate_history_name_list_type = { "pstate_history_name_list", pstate_history_name_list_alloc, pstate_history_name_list_free, 0, /* enum_parse */ pstate_history_name_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pstate_history_name_list_convert, generic_struct_is_set, }; void pstate_history_write(fp, name, this) output_ty *fp; char *name; pstate_history this; { if (!this) return; trace(("pstate_history_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); assert(((pstate_history)this)->reference_count > 0); trace(("rc = %d;\n", ((pstate_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); pstate_history_name_list_write(fp, "name", this->name); output_fputs(fp, /*{*/"}"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *pstate_history_alloc _((void)); static void * pstate_history_alloc() { pstate_history this; trace(("pstate_history_alloc()\n{\n"/*}*/)); this = mem_alloc(sizeof(struct pstate_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; } pstate_history pstate_history_copy(this) pstate_history this; { trace(("pstate_history_copy()\n{\n"/*}*/)); this->reference_count++; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } static void pstate_history_free _((void *)); static void pstate_history_free(that) void *that; { pstate_history this = that; if (!this) return; this->reference_count--; assert(this->reference_count >= 0); if (this->reference_count > 0) return; trace(("pstate_history_free(this = %08lX)\n{\n"/*}*/, (long)this)); pstate_history_name_list_free(this->name); mem_free(this); trace((/*{*/"}\n")); } static type_table_ty pstate_history_table[] = { { "delta_number", offsetof(struct pstate_history, delta_number), &integer_type, pstate_history_delta_number_mask, }, { "change_number", offsetof(struct pstate_history, change_number), &integer_type, pstate_history_change_number_mask, }, { "name", offsetof(struct pstate_history, name), &pstate_history_name_list_type, pstate_history_name_mask, }, }; static void *pstate_history_parse _((void *, string_ty *, type_ty **, unsigned long *)); static void * pstate_history_parse(this, name, type_pp, mask_p) void *this; string_ty *name; type_ty **type_pp; unsigned long *mask_p; { void *addr; trace(("pstate_history_parse(this = %08lX, name = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)name, (long)type_pp)); assert(((pstate_history)this)->reference_count > 0); assert(sizeof(pstate_history) == sizeof(generic_struct_ty *)); addr = generic_struct_parse ( this, name, type_pp, mask_p, pstate_history_table, SIZEOF(pstate_history_table) ); trace((/*{*/"return %08lX;\n}\n", (long)addr)); return addr; } static string_ty *pstate_history_fuzzy _((string_ty *)); static string_ty * pstate_history_fuzzy(name) string_ty *name; { string_ty *result; trace(("pstate_history_fuzzy(name = %08lX)\n{\n"/*}*/, (long)name)); result = generic_struct_fuzzy ( name, pstate_history_table, SIZEOF(pstate_history_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static struct rpt_value_ty *pstate_history_convert _((void *)); static struct rpt_value_ty * pstate_history_convert(this) void *this; { struct rpt_value_ty *result; trace(("pstate_history_convert(name = %08lX)\n{\n"/*}*/, (long)this)); assert(((pstate_history)this)->reference_count > 0); result = generic_struct_convert ( this, pstate_history_table, SIZEOF(pstate_history_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } type_ty pstate_history_type = { "pstate_history", pstate_history_alloc, pstate_history_free, 0, /* enum_parse */ 0, /* list_parse */ pstate_history_parse, pstate_history_fuzzy, pstate_history_convert, generic_struct_is_set, }; void pstate_history_list_write(fp, name, this) output_ty *fp; char *name; pstate_history_list this; { size_t j; if (!this) return; trace(("pstate_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) { pstate_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 *pstate_history_list_alloc _((void)); static void * pstate_history_list_alloc() { pstate_history_list result; trace(("pstate_history_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pstate_history_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pstate_history_list_free _((void *)); static void pstate_history_list_free(that) void *that; { pstate_history_list this = that; size_t j; if (!this) return; trace(("pstate_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) pstate_history_free(this->list[j]); if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *pstate_history_list_parse _((void *, type_ty **)); static void * pstate_history_list_parse(that, type_pp) void *that; type_ty **type_pp; { pstate_history_list this = that; void *addr; trace(("pstate_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 = &pstate_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 *pstate_history_list_convert _((void *)); static rpt_value_ty * pstate_history_list_convert(that) void *that; { pstate_history_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pstate_history_list *)that; if (!this) return 0; trace(("pstate_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 = pstate_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 pstate_history_list_type = { "pstate_history_list", pstate_history_list_alloc, pstate_history_list_free, 0, /* enum_parse */ pstate_history_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pstate_history_list_convert, generic_struct_is_set, }; void pstate_change_list_write(fp, name, this) output_ty *fp; char *name; pstate_change_list this; { size_t j; if (!this) return; trace(("pstate_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 *pstate_change_list_alloc _((void)); static void * pstate_change_list_alloc() { pstate_change_list result; trace(("pstate_change_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pstate_change_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pstate_change_list_free _((void *)); static void pstate_change_list_free(that) void *that; { pstate_change_list this = that; size_t j; if (!this) return; trace(("pstate_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 *pstate_change_list_parse _((void *, type_ty **)); static void * pstate_change_list_parse(that, type_pp) void *that; type_ty **type_pp; { pstate_change_list this = that; void *addr; trace(("pstate_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 *pstate_change_list_convert _((void *)); static rpt_value_ty * pstate_change_list_convert(that) void *that; { pstate_change_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pstate_change_list *)that; if (!this) return 0; trace(("pstate_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 pstate_change_list_type = { "pstate_change_list", pstate_change_list_alloc, pstate_change_list_free, 0, /* enum_parse */ pstate_change_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pstate_change_list_convert, generic_struct_is_set, }; void pstate_administrator_list_write(fp, name, this) output_ty *fp; char *name; pstate_administrator_list this; { size_t j; if (!this) return; trace(("pstate_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 *pstate_administrator_list_alloc _((void)); static void * pstate_administrator_list_alloc() { pstate_administrator_list result; trace(("pstate_administrator_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pstate_administrator_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pstate_administrator_list_free _((void *)); static void pstate_administrator_list_free(that) void *that; { pstate_administrator_list this = that; size_t j; if (!this) return; trace(("pstate_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 *pstate_administrator_list_parse _((void *, type_ty **)); static void * pstate_administrator_list_parse(that, type_pp) void *that; type_ty **type_pp; { pstate_administrator_list this = that; void *addr; trace(("pstate_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 *pstate_administrator_list_convert _((void *)); static rpt_value_ty * pstate_administrator_list_convert(that) void *that; { pstate_administrator_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pstate_administrator_list *)that; if (!this) return 0; trace(("pstate_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 pstate_administrator_list_type = { "pstate_administrator_list", pstate_administrator_list_alloc, pstate_administrator_list_free, 0, /* enum_parse */ pstate_administrator_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pstate_administrator_list_convert, generic_struct_is_set, }; void pstate_developer_list_write(fp, name, this) output_ty *fp; char *name; pstate_developer_list this; { size_t j; if (!this) return; trace(("pstate_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 *pstate_developer_list_alloc _((void)); static void * pstate_developer_list_alloc() { pstate_developer_list result; trace(("pstate_developer_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pstate_developer_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pstate_developer_list_free _((void *)); static void pstate_developer_list_free(that) void *that; { pstate_developer_list this = that; size_t j; if (!this) return; trace(("pstate_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 *pstate_developer_list_parse _((void *, type_ty **)); static void * pstate_developer_list_parse(that, type_pp) void *that; type_ty **type_pp; { pstate_developer_list this = that; void *addr; trace(("pstate_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 *pstate_developer_list_convert _((void *)); static rpt_value_ty * pstate_developer_list_convert(that) void *that; { pstate_developer_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pstate_developer_list *)that; if (!this) return 0; trace(("pstate_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 pstate_developer_list_type = { "pstate_developer_list", pstate_developer_list_alloc, pstate_developer_list_free, 0, /* enum_parse */ pstate_developer_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pstate_developer_list_convert, generic_struct_is_set, }; void pstate_reviewer_list_write(fp, name, this) output_ty *fp; char *name; pstate_reviewer_list this; { size_t j; if (!this) return; trace(("pstate_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 *pstate_reviewer_list_alloc _((void)); static void * pstate_reviewer_list_alloc() { pstate_reviewer_list result; trace(("pstate_reviewer_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pstate_reviewer_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pstate_reviewer_list_free _((void *)); static void pstate_reviewer_list_free(that) void *that; { pstate_reviewer_list this = that; size_t j; if (!this) return; trace(("pstate_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 *pstate_reviewer_list_parse _((void *, type_ty **)); static void * pstate_reviewer_list_parse(that, type_pp) void *that; type_ty **type_pp; { pstate_reviewer_list this = that; void *addr; trace(("pstate_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 *pstate_reviewer_list_convert _((void *)); static rpt_value_ty * pstate_reviewer_list_convert(that) void *that; { pstate_reviewer_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pstate_reviewer_list *)that; if (!this) return 0; trace(("pstate_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 pstate_reviewer_list_type = { "pstate_reviewer_list", pstate_reviewer_list_alloc, pstate_reviewer_list_free, 0, /* enum_parse */ pstate_reviewer_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pstate_reviewer_list_convert, generic_struct_is_set, }; void pstate_integrator_list_write(fp, name, this) output_ty *fp; char *name; pstate_integrator_list this; { size_t j; if (!this) return; trace(("pstate_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 *pstate_integrator_list_alloc _((void)); static void * pstate_integrator_list_alloc() { pstate_integrator_list result; trace(("pstate_integrator_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pstate_integrator_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pstate_integrator_list_free _((void *)); static void pstate_integrator_list_free(that) void *that; { pstate_integrator_list this = that; size_t j; if (!this) return; trace(("pstate_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 *pstate_integrator_list_parse _((void *, type_ty **)); static void * pstate_integrator_list_parse(that, type_pp) void *that; type_ty **type_pp; { pstate_integrator_list this = that; void *addr; trace(("pstate_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 *pstate_integrator_list_convert _((void *)); static rpt_value_ty * pstate_integrator_list_convert(that) void *that; { pstate_integrator_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pstate_integrator_list *)that; if (!this) return 0; trace(("pstate_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 pstate_integrator_list_type = { "pstate_integrator_list", pstate_integrator_list_alloc, pstate_integrator_list_free, 0, /* enum_parse */ pstate_integrator_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pstate_integrator_list_convert, generic_struct_is_set, }; void pstate_write(fp, this) output_ty *fp; pstate this; { if (!this) return; trace(("pstate_write(this = %08lX)\n{\n"/*}*/, this)); assert(((pstate)this)->reference_count > 0); trace(("rc = %d;\n", ((pstate)this)->reference_count)); integer_write(fp, "next_test_number", this->next_test_number); integer_write(fp, "umask", this->umask); string_write(fp, "description", this->description); string_write(fp, "owner_name", this->owner_name); string_write(fp, "group_name", this->group_name); 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_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); string_write(fp, "default_development_directory", this->default_development_directory); boolean_write(fp, "default_test_exemption", this->default_test_exemption); pstate_copyright_years_list_write(fp, "copyright_years", this->copyright_years); integer_write(fp, "next_change_number", this->next_change_number); integer_write(fp, "next_delta_number", this->next_delta_number); pstate_src_list_write(fp, "src", this->src); pstate_history_list_write(fp, "history", this->history); pstate_change_list_write(fp, "change", this->change); pstate_administrator_list_write(fp, "administrator", this->administrator); pstate_developer_list_write(fp, "developer", this->developer); pstate_reviewer_list_write(fp, "reviewer", this->reviewer); pstate_integrator_list_write(fp, "integrator", this->integrator); integer_write(fp, "currently_integrating_change", this->currently_integrating_change); integer_write(fp, "version_major", this->version_major); integer_write(fp, "version_minor", this->version_minor); string_write(fp, "version_previous", this->version_previous); trace((/*{*/"}\n")); } static void *pstate_alloc _((void)); static void * pstate_alloc() { pstate this; trace(("pstate_alloc()\n{\n"/*}*/)); this = mem_alloc(sizeof(struct pstate)); this->reference_count = 1; this->mask = 0; this->next_test_number = 0; this->umask = 0; this->description = 0; this->owner_name = 0; this->group_name = 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_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_development_directory = 0; this->default_test_exemption = 0; this->copyright_years = 0; this->next_change_number = 0; this->next_delta_number = 0; this->src = 0; this->history = 0; this->change = 0; this->administrator = 0; this->developer = 0; this->reviewer = 0; this->integrator = 0; this->currently_integrating_change = 0; this->version_major = 0; this->version_minor = 0; this->version_previous = 0; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } pstate pstate_copy(this) pstate this; { trace(("pstate_copy()\n{\n"/*}*/)); this->reference_count++; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } static void pstate_free _((void *)); static void pstate_free(that) void *that; { pstate this = that; if (!this) return; this->reference_count--; assert(this->reference_count >= 0); if (this->reference_count > 0) return; trace(("pstate_free(this = %08lX)\n{\n"/*}*/, (long)this)); str_free(this->description); str_free(this->owner_name); str_free(this->group_name); 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_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); str_free(this->default_development_directory); pstate_copyright_years_list_free(this->copyright_years); pstate_src_list_free(this->src); pstate_history_list_free(this->history); pstate_change_list_free(this->change); pstate_administrator_list_free(this->administrator); pstate_developer_list_free(this->developer); pstate_reviewer_list_free(this->reviewer); pstate_integrator_list_free(this->integrator); str_free(this->version_previous); mem_free(this); trace((/*{*/"}\n")); } static type_table_ty pstate_table[] = { { "next_test_number", offsetof(struct pstate, next_test_number), &integer_type, pstate_next_test_number_mask, }, { "umask", offsetof(struct pstate, umask), &integer_type, pstate_umask_mask, }, { "description", offsetof(struct pstate, description), &string_type, pstate_description_mask, }, { "owner_name", offsetof(struct pstate, owner_name), &string_type, pstate_owner_name_mask, }, { "group_name", offsetof(struct pstate, group_name), &string_type, pstate_group_name_mask, }, { "developer_may_review", offsetof(struct pstate, developer_may_review), &boolean_type, pstate_developer_may_review_mask, }, { "developer_may_integrate", offsetof(struct pstate, developer_may_integrate), &boolean_type, pstate_developer_may_integrate_mask, }, { "reviewer_may_integrate", offsetof(struct pstate, reviewer_may_integrate), &boolean_type, pstate_reviewer_may_integrate_mask, }, { "developers_may_create_changes", offsetof(struct pstate, developers_may_create_changes), &boolean_type, pstate_developers_may_create_changes_mask, }, { "forced_develop_begin_notify_command", offsetof(struct pstate, forced_develop_begin_notify_command), &string_type, pstate_forced_develop_begin_notify_command_mask, }, { "develop_end_notify_command", offsetof(struct pstate, develop_end_notify_command), &string_type, pstate_develop_end_notify_command_mask, }, { "develop_end_undo_notify_command", offsetof(struct pstate, develop_end_undo_notify_command), &string_type, pstate_develop_end_undo_notify_command_mask, }, { "review_pass_notify_command", offsetof(struct pstate, review_pass_notify_command), &string_type, pstate_review_pass_notify_command_mask, }, { "review_pass_undo_notify_command", offsetof(struct pstate, review_pass_undo_notify_command), &string_type, pstate_review_pass_undo_notify_command_mask, }, { "review_fail_notify_command", offsetof(struct pstate, review_fail_notify_command), &string_type, pstate_review_fail_notify_command_mask, }, { "integrate_pass_notify_command", offsetof(struct pstate, integrate_pass_notify_command), &string_type, pstate_integrate_pass_notify_command_mask, }, { "integrate_fail_notify_command", offsetof(struct pstate, integrate_fail_notify_command), &string_type, pstate_integrate_fail_notify_command_mask, }, { "default_development_directory", offsetof(struct pstate, default_development_directory), &string_type, pstate_default_development_directory_mask, }, { "default_test_exemption", offsetof(struct pstate, default_test_exemption), &boolean_type, pstate_default_test_exemption_mask, }, { "copyright_years", offsetof(struct pstate, copyright_years), &pstate_copyright_years_list_type, pstate_copyright_years_mask, }, { "next_change_number", offsetof(struct pstate, next_change_number), &integer_type, pstate_next_change_number_mask, }, { "next_delta_number", offsetof(struct pstate, next_delta_number), &integer_type, pstate_next_delta_number_mask, }, { "src", offsetof(struct pstate, src), &pstate_src_list_type, pstate_src_mask, }, { "history", offsetof(struct pstate, history), &pstate_history_list_type, pstate_history_mask, }, { "change", offsetof(struct pstate, change), &pstate_change_list_type, pstate_change_mask, }, { "administrator", offsetof(struct pstate, administrator), &pstate_administrator_list_type, pstate_administrator_mask, }, { "developer", offsetof(struct pstate, developer), &pstate_developer_list_type, pstate_developer_mask, }, { "reviewer", offsetof(struct pstate, reviewer), &pstate_reviewer_list_type, pstate_reviewer_mask, }, { "integrator", offsetof(struct pstate, integrator), &pstate_integrator_list_type, pstate_integrator_mask, }, { "currently_integrating_change", offsetof(struct pstate, currently_integrating_change), &integer_type, pstate_currently_integrating_change_mask, }, { "version_major", offsetof(struct pstate, version_major), &integer_type, pstate_version_major_mask, }, { "version_minor", offsetof(struct pstate, version_minor), &integer_type, pstate_version_minor_mask, }, { "version_previous", offsetof(struct pstate, version_previous), &string_type, pstate_version_previous_mask, }, }; static void *pstate_parse _((void *, string_ty *, type_ty **, unsigned long *)); static void * pstate_parse(this, name, type_pp, mask_p) void *this; string_ty *name; type_ty **type_pp; unsigned long *mask_p; { void *addr; trace(("pstate_parse(this = %08lX, name = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)name, (long)type_pp)); assert(((pstate)this)->reference_count > 0); assert(sizeof(pstate) == sizeof(generic_struct_ty *)); addr = generic_struct_parse ( this, name, type_pp, mask_p, pstate_table, SIZEOF(pstate_table) ); trace((/*{*/"return %08lX;\n}\n", (long)addr)); return addr; } static string_ty *pstate_fuzzy _((string_ty *)); static string_ty * pstate_fuzzy(name) string_ty *name; { string_ty *result; trace(("pstate_fuzzy(name = %08lX)\n{\n"/*}*/, (long)name)); result = generic_struct_fuzzy ( name, pstate_table, SIZEOF(pstate_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static struct rpt_value_ty *pstate_convert _((void *)); static struct rpt_value_ty * pstate_convert(this) void *this; { struct rpt_value_ty *result; trace(("pstate_convert(name = %08lX)\n{\n"/*}*/, (long)this)); assert(((pstate)this)->reference_count > 0); result = generic_struct_convert ( this, pstate_table, SIZEOF(pstate_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } type_ty pstate_type = { "pstate", pstate_alloc, pstate_free, 0, /* enum_parse */ 0, /* list_parse */ pstate_parse, pstate_fuzzy, pstate_convert, generic_struct_is_set, }; pstate pstate_read_file(filename) string_ty *filename; { pstate result; trace(("pstate_read_file(filename = \"%s\")\n{\n"/*}*/, (filename ? filename->str_text : ""))); os_become_must_be_active(); result = parse(filename, &pstate_type); trace(("return %08lX;\n", result)); trace((/*{*/"}\n")); return result; } void pstate_write_file(filename, value, compress) string_ty *filename; pstate value; int compress; { output_ty *fp; trace(("pstate_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); pstate_write(fp, value); type_enum_option_clear(); output_delete(fp); trace((/*{*/"}\n")); } void pstate__rpt_init() { trace(("pstate__rpt_init()\n{\n"/*}*/)); trace((/*{*/"}\n")); }