1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
|
.\" Copyright (c) 1994 Michael Haardt (u31b3hs@pool.informatik.rwth-aachen.de), Sat Jun 4 20:38:26 MET DST 1994
.\" Copyright (c) 1995 Michael Haardt (michael@cantor.informatik.rwth-aachen.de), Thu Mar 16 18:46:23 MET 1995
.\" Copyright (c) 1996 Andries Brouwer (aeb@cwi.nl), Sat Jan 13 00:16:41 MET 1996
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, write to the Free
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
.\" USA.
.\"
.\" Sat Jan 13 00:16:41 MET 1996, aeb: merged in some text contributed
.\" by Melvin Smith (msmith@falcon.mercer.peachnet.edu) and various
.\" other changes.
.\" Modified Fri May 16 23:41:15 1996 by Martin Schulze (joey@infodrom.north.de)
.\"
.\" Japanese Version Copyright (c) 1998 TACHIBANA Akira
.\" all rights reserved.
.\" Translated Thu May 28 00:30:18 JST 1998
.\" by TACHIBANA Akira <tati@tky.3web.ne.jp>
.\" Updated Fri Dec 21 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
.\"
.TH PERROR 3 2001-12-14 "" "Library functions"
.SH ̾
perror \- ƥ२顼åϤ
.SH
.B #include <stdio.h>
.sp
.BI "void perror(const char " *s );
.sp
.B #include <errno.h>
.sp
.BI "const char *" sys_errlist [];
.br
.BI "int " sys_nerr ;
.SH
ؿ
.B perror()
ϡǸ˥顼λƥॳʤ饤֥ؿ
顼åɸ२顼Ϥ˽Ϥ롣
ޤ
.RI ( s
NULL Ǥʤ
.RI * s
NUL Ǥʤ)ʸ
.I s
Ϥ졢³ƥ³
줫åȲԤϤ롣
Υå³Ѥ뤿ˤϡʸϥ顼ȯ
ؿ̾ޤ٤Ǥ롣
顼ֹϳѿ
.IR errno
롣顼ֹϥ顼ȯꤵ졢
ƽФԤƤ
.IR errno
ϥꥢʤ
ѿ
.IR sys_errlist "[]"
ϡ
.I errno
źȤ̵Υ顼å뤿Ѥ롣
ơ֥ǤκΥåֹ
.IR sys_nerr " \-1"
Ȥʤ롣
Υơ֥ؤľܻȤˤդ뤳ȡʤʤ顢顼ֹ椬
.IR sys_errlist "[]"
ɲäƤȤϸ¤ʤǤ롣
ƥॳ뤬Ԥ硢֤ͤ̾ \-1 ֤ꡢ
.I errno
˥顼̤ͤꤵ롣(顼ֹ
.IR "<errno.h>"
˵ҤƤ롣)
¿Υ饤֥ؿƱͤưȤʤ롣
ؿ
.B perror()
ϡΥ顼ɤβɤʥåؤѴ롣
.I errno
ϡ饤֥ƽФˤ̤Ǥ뤳Ȥդ뤳:
θƽФȤȤƤ⡢ǸƤӽФ¾Υ饤֥ؿ
Ԥơη̤ѿꤹ뤳Ȥ⤢Τǡ
äơԤƽФΤ
.BR perror
θƽФԤʤˤ
.I errno
ͤ
¸ƤʤФʤʤ
.SH
ANSI C, BSD 4.3, POSIX, X/OPEN
.SH Ϣ
.BR strerror (3)
|