?? errmsg.c
字號:
/*errmsg.c - implementation of the elf_errmsg(3) function.Copyright (C) 1995 - 1999 Michael Riepe <michael@stud.uni-hannover.de>This library is free software; you can redistribute it and/ormodify it under the terms of the GNU Library General PublicLicense as published by the Free Software Foundation; eitherversion 2 of the License, or (at your option) any later version.This library is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNULibrary General Public License for more details.You should have received a copy of the GNU Library General PublicLicense along with this library; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.*/#include <private.h>#ifndef lintstatic const char rcsid[] = "@(#) $Id: errmsg.c,v 1.6 2000/03/31 18:02:55 michael Exp $";#endif /* lint */#if HAVE_GETTEXT# undef HAVE_CATGETS# include <libintl.h>#else /* HAVE_GETTEXT */# define dgettext(dom, str) str#endif /* HAVE_GETTEXT */#if HAVE_CATGETS# include <nl_types.h>static nl_catd _libelf_cat = (nl_catd)0;#endif /* HAVE_CATGETS */#if HAVE_GETTEXT || HAVE_CATGETSstatic const char domain[] = "libelf";#endif /* HAVE_GETTEXT || HAVE_CATGETS */#if PICstatic const char *_messages[] = {#else /* PIC */static const char *const _messages[] = {#endif /* PIC */#define __err__(a,b) b,#include <errors.h> /* include string tables from errors.h */#undef __err__};const char*elf_errmsg(int err) { if (err == 0) { err = _elf_errno; if (err == 0) { return NULL; } } else if (err == -1) { err = _elf_errno; } if (err < 0 || err >= ERROR_NUM || _messages[err] == NULL) { err = ERROR_UNKNOWN; }#if HAVE_CATGETS if (_libelf_cat == (nl_catd)0) { _libelf_cat = catopen(domain, 0); } if (_libelf_cat != (nl_catd)-1) { return catgets(_libelf_cat, 1, err + 1, _messages[err]); }#endif /* HAVE_CATGETS */ return dgettext(domain, _messages[err]);}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -