cleanup so it will go through lint without any fancy grep -v's;
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 7 Dec 1981 04:41:04 +0000 (20:41 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 7 Dec 1981 04:41:04 +0000 (20:41 -0800)
change the way SCCS Id's are handled.

SCCS-vsn: usr.sbin/sendmail/src/alias.c 3.28
SCCS-vsn: usr.sbin/sendmail/src/arpadate.c 3.9
SCCS-vsn: usr.sbin/sendmail/src/conf.c 3.42
SCCS-vsn: usr.sbin/sendmail/src/deliver.c 3.60
SCCS-vsn: usr.sbin/sendmail/src/collect.c 3.31
SCCS-vsn: usr.sbin/sendmail/src/err.c 3.17
SCCS-vsn: usr.sbin/sendmail/src/sendmail.h 3.56
SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 3.37
SCCS-vsn: usr.sbin/sendmail/src/savemail.c 3.24
SCCS-vsn: usr.sbin/sendmail/src/sysexits.c 3.3
SCCS-vsn: usr.sbin/sendmail/src/useful.h 3.7
SCCS-vsn: usr.sbin/sendmail/src/util.c 3.13
SCCS-vsn: usr.sbin/sendmail/src/version.c 3.70
SCCS-vsn: usr.sbin/sendmail/src/main.c 3.58
SCCS-vsn: usr.sbin/sendmail/src/srvrsmtp.c 3.13
SCCS-vsn: usr.sbin/sendmail/src/readcf.c 3.18
SCCS-vsn: usr.sbin/sendmail/src/macro.c 3.8
SCCS-vsn: usr.sbin/sendmail/src/headers.c 3.14
SCCS-vsn: usr.sbin/sendmail/src/stab.c 3.11
SCCS-vsn: bin/rmail/rmail.c 3.6
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 3.31
SCCS-vsn: usr.sbin/sendmail/mailstats/mailstats.c 3.4
SCCS-vsn: usr.sbin/sendmail/src/stats.c 3.4
SCCS-vsn: usr.bin/vacation/vacation.c 3.5
SCCS-vsn: usr.sbin/sendmail/src/usersmtp.c 3.7
SCCS-vsn: usr.sbin/sendmail/src/daemon.c 3.5
SCCS-vsn: usr.sbin/sendmail/src/queue.c 3.8
SCCS-vsn: usr.sbin/sendmail/src/convtime.c 3.2

28 files changed:
usr/src/bin/rmail/rmail.c
usr/src/usr.bin/vacation/vacation.c
usr/src/usr.sbin/sendmail/mailstats/mailstats.c
usr/src/usr.sbin/sendmail/src/alias.c
usr/src/usr.sbin/sendmail/src/arpadate.c
usr/src/usr.sbin/sendmail/src/collect.c
usr/src/usr.sbin/sendmail/src/conf.c
usr/src/usr.sbin/sendmail/src/convtime.c
usr/src/usr.sbin/sendmail/src/daemon.c
usr/src/usr.sbin/sendmail/src/deliver.c
usr/src/usr.sbin/sendmail/src/err.c
usr/src/usr.sbin/sendmail/src/headers.c
usr/src/usr.sbin/sendmail/src/macro.c
usr/src/usr.sbin/sendmail/src/main.c
usr/src/usr.sbin/sendmail/src/parseaddr.c
usr/src/usr.sbin/sendmail/src/queue.c
usr/src/usr.sbin/sendmail/src/readcf.c
usr/src/usr.sbin/sendmail/src/recipient.c
usr/src/usr.sbin/sendmail/src/savemail.c
usr/src/usr.sbin/sendmail/src/sendmail.h
usr/src/usr.sbin/sendmail/src/srvrsmtp.c
usr/src/usr.sbin/sendmail/src/stab.c
usr/src/usr.sbin/sendmail/src/stats.c
usr/src/usr.sbin/sendmail/src/sysexits.c
usr/src/usr.sbin/sendmail/src/useful.h
usr/src/usr.sbin/sendmail/src/usersmtp.c
usr/src/usr.sbin/sendmail/src/util.c
usr/src/usr.sbin/sendmail/src/version.c

index 4f64728..14f0f7e 100644 (file)
@@ -6,13 +6,13 @@
 ** same thing.
 */
 
 ** same thing.
 */
 
-static char    SccsId[] =      "@(#)rmail.c    3.5     %G%";
-
 # include <stdio.h>
 # include <sysexits.h>
 # include "useful.h"
 # include "conf.h"
 
 # include <stdio.h>
 # include <sysexits.h>
 # include "useful.h"
 # include "conf.h"
 
+SCCSID(@(#)rmail.c     3.6     (Berkeley)      %G%);
+
 extern FILE *popen();
 extern char *index();
 
 extern FILE *popen();
 extern char *index();
 
@@ -90,7 +90,7 @@ main(argc, argv)
        }
        strcat(from, ufrom);
 
        }
        strcat(from, ufrom);
 
-       sprintf(cmd, "%s -em -f%s", MAILER, from);
+       (void) sprintf(cmd, "%s -em -f%s", MAILER, from);
        while (*++argv != NULL)
        {
                strcat(cmd, " '");
        while (*++argv != NULL)
        {
                strcat(cmd, " '");
index 3af5ff2..76faa3c 100644 (file)
@@ -5,7 +5,7 @@
 # include "useful.h"
 # include "userdbm.h"
 
 # include "useful.h"
 # include "userdbm.h"
 
-static char    SccsId[] =      "@(#)vacation.c 3.4     %G%";
+SCCSID(@(#)vacation.c  3.5             %G%);
 
 /*
 **  VACATION -- return a message to the sender when on vacation.
 
 /*
 **  VACATION -- return a message to the sender when on vacation.
index 79f42b6..e415de0 100644 (file)
@@ -1,6 +1,6 @@
 # include "sendmail.h"
 
 # include "sendmail.h"
 
-static char    SccsId[] =      "@(#)mailstats.c        3.3     %G%";
+SCCSID(@(#)mailstats.c 3.4             %G%);
 
 /*
 **  MAILSTATS -- print mail statistics.
 
 /*
 **  MAILSTATS -- print mail statistics.
@@ -30,7 +30,7 @@ main(argc, argv)
        if (read(fd, &stat, sizeof stat) != sizeof stat ||
            stat.stat_size != sizeof stat)
        {
        if (read(fd, &stat, sizeof stat) != sizeof stat ||
            stat.stat_size != sizeof stat)
        {
-               sprintf(stderr, "File size change\n");
+               (void) sprintf(stderr, "File size change\n");
                exit(EX_OSERR);
        }
 
                exit(EX_OSERR);
        }
 
index dd221d6..bde0e3b 100644 (file)
@@ -4,9 +4,9 @@
 # include "sendmail.h"
 
 # ifdef DBM
 # include "sendmail.h"
 
 # ifdef DBM
-static char SccsId[] = "@(#)alias.c    3.27    %G%     (with DBM)";
+SCCSID(@(#)alias.c     3.28            %G%     (with DBM));
 # else DBM
 # else DBM
-static char SccsId[] = "@(#)alias.c    3.27    %G%     (without DBM)";
+SCCSID(@(#)alias.c     3.28            %G%     (without DBM));
 # endif DBM
 
 /*
 # endif DBM
 
 /*
index 3d4d185..25d3456 100644 (file)
@@ -6,7 +6,7 @@
 # endif
 # include "useful.h"
 
 # endif
 # include "useful.h"
 
-static char SccsId[] = "@(#)arpadate.c 3.8     %G%";
+SCCSID(@(#)arpadate.c  3.9             %G%);
 
 /*
 **  ARPADATE -- Create date in ARPANET format
 
 /*
 **  ARPADATE -- Create date in ARPANET format
index 24b5ad6..0531b78 100644 (file)
@@ -1,7 +1,7 @@
 # include <errno.h>
 # include "sendmail.h"
 
 # include <errno.h>
 # include "sendmail.h"
 
-static char    SccsId[] = "@(#)collect.c       3.30    %G%";
+SCCSID(@(#)collect.c   3.31            %G%);
 
 /*
 **  COLLECT -- read & parse message header & make temp file.
 
 /*
 **  COLLECT -- read & parse message header & make temp file.
@@ -46,6 +46,7 @@ maketemp(from)
        extern char *mktemp();
        static char tempfname[40];
        extern char *QueueDir;
        extern char *mktemp();
        static char tempfname[40];
        extern char *QueueDir;
+       extern char *macvalue();
        extern char *index();
 
        /*
        extern char *index();
 
        /*
@@ -71,10 +72,10 @@ maketemp(from)
        {
                char xbuf[50];
 
        {
                char xbuf[50];
 
-               sprintf(xbuf, "Mail-From: %s$s received by $i at $b",
+               (void) sprintf(xbuf, "Mail-From: %s$s received by $i at $b",
                        macvalue('r') == NULL ? "" : "$r host ");
                (void) expand(xbuf, buf, &buf[sizeof buf - 1]);
                        macvalue('r') == NULL ? "" : "$r host ");
                (void) expand(xbuf, buf, &buf[sizeof buf - 1]);
-               chompheader(buf, FALSE);
+               (void) chompheader(buf, FALSE);
        }
 
        /*
        }
 
        /*
index 53d2a2e..1d87165 100644 (file)
@@ -36,7 +36,7 @@
 
 
 
 
 
 
-static char SccsId[] = "@(#)conf.c     3.41    %G%";
+SCCSID(@(#)conf.c      3.42            %G%);
 \f/*
 **  Header info table
 **     Final (null) entry contains the flags used for any other field.
 \f/*
 **  Header info table
 **     Final (null) entry contains the flags used for any other field.
index 3114d10..0acf530 100644 (file)
@@ -1,11 +1,19 @@
-# include <sys/types.h>
 # include <ctype.h>
 # include <ctype.h>
+# include "useful.h"
 
 
-static char    SccsId[] =      "@(#)convtime.c 3.1     %G%";
+SCCSID(@(#)convtime.c  3.2             %G%);
 
 /*
 **  CONVTIME -- convert time
 **
 
 /*
 **  CONVTIME -- convert time
 **
+**     Takes a time as an ascii string with a trailing character
+**     giving units:
+**       s -- seconds
+**       m -- minutes
+**       h -- hours
+**       d -- days (default)
+**       w -- weeks
+**
 **     Parameters:
 **             p -- pointer to ascii time.
 **
 **     Parameters:
 **             p -- pointer to ascii time.
 **
@@ -20,30 +28,38 @@ time_t
 convtime(p)
        char *p;
 {
 convtime(p)
        char *p;
 {
-       register time_t t;
+       register time_t t, r;
 
 
-       t = 0;
-       while (isdigit(*p))
-               t = t * 10 + (*p++ - '0');
-       switch (*p)
+       r = 0;
+       while (*p != '\0')
        {
        {
-         case 'w':             /* weeks */
-               t *= 7;
+               t = 0;
+               while (isdigit(*p))
+                       t = t * 10 + (*p++ - '0');
+               switch (*p++)
+               {
+                 case 'w':             /* weeks */
+                       t *= 7;
+
+                 case '\0':
+                       p--;
+                       /* fall through... */
 
 
-         case 'd':             /* days */
-         case '\0':
-         default:
-               t *= 24;
+                 case 'd':             /* days */
+                 default:
+                       t *= 24;
 
 
-         case 'h':             /* hours */
-               t *= 60;
+                 case 'h':             /* hours */
+                       t *= 60;
 
 
-         case 'm':             /* minutes */
-               t *= 60;
+                 case 'm':             /* minutes */
+                       t *= 60;
 
 
-         case 's':             /* seconds */
-               break;
+                 case 's':             /* seconds */
+                       break;
+               }
+               r += t;
        }
 
        }
 
-       return (t);
+       return (r);
 }
 }
index 1a1c621..acf7c66 100644 (file)
@@ -1,7 +1,7 @@
 # include "sendmail.h"
 # include <sys/mx.h>
 
 # include "sendmail.h"
 # include <sys/mx.h>
 
-static char    SccsId[] =      "@(#)daemon.c   3.4     %G%";
+SCCSID(@(#)daemon.c    3.5             %G%);
 
 /*
 **  DAEMON.C -- routines to use when running as a daemon.
 
 /*
 **  DAEMON.C -- routines to use when running as a daemon.
index d40c168..1dda0f7 100644 (file)
@@ -6,7 +6,7 @@
 # include <syslog.h>
 # endif LOG
 
 # include <syslog.h>
 # endif LOG
 
-static char SccsId[] = "@(#)deliver.c  3.59    %G%";
+SCCSID(@(#)deliver.c   3.60            %G%);
 
 /*
 **  DELIVER -- Deliver a message to a list of addresses.
 
 /*
 **  DELIVER -- Deliver a message to a list of addresses.
index d961859..a026cd8 100644 (file)
@@ -3,7 +3,7 @@
 # include <syslog.h>
 # endif LOG
 
 # include <syslog.h>
 # endif LOG
 
-static char    SccsId[] = "@(#)err.c   3.16    %G%";
+SCCSID(@(#)err.c       3.17            %G%);
 
 /*
 **  SYSERR -- Print error message.
 
 /*
 **  SYSERR -- Print error message.
index 2ff2d60..18120cb 100644 (file)
@@ -1,7 +1,7 @@
 # include <errno.h>
 # include "sendmail.h"
 
 # include <errno.h>
 # include "sendmail.h"
 
-static char    SccsId[] = "@(#)headers.c       3.13    %G%";
+SCCSID(@(#)headers.c   3.14            %G%);
 
 /*
 **  CHOMPHEADER -- process and save a header line.
 
 /*
 **  CHOMPHEADER -- process and save a header line.
index 0859028..77ec3d9 100644 (file)
@@ -1,7 +1,7 @@
 # include "useful.h"
 # include "conf.h"
 
 # include "useful.h"
 # include "conf.h"
 
-static char SccsId[] = "@(#)macro.c    3.7     %G%";
+SCCSID(@(#)macro.c     3.8             %G%);
 
 char   *Macro[128];
 extern int     Debug;
 
 char   *Macro[128];
 extern int     Debug;
index 35629c6..a42aa77 100644 (file)
@@ -7,7 +7,7 @@
 # include <syslog.h>
 # endif LOG
 
 # include <syslog.h>
 # endif LOG
 
-static char    SccsId[] = "@(#)main.c  3.57    %G%";
+SCCSID(@(#)main.c      3.58            %G%);
 
 /*
 **  SENDMAIL -- Post mail to a set of destinations.
 
 /*
 **  SENDMAIL -- Post mail to a set of destinations.
index 13f1993..34a1532 100644 (file)
@@ -1,6 +1,6 @@
 # include "sendmail.h"
 
 # include "sendmail.h"
 
-static char    SccsId[] =      "@(#)parseaddr.c        3.36    %G%";
+SCCSID(@(#)parseaddr.c 3.37            %G%);
 
 /*
 **  PARSE -- Parse an address
 
 /*
 **  PARSE -- Parse an address
index 4194d6d..be84a85 100644 (file)
@@ -5,10 +5,10 @@
 # include <errno.h>
 
 # ifndef QUEUE
 # include <errno.h>
 
 # ifndef QUEUE
-static char    SccsId[] =      "@(#)queue.c    3.7     %G%     (no queueing)";
+SCCSID(@(#)queue.c     3.8             %G%     (no queueing));
 # else QUEUE
 
 # else QUEUE
 
-static char    SccsId[] =      "@(#)queue.c    3.7     %G%";
+SCCSID(@(#)queue.c     3.8             %G%);
 
 /*
 **  QUEUEUP -- queue a message up for future transmission.
 
 /*
 **  QUEUEUP -- queue a message up for future transmission.
@@ -33,10 +33,9 @@ queueup(df)
 {
        char cf[MAXNAME];
        register FILE *f;
 {
        char cf[MAXNAME];
        register FILE *f;
-       register int i;
        register HDR *h;
        register HDR *h;
-       register char *p;
        register ADDRESS *q;
        register ADDRESS *q;
+       extern char *mktemp();
 
        /*
        **  Create control file.
 
        /*
        **  Create control file.
@@ -265,7 +264,6 @@ orderq()
        register WORK **wp;             /* parent of w */
        register FILE *f;
        register int i;
        register WORK **wp;             /* parent of w */
        register FILE *f;
        register int i;
-       struct stat st;
        WORK wlist[WLSIZE];
        int wn = 0;
        extern workcmpf();
        WORK wlist[WLSIZE];
        int wn = 0;
        extern workcmpf();
index 22f7b8d..599573e 100644 (file)
@@ -1,6 +1,6 @@
 # include "sendmail.h"
 
 # include "sendmail.h"
 
-static char SccsId[] = "@(#)readcf.c   3.17    %G%";
+SCCSID(@(#)readcf.c    3.18            %G%);
 
 /*
 **  READCF -- read control file.
 
 /*
 **  READCF -- read control file.
index d562048..8f2e5c9 100644 (file)
@@ -2,7 +2,7 @@
 # include "sendmail.h"
 # include <sys/stat.h>
 
 # include "sendmail.h"
 # include <sys/stat.h>
 
-static char SccsId[] = "@(#)recipient.c        3.30    %G%";
+SCCSID(@(#)recipient.c 3.31            %G%);
 
 /*
 **  SENDTO -- Designate a send list.
 
 /*
 **  SENDTO -- Designate a send list.
@@ -41,6 +41,7 @@ sendto(list, copyf, ctladdr, qflags)
        char *list;
        int copyf;
        ADDRESS *ctladdr;
        char *list;
        int copyf;
        ADDRESS *ctladdr;
+       ADDRESS **sendq;
        u_short qflags;
 {
        register char *p;
        u_short qflags;
 {
        register char *p;
index 43f9d3a..53710dd 100644 (file)
@@ -1,7 +1,7 @@
 # include <pwd.h>
 # include "sendmail.h"
 
 # include <pwd.h>
 # include "sendmail.h"
 
-static char    SccsId[] = "@(#)savemail.c      3.23    %G%";
+SCCSID(@(#)savemail.c  3.24            %G%);
 
 /*
 **  SAVEMAIL -- Save mail on error
 
 /*
 **  SAVEMAIL -- Save mail on error
index 894ae6c..ec817cc 100644 (file)
@@ -6,14 +6,13 @@
 
 # ifdef _DEFINE
 # define EXTERN
 
 # ifdef _DEFINE
 # define EXTERN
-static char SmailSccsId[] =    "@(#)sendmail.h 3.55    %G%";
+# ifndef lint
+static char SmailSccsId[] =    "@(#)sendmail.h 3.56            %G%";
+# endif lint
 # else  _DEFINE
 # define EXTERN extern
 # endif _DEFINE
 
 # else  _DEFINE
 # define EXTERN extern
 # endif _DEFINE
 
-# ifndef major
-# include <sys/types.h>
-# endif major
 # include <stdio.h>
 # include <ctype.h>
 # include "conf.h"
 # include <stdio.h>
 # include <ctype.h>
 # include "conf.h"
index 722248a..b6d74f2 100644 (file)
@@ -1,10 +1,10 @@
 # include "sendmail.h"
 
 # ifndef SMTP
 # include "sendmail.h"
 
 # ifndef SMTP
-static char    SccsId[] =      "@(#)srvrsmtp.c 3.12    %G%     (no SMTP)";
+SCCSID(@(#)srvrsmtp.c  3.13            %G%     (no SMTP));
 # else SMTP
 
 # else SMTP
 
-static char    SccsId[] =      "@(#)srvrsmtp.c 3.12    %G%";
+SCCSID(@(#)srvrsmtp.c  3.13            %G%);
 
 /*
 **  SMTP -- run the SMTP protocol.
 
 /*
 **  SMTP -- run the SMTP protocol.
index c1e4bea..4136163 100644 (file)
@@ -1,6 +1,6 @@
 # include "sendmail.h"
 
 # include "sendmail.h"
 
-static char SccsId[] = "@(#)stab.c     3.10    %G%";
+SCCSID(@(#)stab.c      3.11            %G%);
 
 /*
 **  STAB -- manage the symbol table
 
 /*
 **  STAB -- manage the symbol table
index 4a267a5..6d597b0 100644 (file)
@@ -1,6 +1,6 @@
 # include "sendmail.h"
 
 # include "sendmail.h"
 
-static char    SccsId[] =      "@(#)stats.c    3.3     %G%";
+SCCSID(@(#)stats.c     3.4             %G%);
 
 /*
 **  POSTSTATS -- post statistics in the statistics file
 
 /*
 **  POSTSTATS -- post statistics in the statistics file
index 44e4874..54334a9 100644 (file)
@@ -1,6 +1,7 @@
 # include <sysexits.h>
 # include <sysexits.h>
+# include "useful.h"
 
 
-static char    SccsId[] = "@(#)sysexits.c      3.2     %G%";
+SCCSID(@(#)sysexits.c  3.3             %G%);
 
 /*
 **  SYSEXITS.C -- error messages corresponding to sysexits.h
 
 /*
 **  SYSEXITS.C -- error messages corresponding to sysexits.h
index 701420a..b74d1e7 100644 (file)
@@ -1,7 +1,7 @@
 /*
 **  USEFUL.H -- Some useful stuff.
 **
 /*
 **  USEFUL.H -- Some useful stuff.
 **
-**     @(#)useful.h    3.6     %G%
+**     @(#)useful.h    3.7             %G%
 */
 
 # ifndef makedev
 */
 
 # ifndef makedev
@@ -20,6 +20,25 @@ typedef char bool;
 /* bit hacking */
 # define bitset(bit, word)     ((word) & (bit))
 
 /* bit hacking */
 # define bitset(bit, word)     ((word) & (bit))
 
+/* assertions */
+# ifndef NASSERT
+# define ASSERT(expr, msg, parm)\
+       if (!(expr))\
+       {\
+               fprintf(stderr, "assertion botch: %s:%d: ", __FILE__, __LINE__);\
+               fprintf(stderr, msg, parm);\
+       }
+# else NASSERT
+# define ASSERT(expr, msg, parm)
+# endif NASSERT
+
+/* sccs id's */
+# ifndef lint
+# define SCCSID(arg)   static char SccsId[] = "arg";
+# else lint
+# define SCCSID(arg)
+# endif lint
+
 /* define the types of some common functions */
 extern char    *strcpy(), *strncpy();
 extern char    *strcat(), *strncat();
 /* define the types of some common functions */
 extern char    *strcpy(), *strncpy();
 extern char    *strcat(), *strncat();
index 8c5dce8..91f9be5 100644 (file)
@@ -4,10 +4,10 @@
 # include "sendmail.h"
 
 # ifndef SMTP
 # include "sendmail.h"
 
 # ifndef SMTP
-static char    SccsId[] =      "@(#)usersmtp.c 3.6     %G%     (no SMTP)";
+SCCSID(@(#)usersmtp.c  3.7             %G%     (no SMTP));
 # else SMTP
 
 # else SMTP
 
-static char    SccsId[] =      "@(#)usersmtp.c 3.6     %G%";
+SCCSID(@(#)usersmtp.c  3.7             %G%);
 
 /*
 **  SMTPINIT -- initialize SMTP.
 
 /*
 **  SMTPINIT -- initialize SMTP.
index 1b02d86..24cfbe4 100644 (file)
@@ -7,7 +7,7 @@
 # include <ctype.h>
 # include "conf.h"
 
 # include <ctype.h>
 # include "conf.h"
 
-static char    SccsId[] = "@(#)util.c  3.12.1.1        %G%";
+SCCSID(@(#)util.c      3.13            %G%);
 
 /*
 **  STRIPQUOTES -- Strip quotes & quote bits from a string.
 
 /*
 **  STRIPQUOTES -- Strip quotes & quote bits from a string.
index afc7405..c471e05 100644 (file)
@@ -1,3 +1,5 @@
-static char    SccsId[] = "@(#)SendMail version 3.69 of %G%";
+# ifndef lint
+static char    SccsId[] = "@(#)SendMail version 3.70 of %G%";
+# endif lint
 
 
-char   Version[] = "3.69 [%G%]";
+char   Version[] = "3.70 [%G%]";