#include #include #include #include #include #include #include #include #include #include #include #include #include void pconf_integrate_begin_exceptions_list_write(fp, name, this) output_ty *fp; char *name; pconf_integrate_begin_exceptions_list this; { size_t j; if (!this) return; trace(("pconf_integrate_begin_exceptions_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 *pconf_integrate_begin_exceptions_list_alloc _((void)); static void * pconf_integrate_begin_exceptions_list_alloc() { pconf_integrate_begin_exceptions_list result; trace(("pconf_integrate_begin_exceptions_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pconf_integrate_begin_exceptions_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pconf_integrate_begin_exceptions_list_free _((void *)); static void pconf_integrate_begin_exceptions_list_free(that) void *that; { pconf_integrate_begin_exceptions_list this = that; size_t j; if (!this) return; trace(("pconf_integrate_begin_exceptions_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 *pconf_integrate_begin_exceptions_list_parse _((void *, type_ty **)); static void * pconf_integrate_begin_exceptions_list_parse(that, type_pp) void *that; type_ty **type_pp; { pconf_integrate_begin_exceptions_list this = that; void *addr; trace(("pconf_integrate_begin_exceptions_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 *pconf_integrate_begin_exceptions_list_convert _((void *)); static rpt_value_ty * pconf_integrate_begin_exceptions_list_convert(that) void *that; { pconf_integrate_begin_exceptions_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pconf_integrate_begin_exceptions_list *)that; if (!this) return 0; trace(("pconf_integrate_begin_exceptions_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 pconf_integrate_begin_exceptions_list_type = { "pconf_integrate_begin_exceptions_list", pconf_integrate_begin_exceptions_list_alloc, pconf_integrate_begin_exceptions_list_free, 0, /* enum_parse */ pconf_integrate_begin_exceptions_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pconf_integrate_begin_exceptions_list_convert, generic_struct_is_set, }; void pconf_symlink_exceptions_list_write(fp, name, this) output_ty *fp; char *name; pconf_symlink_exceptions_list this; { size_t j; if (!this) return; trace(("pconf_symlink_exceptions_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 *pconf_symlink_exceptions_list_alloc _((void)); static void * pconf_symlink_exceptions_list_alloc() { pconf_symlink_exceptions_list result; trace(("pconf_symlink_exceptions_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pconf_symlink_exceptions_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pconf_symlink_exceptions_list_free _((void *)); static void pconf_symlink_exceptions_list_free(that) void *that; { pconf_symlink_exceptions_list this = that; size_t j; if (!this) return; trace(("pconf_symlink_exceptions_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 *pconf_symlink_exceptions_list_parse _((void *, type_ty **)); static void * pconf_symlink_exceptions_list_parse(that, type_pp) void *that; type_ty **type_pp; { pconf_symlink_exceptions_list this = that; void *addr; trace(("pconf_symlink_exceptions_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 *pconf_symlink_exceptions_list_convert _((void *)); static rpt_value_ty * pconf_symlink_exceptions_list_convert(that) void *that; { pconf_symlink_exceptions_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pconf_symlink_exceptions_list *)that; if (!this) return 0; trace(("pconf_symlink_exceptions_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 pconf_symlink_exceptions_list_type = { "pconf_symlink_exceptions_list", pconf_symlink_exceptions_list_alloc, pconf_symlink_exceptions_list_free, 0, /* enum_parse */ pconf_symlink_exceptions_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pconf_symlink_exceptions_list_convert, generic_struct_is_set, }; static char *pconf_history_put_trashes_file_s[] = { "fatal", "warn", "ignore", }; static string_ty *pconf_history_put_trashes_file_f[SIZEOF(pconf_history_put_trashes_file_s)]; char * pconf_history_put_trashes_file_ename(this) pconf_history_put_trashes_file_ty this; { static char buffer[20]; if ((int)this >= 0 && (int)this < 3) return pconf_history_put_trashes_file_s[this]; sprintf(buffer, "%d", (int)this); return buffer; } void pconf_history_put_trashes_file_write(fp, name, this) output_ty *fp; const char *name; pconf_history_put_trashes_file_ty this; { if (name) { if (this == 0 && type_enum_option_query()) return; output_fputs(fp, name); output_fputs(fp, " = "); } output_fputs(fp, pconf_history_put_trashes_file_s[this]); if (name) output_fputs(fp, ";\n"); } static int pconf_history_put_trashes_file_parse _((string_ty *)); static int pconf_history_put_trashes_file_parse(name) string_ty *name; { int j; slow_to_fast(pconf_history_put_trashes_file_s, pconf_history_put_trashes_file_f, SIZEOF(pconf_history_put_trashes_file_s)); for (j = 0; j < SIZEOF(pconf_history_put_trashes_file_f); ++j) { if (str_equal(name, pconf_history_put_trashes_file_f[j])) return j; } return -1; } static string_ty *pconf_history_put_trashes_file_fuzzy _((string_ty *)); static string_ty * pconf_history_put_trashes_file_fuzzy(name) string_ty *name; { return generic_enum_fuzzy ( name, pconf_history_put_trashes_file_f, SIZEOF(pconf_history_put_trashes_file_f) ); } static struct rpt_value_ty *pconf_history_put_trashes_file_convert _((void *)); static struct rpt_value_ty * pconf_history_put_trashes_file_convert(this) void *this; { if (!pconf_history_put_trashes_file_f[0]) slow_to_fast(pconf_history_put_trashes_file_s, pconf_history_put_trashes_file_f, SIZEOF(pconf_history_put_trashes_file_s)); return generic_enum_convert ( this, pconf_history_put_trashes_file_f, SIZEOF(pconf_history_put_trashes_file_f) ); } type_ty pconf_history_put_trashes_file_type = { "pconf_history_put_trashes_file", 0, /* alloc */ 0, /* free */ pconf_history_put_trashes_file_parse, 0, /* list_parse */ 0, /* struct_parse */ pconf_history_put_trashes_file_fuzzy, pconf_history_put_trashes_file_convert, generic_enum_is_set, }; static char *pconf_history_content_limitation_s[] = { "ascii_text", "international_text", "binary_capable", }; static string_ty *pconf_history_content_limitation_f[SIZEOF(pconf_history_content_limitation_s)]; char * pconf_history_content_limitation_ename(this) pconf_history_content_limitation_ty this; { static char buffer[20]; if ((int)this >= 0 && (int)this < 3) return pconf_history_content_limitation_s[this]; sprintf(buffer, "%d", (int)this); return buffer; } void pconf_history_content_limitation_write(fp, name, this) output_ty *fp; const char *name; pconf_history_content_limitation_ty this; { if (name) { if (this == 0 && type_enum_option_query()) return; output_fputs(fp, name); output_fputs(fp, " = "); } output_fputs(fp, pconf_history_content_limitation_s[this]); if (name) output_fputs(fp, ";\n"); } static int pconf_history_content_limitation_parse _((string_ty *)); static int pconf_history_content_limitation_parse(name) string_ty *name; { int j; slow_to_fast(pconf_history_content_limitation_s, pconf_history_content_limitation_f, SIZEOF(pconf_history_content_limitation_s)); for (j = 0; j < SIZEOF(pconf_history_content_limitation_f); ++j) { if (str_equal(name, pconf_history_content_limitation_f[j])) return j; } return -1; } static string_ty *pconf_history_content_limitation_fuzzy _((string_ty *)); static string_ty * pconf_history_content_limitation_fuzzy(name) string_ty *name; { return generic_enum_fuzzy ( name, pconf_history_content_limitation_f, SIZEOF(pconf_history_content_limitation_f) ); } static struct rpt_value_ty *pconf_history_content_limitation_convert _((void *)); static struct rpt_value_ty * pconf_history_content_limitation_convert(this) void *this; { if (!pconf_history_content_limitation_f[0]) slow_to_fast(pconf_history_content_limitation_s, pconf_history_content_limitation_f, SIZEOF(pconf_history_content_limitation_s)); return generic_enum_convert ( this, pconf_history_content_limitation_f, SIZEOF(pconf_history_content_limitation_f) ); } type_ty pconf_history_content_limitation_type = { "pconf_history_content_limitation", 0, /* alloc */ 0, /* free */ pconf_history_content_limitation_parse, 0, /* list_parse */ 0, /* struct_parse */ pconf_history_content_limitation_fuzzy, pconf_history_content_limitation_convert, generic_enum_is_set, }; static char *pconf_architecture_mode_s[] = { "required", "optional", "forbidden", }; static string_ty *pconf_architecture_mode_f[SIZEOF(pconf_architecture_mode_s)]; char * pconf_architecture_mode_ename(this) pconf_architecture_mode_ty this; { static char buffer[20]; if ((int)this >= 0 && (int)this < 3) return pconf_architecture_mode_s[this]; sprintf(buffer, "%d", (int)this); return buffer; } void pconf_architecture_mode_write(fp, name, this) output_ty *fp; const char *name; pconf_architecture_mode_ty this; { if (name) { if (this == 0 && type_enum_option_query()) return; output_fputs(fp, name); output_fputs(fp, " = "); } output_fputs(fp, pconf_architecture_mode_s[this]); if (name) output_fputs(fp, ";\n"); } static int pconf_architecture_mode_parse _((string_ty *)); static int pconf_architecture_mode_parse(name) string_ty *name; { int j; slow_to_fast(pconf_architecture_mode_s, pconf_architecture_mode_f, SIZEOF(pconf_architecture_mode_s)); for (j = 0; j < SIZEOF(pconf_architecture_mode_f); ++j) { if (str_equal(name, pconf_architecture_mode_f[j])) return j; } return -1; } static string_ty *pconf_architecture_mode_fuzzy _((string_ty *)); static string_ty * pconf_architecture_mode_fuzzy(name) string_ty *name; { return generic_enum_fuzzy ( name, pconf_architecture_mode_f, SIZEOF(pconf_architecture_mode_f) ); } static struct rpt_value_ty *pconf_architecture_mode_convert _((void *)); static struct rpt_value_ty * pconf_architecture_mode_convert(this) void *this; { if (!pconf_architecture_mode_f[0]) slow_to_fast(pconf_architecture_mode_s, pconf_architecture_mode_f, SIZEOF(pconf_architecture_mode_s)); return generic_enum_convert ( this, pconf_architecture_mode_f, SIZEOF(pconf_architecture_mode_f) ); } type_ty pconf_architecture_mode_type = { "pconf_architecture_mode", 0, /* alloc */ 0, /* free */ pconf_architecture_mode_parse, 0, /* list_parse */ 0, /* struct_parse */ pconf_architecture_mode_fuzzy, pconf_architecture_mode_convert, generic_enum_is_set, }; void pconf_architecture_write(fp, name, this) output_ty *fp; char *name; pconf_architecture this; { if (!this) return; trace(("pconf_architecture_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); assert(((pconf_architecture)this)->reference_count > 0); trace(("rc = %d;\n", ((pconf_architecture)this)->reference_count)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } output_fputs(fp, "{\n"/*}*/); string_write(fp, "name", this->name); string_write(fp, "pattern", this->pattern); pconf_architecture_mode_write(fp, "mode", this->mode); output_fputs(fp, /*{*/"}"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *pconf_architecture_alloc _((void)); static void * pconf_architecture_alloc() { pconf_architecture this; trace(("pconf_architecture_alloc()\n{\n"/*}*/)); this = mem_alloc(sizeof(struct pconf_architecture)); this->reference_count = 1; this->mask = 0; this->name = 0; this->pattern = 0; this->mode = 0; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } pconf_architecture pconf_architecture_copy(this) pconf_architecture this; { trace(("pconf_architecture_copy()\n{\n"/*}*/)); this->reference_count++; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } static void pconf_architecture_free _((void *)); static void pconf_architecture_free(that) void *that; { pconf_architecture this = that; if (!this) return; this->reference_count--; assert(this->reference_count >= 0); if (this->reference_count > 0) return; trace(("pconf_architecture_free(this = %08lX)\n{\n"/*}*/, (long)this)); str_free(this->name); str_free(this->pattern); mem_free(this); trace((/*{*/"}\n")); } static type_table_ty pconf_architecture_table[] = { { "name", offsetof(struct pconf_architecture, name), &string_type, pconf_architecture_name_mask, }, { "pattern", offsetof(struct pconf_architecture, pattern), &string_type, pconf_architecture_pattern_mask, }, { "mode", offsetof(struct pconf_architecture, mode), &pconf_architecture_mode_type, pconf_architecture_mode_mask, }, }; static void *pconf_architecture_parse _((void *, string_ty *, type_ty **, unsigned long *)); static void * pconf_architecture_parse(this, name, type_pp, mask_p) void *this; string_ty *name; type_ty **type_pp; unsigned long *mask_p; { void *addr; trace(("pconf_architecture_parse(this = %08lX, name = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)name, (long)type_pp)); assert(((pconf_architecture)this)->reference_count > 0); assert(sizeof(pconf_architecture) == sizeof(generic_struct_ty *)); addr = generic_struct_parse ( this, name, type_pp, mask_p, pconf_architecture_table, SIZEOF(pconf_architecture_table) ); trace((/*{*/"return %08lX;\n}\n", (long)addr)); return addr; } static string_ty *pconf_architecture_fuzzy _((string_ty *)); static string_ty * pconf_architecture_fuzzy(name) string_ty *name; { string_ty *result; trace(("pconf_architecture_fuzzy(name = %08lX)\n{\n"/*}*/, (long)name)); result = generic_struct_fuzzy ( name, pconf_architecture_table, SIZEOF(pconf_architecture_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static struct rpt_value_ty *pconf_architecture_convert _((void *)); static struct rpt_value_ty * pconf_architecture_convert(this) void *this; { struct rpt_value_ty *result; trace(("pconf_architecture_convert(name = %08lX)\n{\n"/*}*/, (long)this)); assert(((pconf_architecture)this)->reference_count > 0); result = generic_struct_convert ( this, pconf_architecture_table, SIZEOF(pconf_architecture_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } type_ty pconf_architecture_type = { "pconf_architecture", pconf_architecture_alloc, pconf_architecture_free, 0, /* enum_parse */ 0, /* list_parse */ pconf_architecture_parse, pconf_architecture_fuzzy, pconf_architecture_convert, generic_struct_is_set, }; void pconf_architecture_list_write(fp, name, this) output_ty *fp; char *name; pconf_architecture_list this; { size_t j; if (!this) return; trace(("pconf_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) { pconf_architecture_write(fp, (char *)0, this->list[j]); output_fputs(fp, ",\n"); } output_fputs(fp, /*[*/"]"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *pconf_architecture_list_alloc _((void)); static void * pconf_architecture_list_alloc() { pconf_architecture_list result; trace(("pconf_architecture_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pconf_architecture_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pconf_architecture_list_free _((void *)); static void pconf_architecture_list_free(that) void *that; { pconf_architecture_list this = that; size_t j; if (!this) return; trace(("pconf_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) pconf_architecture_free(this->list[j]); if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *pconf_architecture_list_parse _((void *, type_ty **)); static void * pconf_architecture_list_parse(that, type_pp) void *that; type_ty **type_pp; { pconf_architecture_list this = that; void *addr; trace(("pconf_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 = &pconf_architecture_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 *pconf_architecture_list_convert _((void *)); static rpt_value_ty * pconf_architecture_list_convert(that) void *that; { pconf_architecture_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pconf_architecture_list *)that; if (!this) return 0; trace(("pconf_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 = pconf_architecture_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 pconf_architecture_list_type = { "pconf_architecture_list", pconf_architecture_list_alloc, pconf_architecture_list_free, 0, /* enum_parse */ pconf_architecture_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pconf_architecture_list_convert, generic_struct_is_set, }; void pconf_file_template_pattern_list_write(fp, name, this) output_ty *fp; char *name; pconf_file_template_pattern_list this; { size_t j; if (!this) return; trace(("pconf_file_template_pattern_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 *pconf_file_template_pattern_list_alloc _((void)); static void * pconf_file_template_pattern_list_alloc() { pconf_file_template_pattern_list result; trace(("pconf_file_template_pattern_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pconf_file_template_pattern_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pconf_file_template_pattern_list_free _((void *)); static void pconf_file_template_pattern_list_free(that) void *that; { pconf_file_template_pattern_list this = that; size_t j; if (!this) return; trace(("pconf_file_template_pattern_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 *pconf_file_template_pattern_list_parse _((void *, type_ty **)); static void * pconf_file_template_pattern_list_parse(that, type_pp) void *that; type_ty **type_pp; { pconf_file_template_pattern_list this = that; void *addr; trace(("pconf_file_template_pattern_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 *pconf_file_template_pattern_list_convert _((void *)); static rpt_value_ty * pconf_file_template_pattern_list_convert(that) void *that; { pconf_file_template_pattern_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pconf_file_template_pattern_list *)that; if (!this) return 0; trace(("pconf_file_template_pattern_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 pconf_file_template_pattern_list_type = { "pconf_file_template_pattern_list", pconf_file_template_pattern_list_alloc, pconf_file_template_pattern_list_free, 0, /* enum_parse */ pconf_file_template_pattern_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pconf_file_template_pattern_list_convert, generic_struct_is_set, }; void pconf_file_template_write(fp, name, this) output_ty *fp; char *name; pconf_file_template this; { if (!this) return; trace(("pconf_file_template_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); assert(((pconf_file_template)this)->reference_count > 0); trace(("rc = %d;\n", ((pconf_file_template)this)->reference_count)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } output_fputs(fp, "{\n"/*}*/); pconf_file_template_pattern_list_write(fp, "pattern", this->pattern); string_write(fp, "body", this->body); string_write(fp, "body_command", this->body_command); output_fputs(fp, /*{*/"}"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *pconf_file_template_alloc _((void)); static void * pconf_file_template_alloc() { pconf_file_template this; trace(("pconf_file_template_alloc()\n{\n"/*}*/)); this = mem_alloc(sizeof(struct pconf_file_template)); this->reference_count = 1; this->mask = 0; this->pattern = 0; this->body = 0; this->body_command = 0; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } pconf_file_template pconf_file_template_copy(this) pconf_file_template this; { trace(("pconf_file_template_copy()\n{\n"/*}*/)); this->reference_count++; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } static void pconf_file_template_free _((void *)); static void pconf_file_template_free(that) void *that; { pconf_file_template this = that; if (!this) return; this->reference_count--; assert(this->reference_count >= 0); if (this->reference_count > 0) return; trace(("pconf_file_template_free(this = %08lX)\n{\n"/*}*/, (long)this)); pconf_file_template_pattern_list_free(this->pattern); str_free(this->body); str_free(this->body_command); mem_free(this); trace((/*{*/"}\n")); } static type_table_ty pconf_file_template_table[] = { { "pattern", offsetof(struct pconf_file_template, pattern), &pconf_file_template_pattern_list_type, pconf_file_template_pattern_mask, }, { "body", offsetof(struct pconf_file_template, body), &string_type, pconf_file_template_body_mask, }, { "body_command", offsetof(struct pconf_file_template, body_command), &string_type, pconf_file_template_body_command_mask, }, }; static void *pconf_file_template_parse _((void *, string_ty *, type_ty **, unsigned long *)); static void * pconf_file_template_parse(this, name, type_pp, mask_p) void *this; string_ty *name; type_ty **type_pp; unsigned long *mask_p; { void *addr; trace(("pconf_file_template_parse(this = %08lX, name = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)name, (long)type_pp)); assert(((pconf_file_template)this)->reference_count > 0); assert(sizeof(pconf_file_template) == sizeof(generic_struct_ty *)); addr = generic_struct_parse ( this, name, type_pp, mask_p, pconf_file_template_table, SIZEOF(pconf_file_template_table) ); trace((/*{*/"return %08lX;\n}\n", (long)addr)); return addr; } static string_ty *pconf_file_template_fuzzy _((string_ty *)); static string_ty * pconf_file_template_fuzzy(name) string_ty *name; { string_ty *result; trace(("pconf_file_template_fuzzy(name = %08lX)\n{\n"/*}*/, (long)name)); result = generic_struct_fuzzy ( name, pconf_file_template_table, SIZEOF(pconf_file_template_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static struct rpt_value_ty *pconf_file_template_convert _((void *)); static struct rpt_value_ty * pconf_file_template_convert(this) void *this; { struct rpt_value_ty *result; trace(("pconf_file_template_convert(name = %08lX)\n{\n"/*}*/, (long)this)); assert(((pconf_file_template)this)->reference_count > 0); result = generic_struct_convert ( this, pconf_file_template_table, SIZEOF(pconf_file_template_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } type_ty pconf_file_template_type = { "pconf_file_template", pconf_file_template_alloc, pconf_file_template_free, 0, /* enum_parse */ 0, /* list_parse */ pconf_file_template_parse, pconf_file_template_fuzzy, pconf_file_template_convert, generic_struct_is_set, }; void pconf_file_template_list_write(fp, name, this) output_ty *fp; char *name; pconf_file_template_list this; { size_t j; if (!this) return; trace(("pconf_file_template_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) { pconf_file_template_write(fp, (char *)0, this->list[j]); output_fputs(fp, ",\n"); } output_fputs(fp, /*[*/"]"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *pconf_file_template_list_alloc _((void)); static void * pconf_file_template_list_alloc() { pconf_file_template_list result; trace(("pconf_file_template_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pconf_file_template_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pconf_file_template_list_free _((void *)); static void pconf_file_template_list_free(that) void *that; { pconf_file_template_list this = that; size_t j; if (!this) return; trace(("pconf_file_template_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) pconf_file_template_free(this->list[j]); if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *pconf_file_template_list_parse _((void *, type_ty **)); static void * pconf_file_template_list_parse(that, type_pp) void *that; type_ty **type_pp; { pconf_file_template_list this = that; void *addr; trace(("pconf_file_template_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 = &pconf_file_template_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 *pconf_file_template_list_convert _((void *)); static rpt_value_ty * pconf_file_template_list_convert(that) void *that; { pconf_file_template_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pconf_file_template_list *)that; if (!this) return 0; trace(("pconf_file_template_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 = pconf_file_template_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 pconf_file_template_list_type = { "pconf_file_template_list", pconf_file_template_list_alloc, pconf_file_template_list_free, 0, /* enum_parse */ pconf_file_template_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pconf_file_template_list_convert, generic_struct_is_set, }; void pconf_whiteout_template_pattern_list_write(fp, name, this) output_ty *fp; char *name; pconf_whiteout_template_pattern_list this; { size_t j; if (!this) return; trace(("pconf_whiteout_template_pattern_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 *pconf_whiteout_template_pattern_list_alloc _((void)); static void * pconf_whiteout_template_pattern_list_alloc() { pconf_whiteout_template_pattern_list result; trace(("pconf_whiteout_template_pattern_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pconf_whiteout_template_pattern_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pconf_whiteout_template_pattern_list_free _((void *)); static void pconf_whiteout_template_pattern_list_free(that) void *that; { pconf_whiteout_template_pattern_list this = that; size_t j; if (!this) return; trace(("pconf_whiteout_template_pattern_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 *pconf_whiteout_template_pattern_list_parse _((void *, type_ty **)); static void * pconf_whiteout_template_pattern_list_parse(that, type_pp) void *that; type_ty **type_pp; { pconf_whiteout_template_pattern_list this = that; void *addr; trace(("pconf_whiteout_template_pattern_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 *pconf_whiteout_template_pattern_list_convert _((void *)); static rpt_value_ty * pconf_whiteout_template_pattern_list_convert(that) void *that; { pconf_whiteout_template_pattern_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pconf_whiteout_template_pattern_list *)that; if (!this) return 0; trace(("pconf_whiteout_template_pattern_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 pconf_whiteout_template_pattern_list_type = { "pconf_whiteout_template_pattern_list", pconf_whiteout_template_pattern_list_alloc, pconf_whiteout_template_pattern_list_free, 0, /* enum_parse */ pconf_whiteout_template_pattern_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pconf_whiteout_template_pattern_list_convert, generic_struct_is_set, }; void pconf_whiteout_template_write(fp, name, this) output_ty *fp; char *name; pconf_whiteout_template this; { if (!this) return; trace(("pconf_whiteout_template_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); assert(((pconf_whiteout_template)this)->reference_count > 0); trace(("rc = %d;\n", ((pconf_whiteout_template)this)->reference_count)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } output_fputs(fp, "{\n"/*}*/); pconf_whiteout_template_pattern_list_write(fp, "pattern", this->pattern); string_write(fp, "body", this->body); output_fputs(fp, /*{*/"}"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *pconf_whiteout_template_alloc _((void)); static void * pconf_whiteout_template_alloc() { pconf_whiteout_template this; trace(("pconf_whiteout_template_alloc()\n{\n"/*}*/)); this = mem_alloc(sizeof(struct pconf_whiteout_template)); this->reference_count = 1; this->mask = 0; this->pattern = 0; this->body = 0; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } pconf_whiteout_template pconf_whiteout_template_copy(this) pconf_whiteout_template this; { trace(("pconf_whiteout_template_copy()\n{\n"/*}*/)); this->reference_count++; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } static void pconf_whiteout_template_free _((void *)); static void pconf_whiteout_template_free(that) void *that; { pconf_whiteout_template this = that; if (!this) return; this->reference_count--; assert(this->reference_count >= 0); if (this->reference_count > 0) return; trace(("pconf_whiteout_template_free(this = %08lX)\n{\n"/*}*/, (long)this)); pconf_whiteout_template_pattern_list_free(this->pattern); str_free(this->body); mem_free(this); trace((/*{*/"}\n")); } static type_table_ty pconf_whiteout_template_table[] = { { "pattern", offsetof(struct pconf_whiteout_template, pattern), &pconf_whiteout_template_pattern_list_type, pconf_whiteout_template_pattern_mask, }, { "body", offsetof(struct pconf_whiteout_template, body), &string_type, pconf_whiteout_template_body_mask, }, }; static void *pconf_whiteout_template_parse _((void *, string_ty *, type_ty **, unsigned long *)); static void * pconf_whiteout_template_parse(this, name, type_pp, mask_p) void *this; string_ty *name; type_ty **type_pp; unsigned long *mask_p; { void *addr; trace(("pconf_whiteout_template_parse(this = %08lX, name = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)name, (long)type_pp)); assert(((pconf_whiteout_template)this)->reference_count > 0); assert(sizeof(pconf_whiteout_template) == sizeof(generic_struct_ty *)); addr = generic_struct_parse ( this, name, type_pp, mask_p, pconf_whiteout_template_table, SIZEOF(pconf_whiteout_template_table) ); trace((/*{*/"return %08lX;\n}\n", (long)addr)); return addr; } static string_ty *pconf_whiteout_template_fuzzy _((string_ty *)); static string_ty * pconf_whiteout_template_fuzzy(name) string_ty *name; { string_ty *result; trace(("pconf_whiteout_template_fuzzy(name = %08lX)\n{\n"/*}*/, (long)name)); result = generic_struct_fuzzy ( name, pconf_whiteout_template_table, SIZEOF(pconf_whiteout_template_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static struct rpt_value_ty *pconf_whiteout_template_convert _((void *)); static struct rpt_value_ty * pconf_whiteout_template_convert(this) void *this; { struct rpt_value_ty *result; trace(("pconf_whiteout_template_convert(name = %08lX)\n{\n"/*}*/, (long)this)); assert(((pconf_whiteout_template)this)->reference_count > 0); result = generic_struct_convert ( this, pconf_whiteout_template_table, SIZEOF(pconf_whiteout_template_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } type_ty pconf_whiteout_template_type = { "pconf_whiteout_template", pconf_whiteout_template_alloc, pconf_whiteout_template_free, 0, /* enum_parse */ 0, /* list_parse */ pconf_whiteout_template_parse, pconf_whiteout_template_fuzzy, pconf_whiteout_template_convert, generic_struct_is_set, }; void pconf_whiteout_template_list_write(fp, name, this) output_ty *fp; char *name; pconf_whiteout_template_list this; { size_t j; if (!this) return; trace(("pconf_whiteout_template_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) { pconf_whiteout_template_write(fp, (char *)0, this->list[j]); output_fputs(fp, ",\n"); } output_fputs(fp, /*[*/"]"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *pconf_whiteout_template_list_alloc _((void)); static void * pconf_whiteout_template_list_alloc() { pconf_whiteout_template_list result; trace(("pconf_whiteout_template_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pconf_whiteout_template_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pconf_whiteout_template_list_free _((void *)); static void pconf_whiteout_template_list_free(that) void *that; { pconf_whiteout_template_list this = that; size_t j; if (!this) return; trace(("pconf_whiteout_template_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) pconf_whiteout_template_free(this->list[j]); if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *pconf_whiteout_template_list_parse _((void *, type_ty **)); static void * pconf_whiteout_template_list_parse(that, type_pp) void *that; type_ty **type_pp; { pconf_whiteout_template_list this = that; void *addr; trace(("pconf_whiteout_template_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 = &pconf_whiteout_template_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 *pconf_whiteout_template_list_convert _((void *)); static rpt_value_ty * pconf_whiteout_template_list_convert(that) void *that; { pconf_whiteout_template_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pconf_whiteout_template_list *)that; if (!this) return 0; trace(("pconf_whiteout_template_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 = pconf_whiteout_template_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 pconf_whiteout_template_list_type = { "pconf_whiteout_template_list", pconf_whiteout_template_list_alloc, pconf_whiteout_template_list_free, 0, /* enum_parse */ pconf_whiteout_template_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pconf_whiteout_template_list_convert, generic_struct_is_set, }; void pconf_filename_pattern_accept_list_write(fp, name, this) output_ty *fp; char *name; pconf_filename_pattern_accept_list this; { size_t j; if (!this) return; trace(("pconf_filename_pattern_accept_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 *pconf_filename_pattern_accept_list_alloc _((void)); static void * pconf_filename_pattern_accept_list_alloc() { pconf_filename_pattern_accept_list result; trace(("pconf_filename_pattern_accept_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pconf_filename_pattern_accept_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pconf_filename_pattern_accept_list_free _((void *)); static void pconf_filename_pattern_accept_list_free(that) void *that; { pconf_filename_pattern_accept_list this = that; size_t j; if (!this) return; trace(("pconf_filename_pattern_accept_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 *pconf_filename_pattern_accept_list_parse _((void *, type_ty **)); static void * pconf_filename_pattern_accept_list_parse(that, type_pp) void *that; type_ty **type_pp; { pconf_filename_pattern_accept_list this = that; void *addr; trace(("pconf_filename_pattern_accept_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 *pconf_filename_pattern_accept_list_convert _((void *)); static rpt_value_ty * pconf_filename_pattern_accept_list_convert(that) void *that; { pconf_filename_pattern_accept_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pconf_filename_pattern_accept_list *)that; if (!this) return 0; trace(("pconf_filename_pattern_accept_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 pconf_filename_pattern_accept_list_type = { "pconf_filename_pattern_accept_list", pconf_filename_pattern_accept_list_alloc, pconf_filename_pattern_accept_list_free, 0, /* enum_parse */ pconf_filename_pattern_accept_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pconf_filename_pattern_accept_list_convert, generic_struct_is_set, }; void pconf_filename_pattern_reject_list_write(fp, name, this) output_ty *fp; char *name; pconf_filename_pattern_reject_list this; { size_t j; if (!this) return; trace(("pconf_filename_pattern_reject_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 *pconf_filename_pattern_reject_list_alloc _((void)); static void * pconf_filename_pattern_reject_list_alloc() { pconf_filename_pattern_reject_list result; trace(("pconf_filename_pattern_reject_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pconf_filename_pattern_reject_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pconf_filename_pattern_reject_list_free _((void *)); static void pconf_filename_pattern_reject_list_free(that) void *that; { pconf_filename_pattern_reject_list this = that; size_t j; if (!this) return; trace(("pconf_filename_pattern_reject_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 *pconf_filename_pattern_reject_list_parse _((void *, type_ty **)); static void * pconf_filename_pattern_reject_list_parse(that, type_pp) void *that; type_ty **type_pp; { pconf_filename_pattern_reject_list this = that; void *addr; trace(("pconf_filename_pattern_reject_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 *pconf_filename_pattern_reject_list_convert _((void *)); static rpt_value_ty * pconf_filename_pattern_reject_list_convert(that) void *that; { pconf_filename_pattern_reject_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pconf_filename_pattern_reject_list *)that; if (!this) return 0; trace(("pconf_filename_pattern_reject_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 pconf_filename_pattern_reject_list_type = { "pconf_filename_pattern_reject_list", pconf_filename_pattern_reject_list_alloc, pconf_filename_pattern_reject_list_free, 0, /* enum_parse */ pconf_filename_pattern_reject_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pconf_filename_pattern_reject_list_convert, generic_struct_is_set, }; void pconf_trojan_horse_suspect_list_write(fp, name, this) output_ty *fp; char *name; pconf_trojan_horse_suspect_list this; { size_t j; if (!this) return; trace(("pconf_trojan_horse_suspect_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 *pconf_trojan_horse_suspect_list_alloc _((void)); static void * pconf_trojan_horse_suspect_list_alloc() { pconf_trojan_horse_suspect_list result; trace(("pconf_trojan_horse_suspect_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pconf_trojan_horse_suspect_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pconf_trojan_horse_suspect_list_free _((void *)); static void pconf_trojan_horse_suspect_list_free(that) void *that; { pconf_trojan_horse_suspect_list this = that; size_t j; if (!this) return; trace(("pconf_trojan_horse_suspect_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 *pconf_trojan_horse_suspect_list_parse _((void *, type_ty **)); static void * pconf_trojan_horse_suspect_list_parse(that, type_pp) void *that; type_ty **type_pp; { pconf_trojan_horse_suspect_list this = that; void *addr; trace(("pconf_trojan_horse_suspect_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 *pconf_trojan_horse_suspect_list_convert _((void *)); static rpt_value_ty * pconf_trojan_horse_suspect_list_convert(that) void *that; { pconf_trojan_horse_suspect_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pconf_trojan_horse_suspect_list *)that; if (!this) return 0; trace(("pconf_trojan_horse_suspect_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 pconf_trojan_horse_suspect_list_type = { "pconf_trojan_horse_suspect_list", pconf_trojan_horse_suspect_list_alloc, pconf_trojan_horse_suspect_list_free, 0, /* enum_parse */ pconf_trojan_horse_suspect_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pconf_trojan_horse_suspect_list_convert, generic_struct_is_set, }; void pconf_project_specific_write(fp, name, this) output_ty *fp; char *name; pconf_project_specific this; { if (!this) return; trace(("pconf_project_specific_write(name = \"%s\", this = %08lX)\n{\n"/*}*/, name, (long)this)); assert(((pconf_project_specific)this)->reference_count > 0); trace(("rc = %d;\n", ((pconf_project_specific)this)->reference_count)); if (name) { output_fputs(fp, name); output_fputs(fp, " =\n"); } output_fputs(fp, "{\n"/*}*/); string_write(fp, "name", this->name); string_write(fp, "value", this->value); output_fputs(fp, /*{*/"}"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *pconf_project_specific_alloc _((void)); static void * pconf_project_specific_alloc() { pconf_project_specific this; trace(("pconf_project_specific_alloc()\n{\n"/*}*/)); this = mem_alloc(sizeof(struct pconf_project_specific)); this->reference_count = 1; this->mask = 0; this->name = 0; this->value = 0; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } pconf_project_specific pconf_project_specific_copy(this) pconf_project_specific this; { trace(("pconf_project_specific_copy()\n{\n"/*}*/)); this->reference_count++; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } static void pconf_project_specific_free _((void *)); static void pconf_project_specific_free(that) void *that; { pconf_project_specific this = that; if (!this) return; this->reference_count--; assert(this->reference_count >= 0); if (this->reference_count > 0) return; trace(("pconf_project_specific_free(this = %08lX)\n{\n"/*}*/, (long)this)); str_free(this->name); str_free(this->value); mem_free(this); trace((/*{*/"}\n")); } static type_table_ty pconf_project_specific_table[] = { { "name", offsetof(struct pconf_project_specific, name), &string_type, pconf_project_specific_name_mask, }, { "value", offsetof(struct pconf_project_specific, value), &string_type, pconf_project_specific_value_mask, }, }; static void *pconf_project_specific_parse _((void *, string_ty *, type_ty **, unsigned long *)); static void * pconf_project_specific_parse(this, name, type_pp, mask_p) void *this; string_ty *name; type_ty **type_pp; unsigned long *mask_p; { void *addr; trace(("pconf_project_specific_parse(this = %08lX, name = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)name, (long)type_pp)); assert(((pconf_project_specific)this)->reference_count > 0); assert(sizeof(pconf_project_specific) == sizeof(generic_struct_ty *)); addr = generic_struct_parse ( this, name, type_pp, mask_p, pconf_project_specific_table, SIZEOF(pconf_project_specific_table) ); trace((/*{*/"return %08lX;\n}\n", (long)addr)); return addr; } static string_ty *pconf_project_specific_fuzzy _((string_ty *)); static string_ty * pconf_project_specific_fuzzy(name) string_ty *name; { string_ty *result; trace(("pconf_project_specific_fuzzy(name = %08lX)\n{\n"/*}*/, (long)name)); result = generic_struct_fuzzy ( name, pconf_project_specific_table, SIZEOF(pconf_project_specific_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static struct rpt_value_ty *pconf_project_specific_convert _((void *)); static struct rpt_value_ty * pconf_project_specific_convert(this) void *this; { struct rpt_value_ty *result; trace(("pconf_project_specific_convert(name = %08lX)\n{\n"/*}*/, (long)this)); assert(((pconf_project_specific)this)->reference_count > 0); result = generic_struct_convert ( this, pconf_project_specific_table, SIZEOF(pconf_project_specific_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } type_ty pconf_project_specific_type = { "pconf_project_specific", pconf_project_specific_alloc, pconf_project_specific_free, 0, /* enum_parse */ 0, /* list_parse */ pconf_project_specific_parse, pconf_project_specific_fuzzy, pconf_project_specific_convert, generic_struct_is_set, }; void pconf_project_specific_list_write(fp, name, this) output_ty *fp; char *name; pconf_project_specific_list this; { size_t j; if (!this) return; trace(("pconf_project_specific_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) { pconf_project_specific_write(fp, (char *)0, this->list[j]); output_fputs(fp, ",\n"); } output_fputs(fp, /*[*/"]"); if (name) output_fputs(fp, ";\n"); trace((/*{*/"}\n")); } static void *pconf_project_specific_list_alloc _((void)); static void * pconf_project_specific_list_alloc() { pconf_project_specific_list result; trace(("pconf_project_specific_list_alloc()\n{\n"/*}*/)); result = mem_alloc(sizeof(struct pconf_project_specific_list)); result->list = 0; result->length = 0; result->maximum = 0; trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static void pconf_project_specific_list_free _((void *)); static void pconf_project_specific_list_free(that) void *that; { pconf_project_specific_list this = that; size_t j; if (!this) return; trace(("pconf_project_specific_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) pconf_project_specific_free(this->list[j]); if (this->list) mem_free(this->list); mem_free(this); trace((/*{*/"}\n")); } static void *pconf_project_specific_list_parse _((void *, type_ty **)); static void * pconf_project_specific_list_parse(that, type_pp) void *that; type_ty **type_pp; { pconf_project_specific_list this = that; void *addr; trace(("pconf_project_specific_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 = &pconf_project_specific_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 *pconf_project_specific_list_convert _((void *)); static rpt_value_ty * pconf_project_specific_list_convert(that) void *that; { pconf_project_specific_list this; rpt_value_ty *result; size_t j; rpt_value_ty *vp; this = *(pconf_project_specific_list *)that; if (!this) return 0; trace(("pconf_project_specific_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 = pconf_project_specific_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 pconf_project_specific_list_type = { "pconf_project_specific_list", pconf_project_specific_list_alloc, pconf_project_specific_list_free, 0, /* enum_parse */ pconf_project_specific_list_parse, 0, /* struct_parse */ 0, /* fuzzy */ pconf_project_specific_list_convert, generic_struct_is_set, }; void pconf_write(fp, this) output_ty *fp; pconf this; { if (!this) return; trace(("pconf_write(this = %08lX)\n{\n"/*}*/, this)); assert(((pconf)this)->reference_count > 0); trace(("rc = %d;\n", ((pconf)this)->reference_count)); string_write(fp, "build_command", this->build_command); string_write(fp, "development_build_command", this->development_build_command); string_write(fp, "build_time_adjust_notify_command", this->build_time_adjust_notify_command); boolean_write(fp, "build_covers_all_architectures", this->build_covers_all_architectures); string_write(fp, "change_file_command", this->change_file_command); string_write(fp, "change_file_undo_command", this->change_file_undo_command); string_write(fp, "project_file_command", this->project_file_command); string_write(fp, "develop_begin_command", this->develop_begin_command); string_write(fp, "integrate_begin_command", this->integrate_begin_command); boolean_write(fp, "link_integration_directory", this->link_integration_directory); pconf_integrate_begin_exceptions_list_write(fp, "integrate_begin_exceptions", this->integrate_begin_exceptions); boolean_write(fp, "create_symlinks_before_build", this->create_symlinks_before_build); boolean_write(fp, "create_symlinks_before_integration_build", this->create_symlinks_before_integration_build); boolean_write(fp, "remove_symlinks_after_build", this->remove_symlinks_after_build); boolean_write(fp, "remove_symlinks_after_integration_build", this->remove_symlinks_after_integration_build); pconf_symlink_exceptions_list_write(fp, "symlink_exceptions", this->symlink_exceptions); string_write(fp, "history_create_command", this->history_create_command); string_write(fp, "history_get_command", this->history_get_command); string_write(fp, "history_put_command", this->history_put_command); string_write(fp, "history_query_command", this->history_query_command); pconf_history_put_trashes_file_write(fp, "history_put_trashes_file", this->history_put_trashes_file); pconf_history_content_limitation_write(fp, "history_content_limitation", this->history_content_limitation); string_write(fp, "diff_command", this->diff_command); string_write(fp, "diff3_command", this->diff3_command); string_write(fp, "merge_command", this->merge_command); string_write(fp, "patch_diff_command", this->patch_diff_command); string_write(fp, "test_command", this->test_command); string_write(fp, "development_test_command", this->development_test_command); string_write(fp, "batch_test_command", this->batch_test_command); pconf_architecture_list_write(fp, "architecture", this->architecture); pconf_file_template_list_write(fp, "file_template", this->file_template); pconf_whiteout_template_list_write(fp, "whiteout_template", this->whiteout_template); integer_write(fp, "maximum_filename_length", this->maximum_filename_length); boolean_write(fp, "posix_filename_charset", this->posix_filename_charset); boolean_write(fp, "dos_filename_required", this->dos_filename_required); boolean_write(fp, "windows_filename_required", this->windows_filename_required); boolean_write(fp, "shell_safe_filenames", this->shell_safe_filenames); pconf_filename_pattern_accept_list_write(fp, "filename_pattern_accept", this->filename_pattern_accept); pconf_filename_pattern_reject_list_write(fp, "filename_pattern_reject", this->filename_pattern_reject); string_write(fp, "new_test_filename", this->new_test_filename); string_write(fp, "development_directory_template", this->development_directory_template); string_write(fp, "metrics_filename_pattern", this->metrics_filename_pattern); pconf_trojan_horse_suspect_list_write(fp, "trojan_horse_suspect", this->trojan_horse_suspect); pconf_project_specific_list_write(fp, "project_specific", this->project_specific); trace((/*{*/"}\n")); } static void *pconf_alloc _((void)); static void * pconf_alloc() { pconf this; trace(("pconf_alloc()\n{\n"/*}*/)); this = mem_alloc(sizeof(struct pconf)); this->reference_count = 1; this->mask = 0; this->build_command = 0; this->development_build_command = 0; this->build_time_adjust_notify_command = 0; this->build_covers_all_architectures = 0; this->change_file_command = 0; this->change_file_undo_command = 0; this->project_file_command = 0; this->develop_begin_command = 0; this->integrate_begin_command = 0; this->link_integration_directory = 0; this->integrate_begin_exceptions = 0; this->create_symlinks_before_build = 0; this->create_symlinks_before_integration_build = 0; this->remove_symlinks_after_build = 0; this->remove_symlinks_after_integration_build = 0; this->symlink_exceptions = 0; this->history_create_command = 0; this->history_get_command = 0; this->history_put_command = 0; this->history_query_command = 0; this->history_put_trashes_file = 0; this->history_content_limitation = 0; this->diff_command = 0; this->diff3_command = 0; this->merge_command = 0; this->patch_diff_command = 0; this->test_command = 0; this->development_test_command = 0; this->batch_test_command = 0; this->architecture = 0; this->file_template = 0; this->whiteout_template = 0; this->maximum_filename_length = 0; this->posix_filename_charset = 0; this->dos_filename_required = 0; this->windows_filename_required = 0; this->shell_safe_filenames = 0; this->filename_pattern_accept = 0; this->filename_pattern_reject = 0; this->new_test_filename = 0; this->development_directory_template = 0; this->metrics_filename_pattern = 0; this->trojan_horse_suspect = 0; this->project_specific = 0; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } pconf pconf_copy(this) pconf this; { trace(("pconf_copy()\n{\n"/*}*/)); this->reference_count++; trace(("return %08lX;\n", (long)this)); trace((/*{*/"}\n")); return this; } static void pconf_free _((void *)); static void pconf_free(that) void *that; { pconf this = that; if (!this) return; this->reference_count--; assert(this->reference_count >= 0); if (this->reference_count > 0) return; trace(("pconf_free(this = %08lX)\n{\n"/*}*/, (long)this)); str_free(this->build_command); str_free(this->development_build_command); str_free(this->build_time_adjust_notify_command); str_free(this->change_file_command); str_free(this->change_file_undo_command); str_free(this->project_file_command); str_free(this->develop_begin_command); str_free(this->integrate_begin_command); pconf_integrate_begin_exceptions_list_free(this->integrate_begin_exceptions); pconf_symlink_exceptions_list_free(this->symlink_exceptions); str_free(this->history_create_command); str_free(this->history_get_command); str_free(this->history_put_command); str_free(this->history_query_command); str_free(this->diff_command); str_free(this->diff3_command); str_free(this->merge_command); str_free(this->patch_diff_command); str_free(this->test_command); str_free(this->development_test_command); str_free(this->batch_test_command); pconf_architecture_list_free(this->architecture); pconf_file_template_list_free(this->file_template); pconf_whiteout_template_list_free(this->whiteout_template); pconf_filename_pattern_accept_list_free(this->filename_pattern_accept); pconf_filename_pattern_reject_list_free(this->filename_pattern_reject); str_free(this->new_test_filename); str_free(this->development_directory_template); str_free(this->metrics_filename_pattern); pconf_trojan_horse_suspect_list_free(this->trojan_horse_suspect); pconf_project_specific_list_free(this->project_specific); mem_free(this); trace((/*{*/"}\n")); } static type_table_ty pconf_table[] = { { "build_command", offsetof(struct pconf, build_command), &string_type, pconf_build_command_mask, }, { "development_build_command", offsetof(struct pconf, development_build_command), &string_type, pconf_development_build_command_mask, }, { "build_time_adjust_notify_command", offsetof(struct pconf, build_time_adjust_notify_command), &string_type, pconf_build_time_adjust_notify_command_mask, }, { "build_covers_all_architectures", offsetof(struct pconf, build_covers_all_architectures), &boolean_type, pconf_build_covers_all_architectures_mask, }, { "change_file_command", offsetof(struct pconf, change_file_command), &string_type, pconf_change_file_command_mask, }, { "change_file_undo_command", offsetof(struct pconf, change_file_undo_command), &string_type, pconf_change_file_undo_command_mask, }, { "project_file_command", offsetof(struct pconf, project_file_command), &string_type, pconf_project_file_command_mask, }, { "develop_begin_command", offsetof(struct pconf, develop_begin_command), &string_type, pconf_develop_begin_command_mask, }, { "integrate_begin_command", offsetof(struct pconf, integrate_begin_command), &string_type, pconf_integrate_begin_command_mask, }, { "link_integration_directory", offsetof(struct pconf, link_integration_directory), &boolean_type, pconf_link_integration_directory_mask, }, { "integrate_begin_exceptions", offsetof(struct pconf, integrate_begin_exceptions), &pconf_integrate_begin_exceptions_list_type, pconf_integrate_begin_exceptions_mask, }, { "create_symlinks_before_build", offsetof(struct pconf, create_symlinks_before_build), &boolean_type, pconf_create_symlinks_before_build_mask, }, { "create_symlinks_before_integration_build", offsetof(struct pconf, create_symlinks_before_integration_build), &boolean_type, pconf_create_symlinks_before_integration_build_mask, }, { "remove_symlinks_after_build", offsetof(struct pconf, remove_symlinks_after_build), &boolean_type, pconf_remove_symlinks_after_build_mask, }, { "remove_symlinks_after_integration_build", offsetof(struct pconf, remove_symlinks_after_integration_build), &boolean_type, pconf_remove_symlinks_after_integration_build_mask, }, { "symlink_exceptions", offsetof(struct pconf, symlink_exceptions), &pconf_symlink_exceptions_list_type, pconf_symlink_exceptions_mask, }, { "history_create_command", offsetof(struct pconf, history_create_command), &string_type, pconf_history_create_command_mask, }, { "history_get_command", offsetof(struct pconf, history_get_command), &string_type, pconf_history_get_command_mask, }, { "history_put_command", offsetof(struct pconf, history_put_command), &string_type, pconf_history_put_command_mask, }, { "history_query_command", offsetof(struct pconf, history_query_command), &string_type, pconf_history_query_command_mask, }, { "history_put_trashes_file", offsetof(struct pconf, history_put_trashes_file), &pconf_history_put_trashes_file_type, pconf_history_put_trashes_file_mask, }, { "history_content_limitation", offsetof(struct pconf, history_content_limitation), &pconf_history_content_limitation_type, pconf_history_content_limitation_mask, }, { "diff_command", offsetof(struct pconf, diff_command), &string_type, pconf_diff_command_mask, }, { "diff3_command", offsetof(struct pconf, diff3_command), &string_type, pconf_diff3_command_mask, }, { "merge_command", offsetof(struct pconf, merge_command), &string_type, pconf_merge_command_mask, }, { "patch_diff_command", offsetof(struct pconf, patch_diff_command), &string_type, pconf_patch_diff_command_mask, }, { "test_command", offsetof(struct pconf, test_command), &string_type, pconf_test_command_mask, }, { "development_test_command", offsetof(struct pconf, development_test_command), &string_type, pconf_development_test_command_mask, }, { "batch_test_command", offsetof(struct pconf, batch_test_command), &string_type, pconf_batch_test_command_mask, }, { "architecture", offsetof(struct pconf, architecture), &pconf_architecture_list_type, pconf_architecture_mask, }, { "file_template", offsetof(struct pconf, file_template), &pconf_file_template_list_type, pconf_file_template_mask, }, { "whiteout_template", offsetof(struct pconf, whiteout_template), &pconf_whiteout_template_list_type, pconf_whiteout_template_mask, }, { "maximum_filename_length", offsetof(struct pconf, maximum_filename_length), &integer_type, pconf_maximum_filename_length_mask, }, { "posix_filename_charset", offsetof(struct pconf, posix_filename_charset), &boolean_type, pconf_posix_filename_charset_mask, }, { "dos_filename_required", offsetof(struct pconf, dos_filename_required), &boolean_type, pconf_dos_filename_required_mask, }, { "windows_filename_required", offsetof(struct pconf, windows_filename_required), &boolean_type, pconf_windows_filename_required_mask, }, { "shell_safe_filenames", offsetof(struct pconf, shell_safe_filenames), &boolean_type, pconf_shell_safe_filenames_mask, }, { "filename_pattern_accept", offsetof(struct pconf, filename_pattern_accept), &pconf_filename_pattern_accept_list_type, pconf_filename_pattern_accept_mask, }, { "filename_pattern_reject", offsetof(struct pconf, filename_pattern_reject), &pconf_filename_pattern_reject_list_type, pconf_filename_pattern_reject_mask, }, { "new_test_filename", offsetof(struct pconf, new_test_filename), &string_type, pconf_new_test_filename_mask, }, { "development_directory_template", offsetof(struct pconf, development_directory_template), &string_type, pconf_development_directory_template_mask, }, { "metrics_filename_pattern", offsetof(struct pconf, metrics_filename_pattern), &string_type, pconf_metrics_filename_pattern_mask, }, { "trojan_horse_suspect", offsetof(struct pconf, trojan_horse_suspect), &pconf_trojan_horse_suspect_list_type, pconf_trojan_horse_suspect_mask, }, { "project_specific", offsetof(struct pconf, project_specific), &pconf_project_specific_list_type, pconf_project_specific_mask, }, }; static void *pconf_parse _((void *, string_ty *, type_ty **, unsigned long *)); static void * pconf_parse(this, name, type_pp, mask_p) void *this; string_ty *name; type_ty **type_pp; unsigned long *mask_p; { void *addr; trace(("pconf_parse(this = %08lX, name = %08lX, type_pp = %08lX)\n{\n"/*}*/, (long)this, (long)name, (long)type_pp)); assert(((pconf)this)->reference_count > 0); assert(sizeof(pconf) == sizeof(generic_struct_ty *)); addr = generic_struct_parse ( this, name, type_pp, mask_p, pconf_table, SIZEOF(pconf_table) ); trace((/*{*/"return %08lX;\n}\n", (long)addr)); return addr; } static string_ty *pconf_fuzzy _((string_ty *)); static string_ty * pconf_fuzzy(name) string_ty *name; { string_ty *result; trace(("pconf_fuzzy(name = %08lX)\n{\n"/*}*/, (long)name)); result = generic_struct_fuzzy ( name, pconf_table, SIZEOF(pconf_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } static struct rpt_value_ty *pconf_convert _((void *)); static struct rpt_value_ty * pconf_convert(this) void *this; { struct rpt_value_ty *result; trace(("pconf_convert(name = %08lX)\n{\n"/*}*/, (long)this)); assert(((pconf)this)->reference_count > 0); result = generic_struct_convert ( this, pconf_table, SIZEOF(pconf_table) ); trace(("return %08lX;\n", (long)result)); trace((/*{*/"}\n")); return result; } type_ty pconf_type = { "pconf", pconf_alloc, pconf_free, 0, /* enum_parse */ 0, /* list_parse */ pconf_parse, pconf_fuzzy, pconf_convert, generic_struct_is_set, }; pconf pconf_read_file(filename) string_ty *filename; { pconf result; trace(("pconf_read_file(filename = \"%s\")\n{\n"/*}*/, (filename ? filename->str_text : ""))); os_become_must_be_active(); result = parse(filename, &pconf_type); trace(("return %08lX;\n", result)); trace((/*{*/"}\n")); return result; } void pconf_write_file(filename, value, compress) string_ty *filename; pconf value; int compress; { output_ty *fp; trace(("pconf_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); pconf_write(fp, value); type_enum_option_clear(); output_delete(fp); trace((/*{*/"}\n")); } void pconf__rpt_init() { trace(("pconf__rpt_init()\n{\n"/*}*/)); generic_enum__init(pconf_history_put_trashes_file_s, SIZEOF(pconf_history_put_trashes_file_s)); generic_enum__init(pconf_history_content_limitation_s, SIZEOF(pconf_history_content_limitation_s)); generic_enum__init(pconf_architecture_mode_s, SIZEOF(pconf_architecture_mode_s)); trace((/*{*/"}\n")); }