18 static bool nameeq(
char*,
char*);
42 wordlist *tw, *wn, *wl1, *wl10, *wl2, *wl20;
44 double vntol, abstol, reltol, tol, cmax, cm1, cm2;
57 if (!wl || !wl->wl_next) {
60 fprintf(
cp_err,
"Error: invalid current plot (constants)\n");
70 fprintf(
cp_err,
"Error: no previous similar plot\n");
73 fprintf(
cp_err,
"Plots are \"%s\" and \"%s\"\n",
77 else if (!wl->wl_next) {
83 fprintf(
cp_err,
"Error: invalid plot \"%s\"\n", wl->wl_word);
86 fprintf(
cp_err,
"Plots are \"%s\" and \"%s\"\n",
95 fprintf(
cp_err,
"Error: no such plot %s\n", wl->wl_word);
104 fprintf(
cp_err,
"Error: no such plot %s\n", wl->wl_word);
118 "Warning: plots %s and %s seem to be of different types\n",
122 "Warning: plots %s and %s seem to be from different circuits\n",
129 if (wl && !
eq(wl->wl_word,
"all")) {
130 for (wl1 = wl10; wl1; wl1 = wn) {
132 for (tw = wl; tw; tw = tw->
wl_next)
149 for (wl2 = wl20; wl2; wl2 = wn) {
151 for (tw = wl; tw; tw = tw->
wl_next)
171 for (wl1 = wl10; wl1; wl1 = wn) {
175 ">>> vector %s in %s not in %s\n",
193 for (wl2 = wl20; wl2; wl2 = wl2->
wl_next) {
196 ">>> vector %s in %s not in %s\n",
204 for (wl1 = wl10; wl1; wl1 = wl1->
wl_next) {
221 ">>> vector %s type mismatch\n", wl1->
wl_word);
230 for (dl = dl0; dl; dl = dl->
d2_next) {
239 for (i = 0; i < j; i++) {
242 ">>> %s is %d long in %s and %d long in %s\n",
250 ">>> %s is %d long in %s and %d long in %s\n",
261 tol <
FABS(d1 - d2)) {
263 "%s.%s[%d] = %-15s ",
280 cmax =
MAX(cm1, cm2);
284 "%s.%s[%d] = %-10s, ",
289 "%s.%s[%d] = %-10s, ",
298 for (; dl0; dl0 = dl) {
318 (void) sprintf(buf1,
"v(%s)", n1);
322 (void) sprintf(buf2,
"v(%s)", n2);
325 for (i = 0; buf1[i]; i++)
326 if (isupper(buf1[i]))
327 buf1[i] = tolower(buf1[i]);
328 for (i = 0; buf2[i]; i++)
329 if (isupper(buf2[i]))
330 buf2[i] = tolower(buf2[i]);
331 return (
eq(buf1, buf2) ?
true :
false);
void com_diff(wordlist *wl)
bool cp_getvar(char *n, int t, char *r)
struct wordlist * wl_prev
struct wordlist * wl_next