From f895a45d1d4d8d7755006df94009f4d45607c42a Mon Sep 17 00:00:00 2001 From: Eric Allman Date: Sat, 2 Aug 1980 20:50:10 -0800 Subject: [PATCH] cleaned up comments SCCS-vsn: usr.sbin/sendmail/src/alias.c 1.3 SCCS-vsn: usr.sbin/sendmail/src/arpadate.c 1.3 SCCS-vsn: usr.sbin/sendmail/src/conf.c 1.4 SCCS-vsn: usr.sbin/sendmail/src/deliver.c 1.4 SCCS-vsn: usr.sbin/sendmail/src/err.c 1.3 SCCS-vsn: usr.sbin/sendmail/src/main.c 1.5 SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 1.3 SCCS-vsn: usr.sbin/sendmail/src/savemail.c 1.4 SCCS-vsn: usr.sbin/sendmail/src/sysexits.c 1.3 SCCS-vsn: usr.sbin/sendmail/src/util.c 1.3 --- usr/src/usr.sbin/sendmail/src/alias.c | 36 ++------ usr/src/usr.sbin/sendmail/src/arpadate.c | 12 +-- usr/src/usr.sbin/sendmail/src/conf.c | 41 +------- usr/src/usr.sbin/sendmail/src/deliver.c | 108 +--------------------- usr/src/usr.sbin/sendmail/src/err.c | 16 +--- usr/src/usr.sbin/sendmail/src/main.c | 87 +---------------- usr/src/usr.sbin/sendmail/src/parseaddr.c | 34 +------ usr/src/usr.sbin/sendmail/src/savemail.c | 47 +--------- usr/src/usr.sbin/sendmail/src/sysexits.c | 5 +- usr/src/usr.sbin/sendmail/src/util.c | 30 +----- 10 files changed, 20 insertions(+), 396 deletions(-) diff --git a/usr/src/usr.sbin/sendmail/src/alias.c b/usr/src/usr.sbin/sendmail/src/alias.c index 3cf8432795..63bbb97a3c 100644 --- a/usr/src/usr.sbin/sendmail/src/alias.c +++ b/usr/src/usr.sbin/sendmail/src/alias.c @@ -3,7 +3,7 @@ # include # include "dlvrmail.h" -static char SccsId[] = "@(#)alias.c 1.2 %G%"; +static char SccsId[] = "@(#)alias.c 1.3 %G%"; /* ** ALIAS -- Compute aliases. @@ -27,26 +27,16 @@ static char SccsId[] = "@(#)alias.c 1.2 %G%"; ** MAXRCRSN -- the maximum recursion depth. ** ALIASFILE -- the pathname of the alias file. ** -** Requires: -** fopen (stdio) -** fgets (stdio) -** rewind (stdio) -** isspace (sys) -** printf (sys) -** sendto -** syserr -** parse -** nxtinq -** sameaddr -** tkoffq -** putonq -** fclose (sys) -** ** Called By: ** main ** ** Files: -** /usr/lib/mailaliases -- the mail aliases. +** ALIASFILE -- the mail aliases. The format is +** a series of lines of the form: +** alias:name1,name2,name3,... +** where 'alias' expands to all of +** 'name[i]'. Continuations begin with +** space or tab. ** ** Notes: ** If NoAlias (the "-n" flag) is set, no aliasing is @@ -56,11 +46,6 @@ static char SccsId[] = "@(#)alias.c 1.2 %G%"; ** It should complain about names that are aliased to ** nothing. ** It is unsophisticated about line overflows. -** -** History: -** 3/5/80 -- extensive mods to change internal address -** format. -** 12/27/79 -- written. */ @@ -217,15 +202,8 @@ alias() ** Side Effects: ** New names are added to SendQ. ** -** Requires: -** none -** ** Called By: ** recipient -** -** History: -** 3/5/80 -- return value changed. -** 1/23/80 -- null version written. */ bool diff --git a/usr/src/usr.sbin/sendmail/src/arpadate.c b/usr/src/usr.sbin/sendmail/src/arpadate.c index 5bc25ffddc..c3d45a56c2 100644 --- a/usr/src/usr.sbin/sendmail/src/arpadate.c +++ b/usr/src/usr.sbin/sendmail/src/arpadate.c @@ -1,6 +1,6 @@ # include -static char SccsId[] = "@(#)arpadate.c 1.2 %G%"; +static char SccsId[] = "@(#)arpadate.c 1.3 %G%"; /* ** ARPADATE -- Create date in ARPANET format @@ -17,16 +17,6 @@ static char SccsId[] = "@(#)arpadate.c 1.2 %G%"; ** WARNING: ** date is stored in a local buffer -- subsequent ** calls will overwrite. -** -** Requires: -** time (sys) -** ctime (sys) -** strcpy (sys) -** strcat (sys) -** localtime (sys) -** -** History: -** 1/15/80 -- written. */ arpadate() diff --git a/usr/src/usr.sbin/sendmail/src/conf.c b/usr/src/usr.sbin/sendmail/src/conf.c index 62e3c73919..899036e8d1 100644 --- a/usr/src/usr.sbin/sendmail/src/conf.c +++ b/usr/src/usr.sbin/sendmail/src/conf.c @@ -2,7 +2,7 @@ # include # include "dlvrmail.h" -static char SccsId[] = "@(#)conf.c 1.3 %G%"; +static char SccsId[] = "@(#)conf.c 1.4 %G%"; # include /* @@ -185,16 +185,8 @@ struct parsetab ParseTab[] = ** Side Effects: ** none ** -** Requires: -** getlogin (sys) -** getpwuid (sys) -** getuid (sys) -** ** Called By: ** main -** -** History: -** 12/26/79 -- written. */ char * @@ -243,19 +235,8 @@ getname() ** WARNING: ** Return value is in a local buffer. ** -** Requires: -** stat (sys) -** ttyn (sys) -** open (sys) -** read (sys) -** close (sys) -** seek (sys) -** ** Called By: ** savemail -** -** History: -** 1/12/80 -- written. */ # include @@ -312,9 +293,6 @@ ttypath() ** Side Effects: ** none ** -** Requires: -** fopen (sys) -** ** Called By: ** deliver ** @@ -350,12 +328,6 @@ fdopen(fd, type) ** ** Side Effects: ** none. -** -** Requires: -** none. -** -** History: -** 3/14/80 -- written. Why isn't this in -lS? */ index(s, c) @@ -392,19 +364,8 @@ index(s, c) ** WARNING: ** Return value is in a local buffer. ** -** Requires: -** stat (sys) -** ttyn (sys) -** open (sys) -** read (sys) -** close (sys) -** seek (sys) -** ** Called By: ** savemail -** -** History: -** 1/12/80 -- written. */ # include diff --git a/usr/src/usr.sbin/sendmail/src/deliver.c b/usr/src/usr.sbin/sendmail/src/deliver.c index 3e66d0e55b..3614d87277 100644 --- a/usr/src/usr.sbin/sendmail/src/deliver.c +++ b/usr/src/usr.sbin/sendmail/src/deliver.c @@ -6,7 +6,7 @@ # include # endif LOG -static char SccsId[] = "@(#)deliver.c 1.3 %G%"; +static char SccsId[] = "@(#)deliver.c 1.4 %G%"; /* ** DELIVER -- Deliver a message to a particular address. @@ -41,45 +41,13 @@ static char SccsId[] = "@(#)deliver.c 1.3 %G%"; ** parent waits for the child to finish before forking ** another child. ** -** Requires: -** buildargv -** giveresponse -** fork (sys) -** rewind (sys) -** execv (sys) -** exit (sys) -** wait (sys) -** syserr -** getpwnam (sys) -** endpwent (sys) -** initlog -** flagset -** usrerr -** pipe (sys) -** close (sys) -** dup (sys) -** setuid (sys) -** getuid (sys) -** signal (sys) -** fdopen (sys[v7] or conf.c[v6]) -** fclose (sys) -** printf (sys) -** stripquotes -** mailfile -** index (sys) -** ** Called By: ** main ** savemail ** ** Files: -** standard input -- must be openned to the message to +** standard input -- must be opened to the message to ** deliver. -** -** History: -** 3/5/80 -- modified rather extensively to change the -** internal form of addresses. -** 12/26/79 -- written. */ deliver(to, editfcn) @@ -305,17 +273,8 @@ deliver(to, editfcn) ** Error may be set. ** ExitStat may be set. ** -** Requires: -** usrerr -** syserr -** flagset -** logmsg (sys) -** ** Called By: ** deliver -** -** History: -** 2/18/80 -- broken from deliver. */ giveresponse(stat, force, m) @@ -389,21 +348,8 @@ giveresponse(stat, force, m) ** Puts a "From" line in UNIX format, and then ** outputs the rest of the message. ** -** Requires: -** fprintf (sys) -** fgets (sys) -** fputs (sys) -** time (sys) -** ctime (sys) -** ferror (sys) -** syserr -** setstat -** ** Called By: ** deliver -** -** History: -** 1/8/80 -- written. */ putheader(fp) @@ -436,12 +382,6 @@ putheader(fp) ** ** Side Effects: ** logs an error message. -** -** Requires: -** syserr -** -** History: -** 1/17/80 -- written. */ pipesig() @@ -464,16 +404,9 @@ pipesig() ** Side Effects: ** none. ** -** Requires: -** parse -** recipient -** ** Called By: ** main ** alias -** -** History: -** 1/11/80 -- written. */ sendto(list, copyf) @@ -530,23 +463,9 @@ sendto(list, copyf) ** Side Effects: ** none. ** -** Requires: -** sameaddr -** parse -** forward -** printf (sys) -** strcmp (sys) -** nxtinq -** putonq -** ** Called By: ** sendto ** main -** -** History: -** 3/5/80 -- modified to know about new internal form -** for addresses. -** 12/31/79 -- written. */ recipient(a, targetq) @@ -670,17 +589,8 @@ recipient(a, targetq) ** Since the argv is staticly allocated, any subsequent ** calls will clobber the old argv. ** -** Requires: -** printf (sys) -** sprintf (sys) -** flagset -** syserr -** ** Called By: ** deliver -** -** History: -** 12/26/79 -- written. */ char ** @@ -813,22 +723,8 @@ buildargv(tmplt, flags, host, user, from) ** Side Effects: ** none. ** -** Requires: -** fgets (sys) -** fputs (sys) -** fprintf (sys) -** fopen (sys) -** fclose (sys) -** ferror (sys) -** time (sys) -** ctime (sys) -** rewind (sys) -** ** Called By: ** deliver -** -** History: -** 3/5/80 -- written. */ mailfile(filename) diff --git a/usr/src/usr.sbin/sendmail/src/err.c b/usr/src/usr.sbin/sendmail/src/err.c index 532fc07319..6d86dd3ed1 100644 --- a/usr/src/usr.sbin/sendmail/src/err.c +++ b/usr/src/usr.sbin/sendmail/src/err.c @@ -4,7 +4,7 @@ # include # endif LOG -static char SccsId[] = "@(#)err.c 1.2 %G%"; +static char SccsId[] = "@(#)err.c 1.3 %G%"; /* ** ERR -- Print error message. @@ -22,14 +22,6 @@ static char SccsId[] = "@(#)err.c 1.2 %G%"; ** Side Effects: ** Sets Error. ** Sets ExitStat. -** -** Requires: -** sprintf (sys) -** printf (sys) -** logmsg -** -** History: -** 12/29/79 -- written. */ /*VARARGS1*/ @@ -82,12 +74,6 @@ syserr(fmt, a, b, c, d, e) ** ** Side Effects: ** sets Error. -** -** Requires: -** printf (sys) -** -** History: -** 1/1/80 -- written. */ /*VARARGS1*/ diff --git a/usr/src/usr.sbin/sendmail/src/main.c b/usr/src/usr.sbin/sendmail/src/main.c index ed6dd5ea4a..6b2f5cf1da 100644 --- a/usr/src/usr.sbin/sendmail/src/main.c +++ b/usr/src/usr.sbin/sendmail/src/main.c @@ -6,7 +6,7 @@ # include # endif LOG -static char SccsId[] = "@(#)main.c 1.4 %G%"; +static char SccsId[] = "@(#)main.c 1.5 %G%"; /* ** DELIVERMAIL -- Deliver mail to a set of destinations @@ -77,9 +77,6 @@ static char SccsId[] = "@(#)main.c 1.4 %G%"; ** mailers; it is their responsibility to make them ** correct. ** -** Defined Constants: -** none -** ** Compilation Flags: ** BADMAIL -- the mailer used for local mail doesn't ** return the standard set of exit codes. This @@ -98,32 +95,6 @@ static char SccsId[] = "@(#)main.c 1.4 %G%"; ** chmod 755 a.out ** mv a.out delivermail ** -** Requires: -** signal (sys) -** setbuf (sys) -** initlog (libX) -** open (sys) -** lseek (sys) -** close (sys) -** dup (sys) -** printf (sys) -** syserr -** atoi (sys) -** freopen (sys) -** openxscript -** maketemp -** getname -** strcmp (sys) -** getuid (sys) -** parse -** usrerr -** finis -** sendto -** alias -** recipient -** nxtinq -** deliver -** ** Deficiencies: ** It ought to collect together messages that are ** destined for a single host and send these @@ -133,9 +104,6 @@ static char SccsId[] = "@(#)main.c 1.4 %G%"; ** ** Author: ** Eric Allman, UCB/INGRES -** -** History: -** 12/26/79 -- first written. */ @@ -452,11 +420,6 @@ main(argc, argv) /* ** FINIS -- Clean up and exit. ** -** Algorithm: -** if we should remove the input -** remove the input -** exit -** ** Parameters: ** none ** @@ -466,13 +429,6 @@ main(argc, argv) ** Side Effects: ** exits delivermail ** -** Requires: -** unlink (sys) -** exit (sys) -** savemail -** InFileName -- the file to remove -** ExitStat -- the status to exit with -** ** Called By: ** main ** via signal on interrupt. @@ -480,9 +436,6 @@ main(argc, argv) ** Deficiencies: ** It may be that it should only remove the input ** file if there have been no errors. -** -** History: -** 12/26/79 -- written. */ finis() @@ -520,23 +473,6 @@ finis() ** Side Effects: ** Temp file is created and filled. ** -** Requires: -** creat (sys) -** close (sys) -** syserr -** mktemp (sys) -** fopen (sys) -** fgets (sys) -** makemsgid -** fprintf (sys) -** fputs (sys) -** isspace (sys) -** matchhdr -** prescan -** ferror (sys) -** clearerr (sys) -** freopen (sys) -** ** Called By: ** main ** @@ -550,9 +486,6 @@ finis() ** protocol, but seems reasonable in practice. In ** any case, the only problem is that error responses ** may be sent to the wrong person. -** -** History: -** 12/26/79 -- written. */ char * @@ -686,16 +619,8 @@ maketemp() ** Side Effects: ** Stores a message-id into MsgId. ** -** Requires: -** sprintf (sys) -** getpid (sys) -** time (sys) -** ** Called By: ** maketemp -** -** History: -** 2/3/80 -- written. */ makemsgid() @@ -722,18 +647,8 @@ makemsgid() ** Turns the standard output into a special file ** somewhere. ** -** Requires: -** mktemp (sys) -** chmod (sys) -** freopen (sys) -** syserr -** setbuf (sys) -** ** Called By: ** main -** -** History: -** 1/11/80 -- written. */ openxscrpt() diff --git a/usr/src/usr.sbin/sendmail/src/parseaddr.c b/usr/src/usr.sbin/sendmail/src/parseaddr.c index 616c712ee4..59c5a31bca 100644 --- a/usr/src/usr.sbin/sendmail/src/parseaddr.c +++ b/usr/src/usr.sbin/sendmail/src/parseaddr.c @@ -2,7 +2,7 @@ # include # include "dlvrmail.h" -static char SccsId[] = "@(#)parseaddr.c 1.2 %G%"; +static char SccsId[] = "@(#)parseaddr.c 1.3 %G%"; /* ** PARSE -- Parse an address @@ -39,28 +39,11 @@ static char SccsId[] = "@(#)parseaddr.c 1.2 %G%"; ** Side Effects: ** none ** -** Defined Constants: -** none -** -** Requires: -** usrerr -** strcpy (sys) -** isalpha (sys) -** xalloc -** prescan -** flagset -** makelower -** printf (sys) -** ParseTab -- the parse table. -** ** Called By: ** main ** sendto ** alias ** savemail -** -** History: -** 12/26/79 -- written. */ addrq * @@ -267,14 +250,8 @@ parse(addr, a, copyf) ** Side Effects: ** String pointed to by p is translated to lower case. ** -** Requires: -** isupper (sys) -** ** Called By: ** parse -** -** History: -** 12/26/79 -- written. */ makelower(p) @@ -324,18 +301,9 @@ makelower(p) ** Side Effects: ** buf gets clobbered. ** -** Requires: -** isspace (sys) -** any -** usrerr -** ** Called By: ** parse ** maketemp -** -** History: -** 12/30/79 -- broken from parse; comment processing -** added. */ char * diff --git a/usr/src/usr.sbin/sendmail/src/savemail.c b/usr/src/usr.sbin/sendmail/src/savemail.c index 9b798f9928..066901b936 100644 --- a/usr/src/usr.sbin/sendmail/src/savemail.c +++ b/usr/src/usr.sbin/sendmail/src/savemail.c @@ -2,7 +2,7 @@ # include # include "dlvrmail.h" -static char SccsId[] = "@(#)savemail.c 1.3 %G%"; +static char SccsId[] = "@(#)savemail.c 1.4 %G%"; /* ** SAVEMAIL -- Save mail on error @@ -24,37 +24,6 @@ static char SccsId[] = "@(#)savemail.c 1.3 %G%"; ** directory. ** ** WARNING: the user id is reset to the original user. -** -** Requires: -** fopen (sys) -** bmove -** parse -** deliver -** strcpy (sys) -** strcat (sys) -** fclose (sys) -** fgets (sys) -** fputs (sys) -** setpwent (sys) -** getuid (sys) -** setuid (sys) -** getgid (sys) -** setgid (sys) -** getpwnam (sys) -** fprintf (sys) -** ttypath -** freopen (sys) -** printf (sys) -** syserr -** rewind (sys) -** time (sys) -** ferror (sys) -** -** Called By: -** finis -** -** History: -** 12/30/79 -- written. */ # define MY_NAME "~MAILER~DAEMON~" @@ -246,22 +215,8 @@ savemail() ** input from xfile ** output to fp ** -** Requires: -** read (sys) -** write (sys) -** open (sys) -** close (sys) -** syserr -** rewind (sys) -** fflush (sys) -** fprintf (sys) -** fileno (sys) -** ** Called By: ** deliver -** -** History: -** 12/28/79 -- written. */ diff --git a/usr/src/usr.sbin/sendmail/src/sysexits.c b/usr/src/usr.sbin/sendmail/src/sysexits.c index 2878d3731d..5a1fb1071f 100644 --- a/usr/src/usr.sbin/sendmail/src/sysexits.c +++ b/usr/src/usr.sbin/sendmail/src/sysexits.c @@ -1,7 +1,10 @@ # include -static char SccsId[] = "@(#)sysexits.c 1.2 %G%"; +static char SccsId[] = "@(#)sysexits.c 1.3 %G%"; +/* +** SYSEXITS.C -- error messages corresponding to sysexits.h +*/ char *SysExMsg[] = { diff --git a/usr/src/usr.sbin/sendmail/src/util.c b/usr/src/usr.sbin/sendmail/src/util.c index 5ac534739f..97ff8f20d1 100644 --- a/usr/src/usr.sbin/sendmail/src/util.c +++ b/usr/src/usr.sbin/sendmail/src/util.c @@ -1,17 +1,9 @@ # include # include "useful.h" -static char SccsId[] = "@(#)util.c 1.2 %G%"; +static char SccsId[] = "@(#)util.c 1.3 %G%"; /* -** UTIL.C -- General Purpose Routines -** -** Defines: -** stripquotes -** xalloc -** any -*/ - /* ** STRIPQUOTES -- Strip quotes & quote bits from a string. ** ** Runs through a string and strips off unquoted quote @@ -26,14 +18,8 @@ static char SccsId[] = "@(#)util.c 1.2 %G%"; ** Side Effects: ** none. ** -** Requires: -** none. -** ** Called By: ** deliver -** -** History: -** 3/5/80 -- written. */ stripquotes(s) @@ -65,16 +51,8 @@ stripquotes(s) ** Side Effects: ** Memory is allocated. ** -** Requires: -** malloc -** syserr -** exit -** ** Called By: ** lots of people. -** -** History: -** 12/31/79 -- written. */ char * @@ -107,14 +85,8 @@ xalloc(sz) ** Side Effects: ** none. ** -** Requires: -** none. -** ** Called By: ** prescan -** -** History: -** 3/5/80 -- written. */ any(c, s) -- 2.20.1