BSD 4_3_Tahoe release
[unix-history] / usr / src / usr.lib / sendmail / src / sysexits.c
index 572c16b..ac6ac36 100644 (file)
@@ -1,26 +1,31 @@
 /*
 /*
-**  Sendmail
-**  Copyright (c) 1983  Eric P. Allman
-**  Berkeley, California
-**
-**  Copyright (c) 1983 Regents of the University of California.
-**  All rights reserved.  The Berkeley software License Agreement
-**  specifies the terms and conditions for redistribution.
-*/
+ * Copyright (c) 1983 Eric P. Allman
+ * Copyright (c) 1988 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
 
 #ifndef lint
 
 #ifndef lint
-static char    SccsId[] = "@(#)sysexits.c      5.2 (Berkeley) 6/7/85";
-#endif not lint
+static char sccsid[] = "@(#)sysexits.c 5.5 (Berkeley) 6/30/88";
+#endif /* not lint */
 
 
-# include <sysexits.h>
-# include "useful.h"
+#include <sysexits.h>
 
 /*
 
 /*
-**  SYSEXITS.C -- error messages corresponding to sysexits.h
-*/
-
-char   *SysExMsg[] =
-{
+ *  SYSEXITS.C -- error messages corresponding to sysexits.h
+ */
+char *SysExMsg[] = {
        /* 64 USAGE */          "500 Bad usage",
        /* 65 DATAERR */        "501 Data format error",
        /* 66 NOINPUT */        "550 Cannot open input",
        /* 64 USAGE */          "500 Bad usage",
        /* 65 DATAERR */        "501 Data format error",
        /* 66 NOINPUT */        "550 Cannot open input",
@@ -35,34 +40,33 @@ char        *SysExMsg[] =
        /* 75 TEMPFAIL */       "250 Deferred",
        /* 76 PROTOCOL */       "554 Remote protocol error",
        /* 77 NOPERM */         "550 Insufficient permission",
        /* 75 TEMPFAIL */       "250 Deferred",
        /* 76 PROTOCOL */       "554 Remote protocol error",
        /* 77 NOPERM */         "550 Insufficient permission",
+       /* 78 CONFIG */         "554 Local configuration error",
 };
 
 };
 
-int    N_SysEx = sizeof SysExMsg / sizeof SysExMsg[0];
-\f/*
-**  STATSTRING -- return string corresponding to an error status
-**
-**     Parameters:
-**             stat -- the status to decode.
-**
-**     Returns:
-**             The string corresponding to that status
-**
-**     Side Effects:
-**             none.
-*/
+int N_SysEx = sizeof(SysExMsg) / sizeof(SysExMsg[0]);
 
 
+/*
+ *  STATSTRING -- return string corresponding to an error status
+ *
+ *     Parameters:
+ *             stat -- the status to decode.
+ *
+ *     Returns:
+ *             The string corresponding to that status
+ *
+ *     Side Effects:
+ *             none.
+ */
 char *
 statstring(stat)
        int stat;
 {
 char *
 statstring(stat)
        int stat;
 {
-       static char ebuf[100];
+       static char ebuf[50];
 
        stat -= EX__BASE;
 
        stat -= EX__BASE;
-       if (stat < 0 || stat >= N_SysEx)
-       {
-               (void) sprintf(ebuf, "554 Unknown status %d", stat + EX__BASE);
-               return (ebuf);
+       if (stat < 0 || stat >= N_SysEx) {
+               (void)sprintf(ebuf, "554 Unknown status %d", stat + EX__BASE);
+               return(ebuf);
        }
        }
-
-       return (SysExMsg[stat]);
+       return(SysExMsg[stat]);
 }
 }