62 if (fullpath.isEmpty()) {
67 if (comment_file ==
nullptr) {
71 #define comment_load(target, comment_file, comment_path) \
73 const char *comment; \
75 if ((comment = secfile_lookup_str(comment_file, comment_path))) { \
76 target = fc_strdup(comment); \
78 secfile_destroy(comment_file); \
87 "typedoc.tech_classes");
101 "typedoc.citystyles");
103 "typedoc.musicstyles");
106 "typedoc.disasters");
108 "typedoc.achievements");
112 "typedoc.specialists");
115 "typedoc.nationgroups");
117 "typedoc.nationsets");
137 if (comment ==
nullptr) {
138 qCritical(
"Comment for %s missing.",
name);
struct section_file * secfile_load(const QString &filename, bool allow_duplicates)
Create a section file from a file.
void secfile_destroy(struct section_file *secfile)
Free a section file.
void secfile_check_unused(const struct section_file *secfile)
Print log messages for any entries in the file which have not been looked up – ie,...
struct section * secfile_insert_long_comment(struct section_file *secfile, const char *comment)
Insert a long comment entry.
const QStringList & get_data_dirs()
Returns a list of data directory paths, in the order in which they should be searched.
QString fileinfoname(const QStringList &dirs, const QString &filename)
Returns a filename to access the specified file from a directory by searching all specified directori...