⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inp2k.c

📁 另一款电路设计软件
💻 C
字号:
/**********Copyright 1990 Regents of the University of California.  All rights reserved.Author: 1988 Thomas L. Quarles**********/#include "spice.h"#include <stdio.h>#include "ifsim.h"#include "inpdefs.h"#include "inpmacs.h"#include "fteext.h"#include "suffix.h"voidINP2K(ckt,tab,current)    GENERIC *ckt;    INPtables *tab;    card *current;{/* Kname Lname Lname <val> */int type;   /* the type the model says it is */char *line; /* the part of the current line left to parse */char *name; /* the resistor's name */int error;      /* error code temporary */GENERIC *fast;  /* pointer to the actual instance */IFvalue ptemp;  /* a value structure to package resistance into */IFvalue *parm;  /* ptr to a value structure for function return values */int waslead;    /* flag to indicate that funny unlabeled number was found */double leadval; /* actual value of unlabeled number */IFuid uid;      /* uid for default model */    line = current->line;    type = INPtypelook("mutual");    if(type < 0 ) {        LITERR("Device type mutual not supported by this binary\n")        return;    }    INPgetTok(&line,&name,1);    INPinsert(&name,tab);    if(!tab->defKmod) {        /* create deafult K model */        IFnewUid(ckt,&uid,(IFuid)NULL,"K",UID_MODEL,(GENERIC**)NULL);        IFC(newModel,(ckt,type,&(tab->defKmod),uid))    }    IFC(newInstance,(ckt,tab->defKmod,&fast,name))    parm = INPgetValue(ckt,&line,IF_INSTANCE,tab);    GCA(INPpName,("inductor1",parm,ckt,type,fast))    parm = INPgetValue(ckt,&line,IF_INSTANCE,tab);    GCA(INPpName,("inductor2",parm,ckt,type,fast))    PARSECALL((&line,ckt,type,fast,&leadval,&waslead,tab))    if(waslead) {        ptemp.rValue = leadval;        GCA(INPpName,("coefficient",&ptemp,ckt,type,fast))    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -