Update to fcn tprint:
allow multiple printouts in a single simulation run, without overwriting the previous printout.
This commit is contained in:
parent
1a50ca33cd
commit
e8eae7aa85
|
|
@ -7006,9 +7006,12 @@ static void inp_poly_err(struct card *card)
|
||||||
void tprint(struct card *t)
|
void tprint(struct card *t)
|
||||||
{
|
{
|
||||||
struct card *tmp;
|
struct card *tmp;
|
||||||
|
static int npr;
|
||||||
|
char outfile[100];
|
||||||
|
sprintf(outfile, "tprint-out%d.txt", npr);
|
||||||
|
npr++;
|
||||||
/*debug: print into file*/
|
/*debug: print into file*/
|
||||||
FILE *fd = fopen("tprint-out.txt", "w");
|
FILE *fd = fopen(outfile, "w");
|
||||||
for (tmp = t; tmp; tmp = tmp->nextcard)
|
for (tmp = t; tmp; tmp = tmp->nextcard)
|
||||||
if (*(tmp->line) != '*')
|
if (*(tmp->line) != '*')
|
||||||
fprintf(fd, "%6d %6d %s\n", tmp->linenum_orig, tmp->linenum,
|
fprintf(fd, "%6d %6d %s\n", tmp->linenum_orig, tmp->linenum,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue