|
|
@ -476,7 +476,6 @@ 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 + 1], *s, *t, *temperature = NULL; |
|
|
char *tt = NULL, name[BSIZE_SP + 1], *s, *t, *temperature = NULL; |
|
|
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; |
|
|
wordlist *controls = NULL, *pre_controls = NULL; |
|
|
wordlist *controls = NULL, *pre_controls = NULL; |
|
|
@ -635,14 +634,6 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile) |
|
|
else { /* must be regular deck . . . . */ |
|
|
else { /* must be regular deck . . . . */ |
|
|
/* loop through deck and handle control cards */ |
|
|
/* loop through deck and handle control cards */ |
|
|
for (dd = deck->nextcard; dd; dd = ld->nextcard) { |
|
|
for (dd = deck->nextcard; dd; dd = ld->nextcard) { |
|
|
/* get temp from deck */ |
|
|
|
|
|
if (ciprefix(".temp", dd->line)) { |
|
|
|
|
|
s = skip_ws(dd->line + 5); |
|
|
|
|
|
if (temperature) { |
|
|
|
|
|
txfree(temperature); |
|
|
|
|
|
} |
|
|
|
|
|
temperature = copy(s); |
|
|
|
|
|
} |
|
|
|
|
|
/* Ignore comment lines, but not lines begining with '*#', |
|
|
/* Ignore comment lines, but not lines begining with '*#', |
|
|
but remove them, if they are in a .control ... .endc section */ |
|
|
but remove them, if they are in a .control ... .endc section */ |
|
|
s = skip_ws(dd->line); |
|
|
s = skip_ws(dd->line); |
|
|
@ -742,17 +733,6 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile) |
|
|
wl_free(pre_controls); |
|
|
wl_free(pre_controls); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* set temperature if defined to a preliminary variable which may be used |
|
|
|
|
|
in numparam evaluation */ |
|
|
|
|
|
if (temperature) { |
|
|
|
|
|
temperature_value = atof(temperature); |
|
|
|
|
|
cp_vset("pretemp", CP_REAL, &temperature_value); |
|
|
|
|
|
} |
|
|
|
|
|
if (ft_ngdebug) { |
|
|
|
|
|
cp_getvar("pretemp", CP_REAL, &testemp, 0); |
|
|
|
|
|
printf("test temperature %f\n", testemp); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* We are done handling the control stuff. Now process remainder of deck. |
|
|
/* We are done handling the control stuff. Now process remainder of deck. |
|
|
Go on if there is something left after the controls.*/ |
|
|
Go on if there is something left after the controls.*/ |
|
|
if (deck->nextcard) { |
|
|
if (deck->nextcard) { |
|
|
@ -1000,6 +980,15 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile) |
|
|
curr_meas->nextcard = NULL; |
|
|
curr_meas->nextcard = NULL; |
|
|
dd = prev_card; |
|
|
dd = prev_card; |
|
|
} |
|
|
} |
|
|
|
|
|
/* get temp from deck */ |
|
|
|
|
|
if (ciprefix(".temp", dd->line)) { |
|
|
|
|
|
s = skip_ws(dd->line + 5); |
|
|
|
|
|
if (temperature) { |
|
|
|
|
|
txfree(temperature); |
|
|
|
|
|
} |
|
|
|
|
|
temperature = copy(s); |
|
|
|
|
|
*(dd->line) = '*'; |
|
|
|
|
|
} |
|
|
prev_card = dd; |
|
|
prev_card = dd; |
|
|
} //end of for-loop |
|
|
} //end of for-loop |
|
|
|
|
|
|
|
|
|