inp.c, inpcom.c, treat files starting with '*ng_script' as command files

This commit is contained in:
h_vogt 2016-05-29 00:19:10 +02:00 committed by rlar
parent 6535558f9e
commit 81e1e6fa32
2 changed files with 12 additions and 0 deletions

View File

@ -334,6 +334,10 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
return;
}
/* files starting with *ng_script are user supplied command files */
if (ciprefix("*ng_script", deck->li_line))
comfile = TRUE;
if (!comfile) {
/* Extract the .option lines from the deck into 'options',
and remove them from the deck. */

View File

@ -487,6 +487,10 @@ inp_readall(FILE *fp, char *dir_name, bool comfile, bool intfile)
rv = inp_read(fp, 0, dir_name, comfile, intfile);
cc = rv . cc;
/* files starting with *ng_script are user supplied command files */
if (cc && ciprefix("*ng_script", cc->li_line))
comfile = TRUE;
/* The following processing of an input file is not required for command files
like spinit or .spiceinit, so return command files here. */
@ -895,6 +899,10 @@ inp_read(FILE *fp, int call_depth, char *dir_name, bool comfile, bool intfile)
return rv;
}
/* files starting with *ng_script are user supplied command files */
if (call_depth == 0 && ciprefix("*ng_script", cc->li_line))
comfile = TRUE;
if (call_depth == 0 && !comfile) {
cc->li_next = xx_new_line(cc->li_next, copy(".global gnd"), 1, 0);