Revision 12646,
888 bytes
checked in by danw, 26 years ago
(diff) |
This commit was generated by cvs2svn to compensate for changes in r12645,
which included commits to RCS files with non-trunk default branches.
|
Line | |
---|
1 | /* |
---|
2 | |
---|
3 | strerror.c |
---|
4 | |
---|
5 | Author: Tatu Ylonen <ylo@cs.hut.fi> |
---|
6 | |
---|
7 | Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
---|
8 | All rights reserved |
---|
9 | |
---|
10 | Created: Wed Mar 22 18:18:21 1995 ylo |
---|
11 | |
---|
12 | Replacement for strerror for systems that don't have it. |
---|
13 | |
---|
14 | */ |
---|
15 | |
---|
16 | /* |
---|
17 | * $Id: strerror.c,v 1.1.1.2 1999-03-08 17:43:29 danw Exp $ |
---|
18 | * $Log: not supported by cvs2svn $ |
---|
19 | * Revision 1.2 1998/05/12 22:14:46 ylo |
---|
20 | * Fixed strerror to never return NULL. |
---|
21 | * |
---|
22 | * Revision 1.1.1.1 1996/02/18 21:38:11 ylo |
---|
23 | * Imported ssh-1.2.13. |
---|
24 | * |
---|
25 | * Revision 1.2 1995/07/13 01:40:55 ylo |
---|
26 | * Removed "Last modified" header. |
---|
27 | * Added cvs log. |
---|
28 | * |
---|
29 | * $Endlog$ |
---|
30 | */ |
---|
31 | |
---|
32 | |
---|
33 | #include <stdio.h> |
---|
34 | #include <errno.h> |
---|
35 | |
---|
36 | extern int sys_nerr; |
---|
37 | extern char *sys_errlist[]; |
---|
38 | |
---|
39 | char *strerror(int error_number) |
---|
40 | { |
---|
41 | if (error_number >= 0 && error_number < sys_nerr) |
---|
42 | return sys_errlist[error_number]; |
---|
43 | else |
---|
44 | return "Bad error code"; |
---|
45 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.