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

📄 sperror.c

📁 支持数字元件仿真的SPICE插件
💻 C
字号:
/* * Copyright (c) 1985 Thomas L. Quarles *//*  *  provide the error message appropriate for the given error code */#include "prefix.h"#include <string.h>#include "SPerror.h"#include "CKTdefs.h"#include "IFsim.h"#include "util.h"#include "suffix.h"RCSID("SPerror.c $Revision: 1.2 $ on $Date: 92/12/18 16:16:40 $")#define MSG(a) \val = MALLOC(2+strlen(a));\if(val) {\    (void)strcpy(val,a);\    return(val);\}\(*(SPfrontEnd->IFerror))(ERR_PANIC,nomem,(IFuid *)NULL);\return(NULL);char *SPerror(type)    int type;{static char *unknownError = "Error code";static char *Pause =        "Pause requested";static char *intern =       "Impossible error - can't occur";static char *exists =       "Device already exists, existing one being used";static char *nodev =        "No such device";static char *noterm =       "No such terminal on this device";static char *nomod =        "No such model";static char *badparm =      "No such parameter on this device";static char *nomem =        "Out of Memory";static char *badmatrix =    "Matrix can't be decomposed as is";static char *singular =     "Matrix is singular";static char *iterlim =      "Iteration limit reached";static char *order =        "Unsupported integration order";static char *method =       "Unsupported integration method";static char *timestep =     "Timestep too small";static char *xmission =     "transmission lines not supported by pole-zero";static char *toobig =       "magnitude overflow";static char *isshort =      "input or output shorted";static char *inisout =      "transfer function is 1";char *val;    switch(type) {        default:            MSG(unknownError)        case E_PAUSE:            MSG(Pause)        case OK:            return(NULL);        case E_INTERN:            MSG(intern)        case E_EXISTS:            MSG(exists)        case E_NODEV:            MSG(nodev)        case E_NOMOD:            MSG(nomod)        case E_NOTERM:            MSG(noterm)        case E_BADPARM:            MSG(badparm)        case E_NOMEM:            MSG(nomem)        case E_BADMATRIX:            MSG(badmatrix)        case E_SINGULAR:            MSG(singular)        case E_ITERLIM:            MSG(iterlim)        case E_ORDER:            MSG(order)        case E_METHOD:            MSG(method)        case E_TIMESTEP:            MSG(timestep)        case E_XMISSIONLINE:            MSG(xmission)        case E_MAGEXCEEDED:            MSG(toobig)        case E_SHORT:            MSG(isshort)        case E_INISOUT:            MSG(inisout)    }    /*NOTREACHED*/}    

⌨️ 快捷键说明

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