diff --git a/ChangeLog b/ChangeLog index 67874cc50..172d1c391 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2011-12-27 Holger Vogt + * inpcom.c: warnings and error messages in .lib handling (bug no. 3111261) + 2011-12-26 Holger Vogt * xpressn.c * ptfuncs.c, inpptree.c, inpptree.h, spicelib/parser/inp.h diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 76d949ea5..7bd119a24 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -257,12 +257,13 @@ inp_readall(FILE *fp, struct line **data, int call_depth, char *dir_name, bool c if ( !*s ) { /* if at end of line, error */ fprintf(cp_err, "Error: .lib filename missing\n"); tfree(buffer); /* was allocated by readline() */ - continue; + controlled_exit(EXIT_FAILURE); } /* Now s points to first char after .lib */ for ( t = s; *t && !isspace(*t) && !isquote(*t); t++ ) /* skip to end of word */ ; y = t; while ( isspace(*y) || isquote(*y) ) y++; /* advance past space chars */ + // check if rest of line commented out if ( *y && *y != '$' ) { /* .lib */ for ( z = y; *z && !isspace(*z) && !isquote(*z); z++ ) @@ -322,7 +323,12 @@ inp_readall(FILE *fp, struct line **data, int call_depth, char *dir_name, bool c /* Make the .lib a comment */ *buffer = '*'; + } else { /* no lib name given */ + fprintf(cp_err, "Warning: library name missing in line\n %s", buffer); + fprintf(cp_err, " File included as: .inc %s\n", s); + memcpy(buffer, ".inc",4); } + } /* end of .lib handling */ /* now handle .include statements */