You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
659 B

#include <stddef.h>
#include <ngspice.h>
#include <bool.h>
#include <wordlist.h>
#include "plotting/plotit.h"
#include "com_xgraph.h"
/* xgraph file plotargs */
void
com_xgraph(wordlist *wl)
{
char *fname;
bool tempf = FALSE;
if (wl) {
fname = wl->wl_word;
wl = wl->wl_next;
}
if (!wl) {
return;
}
if (cieq(fname, "temp") || cieq(fname, "tmp")) {
fname = smktemp("xg");
tempf = TRUE;
}
(void) plotit(wl, fname, "xgraph");
#if 0
/* Leave temp file sitting around so xgraph can grab it from
background. */
if (tempf)
(void) unlink(fname);
#endif
return;
}