118742Sedward /* 2*33514Sbostic * Copyright (c) 1983 Regents of the University of California. 3*33514Sbostic * All rights reserved. 4*33514Sbostic * 5*33514Sbostic * Redistribution and use in source and binary forms are permitted 6*33514Sbostic * provided that this notice is preserved and that due credit is given 7*33514Sbostic * to the University of California at Berkeley. The name of the University 8*33514Sbostic * may not be used to endorse or promote products derived from this 9*33514Sbostic * software without specific prior written permission. This software 10*33514Sbostic * is provided ``as is'' without express or implied warranty. 1118742Sedward */ 1218742Sedward 13*33514Sbostic #ifndef lint 14*33514Sbostic static char sccsid[] = "@(#)wwerror.c 3.4 (Berkeley) 02/21/88"; 15*33514Sbostic #endif /* not lint */ 16*33514Sbostic 1714963Sedward #include "ww.h" 1814963Sedward 1914963Sedward char * 2014963Sedward wwerror() 2114963Sedward { 2214963Sedward extern errno; 2314963Sedward extern char *sys_errlist[]; 2414963Sedward 2514963Sedward switch (wwerrno) { 2614963Sedward case WWE_NOERR: 2714963Sedward return "No error"; 2814963Sedward case WWE_SYS: 2914963Sedward return sys_errlist[errno]; 3014963Sedward case WWE_NOMEM: 3114963Sedward return "Out of memory"; 3214963Sedward case WWE_TOOMANY: 3314963Sedward return "Too many windows"; 3414963Sedward case WWE_NOPTY: 3514963Sedward return "Out of pseudo-terminals"; 3614963Sedward case WWE_SIZE: 3714963Sedward return "Bad window size"; 3814963Sedward case WWE_BADTERM: 3914963Sedward return "Unknown terminal type"; 4014963Sedward case WWE_CANTDO: 4114963Sedward return "Can't run window on this terminal"; 4214963Sedward default: 4314963Sedward return "Unknown error"; 4414963Sedward } 4514963Sedward } 46