diff options
Diffstat (limited to 'usr.bin/mail/cmd3.c')
-rw-r--r-- | usr.bin/mail/cmd3.c | 80 |
1 files changed, 26 insertions, 54 deletions
diff --git a/usr.bin/mail/cmd3.c b/usr.bin/mail/cmd3.c index c9b7c6a..9308ad3 100644 --- a/usr.bin/mail/cmd3.c +++ b/usr.bin/mail/cmd3.c @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. @@ -53,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; @@ -77,8 +72,7 @@ shell(str) */ /*ARGSUSED*/ int -dosh(str) - char *str; +dosh(char *str __unused) { sig_t sigint = signal(SIGINT, SIG_IGN); char *sh; @@ -96,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]; @@ -152,7 +144,7 @@ overf: */ int -help() +help(void) { int c; FILE *f; @@ -171,8 +163,7 @@ help() * Change user's working directory. */ int -schdir(arglist) - char **arglist; +schdir(char **arglist) { char *cp; @@ -191,8 +182,7 @@ schdir(arglist) } int -respond(msgvec) - int *msgvec; +respond(int *msgvec) { if (value("Replyall") == NULL && value("flipr") == NULL) return (dorespond(msgvec)); @@ -205,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; @@ -271,8 +260,7 @@ dorespond(msgvec) * it does not already. */ char * -reedit(subj) - char *subj; +reedit(char *subj) { char *newsubj; @@ -292,8 +280,7 @@ reedit(subj) * back to the system mailbox. */ int -preserve(msgvec) - int *msgvec; +preserve(int *msgvec) { int *ip, mesg; struct message *mp; @@ -316,8 +303,7 @@ preserve(msgvec) * Mark all given messages as unread. */ int -unread(msgvec) - int msgvec[]; +unread(int msgvec[]) { int *ip; @@ -333,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; @@ -352,8 +337,7 @@ messize(msgvec) * by returning an error. */ int -rexit(e) - int e; +rexit(int e __unused) { if (sourcing) return (1); @@ -366,8 +350,7 @@ rexit(e) * of csh. */ int -set(arglist) - char **arglist; +set(char **arglist) { struct var *vp; char *cp, *cp2; @@ -413,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; @@ -453,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; @@ -509,8 +490,7 @@ group(argv) * order. */ void -sort(list) - char **list; +sort(char **list) { char **ap; @@ -526,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)); } @@ -538,8 +517,7 @@ diction(a, b) /*ARGSUSED*/ int -null(e) - int e; +null(int e __unused) { return (0); } @@ -549,8 +527,7 @@ null(e) * the current file. */ int -file(argv) - char **argv; +file(char **argv) { if (argv[0] == NULL) { @@ -567,8 +544,7 @@ file(argv) * Expand file names like echo */ int -echo(argv) - char **argv; +echo(char **argv) { char **ap, *cp; @@ -585,8 +561,7 @@ echo(argv) } int -Respond(msgvec) - int *msgvec; +Respond(int *msgvec) { if (value("Replyall") == NULL && value("flipr") == NULL) return (doRespond(msgvec)); @@ -600,8 +575,7 @@ Respond(msgvec) * reply. */ int -doRespond(msgvec) - int msgvec[]; +doRespond(int msgvec[]) { struct header head; struct message *mp; @@ -638,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; @@ -670,7 +643,7 @@ ifcmd(argv) * flip over the conditional flag. */ int -elsecmd() +elsecmd(void) { switch (cond) { @@ -698,7 +671,7 @@ elsecmd() * End of if statement. Just set cond back to anything. */ int -endifcmd() +endifcmd(void) { if (cond == CANY) { @@ -713,8 +686,7 @@ endifcmd() * Set the list of alternate names. */ int -alternates(namelist) - char **namelist; +alternates(char **namelist) { int c; char **ap, **ap2, *cp; |