cktnewanal.c

来自「支持数字元件仿真的SPICE插件」· C语言 代码 · 共 46 行

C
46
字号
/* * Copyright (c) 1985 Thomas L. Quarles */#include "prefix.h"#include <stdio.h>#include "TSKdefs.h"#include "JOBdefs.h"#include "IFsim.h"#include "util.h"#ifndef CMS#include "IFerrmsgs.h"#else  /* CMS */#include "IFerrmsg.h"#endif /* CMS */#include "suffix.h"RCSID("CKTnewAnal.c $Revision: 1.1 $ on $Date: 91/04/02 12:07:54 $")extern SPICEanalysis *analInfo[];/* ARGSUSED */intCKTnewAnal(ckt,type,name,analPtr,taskPtr)    GENERIC *ckt;    int type;    IFuid name;    GENERIC **analPtr;    GENERIC *taskPtr;{    if(type==0) {        /* special case for analysis type 0 == option card */        *analPtr=taskPtr; /* pointer to the task itself */        (*(JOB **)analPtr)->JOBname = name;        (*(JOB **)analPtr)->JOBtype = type;        return(OK); /* doesn't need to be created */    }    *analPtr = (GENERIC *)MALLOC(analInfo[type]->size);    if(*analPtr==NULL) return(E_NOMEM);    (*(JOB **)analPtr)->JOBname = name;    (*(JOB **)analPtr)->JOBtype = type;    (*(JOB **)analPtr)->JOBnextJob = ((TSKtask *)taskPtr)->jobs;    ((TSKtask *)taskPtr)->jobs = (JOB *)*analPtr;    return(OK);}

⌨️ 快捷键说明

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