error.c

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

C
71
字号
/**********Copyright 1990 Regents of the University of California.  All rights reserved.Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group**********//* * * Print out in more detail what a floating point error was. */#include "ngspice.h"#include "cpdefs.h"#include "ftedefs.h"#include <signal.h>#include "error.h"/* global error message buffer */char ErrorMessage[1024];voidfperror(char *mess, int code){    fprintf(cp_err, "%s: floating point exception.\n", mess);    return;}/* Print a spice error message. */voidft_sperror(int code, char *mess){    fprintf(cp_err, "%s: %s\n", mess, if_errstring(code));    return;}voidfatal(void){    cp_ccon(FALSE);#ifdef FTEDEBUG#ifdef SIGQUIT    (void) signal(SIGQUIT, SIG_DFL);    (void) kill(getpid(), SIGQUIT);#endif#endif    exit(EXIT_BAD);}/* These error messages are from internal consistency checks. */voidinternalerror(char *message){    fprintf(stderr, "internal error:  %s\n", message);}/* These errors are from external routines like fopen. */voidexternalerror(char *message){    fprintf(stderr, "external error:  %s\n", message);}

⌨️ 快捷键说明

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