#include "spice.h"
#include "ftedefs.h"
Go to the source code of this file.
static struct dvec* findvec |
( |
| ) |
|
|
static |
static struct dvec* findvec |
( |
char * |
word, |
|
|
struct plot * |
pl |
|
) |
| |
|
static |
Definition at line 576 of file vectors.c.
592 if (
cieq(word,
"all")) {
599 for (wl = wl0; wl; wl = wl->
wl_next) {
static char buf[MAXPROMPT]
void vec_newtemp(struct dvec *d)
struct wordlist * wl_next
void ft_loadfile |
( |
char * |
file | ) |
|
Definition at line 48 of file vectors.c.
55 out_printf(
"Loading raw data file (\"%s\") . . . ", file);
65 for (pp = pl, pl =
NULL; pp; pp = np) {
void plot_add(struct plot *pl)
static int namecmp |
( |
char * |
s, |
|
|
char * |
t |
|
) |
| |
|
static |
Definition at line 813 of file vectors.c.
823 while ((*
s == *
t) && !isdigit(*
s) && *
s)
827 if ((*
s != *t) && (!isdigit(*
s) || !isdigit(*t)))
833 for (i = 0; isdigit(*
s);
s++)
834 i = i * 10 + *
s -
'0';
835 for (j = 0; isdigit(*t); t++)
836 j = j * 10 + *t -
'0';
void plot_add |
( |
struct plot * |
pl | ) |
|
Definition at line 80 of file vectors.c.
113 (void) sprintf(buf,
"%s%d", s, plot_num);
static char buf[MAXPROMPT]
void plot_setcur(char *name)
struct wordlist * wl_next
void plot_new(struct plot *pl)
struct plot* plot_alloc |
( |
char * |
name | ) |
|
Definition at line 260 of file vectors.c.
277 n = atoi(tp->pl_typename + strlen(s));
282 (void) sprintf(buf,
"%s%d", s, plot_num);
static char buf[MAXPROMPT]
void plot_delete |
( |
struct plot * |
pl | ) |
|
Definition at line 138 of file vectors.c.
147 fprintf(
cp_err,
"Error: can't destroy the constant plot\n");
159 for (wl = wl0; wl; wl = wl->
wl_next) {
181 "Internal Error: kill plot -- not in list\n");
struct wordlist * wl_next
Definition at line 237 of file vectors.c.
struct wordlist * wl_next
void plot_new |
( |
struct plot * |
pl | ) |
|
bool plot_prefix |
( |
char * |
pre, |
|
|
char * |
str |
|
) |
| |
Definition at line 293 of file vectors.c.
300 while (*pre && *str) {
305 if (*pre || (*str && isdigit(pre[-1])))
void plot_setcur |
( |
char * |
name | ) |
|
Definition at line 204 of file vectors.c.
213 if (
cieq(name,
"new")) {
226 fprintf(
cp_err,
"Error: no such plot named %s\n", name);
struct plot * plot_alloc(char *name)
void plot_new(struct plot *pl)
bool plot_prefix(char *pre, char *str)
char* vec_basename |
( |
struct dvec * |
v | ) |
|
Definition at line 731 of file vectors.c.
741 if (strchr(v->
v_name,
'.')) {
742 for (t = v->
v_name, i = 0; *t && *t !=
'.'; t++)
746 (void)
strcpy(buf, t + 1);
753 for (t = buf; isspace(*t); t++)
758 while ((t > s) && isspace(t[-1]))
static char buf[MAXPROMPT]
struct dvec* vec_copy |
( |
struct dvec * |
v | ) |
|
void vec_dlfree |
( |
struct dvlist * |
dl | ) |
|
Definition at line 391 of file vectors.c.
397 for (; dl; dl = dn) {
Definition at line 705 of file vectors.c.
char * vec_basename(struct dvec *v)
struct dvec* vec_fromplot |
( |
char * |
word, |
|
|
struct plot * |
plot |
|
) |
| |
Definition at line 405 of file vectors.c.
419 if (!d && (sscanf(word,
"%c(%s", &cc, buf) == 2) &&
420 ((s = strrchr(buf,
')')) !=
NULL) &&
421 (*(s + 1) ==
'\0')) {
425 (void) sprintf(buf2,
"%s#branch", buf);
static char buf[MAXPROMPT]
static struct dvec * findvec()
Definition at line 681 of file vectors.c.
693 fprintf(
cp_err,
"vec_gc: throwing away %s.%s\n",
struct dvec* vec_get |
( |
char * |
word | ) |
|
Definition at line 438 of file vectors.c.
459 struct dvlist *dl0, *dl, *dll;
461 wd = word =
copy(word);
463 if (strchr(word,
'.')) {
465 for (i = 0, s = word; *s !=
'.'; i++, s++)
468 if (
cieq(buf,
"all")) {
521 "Error: plot wildcard (name %s) matches nothing\n", word);
537 "Error: circuit parameters only available with spice\n");
542 for (param = name; *param && (*param !=
'['); param++)
546 for (s = param; *s && *s !=
']'; s++)
static char buf[MAXPROMPT]
void vec_newtemp(struct dvec *d)
struct dvec * vec_fromplot(char *word, struct plot *plot)
void vec_sort(struct dvec *d)
static struct plot constantplot
bool plot_prefix(char *pre, char *str)
struct dvec* vec_mkfamily |
( |
struct dvec * |
v | ) |
|
Definition at line 845 of file vectors.c.
854 struct dvec *vecs, *
d;
864 for (i = 0, dl = dl0 =
NULL; i < numvecs; i++) {
876 for (dl = dl0, j = 0; j < numvecs; j++, dl = dl->
dl_next) {
880 (
void) sprintf(buf + strlen(buf),
"[%d]", count[i]);
897 (
double *)
tmalloc(
sizeof(
double) * size);
906 for (i = v->
v_numdims - 2; i >= 0; i--) {
907 if (count[i]++ < v->
v_dims[i])
static char buf[MAXPROMPT]
void vec_newtemp(struct dvec *d)
void vec_newperm |
( |
struct dvec * |
d | ) |
|
void vec_newtemp |
( |
struct dvec * |
d | ) |
|
void vec_remove |
( |
char * |
name | ) |
|
void vec_sort |
( |
struct dvec * |
d | ) |
|
Definition at line 765 of file vectors.c.
783 qsort((
char *) array, i,
sizeof (
struct dvec *),
785 (
int(*)(
const void*,
const void*))
veccmp);
static int veccmp |
( |
struct dvec ** |
d1, |
|
|
struct dvec ** |
d2 |
|
) |
| |
|
static |
Definition at line 799 of file vectors.c.
805 if ((i =
namecmp((*d1)->v_plot->pl_typename,
806 (*d2)->v_plot->pl_typename)) != 0)
808 return (
namecmp((*d1)->v_name, (*d2)->v_name));
static void vecfree |
( |
struct dvec * |
v | ) |
|
|
static |
Definition at line 374 of file vectors.c.
void vec_dlfree(struct dvlist *dl)
Initial value:= {
"Constant values", "Sat Aug 16 10:55:15 PDT 1986", "constants",
}
Definition at line 38 of file vectors.c.