From c741a14c4f890f694be10a42e280f8e15d022bfa Mon Sep 17 00:00:00 2001 From: pnenzi Date: Wed, 13 Aug 2003 12:56:27 +0000 Subject: [PATCH] Corrected ifdef system. --- src/spicelib/devices/cktinit.c | 6 ++-- src/spicelib/devices/dev.c | 63 ++++++++++++++++++++++++---------- 2 files changed, 46 insertions(+), 23 deletions(-) diff --git a/src/spicelib/devices/cktinit.c b/src/spicelib/devices/cktinit.c index bfd7d966a..91efc5b14 100644 --- a/src/spicelib/devices/cktinit.c +++ b/src/spicelib/devices/cktinit.c @@ -3,11 +3,9 @@ Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modifed: 2000 AlansFixes **********/ - +#include #include - -#include - +#include "memory.h" #include #include #include diff --git a/src/spicelib/devices/dev.c b/src/spicelib/devices/dev.c index 36393fd6a..de796f511 100644 --- a/src/spicelib/devices/dev.c +++ b/src/spicelib/devices/dev.c @@ -131,20 +131,45 @@ int add_udn(int,Evt_Udn_Info_t **); /*saj in xspice the DEVices size can be varied so DEVNUM is an int*/ -#ifdef HAVE_EKV -#include "ekv/ekvitf.h" -#ifdef XSPICE -static int DEVNUM = 52; -#else -#define DEVNUM 52 -#endif -#else -#ifdef XSPICE -static int DEVNUM = 51; -#else -#define DEVNUM 51 -#endif -#endif +#ifdef CIDER + + #ifdef HAVE_EKV + #include "ekv/ekvitf.h" + + #ifdef XSPICE + static int DEVNUM = 52; + #else + #define DEVNUM 52 + #endif + + #else + + #ifdef XSPICE + static int DEVNUM = 51; + #else + #define DEVNUM 51 + #endif + + #endif + +#else /* NOT CIDER */ + + #ifdef HAVE_EKV + #include "ekv/ekvitf.h" + #ifdef XSPICE + static int DEVNUM = 47; + #else + #define DEVNUM 47 + #endif + #else + #ifdef XSPICE + static int DEVNUM = 46; + #else + #define DEVNUM 46 + #endif + #endif + +#endif /* CIDER */ /*Make this dynamic for later attempt to make all devices dynamic*/ SPICEdev **DEVices=NULL; @@ -175,7 +200,7 @@ spice_init_devices(void) g_evt_udn_info[0] = &idn_digital_info; DEVicesfl = (int *)tmalloc(DEVNUM*sizeof(int)); - /* tmalloc should automaticlly zero the array! */ + /* tmalloc should automatically zero the array! */ #endif DEVices = (SPICEdev **)tmalloc(DEVNUM*sizeof(SPICEdev *)); @@ -236,17 +261,17 @@ spice_init_devices(void) #ifdef HAVE_EKV DEVices[51] = get_ekv_info(); assert(52 == DEVNUM); -#else +#else /* NOT EKV */ assert(51 == DEVNUM); -#endif /* HAVE_EKV */ -#endif /* CIDER */ - +#endif /* HAVE_EKV */ +#else /* NOT CIDER */ #ifdef HAVE_EKV DEVices[46] = get_ekv_info(); assert(47 == DEVNUM); #else assert(46 == DEVNUM); #endif +#endif /* CIDER */ return; }