Ruby 1.9.2p136(2010-12-25revision30365)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

# missing/strerror.c

Go to the documentation of this file.

    00001 /* public domain rewrite of strerror(3) */
    00002
    00003 extern int sys_nerr;
    00004 extern char *sys_errlist[];
    00005
    00006 static char msg[50];
    00007
    00008 char *
    00009 strerror(int error)
    00010 {
    00011     if (error <= sys_nerr && error > 0) {
    00012         return sys_errlist[error];
    00013     }
    00014     sprintf(msg, "Unknown error (%d)", error);
    00015     return msg;
    00016 }
    00017