Browse Source

allow comments inside of command files

h_vogt 15 years ago
parent
commit
6afe4230f6
  1. 6
      ChangeLog
  2. 14
      src/frontend/inp.c

6
ChangeLog

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

14
src/frontend/inp.c

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