From a0a7d0ca706cf358584e68deb7ec3dc6ad666369 Mon Sep 17 00:00:00 2001 From: rlar Date: Fri, 16 Jul 2010 15:47:05 +0000 Subject: [PATCH] xspice, xtraevt/*real*, add casts to `INPUT' and `OUTPUT' the *.ifs files specify this to be `real' yet the *.mod translator seems to be incomplete, and delivers void * --- ChangeLog | 9 +++++++++ src/xspice/icm/xtraevt/d_to_real/cfunc.mod | 2 +- src/xspice/icm/xtraevt/real_delay/cfunc.mod | 4 ++-- src/xspice/icm/xtraevt/real_gain/cfunc.mod | 4 ++-- src/xspice/icm/xtraevt/real_to_v/cfunc.mod | 2 +- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86e96c291..2c500e07d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-07-16 Robert Larice + * src/xspice/icm/xtraevt/d_to_real/cfunc.mod , + * src/xspice/icm/xtraevt/real_delay/cfunc.mod , + * src/xspice/icm/xtraevt/real_gain/cfunc.mod , + * src/xspice/icm/xtraevt/real_to_v/cfunc.mod : + xspice, xtraevt/*real*, add casts to `INPUT' and `OUTPUT' + the *.ifs files specify this to be `real' + yet the *.mod translator seems to be incomplete, and delivers void * + 2010-07-16 Robert Larice * src/xspice/icm/analog/multi_input_pwl/cfunc.mod : add a missing `const' qualifier diff --git a/src/xspice/icm/xtraevt/d_to_real/cfunc.mod b/src/xspice/icm/xtraevt/d_to_real/cfunc.mod index dbea11f45..c8227a7db 100644 --- a/src/xspice/icm/xtraevt/d_to_real/cfunc.mod +++ b/src/xspice/icm/xtraevt/d_to_real/cfunc.mod @@ -19,7 +19,7 @@ void ucm_d_to_real (ARGS) ena = 1.0; else ena = 0.0; - out = OUTPUT(out); + out = (double *) OUTPUT(out); zero = PARAM(zero); one = PARAM(one); diff --git a/src/xspice/icm/xtraevt/real_delay/cfunc.mod b/src/xspice/icm/xtraevt/real_delay/cfunc.mod index 232f9cb75..0ebaeaae1 100644 --- a/src/xspice/icm/xtraevt/real_delay/cfunc.mod +++ b/src/xspice/icm/xtraevt/real_delay/cfunc.mod @@ -34,8 +34,8 @@ void ucm_real_delay (ARGS) else if(*state != ONE) OUTPUT_CHANGED(out) = FALSE; else { - in = INPUT(in); - out = OUTPUT(out); + in = (double *) INPUT(in); + out = (double *) OUTPUT(out); *out = *in; OUTPUT_DELAY(out) = PARAM(delay); } diff --git a/src/xspice/icm/xtraevt/real_gain/cfunc.mod b/src/xspice/icm/xtraevt/real_gain/cfunc.mod index 7d6285097..4fba1c737 100644 --- a/src/xspice/icm/xtraevt/real_gain/cfunc.mod +++ b/src/xspice/icm/xtraevt/real_gain/cfunc.mod @@ -13,8 +13,8 @@ void ucm_real_gain (ARGS) /* Get the input and output pointers */ - in = INPUT(in); - out = OUTPUT(out); + in = (double *) INPUT(in); + out = (double *) OUTPUT(out); /* Get the parameters */ in_offset = PARAM(in_offset); diff --git a/src/xspice/icm/xtraevt/real_to_v/cfunc.mod b/src/xspice/icm/xtraevt/real_to_v/cfunc.mod index 10e56b751..540f3d75a 100644 --- a/src/xspice/icm/xtraevt/real_to_v/cfunc.mod +++ b/src/xspice/icm/xtraevt/real_to_v/cfunc.mod @@ -14,7 +14,7 @@ void ucm_real_to_v (ARGS) /*double out;*/ - in = INPUT(in); + in = (double *) INPUT(in); if(INIT) { cm_event_alloc(TS, 2 * sizeof(double));