inp.c, inpcom.c: improved debug printout debug-outx.txt
This commit is contained in:
parent
d8fe6bd671
commit
1bb7079dc5
|
|
@ -533,13 +533,23 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
|
||||||
|
|
||||||
/* print out the expanded deck into debug-out2.txt */
|
/* print out the expanded deck into debug-out2.txt */
|
||||||
if (ft_ngdebug) {
|
if (ft_ngdebug) {
|
||||||
FILE *fdo;
|
|
||||||
struct line *tmp_ptr1 = NULL;
|
|
||||||
/*debug: print into file*/
|
/*debug: print into file*/
|
||||||
fdo = fopen("debug-out2.txt", "w");
|
FILE *fdo = fopen("debug-out2.txt", "w");
|
||||||
for (tmp_ptr1 = deck; tmp_ptr1; tmp_ptr1 = tmp_ptr1->li_next)
|
struct line *t = NULL;
|
||||||
fprintf(fdo, "%s\n", tmp_ptr1->li_line);
|
fprintf(fdo, "**************** uncommented deck **************\n\n");
|
||||||
(void) fclose(fdo);
|
/* always print first line */
|
||||||
|
fprintf(fdo, "%6d %6d %s\n", deck->li_linenum_orig, deck->li_linenum, deck->li_line);
|
||||||
|
/* here without out-commented lines */
|
||||||
|
for (t = deck->li_next; t; t = t->li_next) {
|
||||||
|
if (*(t->li_line) == '*')
|
||||||
|
continue;
|
||||||
|
fprintf(fdo, "%6d %6d %s\n", t->li_linenum_orig, t->li_linenum, t->li_line);
|
||||||
|
}
|
||||||
|
fprintf(fdo, "\n****************** complete deck ***************\n\n");
|
||||||
|
/* now completely */
|
||||||
|
for (t = deck; t; t = t->li_next)
|
||||||
|
fprintf(fdo, "%6d %6d %s\n", t->li_linenum_orig, t->li_linenum, t->li_line);
|
||||||
|
fclose(fdo);
|
||||||
}
|
}
|
||||||
for (dd = deck; dd; dd = dd->li_next) {
|
for (dd = deck; dd; dd = dd->li_next) {
|
||||||
/* get csparams and create vectors, being
|
/* get csparams and create vectors, being
|
||||||
|
|
@ -675,13 +685,23 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
|
||||||
|
|
||||||
/* print out the expanded deck into debug-out3.txt */
|
/* print out the expanded deck into debug-out3.txt */
|
||||||
if (ft_ngdebug) {
|
if (ft_ngdebug) {
|
||||||
FILE *fdo;
|
|
||||||
struct line *tmp_ptr1 = NULL;
|
|
||||||
/*debug: print into file*/
|
/*debug: print into file*/
|
||||||
fdo = fopen("debug-out3.txt", "w");
|
FILE *fdo = fopen("debug-out3.txt", "w");
|
||||||
for (tmp_ptr1 = deck; tmp_ptr1; tmp_ptr1 = tmp_ptr1->li_next)
|
struct line *t = NULL;
|
||||||
fprintf(fdo, "%s\n", tmp_ptr1->li_line);
|
fprintf(fdo, "**************** uncommented deck **************\n\n");
|
||||||
(void) fclose(fdo);
|
/* always print first line */
|
||||||
|
fprintf(fdo, "%6d %6d %s\n", deck->li_linenum_orig, deck->li_linenum, deck->li_line);
|
||||||
|
/* here without out-commented lines */
|
||||||
|
for (t = deck->li_next; t; t = t->li_next) {
|
||||||
|
if (*(t->li_line) == '*')
|
||||||
|
continue;
|
||||||
|
fprintf(fdo, "%6d %6d %s\n", t->li_linenum_orig, t->li_linenum, t->li_line);
|
||||||
|
}
|
||||||
|
fprintf(fdo, "\n****************** complete deck ***************\n\n");
|
||||||
|
/* now completely */
|
||||||
|
for (t = deck; t; t = t->li_next)
|
||||||
|
fprintf(fdo, "%6d %6d %s\n", t->li_linenum_orig, t->li_linenum, t->li_line);
|
||||||
|
fclose(fdo);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (expr_w_temper) {
|
if (expr_w_temper) {
|
||||||
|
|
|
||||||
|
|
@ -872,17 +872,17 @@ inp_readall(FILE *fp, int call_depth, char *dir_name, bool comfile, bool intfile
|
||||||
struct line *t;
|
struct line *t;
|
||||||
fprintf(fd, "**************** uncommented deck **************\n\n");
|
fprintf(fd, "**************** uncommented deck **************\n\n");
|
||||||
/* always print first line */
|
/* always print first line */
|
||||||
fprintf(fd, "%d %d %s\n", cc->li_linenum_orig, cc->li_linenum, cc->li_line);
|
fprintf(fd, "%6d %6d %s\n", cc->li_linenum_orig, cc->li_linenum, cc->li_line);
|
||||||
/* here without out-commented lines */
|
/* here without out-commented lines */
|
||||||
for (t = cc->li_next; t; t = t->li_next) {
|
for (t = cc->li_next; t; t = t->li_next) {
|
||||||
if (*(t->li_line) == '*')
|
if (*(t->li_line) == '*')
|
||||||
continue;
|
continue;
|
||||||
fprintf(fd, "%d %d %s\n", t->li_linenum_orig, t->li_linenum, t->li_line);
|
fprintf(fd, "%6d %6d %s\n", t->li_linenum_orig, t->li_linenum, t->li_line);
|
||||||
}
|
}
|
||||||
fprintf(fd, "\n****************** complete deck ***************\n\n");
|
fprintf(fd, "\n****************** complete deck ***************\n\n");
|
||||||
/* now completely */
|
/* now completely */
|
||||||
for (t = cc; t; t = t->li_next)
|
for (t = cc; t; t = t->li_next)
|
||||||
fprintf(fd, "%d %d %s\n", t->li_linenum_orig, t->li_linenum, t->li_line);
|
fprintf(fd, "%6d %6d %s\n", t->li_linenum_orig, t->li_linenum, t->li_line);
|
||||||
fclose(fd);
|
fclose(fd);
|
||||||
|
|
||||||
fprintf(stdout, "max line length %d, max subst. per line %d, number of lines %d\n",
|
fprintf(stdout, "max line length %d, max subst. per line %d, number of lines %d\n",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue