1 /* 2 * Copyright (c) 1983 Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Edward Wang at The University of California, Berkeley. 7 * 8 * %sccs.include.redist.c% 9 */ 10 11 #ifndef lint 12 static char sccsid[] = "@(#)wwerror.c 3.8 (Berkeley) 06/06/90"; 13 #endif /* not lint */ 14 15 #include "ww.h" 16 17 char * 18 wwerror() 19 { 20 extern int errno; 21 char *strerror(); 22 23 switch (wwerrno) { 24 case WWE_NOERR: 25 return "No error"; 26 case WWE_SYS: 27 return strerror(errno); 28 case WWE_NOMEM: 29 return "Out of memory"; 30 case WWE_TOOMANY: 31 return "Too many windows"; 32 case WWE_NOPTY: 33 return "Out of pseudo-terminals"; 34 case WWE_SIZE: 35 return "Bad window size"; 36 case WWE_BADTERM: 37 return "Unknown terminal type"; 38 case WWE_CANTDO: 39 return "Can't run window on this terminal"; 40 default: 41 return "Unknown error"; 42 } 43 } 44