inppname.c

来自「ngspice又一个电子CAD仿真软件代码.功能更全」· C语言 代码 · 共 49 行

C
49
字号
/**********Copyright 1990 Regents of the University of California.  All rights reserved.Author: 1985 Thomas L. Quarles**********/    /*     * INPpName()     *     *  Take a parameter by Name and set it on the specified device      */#include "ngspice.h"#include <stdio.h>#include "cpdefs.h"#include "fteext.h"#include "ifsim.h"#include "iferrmsg.h"#include "inp.h"int INPpName(char *parm, IFvalue * val, void *ckt, int dev, void *fast)		    /* the name of the parameter to set */		    /* the parameter union containing the value to set */		    /* the circuit this device is a member of */		    /* the device type code to the device being parsed */		    /* direct pointer to device being parsed */{    int error;			/* int to store evaluate error return codes in */    int i;    for (i = 0; i < (*(*(ft_sim->devices)[dev]).numInstanceParms); i++) {	if (strcmp(parm,		   ((*(ft_sim->devices)[dev]).instanceParms[i].keyword)) ==	    0) {	    error =		(*(ft_sim->setInstanceParm)) (ckt, fast,					      (*(ft_sim->devices)[dev]).					      instanceParms[i].id, val,					      (IFvalue *) NULL);	    if (error)		return (error);	    break;	}    }    if (i == (*(*(ft_sim->devices)[dev]).numInstanceParms)) {	return (E_BADPARM);    }    return (OK);}

⌨️ 快捷键说明

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