Add a section without source info to the debug output.
Truncate .model lines in this section, as .model lines with several hundred parameters may mask the relevant information.
This commit is contained in:
parent
61206e3aa7
commit
d7cb5c92ba
|
|
@ -973,6 +973,26 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
|
||||||
FILE *fdo = fopen("debug-out2.txt", "w");
|
FILE *fdo = fopen("debug-out2.txt", "w");
|
||||||
if (fdo) {
|
if (fdo) {
|
||||||
struct card *tc = NULL;
|
struct card *tc = NULL;
|
||||||
|
fprintf(fdo,
|
||||||
|
"\n\n**************** uncommented deck without source file info "
|
||||||
|
"**************\n\n");
|
||||||
|
/* always print first line */
|
||||||
|
fprintf(fdo, "%6d %s\n", deck->linenum,
|
||||||
|
deck->line);
|
||||||
|
/* here without out-commented lines */
|
||||||
|
for (tc = deck->nextcard; tc; tc = tc->nextcard) {
|
||||||
|
if (*(tc->line) == '*')
|
||||||
|
continue;
|
||||||
|
/* Only truncated .model lines */
|
||||||
|
if (ciprefix(".model", tc->line)) {
|
||||||
|
fprintf(fdo, "%6d %.100s ...\n",
|
||||||
|
tc->linenum, tc->line);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
fprintf(fdo, "%6d %s\n",
|
||||||
|
tc->linenum, tc->line);
|
||||||
|
}
|
||||||
|
}
|
||||||
fprintf(fdo, "**************** uncommented deck **************\n\n");
|
fprintf(fdo, "**************** uncommented deck **************\n\n");
|
||||||
/* always print first line */
|
/* always print first line */
|
||||||
fprintf(fdo, "%6s %6d %6d %s\n", deck->linesource, deck->linenum_orig, deck->linenum, deck->line);
|
fprintf(fdo, "%6s %6d %6d %s\n", deck->linesource, deck->linenum_orig, deck->linenum, deck->line);
|
||||||
|
|
|
||||||
|
|
@ -1231,8 +1231,15 @@ struct card *inp_readall(FILE *fp, const char *dir_name, const char* file_name,
|
||||||
for (t = cc->nextcard; t; t = t->nextcard) {
|
for (t = cc->nextcard; t; t = t->nextcard) {
|
||||||
if (*(t->line) == '*')
|
if (*(t->line) == '*')
|
||||||
continue;
|
continue;
|
||||||
fprintf(fd, "%6d %s\n",
|
/* Only truncated .model lines */
|
||||||
|
if (ciprefix(".model", t->line)) {
|
||||||
|
fprintf(fd, "%6d %.100s ...\n",
|
||||||
t->linenum, t->line);
|
t->linenum, t->line);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
fprintf(fd, "%6d %s\n",
|
||||||
|
t->linenum, t->line);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fprintf(fd,
|
fprintf(fd,
|
||||||
"\n\n**************** uncommented deck "
|
"\n\n**************** uncommented deck "
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue