Browse Source

Add cm_cecit(). If the input file could not be opened, stop ngspice.

pre-master-46
Holger Vogt 2 years ago
parent
commit
10d7297798
  1. 1
      src/xspice/icm/analog/file_source/cfunc.mod
  2. 1
      src/xspice/icm/table/table2D/cfunc.mod
  3. 1
      src/xspice/icm/table/table3D/cfunc.mod

1
src/xspice/icm/analog/file_source/cfunc.mod

@ -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 */

1
src/xspice/icm/table/table2D/cfunc.mod

@ -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 */

1
src/xspice/icm/table/table3D/cfunc.mod

@ -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…
Cancel
Save