From 40d27fedd984edbdb25a913091dc673f1e00f8fa Mon Sep 17 00:00:00 2001 From: Eric Allman Date: Fri, 24 Dec 1982 16:15:34 -0800 Subject: [PATCH] Change parse to parseaddr for BB&N TCP/IP implementation; clean up 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 | 8 ++++---- usr/src/usr.sbin/sendmail/src/daemon.c | 9 +++++---- usr/src/usr.sbin/sendmail/src/envelope.c | 6 +++--- usr/src/usr.sbin/sendmail/src/parseaddr.c | 10 +++++----- usr/src/usr.sbin/sendmail/src/recipient.c | 4 ++-- usr/src/usr.sbin/sendmail/src/savemail.c | 4 ++-- usr/src/usr.sbin/sendmail/src/sendmail.h | 4 ++-- usr/src/usr.sbin/sendmail/src/version.c | 4 ++-- 8 files changed, 25 insertions(+), 24 deletions(-) diff --git a/usr/src/usr.sbin/sendmail/src/alias.c b/usr/src/usr.sbin/sendmail/src/alias.c index 28cce65dbb..8c052dff2e 100644 --- a/usr/src/usr.sbin/sendmail/src/alias.c +++ b/usr/src/usr.sbin/sendmail/src/alias.c @@ -5,9 +5,9 @@ # include "sendmail.h" # ifdef DBM -SCCSID(@(#)alias.c 3.43 %G% (with DBM)); +SCCSID(@(#)alias.c 3.44 %G% (with DBM)); # else DBM -SCCSID(@(#)alias.c 3.43 %G% (without DBM)); +SCCSID(@(#)alias.c 3.44 %G% (without DBM)); # endif DBM /* @@ -349,7 +349,7 @@ readaliases(aliasfile, init) continue; } *p++ = '\0'; - if (parse(line, &al, 1) == NULL) + if (parseaddr(line, &al, 1) == NULL) { *--p = ':'; syserr("illegal alias name"); @@ -412,7 +412,7 @@ readaliases(aliasfile, init) p[-1] = c; continue; } - (void) parse(p2, &bl, -1); + (void) parseaddr(p2, &bl, -1); p[-1] = c; while (isspace(*p)) p++; diff --git a/usr/src/usr.sbin/sendmail/src/daemon.c b/usr/src/usr.sbin/sendmail/src/daemon.c index 815fdcde5e..16685d2c91 100644 --- a/usr/src/usr.sbin/sendmail/src/daemon.c +++ b/usr/src/usr.sbin/sendmail/src/daemon.c @@ -3,7 +3,7 @@ # include #ifndef DAEMON -SCCSID(@(#)daemon.c 3.37 %G% (w/o daemon mode)); +SCCSID(@(#)daemon.c 3.38 %G% (w/o daemon mode)); #else #include @@ -11,7 +11,7 @@ SCCSID(@(#)daemon.c 3.37 %G% (w/o daemon mode)); #include #include -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. @@ -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 -** 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 */ @@ -64,7 +66,6 @@ getrequests() int t; union wait status; int numconnections = 0; - struct sockaddr otherend; register struct servent *sp; /* diff --git a/usr/src/usr.sbin/sendmail/src/envelope.c b/usr/src/usr.sbin/sendmail/src/envelope.c index cc3a593ebd..65bdcf2f1f 100644 --- a/usr/src/usr.sbin/sendmail/src/envelope.c +++ b/usr/src/usr.sbin/sendmail/src/envelope.c @@ -3,7 +3,7 @@ #include "sendmail.h" #include -SCCSID(@(#)envelope.c 3.3 %G%); +SCCSID(@(#)envelope.c 3.4 %G%); /* ** NEWENVELOPE -- allocate a new envelope @@ -543,10 +543,10 @@ setsender(from) } 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); - (void) parse(from, &CurEnv->e_from, 1); + (void) parseaddr(from, &CurEnv->e_from, 1); } else FromFlag = TRUE; diff --git a/usr/src/usr.sbin/sendmail/src/parseaddr.c b/usr/src/usr.sbin/sendmail/src/parseaddr.c index da5d59398f..38de39b94b 100644 --- a/usr/src/usr.sbin/sendmail/src/parseaddr.c +++ b/usr/src/usr.sbin/sendmail/src/parseaddr.c @@ -1,9 +1,9 @@ # 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 @@ -42,7 +42,7 @@ SCCSID(@(#)parseaddr.c 3.69 %G%); # define DELIMCHARS "$()<>,;\\\"\r\n" /* word delimiters */ ADDRESS * -parse(addr, a, copyf) +parseaddr(addr, a, 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)) - printf("\n--parse(%s)\n", addr); + printf("\n--parseaddr(%s)\n", addr); # endif DEBUG pvp = prescan(addr, ','); @@ -136,7 +136,7 @@ parse(addr, a, copyf) # ifdef DEBUG if (tTd(20, 1)) { - printf("parse-->"); + printf("parseaddr-->"); printaddr(a, FALSE); } # endif DEBUG diff --git a/usr/src/usr.sbin/sendmail/src/recipient.c b/usr/src/usr.sbin/sendmail/src/recipient.c index 56298a212e..8a4b56c611 100644 --- a/usr/src/usr.sbin/sendmail/src/recipient.c +++ b/usr/src/usr.sbin/sendmail/src/recipient.c @@ -2,7 +2,7 @@ # include "sendmail.h" # include -SCCSID(@(#)recipient.c 3.49 %G%); +SCCSID(@(#)recipient.c 3.50 %G%); /* ** SENDTOLIST -- Designate a send list. @@ -75,7 +75,7 @@ sendto(list, copyf, ctladdr, qflags) /* 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; diff --git a/usr/src/usr.sbin/sendmail/src/savemail.c b/usr/src/usr.sbin/sendmail/src/savemail.c index e095336cb1..5173833c24 100644 --- a/usr/src/usr.sbin/sendmail/src/savemail.c +++ b/usr/src/usr.sbin/sendmail/src/savemail.c @@ -1,7 +1,7 @@ # include # include "sendmail.h" -SCCSID(@(#)savemail.c 3.52 %G%); +SCCSID(@(#)savemail.c 3.53 %G%); /* ** 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); - if (parse(buf, &ee->e_from, -1) == NULL) + if (parseaddr(buf, &ee->e_from, -1) == NULL) { syserr("Can't parse myself!"); ExitStat = EX_SOFTWARE; diff --git a/usr/src/usr.sbin/sendmail/src/sendmail.h b/usr/src/usr.sbin/sendmail/src/sendmail.h index 5b1f18d768..a799a5abee 100644 --- a/usr/src/usr.sbin/sendmail/src/sendmail.h +++ b/usr/src/usr.sbin/sendmail/src/sendmail.h @@ -7,7 +7,7 @@ # 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 @@ -444,7 +444,7 @@ EXTERN u_char tTdvect[100]; /* useful functions */ extern char *newstr(); -extern ADDRESS *parse(); +extern ADDRESS *parseaddr(); extern char *xalloc(); extern bool sameaddr(); extern FILE *dfopen(); diff --git a/usr/src/usr.sbin/sendmail/src/version.c b/usr/src/usr.sbin/sendmail/src/version.c index aec4c94b34..0d5a841fc5 100644 --- a/usr/src/usr.sbin/sendmail/src/version.c +++ b/usr/src/usr.sbin/sendmail/src/version.c @@ -1,5 +1,5 @@ # ifndef lint -static char SccsId[] = "@(#)SendMail version 3.262 of %G%"; +static char SccsId[] = "@(#)SendMail version 3.263 of %G%"; # endif lint -char Version[] = "3.262 [%G%]"; +char Version[] = "3.263 [%G%]"; -- 2.20.1