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

📄 perror.c

📁 mips架构的bootloader,99左右的版本 但源代码现在没人更新了
💻 C
字号:
/************************************************************* * File: lib/perror.c * Purpose: Print error message. * Author: Phil Bunce (pjb@carmel.com) * Revision History: *	980623	Created */#include <errno.h>#include <stdio.h>char *_sys_errlist[] = {	"",	"Invalid argument",	"No such file or directory",	"Too many open files",	"","","","","",	"Bad file descriptor",	"","","",	"Permission denied",	"","","","","",	"No such device",	};int _sys_nerr = 20; /* number of items in errlist *//**************************************************************  void perror(const char *msg)*	Performs the same function as the CLIB function of *	the same name.*/void perror(const char *msg){char *p;if (errno < 0 || errno >= _sys_nerr) p = "unknown errno";else p = _sys_errlist[errno];if (msg && *msg) fprintf(stderr,"%s: %s.\n",msg,p);else fprintf(stderr,"%s.\n",p);}

⌨️ 快捷键说明

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