Commit | Line | Data |
---|---|---|
dffa93b1 | 1 | /* Turning errno values into English error messages. |
e17cba16 GH |
2 | Copyright (C) 1985, 86, 87, 88, 93, 94, 95 Free Software Foundation, Inc. |
3 | ||
4 | This file is part of GNU Emacs. | |
5 | ||
6 | GNU Emacs is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2, or (at your option) | |
9 | any later version. | |
10 | ||
11 | GNU Emacs is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with GNU Emacs; see the file COPYING. If not, write to | |
18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
19 | Boston, MA 02111-1307, USA. */ | |
20 | ||
6e8d25a6 GB |
21 | /* Software engineering face-lift by Greg J. Badros, 11-Dec-1999, |
22 | gjb@cs.washington.edu, http://www.cs.washington.edu/homes/gjb */ | |
e17cba16 GH |
23 | |
24 | char * | |
6e8d25a6 | 25 | strerror (int errnum) |
e17cba16 GH |
26 | { |
27 | extern char *sys_errlist[]; | |
28 | extern int sys_nerr; | |
29 | ||
30 | if (errnum >= 0 && errnum < sys_nerr) | |
31 | return sys_errlist[errnum]; | |
32 | return (char *) "Unknown error"; | |
33 | } | |
89e00824 ML |
34 | |
35 | /* | |
36 | Local Variables: | |
37 | c-file-style: "gnu" | |
38 | End: | |
39 | */ |