backup to original state - but changing name of local struct t to tc
This commit is contained in:
parent
6f577684dd
commit
57f8fae0ba
|
|
@ -437,7 +437,7 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
|
||||||
{
|
{
|
||||||
struct card *deck = NULL, *dd, *ld, *prev_param = NULL, *prev_card = NULL;
|
struct card *deck = NULL, *dd, *ld, *prev_param = NULL, *prev_card = NULL;
|
||||||
struct card *realdeck = NULL, *options = NULL, *curr_meas = NULL;
|
struct card *realdeck = NULL, *options = NULL, *curr_meas = NULL;
|
||||||
char *tt = NULL, name[BSIZE_SP], *s, *temperature = NULL;
|
char *tt = NULL, name[BSIZE_SP], *s, *t, *temperature = NULL;
|
||||||
double testemp = 0.0;
|
double testemp = 0.0;
|
||||||
bool commands = FALSE;
|
bool commands = FALSE;
|
||||||
wordlist *wl = NULL, *end = NULL, *wl_first = NULL;
|
wordlist *wl = NULL, *end = NULL, *wl_first = NULL;
|
||||||
|
|
@ -502,11 +502,11 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
|
||||||
/*debug: print into file*/
|
/*debug: print into file*/
|
||||||
FILE *fdo = fopen("debug-out-mc.txt", "w");
|
FILE *fdo = fopen("debug-out-mc.txt", "w");
|
||||||
if (fdo) {
|
if (fdo) {
|
||||||
struct card *t = NULL;
|
struct card *tc = NULL;
|
||||||
fprintf(fdo, "****************** complete mc deck ***************\n\n");
|
fprintf(fdo, "****************** complete mc deck ***************\n\n");
|
||||||
/* now completely */
|
/* now completely */
|
||||||
for (t = deck; t; t = t->nextcard)
|
for (tc = deck; tc; tc = tc->nextcard)
|
||||||
fprintf(fdo, "%6d %6d %s\n", t->linenum_orig, t->linenum, t->line);
|
fprintf(fdo, "%6d %6d %s\n", tc->linenum_orig, tc->linenum, tc->line);
|
||||||
fclose(fdo);
|
fclose(fdo);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -619,9 +619,9 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
|
||||||
/* Put the first token from line into s */
|
/* Put the first token from line into s */
|
||||||
strncpy(name, dd->line, BSIZE_SP);
|
strncpy(name, dd->line, BSIZE_SP);
|
||||||
s = skip_ws(name);
|
s = skip_ws(name);
|
||||||
/* t = skip_non_ws(s);
|
t = skip_non_ws(s);
|
||||||
*t = '\0';
|
*t = '\0';
|
||||||
*/
|
|
||||||
if (ciprefix(".control", dd->line)) {
|
if (ciprefix(".control", dd->line)) {
|
||||||
ld->nextcard = dd->nextcard;
|
ld->nextcard = dd->nextcard;
|
||||||
line_free(dd, FALSE); /* SJB - free this line's memory */
|
line_free(dd, FALSE); /* SJB - free this line's memory */
|
||||||
|
|
@ -745,20 +745,20 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
|
||||||
/*debug: print into file*/
|
/*debug: print into file*/
|
||||||
FILE *fdo = fopen("debug-out2.txt", "w");
|
FILE *fdo = fopen("debug-out2.txt", "w");
|
||||||
if (fdo) {
|
if (fdo) {
|
||||||
struct card *t = NULL;
|
struct card *tc = NULL;
|
||||||
fprintf(fdo, "**************** uncommented deck **************\n\n");
|
fprintf(fdo, "**************** uncommented deck **************\n\n");
|
||||||
/* always print first line */
|
/* always print first line */
|
||||||
fprintf(fdo, "%6d %6d %s\n", deck->linenum_orig, deck->linenum, deck->line);
|
fprintf(fdo, "%6d %6d %s\n", deck->linenum_orig, deck->linenum, deck->line);
|
||||||
/* here without out-commented lines */
|
/* here without out-commented lines */
|
||||||
for (t = deck->nextcard; t; t = t->nextcard) {
|
for (tc = deck->nextcard; tc; tc = tc->nextcard) {
|
||||||
if (*(t->line) == '*')
|
if (*(tc->line) == '*')
|
||||||
continue;
|
continue;
|
||||||
fprintf(fdo, "%6d %6d %s\n", t->linenum_orig, t->linenum, t->line);
|
fprintf(fdo, "%6d %6d %s\n", tc->linenum_orig, tc->linenum, tc->line);
|
||||||
}
|
}
|
||||||
fprintf(fdo, "\n****************** complete deck ***************\n\n");
|
fprintf(fdo, "\n****************** complete deck ***************\n\n");
|
||||||
/* now completely */
|
/* now completely */
|
||||||
for (t = deck; t; t = t->nextcard)
|
for (tc = deck; tc; tc = tc->nextcard)
|
||||||
fprintf(fdo, "%6d %6d %s\n", t->linenum_orig, t->linenum, t->line);
|
fprintf(fdo, "%6d %6d %s\n", tc->linenum_orig, tc->linenum, tc->line);
|
||||||
fclose(fdo);
|
fclose(fdo);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -901,20 +901,20 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
|
||||||
/*debug: print into file*/
|
/*debug: print into file*/
|
||||||
FILE *fdo = fopen("debug-out3.txt", "w");
|
FILE *fdo = fopen("debug-out3.txt", "w");
|
||||||
if (fdo) {
|
if (fdo) {
|
||||||
struct card *t = NULL;
|
struct card *tc = NULL;
|
||||||
fprintf(fdo, "**************** uncommented deck **************\n\n");
|
fprintf(fdo, "**************** uncommented deck **************\n\n");
|
||||||
/* always print first line */
|
/* always print first line */
|
||||||
fprintf(fdo, "%6d %6d %s\n", deck->linenum_orig, deck->linenum, deck->line);
|
fprintf(fdo, "%6d %6d %s\n", deck->linenum_orig, deck->linenum, deck->line);
|
||||||
/* here without out-commented lines */
|
/* here without out-commented lines */
|
||||||
for (t = deck->nextcard; t; t = t->nextcard) {
|
for (tc = deck->nextcard; tc; tc = tc->nextcard) {
|
||||||
if (*(t->line) == '*')
|
if (*(tc->line) == '*')
|
||||||
continue;
|
continue;
|
||||||
fprintf(fdo, "%6d %6d %s\n", t->linenum_orig, t->linenum, t->line);
|
fprintf(fdo, "%6d %6d %s\n", tc->linenum_orig, tc->linenum, tc->line);
|
||||||
}
|
}
|
||||||
fprintf(fdo, "\n****************** complete deck ***************\n\n");
|
fprintf(fdo, "\n****************** complete deck ***************\n\n");
|
||||||
/* now completely */
|
/* now completely */
|
||||||
for (t = deck; t; t = t->nextcard)
|
for (tc = deck; tc; tc = tc->nextcard)
|
||||||
fprintf(fdo, "%6d %6d %s\n", t->linenum_orig, t->linenum, t->line);
|
fprintf(fdo, "%6d %6d %s\n", tc->linenum_orig, tc->linenum, tc->line);
|
||||||
fclose(fdo);
|
fclose(fdo);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue