|
|
@ -205,36 +205,50 @@ com_iplot(wordlist *wl) |
|
|
/* settrace(wl, VF_PLOT); */ |
|
|
/* settrace(wl, VF_PLOT); */ |
|
|
|
|
|
|
|
|
struct dbcomm *d, *td, *currentdb = NULL; |
|
|
struct dbcomm *d, *td, *currentdb = NULL; |
|
|
double window; |
|
|
|
|
|
|
|
|
double window = 0.0; |
|
|
|
|
|
int initial_steps = IPOINTMIN; |
|
|
char *s; |
|
|
char *s; |
|
|
|
|
|
|
|
|
/* Look for "-w window-size" at the front, indicating a windowed iplot. */ |
|
|
|
|
|
|
|
|
|
|
|
if (wl->wl_next && !strcmp("-w", wl->wl_word)) { |
|
|
|
|
|
char *cp; |
|
|
|
|
|
int error; |
|
|
|
|
|
|
|
|
|
|
|
wl = wl->wl_next; |
|
|
|
|
|
cp = wl->wl_word; |
|
|
|
|
|
window = INPevaluate(&cp, &error, 0); |
|
|
|
|
|
if (error || window <= 0) { |
|
|
|
|
|
fprintf(cp_err, "Incremental plot width must be positive.\n"); |
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
/* Look for "-w window-size" at the front, indicating a windowed iplot |
|
|
|
|
|
* or "-d steps" to set the initial delay before the window appears. |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
while (wl && wl->wl_word[0] == '-') { |
|
|
|
|
|
if (wl->wl_word[1] == 'w' && !wl->wl_word[2]) { |
|
|
|
|
|
wl = wl->wl_next; |
|
|
|
|
|
if (wl) { |
|
|
|
|
|
char *cp; |
|
|
|
|
|
int error; |
|
|
|
|
|
|
|
|
|
|
|
cp = wl->wl_word; |
|
|
|
|
|
window = INPevaluate(&cp, &error, 0); |
|
|
|
|
|
if (error || window <= 0) { |
|
|
|
|
|
fprintf(cp_err, |
|
|
|
|
|
"Incremental plot width must be positive.\n"); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} else if (wl->wl_word[1] == 'd' && !wl->wl_word[2]) { |
|
|
|
|
|
wl = wl->wl_next; |
|
|
|
|
|
if (wl) |
|
|
|
|
|
initial_steps = atoi(wl->wl_word); |
|
|
|
|
|
} else { |
|
|
|
|
|
break; |
|
|
} |
|
|
} |
|
|
wl = wl->wl_next; |
|
|
wl = wl->wl_next; |
|
|
} else { |
|
|
|
|
|
window = 0.0; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* We use a modified ad-hoc algorithm here where db_also denotes |
|
|
/* We use a modified ad-hoc algorithm here where db_also denotes |
|
|
vectors on the same command line and db_next denotes |
|
|
vectors on the same command line and db_next denotes |
|
|
separate iplot commands. */ |
|
|
separate iplot commands. */ |
|
|
|
|
|
|
|
|
while (wl) { |
|
|
while (wl) { |
|
|
s = cp_unquote(wl->wl_word); |
|
|
s = cp_unquote(wl->wl_word); |
|
|
d = TMALLOC(struct dbcomm, 1); |
|
|
d = TMALLOC(struct dbcomm, 1); |
|
|
d->db_analysis = NULL; |
|
|
d->db_analysis = NULL; |
|
|
d->db_number = debugnumber++; |
|
|
d->db_number = debugnumber++; |
|
|
d->db_value1 = window; // Field re-use |
|
|
|
|
|
|
|
|
d->db_op = initial_steps; // Field re-use |
|
|
|
|
|
d->db_value1 = window; // Field re-use |
|
|
if (eq(s, "all")) { |
|
|
if (eq(s, "all")) { |
|
|
d->db_type = DB_IPLOTALL; |
|
|
d->db_type = DB_IPLOTALL; |
|
|
} else { |
|
|
} else { |
|
|
|