};
static const lc_opt_table_entry_t options[] = {
- LC_OPT_ENT_ENUM_MASK("dump", "dump ifg before, after or after each cloud", &dump_var),
- LC_OPT_ENT_INT ("iter", "iterations for subtree nodes (standard: 3)", &subtree_iter),
+ LC_OPT_ENT_ENUM_MASK("dump", "dump ifg cloud", &dump_var),
+ LC_OPT_ENT_INT ("iter", "iterations for subtree nodes", &subtree_iter),
LC_OPT_ENT_DBL ("cf", "factor of constraint importance (between 0.0 and 1.0)", &constr_factor),
- LC_OPT_ENT_INT ("max", "maximum recursion depth (default 20)", &max_depth),
+ LC_OPT_ENT_INT ("max", "maximum recursion depth", &max_depth),
{ NULL }
};
static int cmp_clouds_gt(const void *a, const void *b)
{
- const co2_cloud_t **p = a;
- const co2_cloud_t **q = b;
+ const co2_cloud_t * const *p = a;
+ const co2_cloud_t * const *q = b;
double c = CLOUD_WEIGHT(*p);
double d = CLOUD_WEIGHT(*q);
return QSORT_CMP(d, c);
co2_cloud_irn_t *ci = get_co2_cloud_irn(env, a->irn);
if(!ci->cloud) {
- co2_cloud_t *cloud = new_cloud(env, a);
+ new_cloud(env, a);
n_clouds++;
}
}
FILE *f;
ir_snprintf(buf, sizeof(buf), "ifg_%F_%s_cloud_%d.dot", env->co->irg, env->co->cls->name, i);
- if(f = fopen(buf, "wt")) {
+ f = fopen(buf, "wt");
+ if(f != NULL) {
be_ifg_dump_dot(env->co->cenv->ifg, env->co->irg, f, &ifg_dot_cb, env);
fclose(f);
}
peri = 2;
if(cci->cloud && cci->cloud->mst_root)
- snprintf(buf, sizeof(buf), "%+F", cci->cloud->mst_root->inh.irn);
+ ir_snprintf(buf, sizeof(buf), "%+F", cci->cloud->mst_root->inh.irn);
}
ir_fprintf(f, "label=\"%+F%s\" style=filled peripheries=%d color=%s shape=%s", irn, buf, peri,