bsimmdelete.c
来自「支持数字元件仿真的SPICE插件」· C语言 代码 · 共 45 行
C
45 行
/* * Copyright (c) 1985 Hong J. Park, Thomas L. Quarles */#include "prefix.h"#include <stdio.h>#include "util.h"#include "BSIMdefs.h"#include "SPerror.h"#include "suffix.h"RCSID("BSIMmDelete.c $Revision: 1.1 $ on $Date: 90/10/11 12:41:08 $")intBSIMmDelete(inModel,modname,kill) GENmodel **inModel; IFuid modname; GENmodel *kill;{ BSIMmodel **model = (BSIMmodel**)inModel; BSIMmodel *modfast = (BSIMmodel*)kill; BSIMinstance *here; BSIMinstance *prev = NULL; BSIMmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->BSIMnextModel)) { if( (*model)->BSIMmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD);delgot: *oldmod = (*model)->BSIMnextModel; /* cut deleted device out of list */ for(here = (*model)->BSIMinstances ; here ; here = here->BSIMnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?