cleanup, use proper type `runDesc' instead of passing void

This commit is contained in:
rlar 2014-10-04 18:24:05 +02:00
parent 0c4df4bf27
commit ff384526cc
4 changed files with 8 additions and 12 deletions

View File

@ -240,8 +240,8 @@ unsigned int chg[LXT2_WR_GRANULE_SIZE];
#define LXT2_WR_SYM_F_WIRE (1<<15) #define LXT2_WR_SYM_F_WIRE (1<<15)
#define LXT2_WR_SYM_F_REG (1<<16) #define LXT2_WR_SYM_F_REG (1<<16)
void lxt2_init(void *plotPtr); void lxt2_init(runDesc *run);
void lxt2_end(void *plotPtr); void lxt2_end(runDesc *run);
/* file I/O */ /* file I/O */
struct lxt2_wr_trace * lxt2_wr_init(const char *name); struct lxt2_wr_trace * lxt2_wr_init(const char *name);

View File

@ -32,9 +32,8 @@
return(E_NOMEM); \ return(E_NOMEM); \
} }
void CKTemitlxt2(void *plotPtr) void CKTemitlxt2(runDesc *run)
{ {
runDesc *run = (runDesc *) plotPtr;
struct lxt2_wr_symbol **trace_table; struct lxt2_wr_symbol **trace_table;
struct lxt2_wr_symbol *trace; struct lxt2_wr_symbol *trace;
char *name; char *name;

View File

@ -32,10 +32,9 @@
} }
static void EVTtraceinit(CKTcircuit *ckt); static void EVTtraceinit(CKTcircuit *ckt);
static void KVLtraceinit(void *plotPtr); static void KVLtraceinit(runDesc *run);
void lxt2_init(void *plotPtr) { void lxt2_init(runDesc *run) {
runDesc *run = (runDesc *)plotPtr;
#ifdef LXT2_DEBUG #ifdef LXT2_DEBUG
printf("LXT2 lxt2_init\n"); printf("LXT2 lxt2_init\n");
@ -56,9 +55,8 @@ void lxt2_init(void *plotPtr) {
} }
} }
void lxt2_end(void *plotPtr) void lxt2_end(runDesc *run)
{ {
runDesc *run = (runDesc *) plotPtr;
if(run && run->circuit) { if(run && run->circuit) {
#ifdef LXT2_DEBUG #ifdef LXT2_DEBUG
printf("LXT2 final file flush.\n"); printf("LXT2 final file flush.\n");
@ -130,9 +128,8 @@ static void EVTtraceinit(CKTcircuit *ckt) /* the circuit structure */
ckt->lxt2.evt_num = num_nodes; ckt->lxt2.evt_num = num_nodes;
} }
static void KVLtraceinit(void *plotPtr) /* Call this after OUTpBeginPlot after all electrical run data is loaded */ static void KVLtraceinit(runDesc *run) /* Call this after OUTpBeginPlot after all electrical run data is loaded */
{ {
runDesc *run = (runDesc *) plotPtr;
struct lxt2_wr_symbol **trace_table = NULL; struct lxt2_wr_symbol **trace_table = NULL;
int *kvl_indexmap = NULL; int *kvl_indexmap = NULL;
int i; int i;

View File

@ -24,7 +24,7 @@
#pragma alloca #pragma alloca
#endif #endif
#include "ngspice/config.h" #include "ngspice/ngspice.h"
#include "ngspice/lxt2_write.h" #include "ngspice/lxt2_write.h"