summaryrefslogtreecommitdiffstats
path: root/usr.bin/mail
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>2010-12-19 16:25:23 +0000
committercharnier <charnier@FreeBSD.org>2010-12-19 16:25:23 +0000
commitf4859bef574232113ba3dcc6bb533d0d9e06d304 (patch)
treecb3d657c33bdf93a7127358a4d9a36796aa4d3dd /usr.bin/mail
parent708cd7af18dda847027342ccd0ee5ec588215d93 (diff)
downloadFreeBSD-src-f4859bef574232113ba3dcc6bb533d0d9e06d304.zip
FreeBSD-src-f4859bef574232113ba3dcc6bb533d0d9e06d304.tar.gz
Add __unused. Ansi prototypes.
Diffstat (limited to 'usr.bin/mail')
-rw-r--r--usr.bin/mail/cmd2.c66
-rw-r--r--usr.bin/mail/cmd3.c76
-rw-r--r--usr.bin/mail/collect.c35
-rw-r--r--usr.bin/mail/edit.c15
-rw-r--r--usr.bin/mail/fio.c44
-rw-r--r--usr.bin/mail/getname.c6
-rw-r--r--usr.bin/mail/head.c24
-rw-r--r--usr.bin/mail/lex.c43
-rw-r--r--usr.bin/mail/list.c51
-rw-r--r--usr.bin/mail/main.c9
-rw-r--r--usr.bin/mail/names.c59
-rw-r--r--usr.bin/mail/popen.c65
-rw-r--r--usr.bin/mail/quit.c9
-rw-r--r--usr.bin/mail/send.c47
-rw-r--r--usr.bin/mail/strings.c7
-rw-r--r--usr.bin/mail/temp.c2
-rw-r--r--usr.bin/mail/tty.c15
-rw-r--r--usr.bin/mail/util.c69
-rw-r--r--usr.bin/mail/v7.local.c8
-rw-r--r--usr.bin/mail/vars.c24
20 files changed, 204 insertions, 470 deletions
diff --git a/usr.bin/mail/cmd2.c b/usr.bin/mail/cmd2.c
index a6b3a28..dd7f6dd 100644
--- a/usr.bin/mail/cmd2.c
+++ b/usr.bin/mail/cmd2.c
@@ -53,8 +53,7 @@ extern int wait_status;
* If given as first command with no arguments, print first message.
*/
int
-next(msgvec)
- int *msgvec;
+next(int *msgvec)
{
struct message *mp;
int *ip, *ip2, list[2], mdot;
@@ -131,8 +130,7 @@ hitit:
* so we can discard when the user quits.
*/
int
-save(str)
- char str[];
+save(char str[])
{
return (save1(str, 1, "save", saveignore));
@@ -142,8 +140,7 @@ save(str)
* Copy a message to a file without affected its saved-ness
*/
int
-copycmd(str)
- char str[];
+copycmd(char str[])
{
return (save1(str, 0, "copy", saveignore));
@@ -154,11 +151,7 @@ copycmd(str)
* If mark is true, mark the message "saved."
*/
int
-save1(str, mark, cmd, ignore)
- char str[];
- int mark;
- const char *cmd;
- struct ignoretab *ignore;
+save1(char str[], int mark, const char *cmd, struct ignoretab *ignore)
{
struct message *mp;
char *file;
@@ -215,8 +208,7 @@ save1(str, mark, cmd, ignore)
* file name, minus header and trailing blank line.
*/
int
-swrite(str)
- char str[];
+swrite(char str[])
{
return (save1(str, 1, "write", ignoreall));
@@ -232,9 +224,7 @@ swrite(str)
*/
char *
-snarf(linebuf, flag)
- char linebuf[];
- int *flag;
+snarf(char linebuf[], int *flag)
{
char *cp;
@@ -270,8 +260,7 @@ snarf(linebuf, flag)
* Delete messages.
*/
int
-delete(msgvec)
- int msgvec[];
+delete(int msgvec[])
{
delm(msgvec);
@@ -282,8 +271,7 @@ delete(msgvec)
* Delete messages, then type the new dot.
*/
int
-deltype(msgvec)
- int msgvec[];
+deltype(int msgvec[])
{
int list[2];
int lastdot;
@@ -308,8 +296,7 @@ deltype(msgvec)
* Internal interface.
*/
int
-delm(msgvec)
- int *msgvec;
+delm(int *msgvec)
{
struct message *mp;
int *ip, last;
@@ -346,8 +333,7 @@ delm(msgvec)
* Undelete the indicated messages.
*/
int
-undelete_messages(msgvec)
- int *msgvec;
+undelete_messages(int *msgvec)
{
struct message *mp;
int *ip;
@@ -365,7 +351,7 @@ undelete_messages(msgvec)
* Interactively dump core on "core"
*/
int
-core()
+core(void)
{
int pid;
@@ -391,8 +377,7 @@ core()
* Clobber as many bytes of stack as the user requests.
*/
int
-clobber(argv)
- char **argv;
+clobber(char **argv)
{
int times;
@@ -408,8 +393,7 @@ clobber(argv)
* Clobber the stack.
*/
void
-clob1(n)
- int n;
+clob1(int n)
{
char buf[512];
char *cp;
@@ -426,8 +410,7 @@ clob1(n)
* If no arguments, print the current list of retained fields.
*/
int
-retfield(list)
- char *list[];
+retfield(char *list[])
{
return (ignore1(list, ignore + 1, "retained"));
@@ -438,34 +421,28 @@ retfield(list)
* If no arguments, print the current list of ignored fields.
*/
int
-igfield(list)
- char *list[];
+igfield(char *list[])
{
return (ignore1(list, ignore, "ignored"));
}
int
-saveretfield(list)
- char *list[];
+saveretfield(char *list[])
{
return (ignore1(list, saveignore + 1, "retained"));
}
int
-saveigfield(list)
- char *list[];
+saveigfield(char *list[])
{
return (ignore1(list, saveignore, "ignored"));
}
int
-ignore1(list, tab, which)
- char *list[];
- struct ignoretab *tab;
- const char *which;
+ignore1(char *list[], struct ignoretab *tab, const char *which)
{
char field[LINESIZE];
int h;
@@ -494,9 +471,7 @@ ignore1(list, tab, which)
* Print out all currently retained fields.
*/
int
-igshow(tab, which)
- struct ignoretab *tab;
- const char *which;
+igshow(struct ignoretab *tab, const char *which)
{
int h;
struct ignore *igp;
@@ -522,8 +497,7 @@ igshow(tab, which)
* Compare two names for sorting ignored field list.
*/
int
-igcomp(l, r)
- const void *l, *r;
+igcomp(const void *l, const void *r)
{
return (strcmp(*(const char **)l, *(const char **)r));
diff --git a/usr.bin/mail/cmd3.c b/usr.bin/mail/cmd3.c
index bbe7e0f..9308ad3 100644
--- a/usr.bin/mail/cmd3.c
+++ b/usr.bin/mail/cmd3.c
@@ -49,8 +49,7 @@ __FBSDID("$FreeBSD$");
* and forking a sh -c
*/
int
-shell(str)
- char *str;
+shell(char *str)
{
sig_t sigint = signal(SIGINT, SIG_IGN);
char *sh;
@@ -73,8 +72,7 @@ shell(str)
*/
/*ARGSUSED*/
int
-dosh(str)
- char *str;
+dosh(char *str __unused)
{
sig_t sigint = signal(SIGINT, SIG_IGN);
char *sh;
@@ -92,9 +90,7 @@ dosh(str)
* last issued command where possible.
*/
int
-bangexp(str, strsize)
- char *str;
- size_t strsize;
+bangexp(char *str, size_t strsize)
{
char bangbuf[BUFSIZ];
static char lastbang[BUFSIZ];
@@ -148,7 +144,7 @@ overf:
*/
int
-help()
+help(void)
{
int c;
FILE *f;
@@ -167,8 +163,7 @@ help()
* Change user's working directory.
*/
int
-schdir(arglist)
- char **arglist;
+schdir(char **arglist)
{
char *cp;
@@ -187,8 +182,7 @@ schdir(arglist)
}
int
-respond(msgvec)
- int *msgvec;
+respond(int *msgvec)
{
if (value("Replyall") == NULL && value("flipr") == NULL)
return (dorespond(msgvec));
@@ -201,8 +195,7 @@ respond(msgvec)
* message header and send them off to mail1()
*/
int
-dorespond(msgvec)
- int *msgvec;
+dorespond(int *msgvec)
{
struct message *mp;
char *cp, *rcv, *replyto;
@@ -267,8 +260,7 @@ dorespond(msgvec)
* it does not already.
*/
char *
-reedit(subj)
- char *subj;
+reedit(char *subj)
{
char *newsubj;
@@ -288,8 +280,7 @@ reedit(subj)
* back to the system mailbox.
*/
int
-preserve(msgvec)
- int *msgvec;
+preserve(int *msgvec)
{
int *ip, mesg;
struct message *mp;
@@ -312,8 +303,7 @@ preserve(msgvec)
* Mark all given messages as unread.
*/
int
-unread(msgvec)
- int msgvec[];
+unread(int msgvec[])
{
int *ip;
@@ -329,8 +319,7 @@ unread(msgvec)
* Print the size of each message.
*/
int
-messize(msgvec)
- int *msgvec;
+messize(int *msgvec)
{
struct message *mp;
int *ip, mesg;
@@ -348,8 +337,7 @@ messize(msgvec)
* by returning an error.
*/
int
-rexit(e)
- int e;
+rexit(int e __unused)
{
if (sourcing)
return (1);
@@ -362,8 +350,7 @@ rexit(e)
* of csh.
*/
int
-set(arglist)
- char **arglist;
+set(char **arglist)
{
struct var *vp;
char *cp, *cp2;
@@ -409,8 +396,7 @@ set(arglist)
* Unset a bunch of variable values.
*/
int
-unset(arglist)
- char **arglist;
+unset(char **arglist)
{
struct var *vp, *vp2;
int errs, h;
@@ -449,8 +435,7 @@ unset(arglist)
* Put add users to a group.
*/
int
-group(argv)
- char **argv;
+group(char **argv)
{
struct grouphead *gh;
struct group *gp;
@@ -505,8 +490,7 @@ group(argv)
* order.
*/
void
-sort(list)
- char **list;
+sort(char **list)
{
char **ap;
@@ -522,8 +506,7 @@ sort(list)
* qsort.
*/
int
-diction(a, b)
- const void *a, *b;
+diction(const void *a, const void *b)
{
return (strcmp(*(const char **)a, *(const char **)b));
}
@@ -534,8 +517,7 @@ diction(a, b)
/*ARGSUSED*/
int
-null(e)
- int e;
+null(int e __unused)
{
return (0);
}
@@ -545,8 +527,7 @@ null(e)
* the current file.
*/
int
-file(argv)
- char **argv;
+file(char **argv)
{
if (argv[0] == NULL) {
@@ -563,8 +544,7 @@ file(argv)
* Expand file names like echo
*/
int
-echo(argv)
- char **argv;
+echo(char **argv)
{
char **ap, *cp;
@@ -581,8 +561,7 @@ echo(argv)
}
int
-Respond(msgvec)
- int *msgvec;
+Respond(int *msgvec)
{
if (value("Replyall") == NULL && value("flipr") == NULL)
return (doRespond(msgvec));
@@ -596,8 +575,7 @@ Respond(msgvec)
* reply.
*/
int
-doRespond(msgvec)
- int msgvec[];
+doRespond(int msgvec[])
{
struct header head;
struct message *mp;
@@ -634,8 +612,7 @@ doRespond(msgvec)
* .mailrc and do some things if sending, others if receiving.
*/
int
-ifcmd(argv)
- char **argv;
+ifcmd(char **argv)
{
char *cp;
@@ -666,7 +643,7 @@ ifcmd(argv)
* flip over the conditional flag.
*/
int
-elsecmd()
+elsecmd(void)
{
switch (cond) {
@@ -694,7 +671,7 @@ elsecmd()
* End of if statement. Just set cond back to anything.
*/
int
-endifcmd()
+endifcmd(void)
{
if (cond == CANY) {
@@ -709,8 +686,7 @@ endifcmd()
* Set the list of alternate names.
*/
int
-alternates(namelist)
- char **namelist;
+alternates(char **namelist)
{
int c;
char **ap, **ap2, *cp;
diff --git a/usr.bin/mail/collect.c b/usr.bin/mail/collect.c
index 7717888..ef72e9f 100644
--- a/usr.bin/mail/collect.c
+++ b/usr.bin/mail/collect.c
@@ -70,9 +70,7 @@ static int colljmp_p; /* whether to long jump */
static jmp_buf collabort; /* To end collection with error */
FILE *
-collect(hp, printheaders)
- struct header *hp;
- int printheaders;
+collect(struct header *hp, int printheaders)
{
FILE *fbuf;
int lc, cc, escape, eofcount, fd, c, t;
@@ -495,10 +493,7 @@ out:
* Write a file, ex-like if f set.
*/
int
-exwrite(name, fp, f)
- char name[];
- FILE *fp;
- int f;
+exwrite(char name[], FILE *fp, int f)
{
FILE *of;
int c, lc;
@@ -543,9 +538,7 @@ exwrite(name, fp, f)
* On return, make the edit file the new temp file.
*/
void
-mesedit(fp, c)
- FILE *fp;
- int c;
+mesedit(FILE *fp, int c)
{
sig_t sigint = signal(SIGINT, SIG_IGN);
FILE *nf = run_editor(fp, (off_t)-1, c, 0);
@@ -565,9 +558,7 @@ mesedit(fp, c)
* Sh -c must return 0 to accept the new message.
*/
void
-mespipe(fp, cmd)
- FILE *fp;
- char cmd[];
+mespipe(FILE *fp, char cmd[])
{
FILE *nf;
int fd;
@@ -617,11 +608,7 @@ out:
* should shift over and 'f' if not.
*/
int
-forward(ms, fp, fn, f)
- char ms[];
- FILE *fp;
- char *fn;
- int f;
+forward(char ms[], FILE *fp, char *fn, int f)
{
int *msgvec;
struct ignoretab *ig;
@@ -665,8 +652,7 @@ forward(ms, fp, fn, f)
*/
/*ARGSUSED*/
void
-collstop(s)
- int s;
+collstop(int s)
{
sig_t old_action = signal(s, SIG_DFL);
sigset_t nset;
@@ -690,8 +676,7 @@ collstop(s)
*/
/*ARGSUSED*/
void
-collint(s)
- int s;
+collint(int s __unused)
{
/*
* the control flow is subtle, because we can be called from ~q.
@@ -714,8 +699,7 @@ collint(s)
/*ARGSUSED*/
void
-collhup(s)
- int s;
+collhup(int s __unused)
{
rewind(collf);
savedeadletter(collf);
@@ -727,8 +711,7 @@ collhup(s)
}
void
-savedeadletter(fp)
- FILE *fp;
+savedeadletter(FILE *fp)
{
FILE *dbuf;
int c;
diff --git a/usr.bin/mail/edit.c b/usr.bin/mail/edit.c
index 01f33f5..d1ff37f 100644
--- a/usr.bin/mail/edit.c
+++ b/usr.bin/mail/edit.c
@@ -49,8 +49,7 @@ __FBSDID("$FreeBSD$");
* Edit a message list.
*/
int
-editor(msgvec)
- int *msgvec;
+editor(int *msgvec)
{
return (edit1(msgvec, 'e'));
@@ -60,8 +59,7 @@ editor(msgvec)
* Invoke the visual editor on a message list.
*/
int
-visual(msgvec)
- int *msgvec;
+visual(int *msgvec)
{
return (edit1(msgvec, 'v'));
@@ -73,9 +71,7 @@ visual(msgvec)
* We get the editor from the stuff above.
*/
int
-edit1(msgvec, type)
- int *msgvec;
- int type;
+edit1(int *msgvec, int type)
{
int c, i;
FILE *fp;
@@ -137,10 +133,7 @@ edit1(msgvec, type)
* "Type" is 'e' for _PATH_EX, 'v' for _PATH_VI.
*/
FILE *
-run_editor(fp, size, type, readonly)
- FILE *fp;
- off_t size;
- int type, readonly;
+run_editor(FILE *fp, off_t size, int type, int readonly)
{
FILE *nf = NULL;
int t;
diff --git a/usr.bin/mail/fio.c b/usr.bin/mail/fio.c
index b1e646a..1b0efea 100644
--- a/usr.bin/mail/fio.c
+++ b/usr.bin/mail/fio.c
@@ -56,9 +56,7 @@ extern int wait_status;
* Set up the input pointers while copying the mail file into /tmp.
*/
void
-setptr(ibuf, offset)
- FILE *ibuf;
- off_t offset;
+setptr(FILE *ibuf, off_t offset)
{
int c, count;
char *cp, *cp2;
@@ -163,10 +161,7 @@ setptr(ibuf, offset)
* characters written, including the newline if requested.
*/
int
-putline(obuf, linebuf, outlf)
- FILE *obuf;
- char *linebuf;
- int outlf;
+putline(FILE *obuf, char *linebuf, int outlf)
{
int c;
@@ -187,10 +182,7 @@ putline(obuf, linebuf, outlf)
* include the newline (or carriage return) at the end.
*/
int
-readline(ibuf, linebuf, linesize)
- FILE *ibuf;
- char *linebuf;
- int linesize;
+readline(FILE *ibuf, char *linebuf, int linesize)
{
int n;
@@ -210,8 +202,7 @@ readline(ibuf, linebuf, linesize)
* passed message pointer.
*/
FILE *
-setinput(mp)
- struct message *mp;
+setinput(struct message *mp)
{
(void)fflush(otf);
@@ -226,9 +217,7 @@ setinput(mp)
* a dynamically allocated message structure.
*/
void
-makemessage(f, omsgCount)
- FILE *f;
- int omsgCount;
+makemessage(FILE *f, int omsgCount)
{
size_t size;
struct message *nmessage;
@@ -258,9 +247,7 @@ makemessage(f, omsgCount)
* If the write fails, return 1, else 0
*/
int
-append(mp, f)
- struct message *mp;
- FILE *f;
+append(struct message *mp, FILE *f)
{
return (fwrite((char *)mp, sizeof(*mp), 1, f) != 1);
}
@@ -269,8 +256,7 @@ append(mp, f)
* Delete a file, but only if the file is a plain file.
*/
int
-rm(name)
- char *name;
+rm(char *name)
{
struct stat sb;
@@ -289,7 +275,7 @@ static sigset_t nset, oset;
* Hold signals SIGHUP, SIGINT, and SIGQUIT.
*/
void
-holdsigs()
+holdsigs(void)
{
if (sigdepth++ == 0) {
@@ -305,7 +291,7 @@ holdsigs()
* Release signals SIGHUP, SIGINT, and SIGQUIT.
*/
void
-relsesigs()
+relsesigs(void)
{
if (--sigdepth == 0)
@@ -317,8 +303,7 @@ relsesigs()
* the passed buffer.
*/
off_t
-fsize(iob)
- FILE *iob;
+fsize(FILE *iob)
{
struct stat sbuf;
@@ -339,8 +324,7 @@ fsize(iob)
* Return the file name as a dynamic string.
*/
char *
-expand(name)
- char *name;
+expand(char *name)
{
char xname[PATHSIZE];
char cmdbuf[PATHSIZE]; /* also used for file names */
@@ -432,9 +416,7 @@ expand(name)
* Determine the current folder directory name.
*/
int
-getfold(name, namelen)
- char *name;
- int namelen;
+getfold(char *name, int namelen)
{
char *folder;
int copylen;
@@ -453,7 +435,7 @@ getfold(name, namelen)
* Return the name of the dead.letter file.
*/
char *
-getdeadletter()
+getdeadletter(void)
{
char *cp;
diff --git a/usr.bin/mail/getname.c b/usr.bin/mail/getname.c
index 8a825ef..4f06354 100644
--- a/usr.bin/mail/getname.c
+++ b/usr.bin/mail/getname.c
@@ -45,8 +45,7 @@ __FBSDID("$FreeBSD$");
* Search the passwd file for a uid. Return name on success, NULL on failure.
*/
char *
-getname(uid)
- int uid;
+getname(int uid)
{
struct passwd *pw;
@@ -60,8 +59,7 @@ getname(uid)
* on error.
*/
int
-getuserid(name)
- char name[];
+getuserid(char name[])
{
struct passwd *pw;
diff --git a/usr.bin/mail/head.c b/usr.bin/mail/head.c
index d29b2b0..29b1426 100644
--- a/usr.bin/mail/head.c
+++ b/usr.bin/mail/head.c
@@ -50,8 +50,7 @@ __FBSDID("$FreeBSD$");
* accomodate all funny formats.
*/
int
-ishead(linebuf)
- char linebuf[];
+ishead(char linebuf[])
{
struct headline hl;
char parbuf[BUFSIZ];
@@ -73,10 +72,8 @@ ishead(linebuf)
return (1);
}
-/*ARGSUSED*/
void
-fail(linebuf, reason)
- const char *linebuf, *reason;
+fail(const char *linebuf __unused, const char *reason __unused)
{
/*
@@ -93,9 +90,7 @@ fail(linebuf, reason)
* structure. Actually, it scans.
*/
void
-parse(line, hl, pbuf)
- char line[], pbuf[];
- struct headline *hl;
+parse(char line[], struct headline *hl, char pbuf[])
{
char *cp, *sp;
char word[LINESIZE];
@@ -134,9 +129,7 @@ parse(line, hl, pbuf)
* the left string into it.
*/
char *
-copyin(src, space)
- char *src;
- char **space;
+copyin(char *src, char **space)
{
char *cp, *top;
@@ -183,8 +176,7 @@ static char *date_formats[] = {
};
int
-isdate(date)
- char date[];
+isdate(char date[])
{
int i;
@@ -200,8 +192,7 @@ isdate(date)
* Return 1 if they match, 0 if they don't
*/
int
-cmatch(cp, tp)
- char *cp, *tp;
+cmatch(char *cp, char *tp)
{
while (*cp != '\0' && *tp != '\0')
@@ -256,8 +247,7 @@ cmatch(cp, tp)
* or NULL if none follow.
*/
char *
-nextword(wp, wbuf)
- char *wp, *wbuf;
+nextword(char *wp, char *wbuf)
{
int c;
diff --git a/usr.bin/mail/lex.c b/usr.bin/mail/lex.c
index 8258347..3232001 100644
--- a/usr.bin/mail/lex.c
+++ b/usr.bin/mail/lex.c
@@ -62,8 +62,7 @@ extern const char *version;
* mail.
*/
int
-setfile(name)
- char *name;
+setfile(char *name)
{
FILE *ibuf;
int checkmode, i, fd;
@@ -165,7 +164,7 @@ nomail:
* started reading mail.
*/
int
-incfile()
+incfile(void)
{
off_t newsize;
int omsgCount = msgCount;
@@ -198,7 +197,7 @@ static int reset_on_stop; /* do a reset() if stopped */
* print no prompt.
*/
void
-commands()
+commands(void)
{
int n, eofloop = 0;
char linebuf[LINESIZE];
@@ -275,9 +274,7 @@ commands()
* Contxt is non-zero if called while composing mail.
*/
int
-execute(linebuf, contxt)
- char linebuf[];
- int contxt;
+execute(char linebuf[], int contxt)
{
char word[LINESIZE];
char *arglist[MAXARGC];
@@ -472,8 +469,7 @@ out:
* lists to message list functions.
*/
void
-setmsize(sz)
- int sz;
+setmsize(int sz)
{
if (msgvec != NULL)
@@ -487,8 +483,7 @@ setmsize(sz)
*/
__const struct cmd *
-lex(word)
- char word[];
+lex(char word[])
{
const struct cmd *cp;
@@ -514,8 +509,7 @@ lex(word)
* Return true if yep.
*/
int
-isprefix(as1, as2)
- const char *as1, *as2;
+isprefix(const char *as1, const char *as2)
{
const char *s1, *s2;
@@ -537,10 +531,8 @@ isprefix(as1, as2)
static int inithdr; /* am printing startup headers */
-/*ARGSUSED*/
void
-intr(s)
- int s;
+intr(int s __unused)
{
noreset = 0;
@@ -564,8 +556,7 @@ intr(s)
* When we wake up after ^Z, reprint the prompt.
*/
void
-stop(s)
- int s;
+stop(int s)
{
sig_t old_action = signal(s, SIG_DFL);
sigset_t nset;
@@ -585,10 +576,8 @@ stop(s)
/*
* Branch here on hangup signal and simulate "exit".
*/
-/*ARGSUSED*/
void
-hangup(s)
- int s;
+hangup(int s __unused)
{
/* nothing to do? */
@@ -600,7 +589,7 @@ hangup(s)
* give the message count, and print a header listing.
*/
void
-announce()
+announce(void)
{
int vec[2], mdot;
@@ -620,8 +609,7 @@ announce()
* Return a likely place to set dot.
*/
int
-newfileinfo(omsgCount)
- int omsgCount;
+newfileinfo(int omsgCount)
{
struct message *mp;
int u, n, mdot, d, s;
@@ -681,10 +669,8 @@ newfileinfo(omsgCount)
* Print the current version number.
*/
-/*ARGSUSED*/
int
-pversion(e)
- int e;
+pversion(int e __unused)
{
printf("Version %s\n", version);
@@ -695,8 +681,7 @@ pversion(e)
* Load a file of user definitions.
*/
void
-load(name)
- char *name;
+load(char *name)
{
FILE *in, *oldin;
diff --git a/usr.bin/mail/list.c b/usr.bin/mail/list.c
index 4c53281..3a5cc15 100644
--- a/usr.bin/mail/list.c
+++ b/usr.bin/mail/list.c
@@ -52,9 +52,7 @@ __FBSDID("$FreeBSD$");
* Returns the count of messages picked up or -1 on error.
*/
int
-getmsglist(buf, vector, flags)
- char *buf;
- int *vector, flags;
+getmsglist(char *buf, int *vector, int flags)
{
int *ip;
struct message *mp;
@@ -111,9 +109,7 @@ static struct coltab {
static int lastcolmod;
int
-markall(buf, f)
- char buf[];
- int f;
+markall(char buf[], int f)
{
char **np;
int i;
@@ -343,8 +339,7 @@ number:
* value.
*/
int
-evalcol(col)
- int col;
+evalcol(int col)
{
struct coltab *colp;
@@ -362,8 +357,7 @@ evalcol(col)
* has to be undeleted.
*/
int
-check(mesg, f)
- int mesg, f;
+check(int mesg, int f)
{
struct message *mp;
@@ -384,10 +378,7 @@ check(mesg, f)
* for a RAWLIST.
*/
int
-getrawlist(line, argv, argc)
- char line[];
- char **argv;
- int argc;
+getrawlist(char line[], char **argv, int argc)
{
char c, *cp, *cp2, quotec;
int argn;
@@ -511,8 +502,7 @@ static struct lex {
};
int
-scan(sp)
- char **sp;
+scan(char **sp)
{
char *cp, *cp2;
int c;
@@ -613,8 +603,7 @@ scan(sp)
* Unscan the named token by pushing it onto the regret stack.
*/
void
-regret(token)
- int token;
+regret(int token)
{
if (++regretp >= REGDEP)
errx(1, "Too many regrets");
@@ -628,7 +617,7 @@ regret(token)
* Reset all the scanner global variables.
*/
void
-scaninit()
+scaninit(void)
{
regretp = -1;
}
@@ -638,8 +627,7 @@ scaninit()
* its message number.
*/
int
-first(f, m)
- int f, m;
+first(int f, int m)
{
struct message *mp;
@@ -661,9 +649,7 @@ first(f, m)
* if so.
*/
int
-matchsender(str, mesg)
- char *str;
- int mesg;
+matchsender(char *str, int mesg)
{
char *cp;
@@ -683,9 +669,7 @@ matchsender(str, mesg)
static char *to_fields[] = { "to", "cc", "bcc", NULL };
static int
-matchto(str, mesg)
- char *str;
- int mesg;
+matchto(char *str, int mesg)
{
struct message *mp;
char *cp, **to;
@@ -721,9 +705,7 @@ matchto(str, mesg)
static char lastscan[STRINGLEN];
int
-matchfield(str, mesg)
- char *str;
- int mesg;
+matchfield(char *str, int mesg)
{
struct message *mp;
char *cp, *cp2;
@@ -761,8 +743,7 @@ matchfield(str, mesg)
* Mark the named message by setting its mark bit.
*/
void
-mark(mesg)
- int mesg;
+mark(int mesg)
{
int i;
@@ -776,8 +757,7 @@ mark(mesg)
* Unmark the named message.
*/
void
-unmark(mesg)
- int mesg;
+unmark(int mesg)
{
int i;
@@ -791,8 +771,7 @@ unmark(mesg)
* Return the message number corresponding to the passed meta character.
*/
int
-metamess(meta, f)
- int meta, f;
+metamess(int meta, int f)
{
int c, m;
struct message *mp;
diff --git a/usr.bin/mail/main.c b/usr.bin/mail/main.c
index d6db535..0d56580 100644
--- a/usr.bin/mail/main.c
+++ b/usr.bin/mail/main.c
@@ -56,9 +56,7 @@ static jmp_buf hdrjmp;
extern const char *version;
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int i;
struct name *to, *cc, *bcc, *smopts;
@@ -305,8 +303,7 @@ Usage: %s [-dEiInv] [-s subject] [-c cc-addr] [-b bcc-addr] [-F] to-addr ...\n\
*/
/*ARGSUSED*/
void
-hdrstop(signo)
- int signo;
+hdrstop(int signo __unused)
{
(void)fflush(stdout);
@@ -323,7 +320,7 @@ hdrstop(signo)
* Width is either 80 or ws_col;
*/
void
-setscreensize()
+setscreensize(void)
{
struct termios tbuf;
struct winsize ws;
diff --git a/usr.bin/mail/names.c b/usr.bin/mail/names.c
index d1cf3d6..8697f7b 100644
--- a/usr.bin/mail/names.c
+++ b/usr.bin/mail/names.c
@@ -51,9 +51,7 @@ __FBSDID("$FreeBSD$");
* name and return it.
*/
struct name *
-nalloc(str, ntype)
- char str[];
- int ntype;
+nalloc(char str[], int ntype)
{
struct name *np;
@@ -69,8 +67,7 @@ nalloc(str, ntype)
* Find the tail of a list and return it.
*/
struct name *
-tailof(name)
- struct name *name;
+tailof(struct name *name)
{
struct name *np;
@@ -88,9 +85,7 @@ tailof(name)
* Return the list or NULL if none found.
*/
struct name *
-extract(line, ntype)
- char line[];
- int ntype;
+extract(char line[], int ntype)
{
char *cp, *nbuf;
struct name *top, *np, *t;
@@ -119,9 +114,7 @@ extract(line, ntype)
* Turn a list of names into a string of the same names.
*/
char *
-detract(np, ntype)
- struct name *np;
- int ntype;
+detract(struct name *np, int ntype)
{
int s, comma;
char *cp, *top;
@@ -165,8 +158,7 @@ detract(np, ntype)
* Throw away things between ()'s, and take anything between <>.
*/
char *
-yankword(ap, wbuf)
- char *ap, wbuf[];
+yankword(char *ap, char wbuf[])
{
char *cp, *cp2;
@@ -211,8 +203,7 @@ yankword(ap, wbuf)
* and look for words before metacharacters %, @, !.
*/
char *
-yanklogin(ap, wbuf)
- char *ap, wbuf[];
+yanklogin(char *ap, char wbuf[])
{
char *cp, *cp2, *cp_temp;
int n;
@@ -287,10 +278,7 @@ yanklogin(ap, wbuf)
* program and removed.
*/
struct name *
-outof(names, fo, hp)
- struct name *names;
- FILE *fo;
- struct header *hp;
+outof(struct name *names, FILE *fo, struct header *hp)
{
int c, ispipe;
struct name *np, *top;
@@ -440,8 +428,7 @@ cant:
* be a filename. We cheat with .'s to allow path names like ./...
*/
int
-isfileaddr(name)
- char *name;
+isfileaddr(char *name)
{
char *cp;
@@ -464,8 +451,7 @@ isfileaddr(name)
*/
struct name *
-usermap(names)
- struct name *names;
+usermap(struct name *names)
{
struct name *new, *np, *cp;
struct grouphead *gh;
@@ -499,10 +485,7 @@ usermap(names)
*/
struct name *
-gexpand(nlist, gh, metoo, ntype)
- struct name *nlist;
- struct grouphead *gh;
- int metoo, ntype;
+gexpand(struct name *nlist, struct grouphead *gh, int metoo, int ntype)
{
struct group *gp;
struct grouphead *ngh;
@@ -546,8 +529,7 @@ skip:
* Concatenate the two passed name lists, return the result.
*/
struct name *
-cat(n1, n2)
- struct name *n1, *n2;
+cat(struct name *n1, struct name *n2)
{
struct name *tail;
@@ -566,8 +548,7 @@ cat(n1, n2)
* Return an error if the name list won't fit.
*/
char **
-unpack(np)
- struct name *np;
+unpack(struct name *np)
{
char **ap, **top;
struct name *n;
@@ -611,8 +592,7 @@ unpack(np)
* Return the head of the new list.
*/
struct name *
-elide(names)
- struct name *names;
+elide(struct name *names)
{
struct name *np, *t, *new;
struct name *x;
@@ -710,8 +690,7 @@ elide(names)
* the list.
*/
struct name *
-put(list, node)
- struct name *list, *node;
+put(struct name *list, struct name *node)
{
node->n_flink = list;
node->n_blink = NULL;
@@ -725,8 +704,7 @@ put(list, node)
* a name list and return it.
*/
int
-count(np)
- struct name *np;
+count(struct name *np)
{
int c;
@@ -740,9 +718,7 @@ count(np)
* Delete the given name from a namelist.
*/
struct name *
-delname(np, name)
- struct name *np;
- char name[];
+delname(struct name *np, char name[])
{
struct name *p;
@@ -772,8 +748,7 @@ delname(np, name)
/*
void
-prettyprint(name)
- struct name *name;
+prettyprint(struct name *name)
{
struct name *np;
diff --git a/usr.bin/mail/popen.c b/usr.bin/mail/popen.c
index 57675a9..18bf7e5 100644
--- a/usr.bin/mail/popen.c
+++ b/usr.bin/mail/popen.c
@@ -64,8 +64,7 @@ static void delchild(struct child *);
static int file_pid(FILE *);
FILE *
-Fopen(path, mode)
- const char *path, *mode;
+Fopen(const char *path, const char *mode)
{
FILE *fp;
@@ -77,9 +76,7 @@ Fopen(path, mode)
}
FILE *
-Fdopen(fd, mode)
- int fd;
- const char *mode;
+Fdopen(int fd, const char *mode)
{
FILE *fp;
@@ -91,17 +88,14 @@ Fdopen(fd, mode)
}
int
-Fclose(fp)
- FILE *fp;
+Fclose(FILE *fp)
{
unregister_file(fp);
return (fclose(fp));
}
FILE *
-Popen(cmd, mode)
- char *cmd;
- const char *mode;
+Popen(char *cmd, const char *mode)
{
int p[2];
int myside, hisside, fd0, fd1;
@@ -135,8 +129,7 @@ Popen(cmd, mode)
}
int
-Pclose(ptr)
- FILE *ptr;
+Pclose(FILE *ptr)
{
int i;
sigset_t nset, oset;
@@ -154,7 +147,7 @@ Pclose(ptr)
}
void
-close_all_files()
+close_all_files(void)
{
while (fp_head != NULL)
@@ -165,9 +158,7 @@ close_all_files()
}
void
-register_file(fp, pipe, pid)
- FILE *fp;
- int pipe, pid;
+register_file(FILE *fp, int pipe, int pid)
{
struct fp *fpp;
@@ -181,8 +172,7 @@ register_file(fp, pipe, pid)
}
void
-unregister_file(fp)
- FILE *fp;
+unregister_file(FILE *fp)
{
struct fp **pp, *p;
@@ -197,8 +187,7 @@ unregister_file(fp)
}
int
-file_pid(fp)
- FILE *fp;
+file_pid(FILE *fp)
{
struct fp *p;
@@ -218,11 +207,8 @@ file_pid(fp)
*/
/*VARARGS4*/
int
-run_command(cmd, mask, infd, outfd, a0, a1, a2)
- char *cmd;
- sigset_t *mask;
- int infd, outfd;
- char *a0, *a1, *a2;
+run_command(char *cmd, sigset_t *mask, int infd, int outfd, char *a0,
+ char *a1, char *a2)
{
int pid;
@@ -233,11 +219,8 @@ run_command(cmd, mask, infd, outfd, a0, a1, a2)
/*VARARGS4*/
int
-start_command(cmd, mask, infd, outfd, a0, a1, a2)
- char *cmd;
- sigset_t *mask;
- int infd, outfd;
- char *a0, *a1, *a2;
+start_command(char *cmd, sigset_t *mask, int infd, int outfd, char *a0,
+ char *a1, char *a2)
{
int pid;
@@ -262,9 +245,7 @@ start_command(cmd, mask, infd, outfd, a0, a1, a2)
}
void
-prepare_child(nset, infd, outfd)
- sigset_t *nset;
- int infd, outfd;
+prepare_child(sigset_t *nset, int infd, int outfd)
{
int i;
sigset_t eset;
@@ -287,8 +268,7 @@ prepare_child(nset, infd, outfd)
}
int
-wait_command(pid)
- int pid;
+wait_command(int pid)
{
if (wait_child(pid) < 0) {
@@ -299,8 +279,7 @@ wait_command(pid)
}
static struct child *
-findchild(pid)
- int pid;
+findchild(int pid)
{
struct child **cpp;
@@ -319,8 +298,7 @@ findchild(pid)
}
static void
-delchild(cp)
- struct child *cp;
+delchild(struct child *cp)
{
struct child **cpp;
@@ -332,8 +310,7 @@ delchild(cp)
/*ARGSUSED*/
void
-sigchild(signo)
- int signo;
+sigchild(int signo __unused)
{
int pid;
int status;
@@ -356,8 +333,7 @@ int wait_status;
* Wait for a specific child to die.
*/
int
-wait_child(pid)
- int pid;
+wait_child(int pid)
{
sigset_t nset, oset;
struct child *cp = findchild(pid);
@@ -378,8 +354,7 @@ wait_child(pid)
* Mark a child as don't care.
*/
void
-free_child(pid)
- int pid;
+free_child(int pid)
{
sigset_t nset, oset;
struct child *cp = findchild(pid);
diff --git a/usr.bin/mail/quit.c b/usr.bin/mail/quit.c
index 84f8c90..a960755 100644
--- a/usr.bin/mail/quit.c
+++ b/usr.bin/mail/quit.c
@@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
* The "quit" command.
*/
int
-quitcmd()
+quitcmd(void)
{
/*
* If we are sourcing, then return 1 so execute() can handle it.
@@ -66,7 +66,7 @@ quitcmd()
* Remove the system mailbox, if none saved there.
*/
void
-quit()
+quit(void)
{
int mcount, p, modify, autohold, anystat, holdbit, nohold;
FILE *ibuf, *obuf, *fbuf, *rbuf, *readstat, *abuf;
@@ -332,8 +332,7 @@ newmail:
* Incorporate the any new mail that we found.
*/
int
-writeback(res)
- FILE *res;
+writeback(FILE *res)
{
struct message *mp;
int p, c;
@@ -386,7 +385,7 @@ writeback(res)
* file from the temporary. Save any new stuff appended to the file.
*/
void
-edstop()
+edstop(void)
{
int gotcha, c;
struct message *mp;
diff --git a/usr.bin/mail/send.c b/usr.bin/mail/send.c
index 320a7c3..5be7405 100644
--- a/usr.bin/mail/send.c
+++ b/usr.bin/mail/send.c
@@ -52,11 +52,8 @@ __FBSDID("$FreeBSD$");
* prefix is a string to prepend to each output line.
*/
int
-sendmessage(mp, obuf, doign, prefix)
- struct message *mp;
- FILE *obuf;
- struct ignoretab *doign;
- char *prefix;
+sendmessage(struct message *mp, FILE *obuf, struct ignoretab *doign,
+ char *prefix)
{
long count;
FILE *ibuf;
@@ -227,10 +224,7 @@ sendmessage(mp, obuf, doign, prefix)
* Output a reasonable looking status field.
*/
void
-statusput(mp, obuf, prefix)
- struct message *mp;
- FILE *obuf;
- char *prefix;
+statusput(struct message *mp, FILE *obuf, char *prefix)
{
char statout[3];
char *cp = statout;
@@ -250,9 +244,8 @@ statusput(mp, obuf, prefix)
* which does all the dirty work.
*/
int
-mail(to, cc, bcc, smopts, subject, replyto)
- struct name *to, *cc, *bcc, *smopts;
- char *subject, *replyto;
+mail(struct name *to, struct name *cc, struct name *bcc, struct name *smopts,
+ char *subject, char *replyto)
{
struct header head;
@@ -273,8 +266,7 @@ mail(to, cc, bcc, smopts, subject, replyto)
* the mail routine below.
*/
int
-sendmail(str)
- char *str;
+sendmail(char *str)
{
struct header head;
@@ -294,9 +286,7 @@ sendmail(str)
* in the passed header. (Internal interface).
*/
void
-mail1(hp, printheaders)
- struct header *hp;
- int printheaders;
+mail1(struct header *hp, int printheaders)
{
char *cp;
char *nbuf;
@@ -433,9 +423,7 @@ out:
* the distribution list into the appropriate fields.
*/
void
-fixhead(hp, tolist)
- struct header *hp;
- struct name *tolist;
+fixhead(struct header *hp, struct name *tolist)
{
struct name *np;
@@ -463,9 +451,7 @@ fixhead(hp, tolist)
* and return the new file.
*/
FILE *
-infix(hp, fi)
- struct header *hp;
- FILE *fi;
+infix(struct header *hp, FILE *fi)
{
FILE *nfo, *nfi;
int c, fd;
@@ -516,10 +502,7 @@ infix(hp, fi)
* passed file buffer.
*/
int
-puthead(hp, fo, w)
- struct header *hp;
- FILE *fo;
- int w;
+puthead(struct header *hp, FILE *fo, int w)
{
int gotcha;
@@ -545,11 +528,7 @@ puthead(hp, fo, w)
* Format the given header line to not exceed 72 characters.
*/
void
-fmt(str, np, fo, comma)
- const char *str;
- struct name *np;
- FILE *fo;
- int comma;
+fmt(const char *str, struct name *np, FILE *fo, int comma)
{
int col, len;
@@ -581,9 +560,7 @@ fmt(str, np, fo, comma)
/*ARGSUSED*/
int
-savemail(name, fi)
- char name[];
- FILE *fi;
+savemail(char name[], FILE *fi)
{
FILE *fo;
char buf[BUFSIZ];
diff --git a/usr.bin/mail/strings.c b/usr.bin/mail/strings.c
index 44a5dee..ec9334e 100644
--- a/usr.bin/mail/strings.c
+++ b/usr.bin/mail/strings.c
@@ -55,8 +55,7 @@ __FBSDID("$FreeBSD$");
*/
char *
-salloc(size)
- int size;
+salloc(int size)
{
char *t;
int s, index;
@@ -94,7 +93,7 @@ salloc(size)
* since last reset.
*/
void
-sreset()
+sreset(void)
{
struct strings *sp;
int index;
@@ -116,7 +115,7 @@ sreset()
* Meant to be called in main, after initialization.
*/
void
-spreserve()
+spreserve(void)
{
struct strings *sp;
diff --git a/usr.bin/mail/temp.c b/usr.bin/mail/temp.c
index a421ba2..d274467 100644
--- a/usr.bin/mail/temp.c
+++ b/usr.bin/mail/temp.c
@@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
char *tmpdir;
void
-tinit()
+tinit(void)
{
char *cp;
diff --git a/usr.bin/mail/tty.c b/usr.bin/mail/tty.c
index 41d895a..f8635a2 100644
--- a/usr.bin/mail/tty.c
+++ b/usr.bin/mail/tty.c
@@ -57,9 +57,7 @@ static int ttyset; /* We must now do erase/kill */
*/
int
-grabh(hp, gflags)
- struct header *hp;
- int gflags;
+grabh(struct header *hp, int gflags)
{
struct termios ttybuf;
sig_t saveint;
@@ -170,9 +168,7 @@ out:
*/
char *
-readtty(pr, src)
- const char *pr;
- char src[];
+readtty(const char *pr, char src[])
{
char ch, canonb[BUFSIZ];
int c;
@@ -272,8 +268,7 @@ redo:
* Receipt continuation.
*/
void
-ttystop(s)
- int s;
+ttystop(int s)
{
sig_t old_action = signal(s, SIG_DFL);
sigset_t nset;
@@ -287,10 +282,8 @@ ttystop(s)
longjmp(rewrite, 1);
}
-/*ARGSUSED*/
void
-ttyint(s)
- int s;
+ttyint(int s __unused)
{
longjmp(intjmp, 1);
}
diff --git a/usr.bin/mail/util.c b/usr.bin/mail/util.c
index 3df22e0..461738d 100644
--- a/usr.bin/mail/util.c
+++ b/usr.bin/mail/util.c
@@ -52,8 +52,7 @@ static char *save2str(char *, char *);
* Return a pointer to a dynamic copy of the argument.
*/
char *
-savestr(str)
- char *str;
+savestr(char *str)
{
char *new;
int size = strlen(str) + 1;
@@ -67,8 +66,7 @@ savestr(str)
* Make a copy of new argument incorporating old one.
*/
static char *
-save2str(str, old)
- char *str, *old;
+save2str(char *str, char *old)
{
char *new;
int newsize = strlen(str) + 1;
@@ -90,8 +88,7 @@ save2str(str, old)
* back to the system mailbox on exit.
*/
void
-touch(mp)
- struct message *mp;
+touch(struct message *mp)
{
mp->m_flag |= MTOUCH;
@@ -104,8 +101,7 @@ touch(mp)
* Return true if it is.
*/
int
-isdir(name)
- char name[];
+isdir(char name[])
{
struct stat sbuf;
@@ -118,8 +114,7 @@ isdir(name)
* Count the number of arguments in the given string raw list.
*/
int
-argcount(argv)
- char **argv;
+argcount(char **argv)
{
char **ap;
@@ -133,9 +128,7 @@ argcount(argv)
* pointer (or NULL if the desired header field is not available).
*/
char *
-hfield(field, mp)
- const char *field;
- struct message *mp;
+hfield(const char *field, struct message *mp)
{
FILE *ibuf;
char linebuf[LINESIZE];
@@ -164,11 +157,7 @@ hfield(field, mp)
* Must deal with \ continuations & other such fraud.
*/
int
-gethfield(f, linebuf, rem, colon)
- FILE *f;
- char linebuf[];
- int rem;
- char **colon;
+gethfield(FILE *f, char linebuf[], int rem, char **colon)
{
char line2[LINESIZE];
char *cp, *cp2;
@@ -223,10 +212,7 @@ gethfield(f, linebuf, rem, colon)
*/
char*
-ishfield(linebuf, colon, field)
- char linebuf[];
- char *colon;
- const char *field;
+ishfield(char linebuf[], char *colon, const char *field)
{
char *cp = colon;
@@ -246,10 +232,7 @@ ishfield(linebuf, colon, field)
* dsize: space left in buffer (including space for NULL)
*/
void
-istrncpy(dest, src, dsize)
- char *dest;
- const char *src;
- size_t dsize;
+istrncpy(char *dest, const char *src, size_t dsize)
{
strlcpy(dest, src, dsize);
@@ -278,8 +261,7 @@ static struct sstack sstack[SSTACK_SIZE];
* that they are no longer reading from a tty (in all probability).
*/
int
-source(arglist)
- char **arglist;
+source(char **arglist)
{
FILE *fi;
char *cp;
@@ -311,7 +293,7 @@ source(arglist)
* Update the "sourcing" flag as appropriate.
*/
int
-unstack()
+unstack(void)
{
if (ssp <= 0) {
printf("\"Source\" stack over-pop.\n");
@@ -335,8 +317,7 @@ unstack()
* This is nifty for the shell.
*/
void
-alter(name)
- char *name;
+alter(char *name)
{
struct stat sb;
struct timeval tv[2];
@@ -355,9 +336,7 @@ alter(name)
* before returning it.
*/
char *
-nameof(mp, reptype)
- struct message *mp;
- int reptype;
+nameof(struct message *mp, int reptype)
{
char *cp, *cp2;
@@ -378,8 +357,7 @@ nameof(mp, reptype)
* Ignore it.
*/
char *
-skip_comment(cp)
- char *cp;
+skip_comment(char *cp)
{
int nesting = 1;
@@ -405,8 +383,7 @@ skip_comment(cp)
* of "host-phrase."
*/
char *
-skin(name)
- char *name;
+skin(char *name)
{
char *nbuf, *bufend, *cp, *cp2;
int c, gotlt, lastsp;
@@ -517,9 +494,7 @@ skin(name)
* 2 -- get sender's name for Reply
*/
char *
-name1(mp, reptype)
- struct message *mp;
- int reptype;
+name1(struct message *mp, int reptype)
{
char namebuf[LINESIZE];
char linebuf[LINESIZE];
@@ -578,9 +553,7 @@ newname:
* Count the occurances of c in str
*/
int
-charcount(str, c)
- char *str;
- int c;
+charcount(char *str, int c)
{
char *cp;
int i;
@@ -595,9 +568,7 @@ charcount(str, c)
* See if the given header field is supposed to be ignored.
*/
int
-isign(field, ignore)
- const char *field;
- struct ignoretab ignore[2];
+isign(const char *field, struct ignoretab ignore[2])
{
char realfld[LINESIZE];
@@ -615,9 +586,7 @@ isign(field, ignore)
}
int
-member(realfield, table)
- char *realfield;
- struct ignoretab *table;
+member(char *realfield, struct ignoretab *table)
{
struct ignore *igp;
diff --git a/usr.bin/mail/v7.local.c b/usr.bin/mail/v7.local.c
index bf5fa3c..8fc2f64 100644
--- a/usr.bin/mail/v7.local.c
+++ b/usr.bin/mail/v7.local.c
@@ -52,9 +52,7 @@ __FBSDID("$FreeBSD$");
* mail is queued).
*/
void
-findmail(user, buf, buflen)
- char *user, *buf;
- int buflen;
+findmail(char *user, char *buf, int buflen)
{
char *tmp = getenv("MAIL");
@@ -68,7 +66,7 @@ findmail(user, buf, buflen)
* Get rid of the queued mail.
*/
void
-demail()
+demail(void)
{
if (value("keep") != NULL || rm(mailname) < 0)
@@ -79,7 +77,7 @@ demail()
* Discover user login name.
*/
char *
-username()
+username(void)
{
char *np;
uid_t uid;
diff --git a/usr.bin/mail/vars.c b/usr.bin/mail/vars.c
index f752b5c..dca0604 100644
--- a/usr.bin/mail/vars.c
+++ b/usr.bin/mail/vars.c
@@ -48,8 +48,7 @@ __FBSDID("$FreeBSD$");
* Assign a value to a variable.
*/
void
-assign(name, value)
- const char *name, *value;
+assign(const char *name, const char *value)
{
struct var *vp;
int h;
@@ -73,8 +72,7 @@ assign(name, value)
* Thus, we cannot free same!
*/
void
-vfree(cp)
- char *cp;
+vfree(char *cp)
{
if (*cp != '\0')
(void)free(cp);
@@ -86,8 +84,7 @@ vfree(cp)
*/
char *
-vcopy(str)
- const char *str;
+vcopy(const char *str)
{
char *new;
unsigned len;
@@ -107,8 +104,7 @@ vcopy(str)
*/
char *
-value(name)
- const char *name;
+value(const char *name)
{
struct var *vp;
@@ -123,8 +119,7 @@ value(name)
*/
struct var *
-lookup(name)
- const char *name;
+lookup(const char *name)
{
struct var *vp;
@@ -139,8 +134,7 @@ lookup(name)
*/
struct grouphead *
-findgroup(name)
- char name[];
+findgroup(char name[])
{
struct grouphead *gh;
@@ -154,8 +148,7 @@ findgroup(name)
* Print a group out on stdout
*/
void
-printgroup(name)
- char name[];
+printgroup(char name[])
{
struct grouphead *gh;
struct group *gp;
@@ -175,8 +168,7 @@ printgroup(name)
* the variable or group hash table.
*/
int
-hash(name)
- const char *name;
+hash(const char *name)
{
int h = 0;
OpenPOWER on IntegriCloud