Ruby
1.9.3p551(2014-11-13revision48407)
Main Page
Modules
Data Structures
Files
File List
Globals
missing
strerror.c
Go to the documentation of this file.
1
/* public domain rewrite of strerror(3) */
2
3
#include "
ruby/missing.h
"
4
5
extern
int
sys_nerr
;
6
extern
char
*
sys_errlist
[];
7
8
static
char
msg
[50];
9
10
char
*
11
strerror
(
int
error)
12
{
13
if
(error <= sys_nerr && error > 0) {
14
return
sys_errlist
[error];
15
}
16
sprintf(
msg
,
"Unknown error (%d)"
, error);
17
return
msg
;
18
}
19
Generated on Fri Nov 14 2014 16:04:10 for Ruby by
1.8.3