31 static struct o *
get_mut(
long,
long,
struct s*);
46 struct prpty *PDesc,*PNext;
47 struct o *Pointer1,*Pointer2;
50 int i, mutfound =
False;
65 if (Pointer1 ==
NULL || Pointer2 ==
NULL)
70 sprintf(
TypeOut,
"k = %g (a add, d delete) > ",
73 i =
mut_kb(PDesc,Pointer1,Pointer2,LookedAhead);
79 if (mutfound ==
False) {
81 "No mutual inductors found. Enter 'a' to add mutual inductor > ");
93 mut_kb(PDesc,Pointer1,Pointer2,LookedAhead)
97 struct
o *Pointer1,*Pointer2;
105 if (Pointer1 !=
NULL)
107 if (Pointer2 !=
NULL)
112 if (InChar ==
'\0' || InChar ==
'\n' || InChar ==
'\r')
114 if (InChar ==
'a' || InChar ==
'A')
116 if (InChar ==
'd' || InChar ==
'D') {
129 free(PDesc->prpty_Data);
144 struct o *Pointer1,*Pointer2;
146 char value[32],*TypeIn;
151 ShowPrompt(
"Point to first coupled inductor.");
171 ShowPrompt(
"Point to second coupled inductor.");
184 Pointer2 != Pointer1) {
194 ShowPrompt(
"Enter SPICE coupling factor: k = ");
221 sprintf(
TypeOut,
"%ld %ld %ld %ld %s",
247 CDGen(CellDesc,GenDesc,&Pointer);
248 if (Pointer ==
NULL)
break;
251 name = ((
struct c *)Pointer->
oRep)->cMaster->mName;
252 if (!
cieq(name,
"ind"))
continue;
276 CDGen(CellDesc,GenDesc,&Pointer);
277 if (Pointer ==
NULL)
break;
280 name = ((
struct c *)Pointer->
oRep)->cMaster->mName;
281 if (!
cieq(name,
"ind"))
continue;
297 struct prpty *PDesc,*pd1,*pd2;
298 struct o *Pointer1,*Pointer2;
300 char name1[8],name2[8],value[32];
301 long L1X,L2X,L1Y,L2Y;
304 PDesc = CellDesc->sPrptyList;
311 Pointer1 =
get_mut(L1X,L1Y,CellDesc);
312 Pointer2 =
get_mut(L2X,L2Y,CellDesc);
313 if (Pointer1 ==
NULL || Pointer2 ==
NULL)
319 sprintf(
TypeOut,
"K%d %s %s %g",count,name1,name2,
340 for (; PDesc; PDesc = PDesc->prpty_Succ) {
341 if (PDesc->prpty_Value !=
P_NAME)
continue;
342 sprintf(nbuf,
"%s%d",PDesc->prpty_Data->p_name.name,
343 PDesc->prpty_Data->p_name.num);
struct prpty * sPrptyList
struct line * AllocateLine()
union prp_data * prpty_Data
static struct o * select_inductor()
struct prpty * prpty_Succ
struct line * PrintMutual(struct s *CellDesc)
static struct o * get_mut()
void ShowPrompt(char *str)
char * GetName(struct prpty *PDesc)
struct prpty * oPrptyList
void ShowMutual(int *LookedAhead)