Commit | Line | Data |
---|---|---|
3a147896 EW |
1 | #ifndef lint |
2 | static char *sccsid = "@(#)wwerror.c 3.1 83/09/13"; | |
3 | #endif | |
4 | ||
5 | #include "ww.h" | |
6 | ||
7 | char * | |
8 | wwerror() | |
9 | { | |
10 | extern errno; | |
11 | extern char *sys_errlist[]; | |
12 | ||
13 | switch (wwerrno) { | |
14 | case WWE_NOERR: | |
15 | return "No error"; | |
16 | case WWE_SYS: | |
17 | return sys_errlist[errno]; | |
18 | case WWE_NOMEM: | |
19 | return "Out of memory"; | |
20 | case WWE_TOOMANY: | |
21 | return "Too many windows"; | |
22 | case WWE_NOPTY: | |
23 | return "Out of pseudo-terminals"; | |
24 | case WWE_SIZE: | |
25 | return "Bad window size"; | |
26 | case WWE_BADTERM: | |
27 | return "Unknown terminal type"; | |
28 | case WWE_CANTDO: | |
29 | return "Can't run window on this terminal"; | |
30 | default: | |
31 | return "Unknown error"; | |
32 | } | |
33 | } |