release 2
[unix-history] / usr / src / usr.sbin / sendmail / src / err.c
index 3afde44..061478a 100644 (file)
@@ -4,8 +4,10 @@
 # include <log.h>
 # endif LOG
 
 # include <log.h>
 # endif LOG
 
+static char    SccsId[] = "@(#)err.c   2.1     %G%";
+
 /*
 /*
-**  ERR -- Print error message.
+**  SYSERR -- Print error message.
 **
 **     Prints an error message via printf to the diagnostic
 **     output.  If LOG is defined, it logs it also.
 **
 **     Prints an error message via printf to the diagnostic
 **     output.  If LOG is defined, it logs it also.
 **             -1 always
 **
 **     Side Effects:
 **             -1 always
 **
 **     Side Effects:
-**             Sets Error.
-**             Sets ExitStat.
-**
-**     Requires:
-**             sprintf (sys)
-**             printf (sys)
-**             logmsg
-**
-**     History:
-**             12/29/79 -- written.
+**             increments Errors.
+**             sets ExitStat.
 */
 
 /*VARARGS1*/
 */
 
 /*VARARGS1*/
@@ -50,7 +44,7 @@ syserr(fmt, a, b, c, d, e)
                        sprintf(p, ": error %d", errno);
        }
        printf("delivermail: %s\n", errbuf);
                        sprintf(p, ": error %d", errno);
        }
        printf("delivermail: %s\n", errbuf);
-       Error++;
+       Errors++;
 
        /* determine exit status if not already set */
        if (ExitStat == EX_OK)
 
        /* determine exit status if not already set */
        if (ExitStat == EX_OK)
@@ -58,7 +52,7 @@ syserr(fmt, a, b, c, d, e)
                if (errno == 0)
                        ExitStat = EX_SOFTWARE;
                else
                if (errno == 0)
                        ExitStat = EX_SOFTWARE;
                else
-                       ExitStat = EX_UNAVAIL;
+                       ExitStat = EX_OSERR;
        }
 
 # ifdef LOG
        }
 
 # ifdef LOG
@@ -79,13 +73,7 @@ syserr(fmt, a, b, c, d, e)
 **             -1
 **
 **     Side Effects:
 **             -1
 **
 **     Side Effects:
-**             sets Error.
-**
-**     Requires:
-**             printf (sys)
-**
-**     History:
-**             1/1/80 -- written.
+**             increments Errors.
 */
 
 /*VARARGS1*/
 */
 
 /*VARARGS1*/
@@ -97,7 +85,7 @@ usrerr(fmt, a, b, c, d, e)
        if (SuprErrs)
                return;
 
        if (SuprErrs)
                return;
 
-       Error++;
+       Errors++;
        if (To != NULL)
                printf("%s... ", To);
        printf(fmt, a, b, c, d, e);
        if (To != NULL)
                printf("%s... ", To);
        printf(fmt, a, b, c, d, e);