enable returning inp_spsource() with an error code
This commit is contained in:
parent
12bc3a55b6
commit
5c7cf493a3
|
|
@ -434,7 +434,7 @@ eval_seed_opt(struct card *deck)
|
|||
* filter out the following cards: .save, .width, .four, .print, and
|
||||
* .plot, to perform after the run is over.
|
||||
* Then, we run dodeck, which parses up the deck. */
|
||||
void
|
||||
int
|
||||
inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
|
||||
/* arguments:
|
||||
* *fp = pointer to the input file
|
||||
|
|
@ -532,7 +532,7 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
|
|||
if (!deck) {
|
||||
if (!intfile && fp)
|
||||
fclose(fp);
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* files starting with *ng_script are user supplied command files */
|
||||
|
|
@ -738,7 +738,7 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
|
|||
line_free(realdeck, TRUE);
|
||||
line_free(deck->actualLine, TRUE);
|
||||
tfree(tt);
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Now handle translation of spice2c6 POLYs. */
|
||||
|
|
@ -977,6 +977,8 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
|
|||
cp_curerr = lasterr;
|
||||
|
||||
tfree(tt);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ extern bool gr_circular;
|
|||
void inp_dodeck(struct card *deck, char *tt, wordlist *end, bool reuse,
|
||||
struct card *options, char *filename);
|
||||
extern void inp_source(const char *file);
|
||||
void inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile);
|
||||
int inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile);
|
||||
extern void inp_casefix(char *string);
|
||||
extern void inp_list(FILE *file, struct card *deck, struct card *extras, int type);
|
||||
extern struct card *inp_readall(FILE *fp, char *dir_name, bool comfile, bool intfile, bool *expr_w_temper);
|
||||
|
|
|
|||
Loading…
Reference in New Issue