jsperror.c

来自「b tree how to operate on b tr」· C语言 代码 · 共 41 行

C
41
字号
/*JS***********************************************************************    Program : JSPERROR*    Language: ANSI-C*    Author  : Joerg Schoen*    Purpose : Similar to "perror", but recognizes library errors as well**************************************************************************/#ifndef lintstatic const char rcsid[] = "$Id$";#endif/*********     INCLUDES                                         *********/#include <stdio.h>#include <errno.h>#include <jssubs.h>#define Prototype extern/*********     PROTOTYPES                                       *********/Prototype void           jsperror(const char *s);/*JS**********************************************************************   The difficult question is: which error code has precedence? Currently*    this is the library.*************************************************************************/void jsperror(const char *s)/************************************************************************/{  if(JSErrNo)    fprintf(stderr,"%s: %s\n",s,jsStrError(JSErrNo));  else    /*  Leave handling of errno == 0 to perror :)  */    perror(s);  return;}

⌨️ 快捷键说明

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