From 7047535f963148cf11f1800cd41fb9a83d2eba36 Mon Sep 17 00:00:00 2001 From: rlar Date: Fri, 8 Oct 2010 16:41:13 +0000 Subject: [PATCH] type bistromatic --- ChangeLog | 8 ++++++++ src/frontend/spiceif.c | 6 +++--- src/spicelib/analysis/cktnewan.c | 2 +- src/spicelib/parser/inp2dot.c | 4 ++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 49253e023..cd501f1bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-10-08 Robert Larice + * src/frontend/spiceif.c , + * src/spicelib/analysis/cktnewan.c , + * src/spicelib/parser/inp2dot.c : + type bistromatic + in preparation for the next patches + Note: offsetof struct TSKtask.taskOptions === 0 + 2010-10-08 Robert Larice * src/frontend/spiceif.c : remove a redundant cast diff --git a/src/frontend/spiceif.c b/src/frontend/spiceif.c index 255c501aa..d4ec4c713 100644 --- a/src/frontend/spiceif.c +++ b/src/frontend/spiceif.c @@ -1257,7 +1257,7 @@ if_getstat(CKTcircuit *ckt, char *name) break; if (i == ft_sim->analyses[which]->numParms) return (NULL); - if ((*(ft_sim->askAnalysisQuest))(ckt, ft_curckt->ci_curTask, + if ((*(ft_sim->askAnalysisQuest))(ckt, &(((TSKtask*)ft_curckt->ci_curTask)->taskOptions), ft_sim->analyses[which]->analysisParms[i].id, &parm, (IFvalue *)NULL) == -1) { fprintf(cp_err, @@ -1271,7 +1271,7 @@ if_getstat(CKTcircuit *ckt, char *name) if(!(ft_sim->analyses[which]->analysisParms[i].dataType&IF_ASK)) { continue; } - if ((*(ft_sim->askAnalysisQuest))(ckt, ft_curckt->ci_curTask, + if ((*(ft_sim->askAnalysisQuest))(ckt, &(((TSKtask*)ft_curckt->ci_curTask)->taskOptions), ft_sim->analyses[which]->analysisParms[i].id, &parm, (IFvalue *)NULL) == -1) { fprintf(cp_err, @@ -1503,7 +1503,7 @@ do {\ _foo(lname,TRANan,1); } ((TSKtask *)ft_curckt->ci_curTask)->jobs->JOBname = NULL; - ckt->CKTcurJob = ((TSKtask *)ft_curckt->ci_curTask)->jobs; + ckt->CKTcurJob = (&(((TSKtask *)ft_curckt->ci_curTask)->taskOptions))->jobs; _foo(((TSKtask *)ft_curckt->ci_curTask)->jobs->JOBname,char,-1); diff --git a/src/spicelib/analysis/cktnewan.c b/src/spicelib/analysis/cktnewan.c index c007c76a6..622ecf54a 100644 --- a/src/spicelib/analysis/cktnewan.c +++ b/src/spicelib/analysis/cktnewan.c @@ -20,7 +20,7 @@ CKTnewAnal(CKTcircuit *ckt, int type, IFuid name, void **analPtr, void *taskPtr) { if(type==0) { /* special case for analysis type 0 == option card */ - *analPtr=taskPtr; /* pointer to the task itself */ + *analPtr = &(((TSKtask *)taskPtr)->taskOptions); /* pointer to the task itself */ (*(JOB **)analPtr)->JOBname = name; (*(JOB **)analPtr)->JOBtype = type; return(OK); /* doesn't need to be created */ diff --git a/src/spicelib/parser/inp2dot.c b/src/spicelib/parser/inp2dot.c index b489b8515..bb3c93ecb 100644 --- a/src/spicelib/parser/inp2dot.c +++ b/src/spicelib/parser/inp2dot.c @@ -12,7 +12,7 @@ Modified: 2000 AlansFixes #include "fteext.h" #include "inp.h" #include "cpdefs.h" - +#include "tskdefs.h" static int dot_noise(char *line, CKTcircuit *ckt, INPtables *tab, card *current, @@ -627,7 +627,7 @@ dot_options(char *line, CKTcircuit *ckt, INPtables *tab, card *current, /* use a subroutine to handle all of them to keep this */ /* subroutine managable. */ - INPdoOpts(ckt,task,current,tab); + INPdoOpts(ckt, &(((TSKtask *)task)->taskOptions), current, tab); return (0); }