variable rename, unify the source
checked for object file invariance
This commit is contained in:
parent
e0d64e14cc
commit
d06265142d
|
|
@ -21,7 +21,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
|
||||||
#include "variable.h"
|
#include "variable.h"
|
||||||
|
|
||||||
|
|
||||||
static char *pn(double num);
|
static char *pnum(double num);
|
||||||
static int CKTfour(int ndata, int numFreq, double *thd, double *Time, double *Value,
|
static int CKTfour(int ndata, int numFreq, double *thd, double *Time, double *Value,
|
||||||
double FundFreq, double *Freq, double *Mag, double *Phase, double *nMag,
|
double FundFreq, double *Freq, double *Mag, double *Phase, double *nMag,
|
||||||
double *nPhase);
|
double *nPhase);
|
||||||
|
|
@ -41,7 +41,7 @@ int
|
||||||
fourier(wordlist *wl, struct plot *current_plot)
|
fourier(wordlist *wl, struct plot *current_plot)
|
||||||
{
|
{
|
||||||
struct dvec *time, *vec;
|
struct dvec *time, *vec;
|
||||||
struct pnode *names, *first_name;
|
struct pnode *pn, *names;
|
||||||
double *ff, fundfreq, *dp, *stuff;
|
double *ff, fundfreq, *dp, *stuff;
|
||||||
int nfreqs, fourgridsize, polydegree;
|
int nfreqs, fourgridsize, polydegree;
|
||||||
double *freq, *mag, *phase, *nmag, *nphase; /* Outputs from CKTfour */
|
double *freq, *mag, *phase, *nmag, *nphase; /* Outputs from CKTfour */
|
||||||
|
|
@ -87,11 +87,11 @@ fourier(wordlist *wl, struct plot *current_plot)
|
||||||
nphase = TMALLOC(double, nfreqs);
|
nphase = TMALLOC(double, nfreqs);
|
||||||
|
|
||||||
wl = wl->wl_next;
|
wl = wl->wl_next;
|
||||||
names = ft_getpnames(wl, TRUE);
|
pn = ft_getpnames(wl, TRUE);
|
||||||
first_name = names;
|
names = pn;
|
||||||
while (names) {
|
while (pn) {
|
||||||
vec = ft_evaluate(names);
|
vec = ft_evaluate(pn);
|
||||||
names = names->pn_next;
|
pn = pn->pn_next;
|
||||||
while (vec) {
|
while (vec) {
|
||||||
if (vec->v_length != time->v_length) {
|
if (vec->v_length != time->v_length) {
|
||||||
fprintf(cp_err,
|
fprintf(cp_err,
|
||||||
|
|
@ -169,17 +169,17 @@ fourier(wordlist *wl, struct plot *current_plot)
|
||||||
fprintf(cp_out,
|
fprintf(cp_out,
|
||||||
" %-4d %-*s %-*s %-*s %-*s %-*s\n",
|
" %-4d %-*s %-*s %-*s %-*s %-*s\n",
|
||||||
i,
|
i,
|
||||||
fw, pn(freq[i]),
|
fw, pnum(freq[i]),
|
||||||
fw, pn(mag[i]),
|
fw, pnum(mag[i]),
|
||||||
fw, pn(phase[i]),
|
fw, pnum(phase[i]),
|
||||||
fw, pn(nmag[i]),
|
fw, pnum(nmag[i]),
|
||||||
fw, pn(nphase[i]));
|
fw, pnum(nphase[i]));
|
||||||
fputs("\n", cp_out);
|
fputs("\n", cp_out);
|
||||||
vec = vec->v_link2;
|
vec = vec->v_link2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
free_pnode(first_name);
|
free_pnode(names);
|
||||||
tfree(freq);
|
tfree(freq);
|
||||||
tfree(mag);
|
tfree(mag);
|
||||||
tfree(phase);
|
tfree(phase);
|
||||||
|
|
@ -198,7 +198,7 @@ com_fourier(wordlist *wl)
|
||||||
|
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
pn(double num)
|
pnum(double num)
|
||||||
{
|
{
|
||||||
char buf[BSIZE_SP];
|
char buf[BSIZE_SP];
|
||||||
int i = cp_numdgt;
|
int i = cp_numdgt;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue