Change parse to parseaddr for BB&N TCP/IP implementation; clean up
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Sat, 25 Dec 1982 00:15:34 +0000 (16:15 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Sat, 25 Dec 1982 00:15:34 +0000 (16:15 -0800)
comments in daemon.c to simplify the poor alternate protocol type.

SCCS-mr: usr.sbin/sendmail/src/alias.c 108
SCCS-mr: usr.sbin/sendmail/src/sendmail.h 108
SCCS-mr: usr.sbin/sendmail/src/savemail.c 108
SCCS-mr: usr.sbin/sendmail/src/version.c 108
SCCS-mr: usr.sbin/sendmail/src/daemon.c 108
SCCS-mr: usr.sbin/sendmail/src/envelope.c 108
SCCS-mr: usr.sbin/sendmail/src/recipient.c 108
SCCS-mr: usr.sbin/sendmail/src/parseaddr.c 108
SCCS-vsn: usr.sbin/sendmail/src/alias.c 3.44
SCCS-vsn: usr.sbin/sendmail/src/sendmail.h 3.105
SCCS-vsn: usr.sbin/sendmail/src/savemail.c 3.53
SCCS-vsn: usr.sbin/sendmail/src/version.c 3.263
SCCS-vsn: usr.sbin/sendmail/src/daemon.c 3.38
SCCS-vsn: usr.sbin/sendmail/src/envelope.c 3.4
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 3.50
SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 3.70

usr/src/usr.sbin/sendmail/src/alias.c
usr/src/usr.sbin/sendmail/src/daemon.c
usr/src/usr.sbin/sendmail/src/envelope.c
usr/src/usr.sbin/sendmail/src/parseaddr.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/version.c

index 28cce65..8c052df 100644 (file)
@@ -5,9 +5,9 @@
 # include "sendmail.h"
 
 # ifdef DBM
 # include "sendmail.h"
 
 # ifdef DBM
-SCCSID(@(#)alias.c     3.43            %G%     (with DBM));
+SCCSID(@(#)alias.c     3.44            %G%     (with DBM));
 # else DBM
 # else DBM
-SCCSID(@(#)alias.c     3.43            %G%     (without DBM));
+SCCSID(@(#)alias.c     3.44            %G%     (without DBM));
 # endif DBM
 
 /*
 # endif DBM
 
 /*
@@ -349,7 +349,7 @@ readaliases(aliasfile, init)
                        continue;
                }
                *p++ = '\0';
                        continue;
                }
                *p++ = '\0';
-               if (parse(line, &al, 1) == NULL)
+               if (parseaddr(line, &al, 1) == NULL)
                {
                        *--p = ':';
                        syserr("illegal alias name");
                {
                        *--p = ':';
                        syserr("illegal alias name");
@@ -412,7 +412,7 @@ readaliases(aliasfile, init)
                                                p[-1] = c;
                                                continue;
                                        }
                                                p[-1] = c;
                                                continue;
                                        }
-                                       (void) parse(p2, &bl, -1);
+                                       (void) parseaddr(p2, &bl, -1);
                                        p[-1] = c;
                                        while (isspace(*p))
                                                p++;
                                        p[-1] = c;
                                        while (isspace(*p))
                                                p++;
index 815fdcd..16685d2 100644 (file)
@@ -3,7 +3,7 @@
 # include <sys/mx.h>
 
 #ifndef DAEMON
 # include <sys/mx.h>
 
 #ifndef DAEMON
-SCCSID(@(#)daemon.c    3.37            %G%     (w/o daemon mode));
+SCCSID(@(#)daemon.c    3.38            %G%     (w/o daemon mode));
 #else
 
 #include <sys/socket.h>
 #else
 
 #include <sys/socket.h>
@@ -11,7 +11,7 @@ SCCSID(@(#)daemon.c   3.37            %G%     (w/o daemon mode));
 #include <netdb.h>
 #include <wait.h>
 
 #include <netdb.h>
 #include <wait.h>
 
-SCCSID(@(#)daemon.c    3.37            %G%     (with daemon mode));
+SCCSID(@(#)daemon.c    3.38            %G%     (with daemon mode));
 
 /*
 **  DAEMON.C -- routines to use when running as a daemon.
 
 /*
 **  DAEMON.C -- routines to use when running as a daemon.
@@ -51,7 +51,9 @@ static FILE   *MailPort;      /* port that mail comes in on */
 **             Waits until some interesting activity occurs.  When
 **             it does, a child is created to process it, and the
 **             parent waits for completion.  Return from this
 **             Waits until some interesting activity occurs.  When
 **             it does, a child is created to process it, and the
 **             parent waits for completion.  Return from this
-**             routine is always in the child.
+**             routine is always in the child.  The file pointers
+**             "InChannel" and "OutChannel" should be set to point
+**             to the communication channel.
 */
 
 # define MAXCONNS      4       /* maximum simultaneous sendmails */
 */
 
 # define MAXCONNS      4       /* maximum simultaneous sendmails */
@@ -64,7 +66,6 @@ getrequests()
        int t;
        union wait status;
        int numconnections = 0;
        int t;
        union wait status;
        int numconnections = 0;
-       struct sockaddr otherend;
        register struct servent *sp;
 
        /*
        register struct servent *sp;
 
        /*
index cc3a593..65bdcf2 100644 (file)
@@ -3,7 +3,7 @@
 #include "sendmail.h"
 #include <sys/stat.h>
 
 #include "sendmail.h"
 #include <sys/stat.h>
 
-SCCSID(@(#)envelope.c  3.3             %G%);
+SCCSID(@(#)envelope.c  3.4             %G%);
 
 /*
 **  NEWENVELOPE -- allocate a new envelope
 
 /*
 **  NEWENVELOPE -- allocate a new envelope
@@ -543,10 +543,10 @@ setsender(from)
        }
 
        SuprErrs = TRUE;
        }
 
        SuprErrs = TRUE;
-       if (from == NULL || parse(from, &CurEnv->e_from, 1) == NULL)
+       if (from == NULL || parseaddr(from, &CurEnv->e_from, 1) == NULL)
        {
                from = newstr(realname);
        {
                from = newstr(realname);
-               (void) parse(from, &CurEnv->e_from, 1);
+               (void) parseaddr(from, &CurEnv->e_from, 1);
        }
        else
                FromFlag = TRUE;
        }
        else
                FromFlag = TRUE;
index da5d593..38de39b 100644 (file)
@@ -1,9 +1,9 @@
 # include "sendmail.h"
 
 # include "sendmail.h"
 
-SCCSID(@(#)parseaddr.c 3.69            %G%);
+SCCSID(@(#)parseaddr.c 3.70            %G%);
 
 /*
 
 /*
-**  PARSE -- Parse an address
+**  PARSEADDR -- Parse an address
 **
 **     Parses an address and breaks it up into three parts: a
 **     net to transmit the message on, the host to transmit it
 **
 **     Parses an address and breaks it up into three parts: a
 **     net to transmit the message on, the host to transmit it
@@ -42,7 +42,7 @@ SCCSID(@(#)parseaddr.c        3.69            %G%);
 # define DELIMCHARS    "$()<>,;\\\"\r\n"       /* word delimiters */
 
 ADDRESS *
 # define DELIMCHARS    "$()<>,;\\\"\r\n"       /* word delimiters */
 
 ADDRESS *
-parse(addr, a, copyf)
+parseaddr(addr, a, copyf)
        char *addr;
        register ADDRESS *a;
        int copyf;
        char *addr;
        register ADDRESS *a;
        int copyf;
@@ -59,7 +59,7 @@ parse(addr, a, copyf)
        CurEnv->e_to = addr;
 # ifdef DEBUG
        if (tTd(20, 1))
        CurEnv->e_to = addr;
 # ifdef DEBUG
        if (tTd(20, 1))
-               printf("\n--parse(%s)\n", addr);
+               printf("\n--parseaddr(%s)\n", addr);
 # endif DEBUG
 
        pvp = prescan(addr, ',');
 # endif DEBUG
 
        pvp = prescan(addr, ',');
@@ -136,7 +136,7 @@ parse(addr, a, copyf)
 # ifdef DEBUG
        if (tTd(20, 1))
        {
 # ifdef DEBUG
        if (tTd(20, 1))
        {
-               printf("parse-->");
+               printf("parseaddr-->");
                printaddr(a, FALSE);
        }
 # endif DEBUG
                printaddr(a, FALSE);
        }
 # endif DEBUG
index 56298a2..8a4b56c 100644 (file)
@@ -2,7 +2,7 @@
 # include "sendmail.h"
 # include <sys/stat.h>
 
 # include "sendmail.h"
 # include <sys/stat.h>
 
-SCCSID(@(#)recipient.c 3.49            %G%);
+SCCSID(@(#)recipient.c 3.50            %G%);
 
 /*
 **  SENDTOLIST -- Designate a send list.
 
 /*
 **  SENDTOLIST -- Designate a send list.
@@ -75,7 +75,7 @@ sendto(list, copyf, ctladdr, qflags)
                /* parse the address */
                while (isspace(*p) || *p == ',')
                        p++;
                /* parse the address */
                while (isspace(*p) || *p == ',')
                        p++;
-               a = parse(p, (ADDRESS *) NULL, 1);
+               a = parseaddr(p, (ADDRESS *) NULL, 1);
                p = DelimChar;
                if (a == NULL)
                        continue;
                p = DelimChar;
                if (a == NULL)
                        continue;
index e095336..5173833 100644 (file)
@@ -1,7 +1,7 @@
 # include <pwd.h>
 # include "sendmail.h"
 
 # include <pwd.h>
 # include "sendmail.h"
 
-SCCSID(@(#)savemail.c  3.52            %G%);
+SCCSID(@(#)savemail.c  3.53            %G%);
 
 /*
 **  SAVEMAIL -- Save mail on error
 
 /*
 **  SAVEMAIL -- Save mail on error
@@ -259,7 +259,7 @@ returntosender(msg, returnto, sendbody)
 
        /* fake up an address header for the from person */
        expand("$n", buf, &buf[sizeof buf - 1], CurEnv);
 
        /* fake up an address header for the from person */
        expand("$n", buf, &buf[sizeof buf - 1], CurEnv);
-       if (parse(buf, &ee->e_from, -1) == NULL)
+       if (parseaddr(buf, &ee->e_from, -1) == NULL)
        {
                syserr("Can't parse myself!");
                ExitStat = EX_SOFTWARE;
        {
                syserr("Can't parse myself!");
                ExitStat = EX_SOFTWARE;
index 5b1f18d..a799a5a 100644 (file)
@@ -7,7 +7,7 @@
 # ifdef _DEFINE
 # define EXTERN
 # ifndef lint
 # ifdef _DEFINE
 # define EXTERN
 # ifndef lint
-static char SmailSccsId[] =    "@(#)sendmail.h 3.104           %G%";
+static char SmailSccsId[] =    "@(#)sendmail.h 3.105           %G%";
 # endif lint
 # else  _DEFINE
 # define EXTERN extern
 # endif lint
 # else  _DEFINE
 # define EXTERN extern
@@ -444,7 +444,7 @@ EXTERN u_char       tTdvect[100];
 /* useful functions */
 
 extern char    *newstr();
 /* useful functions */
 
 extern char    *newstr();
-extern ADDRESS *parse();
+extern ADDRESS *parseaddr();
 extern char    *xalloc();
 extern bool    sameaddr();
 extern FILE    *dfopen();
 extern char    *xalloc();
 extern bool    sameaddr();
 extern FILE    *dfopen();
index aec4c94..0d5a841 100644 (file)
@@ -1,5 +1,5 @@
 # ifndef lint
 # ifndef lint
-static char    SccsId[] = "@(#)SendMail version 3.262 of %G%";
+static char    SccsId[] = "@(#)SendMail version 3.263 of %G%";
 # endif lint
 
 # endif lint
 
-char   Version[] = "3.262 [%G%]";
+char   Version[] = "3.263 [%G%]";