Browse Source

Change remaining code to use the new usage pattern cp_getvar(,CP_BOOL,NULL)

pre-master-46
rlar 16 years ago
parent
commit
8851f67efd
  1. 10
      ChangeLog
  2. 9
      src/frontend/inp.c
  3. 2
      src/frontend/misccoms.c
  4. 5
      src/frontend/plotting/agraf.c
  5. 8
      src/frontend/postcoms.c
  6. 5
      src/frontend/rawfile.c
  7. 2
      src/frontend/spec.c
  8. 4
      src/frontend/subckt.c

10
ChangeLog

@ -1,3 +1,13 @@
2010-07-20 Robert Larice
* src/frontend/inp.c ,
* src/frontend/misccoms.c ,
* src/frontend/postcoms.c ,
* src/frontend/rawfile.c ,
* src/frontend/spec.c ,
* src/frontend/subckt.c ,
* src/frontend/plotting/agraf.c :
Change remaining code to use the new usage pattern cp_getvar(,CP_BOOL,NULL)
2010-07-20 Robert Larice
* src/frontend/com_display.c ,
* src/frontend/device.c ,

9
src/frontend/inp.c

@ -150,7 +150,7 @@ inp_list(FILE *file, struct line *deck, struct line *extras, int type)
if (useout)
out_init();
cp_getvar("renumber", CP_BOOL, (char *) &renumber);
renumber = cp_getvar("renumber", CP_BOOL, NULL);
if (type == LS_LOGICAL) {
top1:
for (here = deck; here; here = here->li_next) {
@ -698,7 +698,6 @@ inp_dodeck(
struct variable *eev = NULL;
wordlist *wl;
bool noparse, ii;
bool brief;
int print_listing;
static int one;
@ -721,7 +720,7 @@ inp_dodeck(
}
ft_curckt = ct = alloc(struct circ);
}
cp_getvar("noparse", CP_BOOL, (char *) &noparse);
noparse = cp_getvar("noparse", CP_BOOL, NULL);
/* We check preliminary for the scale option. This special processing
@ -821,8 +820,8 @@ inp_dodeck(
} /* for (dd = deck; dd; dd = dd->li_next) */
/* Only print out netlist if brief is FALSE */
cp_getvar( "brief", CP_BOOL, (bool *) &brief );
if(brief==FALSE) {
if(!cp_getvar( "brief", CP_BOOL, NULL )) {
/* output deck */
out_printf( "\nProcessed Netlist\n" );
out_printf( "=================\n" );

2
src/frontend/misccoms.c

@ -35,7 +35,7 @@ com_quit(wordlist *wl)
char buf[64];
bool noask;
(void) cp_getvar("noaskquit", CP_BOOL, (char *) &noask);
noask = cp_getvar("noaskquit", CP_BOOL, NULL);
gr_clean();
cp_ccon(FALSE);
if(wl)

5
src/frontend/plotting/agraf.c

@ -55,7 +55,8 @@ ft_agraf(double *xlims, double *ylims, struct dvec *xscale, struct plot *plot, s
/* Make sure the margin is correct */
omargin = margin;
if (!cp_getvar("noasciiplotvalue", CP_BOOL, (char *) &novalue) &&
novalue = cp_getvar("noasciiplotvalue", CP_BOOL, NULL);
if (!novalue &&
!vec_eq(xscale, vecs)) {
margin *= 2;
} else
@ -71,7 +72,7 @@ ft_agraf(double *xlims, double *ylims, struct dvec *xscale, struct plot *plot, s
if (ft_nopage)
nobreakp = TRUE;
else
cp_getvar("nobreak", CP_BOOL, (char *) &nobreakp);
nobreakp = cp_getvar("nobreak", CP_BOOL, NULL);
maxy -= (margin + FUDGE);
maxx = xscale->v_length;
xrange[0] = xlims[0];

8
src/frontend/postcoms.c

@ -234,12 +234,12 @@ com_print(wordlist *wl)
height = i;
if (height < 20)
height = 20;
if (!cp_getvar("nobreak", CP_BOOL, (char *) &nobreak) && !ft_nopage)
nobreak = cp_getvar("nobreak", CP_BOOL, NULL);
if (!nobreak && !ft_nopage)
nobreak = FALSE;
else
nobreak = TRUE;
(void) cp_getvar("noprintscale", CP_BOOL, (char *)
&noprintscale);
noprintscale = cp_getvar("noprintscale", CP_BOOL, NULL);
bv = vecs;
nextpage:
/* Make the first vector of every page be the scale... */
@ -423,7 +423,7 @@ com_write(wordlist *wl)
else
fprintf(cp_err, "Warning: strange file type %s\n", buf);
}
(void) cp_getvar("appendwrite", CP_BOOL, (char *) &appendwrite);
appendwrite = cp_getvar("appendwrite", CP_BOOL, NULL);
if (wl)
names = ft_getpnames(wl, TRUE);

5
src/frontend/rawfile.c

@ -47,10 +47,7 @@ raw_write(char *name, struct plot *pl, bool app, bool binary)
char buf[BSIZE_SP];
char *branch;
if (!cp_getvar("nopadding", CP_BOOL, (char *) &raw_padding))
raw_padding = FALSE;
/* Invert since we want to know if we should pad. */
raw_padding = !raw_padding;
raw_padding = !cp_getvar("nopadding", CP_BOOL, NULL);
/* Why bother printing out an empty plot? */
if (!pl->pl_dvecs) {

2
src/frontend/spec.c

@ -237,7 +237,7 @@ com_spec(wordlist *wl)
dc[i] += tdvec[i][k]*amp;
}
}
cp_getvar("spectrace", CP_BOOL, &trace);
trace = cp_getvar("spectrace", CP_BOOL, NULL);
for (j = (startf==0 ? 1 : 0); j<fpts; j++) {
freq[j] = startf + j*stepf;
if(trace) fprintf(cp_err, "spec: %e Hz: \r",freq[j]);

4
src/frontend/subckt.c

@ -172,9 +172,9 @@ inp_subcktexpand(struct line *deck)
(void) strcpy(model, ".model");
if(!cp_getvar("modelline", CP_STRING, model))
(void) strcpy(model, ".model");
(void) cp_getvar("nobjthack", CP_BOOL, (char *) &nobjthack);
nobjthack = cp_getvar("nobjthack", CP_BOOL, NULL);
(void) cp_getvar("numparams", CP_BOOL, (char *) &use_numparams);
use_numparams = cp_getvar("numparams", CP_BOOL, NULL);
use_numparams = TRUE;

Loading…
Cancel
Save