allow comments inside of command files
This commit is contained in:
parent
d768003cb4
commit
6afe4230f6
|
|
@ -1,9 +1,13 @@
|
|||
2011-07-17 Holger Vogt
|
||||
* inp.c: allow comment lines inside of
|
||||
command files
|
||||
|
||||
2011-07-17 Robert Larice
|
||||
* src/include/hash.h ,
|
||||
* src/misc/hash.c :
|
||||
nghash cleanup
|
||||
|
||||
2011-07-18 Holger Vogt
|
||||
2011-07-17 Holger Vogt
|
||||
* cmath1.c, cmath1.h, cmath2.c, cmath2.h, parse.c, fteext.h:
|
||||
new complex functions sinh, cosh, tanh
|
||||
* evaluate.c: remove redundant call to cmath2.h
|
||||
|
|
|
|||
|
|
@ -401,12 +401,20 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
|||
}
|
||||
temperature = strdup(s);
|
||||
}
|
||||
/* Ignore comment lines, but not lines begining with '*#' */
|
||||
/* Ignore comment lines, but not lines begining with '*#',
|
||||
but remove them, if they are in a .control ... .endc section */
|
||||
s = dd->li_line;
|
||||
while(isspace(*s)) s++;
|
||||
if ( (*s == '*') && ( (s != dd->li_line) || (s[1] != '#'))) {
|
||||
ld = dd;
|
||||
continue;
|
||||
if (commands) {
|
||||
/* Remove comment lines in control sections, so they don't
|
||||
* get considered as circuits. */
|
||||
ld->li_next = dd->li_next;
|
||||
line_free(dd,FALSE);
|
||||
continue;
|
||||
}
|
||||
ld = dd;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Put the first token from line into s */
|
||||
|
|
|
|||
Loading…
Reference in New Issue