xspice, cast so called `STATIC_VAR' pointers to their concrete type

This commit is contained in:
rlar 2010-07-16 15:26:05 +00:00
parent e23fae5376
commit 26412f883e
4 changed files with 16 additions and 10 deletions

View File

@ -1,3 +1,9 @@
2010-07-16 Robert Larice
* src/xspice/icm/analog/pwl/cfunc.mod ,
* src/xspice/icm/spice2poly/icm_spice2poly/cfunc.mod ,
* src/xspice/icm/xtradev/zener/cfunc.mod :
xspice, cast so called `STATIC_VAR' pointers to their concrete type
2010-07-14 Robert Larice
* src/frontend/commands.c :
remove leftover /*FALSE,*/ comments from the last commit, which where left

View File

@ -267,17 +267,17 @@ void cm_pwl(ARGS) /* structure holding parms,
/* Allocate storage for last_x_value */
STATIC_VAR(last_x_value) = (double *) malloc(sizeof(double));
last_x_value = STATIC_VAR(last_x_value);
last_x_value = (double *) STATIC_VAR(last_x_value);
/* Allocate storage for breakpoint domain & range values */
STATIC_VAR(x) = (double *) calloc(size, sizeof(double));
x = STATIC_VAR(x);
x = (double *) STATIC_VAR(x);
if (!x) {
cm_message_send(allocation_error);
}
STATIC_VAR(y) = (double *) calloc(size, sizeof(double));
y = STATIC_VAR(y);
y = (double *) STATIC_VAR(y);
if (!y) {
cm_message_send(allocation_error);
}
@ -291,11 +291,11 @@ void cm_pwl(ARGS) /* structure holding parms,
}
else {
last_x_value = STATIC_VAR(last_x_value);
last_x_value = (double *) STATIC_VAR(last_x_value);
x = STATIC_VAR(x);
x = (double *) STATIC_VAR(x);
y = STATIC_VAR(y);
y = (double *) STATIC_VAR(y);
}

View File

@ -105,14 +105,14 @@ void spice2poly (ARGS)
STATIC_VAR(acgains) = acgains;
}
else
acgains = STATIC_VAR(acgains);
acgains = (double *) STATIC_VAR(acgains);
/* If analysis type is AC, use the previously computed DC partials */
/* for the AC gains */
if(ANALYSIS == MIF_AC) {
for(i = 0; i < num_inputs; i++) {
acgains = STATIC_VAR(acgains);
acgains = (double *) STATIC_VAR(acgains);
AC_GAIN(out,in[i]).real = acgains[i];
AC_GAIN(out,in[i]).imag = 0.0;
}

View File

@ -176,7 +176,7 @@ void cm_zener(ARGS) /* structure holding parms,
/* Allocate storage for frequencies */
STATIC_VAR(previous_voltage) = (double *) malloc(sizeof(double));
previous_voltage = STATIC_VAR(previous_voltage);
previous_voltage = (double *) STATIC_VAR(previous_voltage);
/* Set previous_voltage value to zero... */
*previous_voltage = 0.0;
@ -184,7 +184,7 @@ void cm_zener(ARGS) /* structure holding parms,
}
else {
previous_voltage = STATIC_VAR(previous_voltage);
previous_voltage = (double *) STATIC_VAR(previous_voltage);
}