66 const char *path, ...)
70 const
char *path, ...)
105 struct uni_name *puni_name;
110 for (i = 0; i < pgwl->unbuilt.length; i++) {
113 puni_name = pgwl->unbuilt.entries + i;
115 if (
source.kind == universals_n_invalid()) {
131 for (i = 0; i < pgwl->unbuilt.length; i++) {
132 puni_name = pgwl->unbuilt.entries + i;
133 free(puni_name->kind);
134 free(puni_name->name);
150 struct uni_name *puni_name;
159 puni_name = pgwl->unbuilt.entries + i;
190 static int last_id = 0;
193 pgwl->
id = ++last_id;
224 struct uni_name *puni_name;
229 free(puni_name->kind);
230 free(puni_name->name);
301 if (pgwl->id ==
id) {
334 const char *path, ...)
361 for (i = 0; i <
length; i++) {
370 kind = universals_n_name(is_unit ? VUT_UTYPE : VUT_IMPROVEMENT);
414 const char *path, ...)
431 "%s.wl_length", path_str);
434 "%s.wl_kind%d", path_str, i);
436 "%s.wl_value%d", path_str, i);
441 "%s.wl_length", path_str);
445 "%s.wl_kind%d", path_str, i);
448 "%s.wl_value%d", path_str, i);
455 while (i < fill_until) {
473 switch (pgwl->status) {
475 max_length =
MAX(max_length, pgwl->unbuilt.length);
485 "worklists.worklist%d", i++);
enum client_states client_state(void)
struct global_worklist * global_worklist_by_id(int id)
static struct global_worklist * global_worklist_alloc(enum global_worklist_status type)
bool global_worklist_set(struct global_worklist *pgwl, const struct worklist *pwl)
const char * global_worklist_name(const struct global_worklist *pgwl)
int global_worklist_id(const struct global_worklist *pgwl)
int global_worklists_number(void)
bool global_worklist_is_valid(const struct global_worklist *pgwl)
void global_worklist_destroy(struct global_worklist *pgwl)
static bool static void global_worklist_save(const struct global_worklist *pgwl, struct section_file *file, int fill_until, const char *path,...) fc__attribute((__format__(__printf__
void global_worklists_build(void)
static bool global_worklist_load(struct section_file *file, const char *path,...) fc__attribute((__format__(__printf__
const struct worklist * global_worklist_get(const struct global_worklist *pgwl)
static bool static void void global_worklists_init(void)
void global_worklists_load(struct section_file *file)
void global_worklists_free(void)
struct global_worklist * global_worklist_new(const char *name)
void global_worklists_unbuild(void)
void global_worklists_save(struct section_file *file)
void global_worklist_set_name(struct global_worklist *pgwl, const char *name)
#define global_worklists_iterate_all_end
#define global_worklists_iterate_all(pgwl)
#define global_worklists_iterate(pgwl)
#define global_worklists_iterate_end
static GtkWidget * source
#define fc_assert_ret(condition)
#define fc_assert_ret_val(condition, val)
#define fc_calloc(n, esz)
bool secfile_lookup_bool_default(const struct section_file *secfile, bool def, const char *path,...)
int secfile_lookup_int_default(const struct section_file *secfile, int def, const char *path,...)
const char * secfile_lookup_str_default(const struct section_file *secfile, const char *def, const char *path,...)
#define secfile_insert_int(secfile, value, path,...)
#define secfile_insert_str(secfile, string, path,...)
const char * universal_rule_name(const struct universal *psource)
const char * universal_type_rule_name(const struct universal *psource)
struct universal universal_by_rule_name(const char *kind, const char *value)
struct global_worklist_list * worklists
enum global_worklist_status status
struct global_worklist::@129::@131::uni_name entries[MAX_LEN_WORKLIST]
struct global_worklist::@129::@131 unbuilt
struct universal entries[MAX_LEN_WORKLIST]
int fc_vsnprintf(char *str, size_t n, const char *format, va_list ap)
#define sz_strlcpy(dest, src)
void worklist_copy(struct worklist *dst, const struct worklist *src)
void worklist_init(struct worklist *pwl)
bool worklist_append(struct worklist *pwl, const struct universal *prod)
int worklist_length(const struct worklist *pwl)