small fixes

This commit is contained in:
Vitor Santos Costa
2018-10-10 12:33:05 +01:00
parent 32266a8b98
commit cb1c73c973
13 changed files with 34 additions and 153 deletions

View File

@@ -811,7 +811,7 @@ static YAP_Bool p_cudd_print_with_names(void) {
DdManager *manager = (DdManager *)YAP_IntOfTerm(YAP_ARG1);
DdNode *n0 = (DdNode *)YAP_IntOfTerm(YAP_ARG2);
const char *s = YAP_AtomName(YAP_AtomOfTerm(YAP_ARG3));
char **namesp;
char ** namesp;
YAP_Term names = YAP_ARG4;
FILE *f;
YAP_Int len;
@@ -850,14 +850,14 @@ static YAP_Bool p_cudd_print_with_names(void) {
names = YAP_TailOfTerm(names);
namesp[i++] = f;
}
Cudd_DumpDot(manager, 1, &n0, namesp, NULL, f);
Cudd_DumpDot(manager, 1, &n0, (const char * const*)namesp, NULL, f);
if (f != stdout && f != stderr)
fclose(f);
while (i > 0) {
i--;
free((void *)namesp[i]);
}
free(namesp);
free((void *)namesp);
return TRUE;
}

View File

@@ -376,7 +376,7 @@ int simpleBDDtoDot(DdManager *manager, DdNode *bdd, char *filename) {
return ret;
}
int simpleNamedBDDtoDot(DdManager *manager, const namedvars varmap, DdNode *bdd, char *filename) {
int simpleNamedBDDtoDot(DdManager *manager, namedvars varmap, DdNode *bdd, char *filename) {
DdNode *f[1];
int ret;
FILE *fd;

View File

@@ -1293,7 +1293,8 @@ gradientpair CalcGradient(extmanager MyManager, DdNode *Current, int TargetVar,
char *TargetPattern, int type) {
DdNode *h, *l;
hisnode *Found;
const char *curnode = NULL, *dynvalue;
const char *curnode = NULL;
char *dynvalue;
gradientpair lowvalue, highvalue, tvalue;
double this_probability;
double *gradient;