Browse Source

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

pre-master-46
h_vogt 10 years ago
committed by rlar
parent
commit
81e1e6fa32
  1. 4
      src/frontend/inp.c
  2. 8
      src/frontend/inpcom.c

4
src/frontend/inp.c

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

8
src/frontend/inpcom.c

@ -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);

Loading…
Cancel
Save