Corrected ifdef system.
This commit is contained in:
parent
00e357b124
commit
c741a14c4f
|
|
@ -3,11 +3,9 @@ Copyright 1990 Regents of the University of California. All rights reserved.
|
||||||
Author: 1985 Thomas L. Quarles
|
Author: 1985 Thomas L. Quarles
|
||||||
Modifed: 2000 AlansFixes
|
Modifed: 2000 AlansFixes
|
||||||
**********/
|
**********/
|
||||||
|
#include <stdlib.h>
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
#include "memory.h"
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include <cktdefs.h>
|
#include <cktdefs.h>
|
||||||
#include <devdefs.h>
|
#include <devdefs.h>
|
||||||
#include <sperror.h>
|
#include <sperror.h>
|
||||||
|
|
|
||||||
|
|
@ -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*/
|
/*saj in xspice the DEVices size can be varied so DEVNUM is an int*/
|
||||||
#ifdef HAVE_EKV
|
#ifdef CIDER
|
||||||
#include "ekv/ekvitf.h"
|
|
||||||
#ifdef XSPICE
|
#ifdef HAVE_EKV
|
||||||
static int DEVNUM = 52;
|
#include "ekv/ekvitf.h"
|
||||||
#else
|
|
||||||
#define DEVNUM 52
|
#ifdef XSPICE
|
||||||
#endif
|
static int DEVNUM = 52;
|
||||||
#else
|
#else
|
||||||
#ifdef XSPICE
|
#define DEVNUM 52
|
||||||
static int DEVNUM = 51;
|
#endif
|
||||||
#else
|
|
||||||
#define DEVNUM 51
|
#else
|
||||||
#endif
|
|
||||||
#endif
|
#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*/
|
/*Make this dynamic for later attempt to make all devices dynamic*/
|
||||||
SPICEdev **DEVices=NULL;
|
SPICEdev **DEVices=NULL;
|
||||||
|
|
@ -175,7 +200,7 @@ spice_init_devices(void)
|
||||||
g_evt_udn_info[0] = &idn_digital_info;
|
g_evt_udn_info[0] = &idn_digital_info;
|
||||||
|
|
||||||
DEVicesfl = (int *)tmalloc(DEVNUM*sizeof(int));
|
DEVicesfl = (int *)tmalloc(DEVNUM*sizeof(int));
|
||||||
/* tmalloc should automaticlly zero the array! */
|
/* tmalloc should automatically zero the array! */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DEVices = (SPICEdev **)tmalloc(DEVNUM*sizeof(SPICEdev *));
|
DEVices = (SPICEdev **)tmalloc(DEVNUM*sizeof(SPICEdev *));
|
||||||
|
|
@ -236,17 +261,17 @@ spice_init_devices(void)
|
||||||
#ifdef HAVE_EKV
|
#ifdef HAVE_EKV
|
||||||
DEVices[51] = get_ekv_info();
|
DEVices[51] = get_ekv_info();
|
||||||
assert(52 == DEVNUM);
|
assert(52 == DEVNUM);
|
||||||
#else
|
#else /* NOT EKV */
|
||||||
assert(51 == DEVNUM);
|
assert(51 == DEVNUM);
|
||||||
#endif /* HAVE_EKV */
|
#endif /* HAVE_EKV */
|
||||||
#endif /* CIDER */
|
#else /* NOT CIDER */
|
||||||
|
|
||||||
#ifdef HAVE_EKV
|
#ifdef HAVE_EKV
|
||||||
DEVices[46] = get_ekv_info();
|
DEVices[46] = get_ekv_info();
|
||||||
assert(47 == DEVNUM);
|
assert(47 == DEVNUM);
|
||||||
#else
|
#else
|
||||||
assert(46 == DEVNUM);
|
assert(46 == DEVNUM);
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* CIDER */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue