com_setscale.c
来自「ngspice又一个电子CAD仿真软件代码.功能更全」· C语言 代码 · 共 38 行
C
38 行
#include <ngspice.h>#include <bool.h>#include <dvec.h>#include "com_setscale.h"#include "quote.h"#include "streams.h"#include "vectors.h"#include "plotting/plotting.h"#include "plotting/pvec.h"/* Set the default scale to the named vector. If no vector named, * find and print the default scale. */voidcom_setscale(wordlist *wl){ struct dvec *d; char *s; if (plot_cur) { if (wl) { s = cp_unquote(wl->wl_word); d = vec_get(s); if(s) tfree(s);/*DG to avoid the cp_unquote memory leak */ if (d == NULL) fprintf(cp_err, "Error: no such vector as %s.\n", wl->wl_word); else plot_cur->pl_scale = d; } else if (plot_cur->pl_scale) { pvec(plot_cur->pl_scale); } } else { fprintf(cp_err, "Error: no current plot.\n"); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?