Add cm_cecit(). If the input file could not be opened, stop ngspice.
This commit is contained in:
parent
19ebfb1887
commit
10d7297798
|
|
@ -233,6 +233,7 @@ void cm_filesource(ARGS) /* structure holding parms, inputs, outputs, etc.
|
||||||
if (!loc->state->fp) {
|
if (!loc->state->fp) {
|
||||||
cm_message_printf("cannot open file %s", PARAM(file));
|
cm_message_printf("cannot open file %s", PARAM(file));
|
||||||
loc->state->atend = 1;
|
loc->state->atend = 1;
|
||||||
|
cm_cexit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* read, preprocess and store the data */
|
/* read, preprocess and store the data */
|
||||||
|
|
|
||||||
|
|
@ -732,6 +732,7 @@ EXITPOINT:
|
||||||
free_local_data(loc);
|
free_local_data(loc);
|
||||||
loc = (Table2_Data_t *) NULL;
|
loc = (Table2_Data_t *) NULL;
|
||||||
}
|
}
|
||||||
|
cm_cexit(1);
|
||||||
}
|
}
|
||||||
return loc;
|
return loc;
|
||||||
} /* end of function init_local_data */
|
} /* end of function init_local_data */
|
||||||
|
|
|
||||||
|
|
@ -802,6 +802,7 @@ EXITPOINT:
|
||||||
free_local_data(loc);
|
free_local_data(loc);
|
||||||
loc = (Table3_Data_t *) NULL;
|
loc = (Table3_Data_t *) NULL;
|
||||||
}
|
}
|
||||||
|
cm_cexit(1);
|
||||||
}
|
}
|
||||||
return loc;
|
return loc;
|
||||||
} /* end of function init_local_data */
|
} /* end of function init_local_data */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue