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

📄 perror.c

📁 vxworks libc库源代码
💻 C
字号:
/* perror.c - print error value. stdio.h *//* Copyright 1992-1993 Wind River Systems, Inc. *//* modification history -------------------- 01c,05mar93,jdi  documentation cleanup for 5.1.01b,20sep92,smb  documentation additions01a,29jul92,smb  written.*/ /*DESCRIPTIONINCLUDE FILE: stdio.h, error.h, string.hSEE ALSO: American National Standard X3.159-1989NOMANUAL*/#include "vxWorks.h"#include "stdio.h"#include "string.h"#include "errno.h"/******************************************************************************** perror - map an error number in `errno' to an error message (ANSI)** This routine maps the error number in the integer expression `errno' to an* error message.  It writes a sequence of characters to the standard error* stream as follows:  first (if <__s> is not a null pointer and the character* pointed to by <__s> is not the null character), the string pointed to by* <__s> followed by a colon (:) and a space; then an appropriate error* message string followed by a new-line character.  The contents of the* error message strings are the same as those returned by strerror() with* the argument `errno'.* * INCLUDE FILES: stdio.h ** RETURNS: N/A** SEE ALSO: strerror()*/void perror     (    const char *  __s	/* error string */    )    {    if ((__s) && (*__s != EOS))    	fprintf (stderr, "%s: ", __s);    fprintf (stderr, "%s\n", strerror (errno));    }

⌨️ 快捷键说明

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