Feature #1967 ยป 0029-ruleload.c-Use-secfile_entry_ignore_by_path.patch
| server/ruleset/ruleload.c | ||
|---|---|---|
|
const char *filename = secfile_name(file);
|
||
|
bool ok = TRUE;
|
||
|
/* section: datafile */
|
||
|
/* Section: datafile */
|
||
|
compat->version = rscompat_check_capabilities(file, filename, compat);
|
||
|
if (compat->version <= 0) {
|
||
|
return FALSE;
|
||
|
}
|
||
|
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
|
||
|
(void) secfile_entry_by_path(file, "datafile.ruledit"); /* unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.description"); /* Unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.ruledit"); /* Unused */
|
||
|
sec = secfile_sections_by_name_prefix(file, ACHIEVEMENT_SECTION_PREFIX);
|
||
|
nval = (NULL != sec ? section_list_size(sec) : 0);
|
||
| ... | ... | |
|
return FALSE;
|
||
|
}
|
||
|
(void) secfile_entry_by_path(file, "datafile.description"); /* Unused */
|
||
|
(void) secfile_entry_by_path(file, "datafile.ruledit"); /* Unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.description"); /* Unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.ruledit"); /* Unused */
|
||
|
return ok;
|
||
|
}
|
||
| ... | ... | |
|
return FALSE;
|
||
|
}
|
||
|
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
|
||
|
(void) secfile_entry_by_path(file, "datafile.ruledit"); /* unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.description"); /* Unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.ruledit"); /* Unused */
|
||
|
/* User tech flag names */
|
||
|
for (i = 0; (flag = secfile_lookup_str_default(file, NULL, "control.flags%d.name", i)) ;
|
||
| ... | ... | |
|
return FALSE;
|
||
|
}
|
||
|
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
|
||
|
(void) secfile_entry_by_path(file, "datafile.ruledit"); /* unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.description"); /* Unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.ruledit"); /* Unused */
|
||
|
/* User unit flag names */
|
||
|
for (i = 0; (flag = secfile_lookup_str_default(file, NULL, "control.flags%d.name", i)) ;
|
||
| ... | ... | |
|
return FALSE;
|
||
|
}
|
||
|
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
|
||
|
(void) secfile_entry_by_path(file, "datafile.ruledit"); /* unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.description"); /* Unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.ruledit"); /* Unused */
|
||
|
/* The names: */
|
||
|
sec = secfile_sections_by_name_prefix(file, BUILDING_SECTION_PREFIX);
|
||
| ... | ... | |
|
return FALSE;
|
||
|
}
|
||
|
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
|
||
|
(void) secfile_entry_by_path(file, "datafile.ruledit"); /* unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.description"); /* Unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.ruledit"); /* Unused */
|
||
|
/* User terrain flag names */
|
||
|
for (i = 0; (flag = secfile_lookup_str_default(file, NULL, "control.flags%d.name", i)) ;
|
||
| ... | ... | |
|
return FALSE;
|
||
|
}
|
||
|
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
|
||
|
(void) secfile_entry_by_path(file, "datafile.ruledit"); /* unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.description"); /* Unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.ruledit"); /* Unused */
|
||
|
sec = secfile_sections_by_name_prefix(file, GOVERNMENT_SECTION_PREFIX);
|
||
|
if (NULL == sec || 0 == (nval = section_list_size(sec))) {
|
||
| ... | ... | |
|
return FALSE;
|
||
|
}
|
||
|
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
|
||
|
(void) secfile_entry_by_path(file, "datafile.ruledit"); /* unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.description"); /* Unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.ruledit"); /* Unused */
|
||
|
sec = secfile_sections_by_name_prefix(file, NATION_SECTION_PREFIX);
|
||
|
if (NULL == sec) {
|
||
| ... | ... | |
|
return FALSE;
|
||
|
}
|
||
|
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
|
||
|
(void) secfile_entry_by_path(file, "datafile.ruledit"); /* unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.description"); /* Unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.ruledit"); /* Unused */
|
||
|
sec = secfile_sections_by_name_prefix(file, STYLE_SECTION_PREFIX);
|
||
|
if (NULL == sec) {
|
||
| ... | ... | |
|
return FALSE;
|
||
|
}
|
||
|
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
|
||
|
(void) secfile_entry_by_path(file, "datafile.ruledit"); /* unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.description"); /* Unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.ruledit"); /* Unused */
|
||
|
/* Specialist options */
|
||
|
sec = secfile_sections_by_name_prefix(file, SPECIALIST_SECTION_PREFIX);
|
||
| ... | ... | |
|
return FALSE;
|
||
|
}
|
||
|
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
|
||
|
(void) secfile_entry_by_path(file, "datafile.ruledit"); /* unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.description"); /* Unused */
|
||
|
secfile_entry_ignore_by_path(file, "datafile.ruledit"); /* Unused */
|
||
|
sec = secfile_sections_by_name_prefix(file, UEFF_SECTION_PREFIX);
|
||