optimize previous fix, avod skipping lines after embedded symbol (embed_fd)

This commit is contained in:
Stefan Schippers 2020-09-24 17:46:58 +02:00
parent 66a8eabf7e
commit c627f21057
2 changed files with 6 additions and 1 deletions

View File

@ -1360,6 +1360,7 @@ int load_sym_def(const char *name, FILE *embed_fd)
while(1)
{
if(endfile && embed_fd) break; /* ']' line encountered --> exit */
if(fscanf(lcc[level].fd," %c",tag)==EOF) {
if (level) {
dbg(1, "load_sym_def(): fclose1, level=%d, fd=%p\n", level, lcc[level].fd);
@ -1370,7 +1371,10 @@ int load_sym_def(const char *name, FILE *embed_fd)
continue;
} else break;
}
if(endfile) continue;
if(endfile) { /* endfile due to max hierarchy: throw away rest of file and do the above '--level' cleanups */
read_record(tag[0], lcc[level].fd);
continue;
}
incremented_level = 0;
switch(tag[0])
{

View File

@ -1,5 +1,6 @@
v {xschem version=2.9.7 file_version=1.2}
G {}
K {}
V {}
S {
}