=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mail/cmd3.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** src/usr.bin/mail/cmd3.c 1995/10/18 08:45:38 1.1 --- src/usr.bin/mail/cmd3.c 1996/06/11 12:53:34 1.2 *************** *** 1,3 **** --- 1,6 ---- + /* $OpenBSD: cmd3.c,v 1.2 1996/06/11 12:53:34 deraadt Exp $ */ + /* $NetBSD: cmd3.c,v 1.5 1996/06/08 19:48:14 christos Exp $ */ + /* * Copyright (c) 1980, 1993 * The Regents of the University of California. All rights reserved. *************** *** 32,39 **** */ #ifndef lint static char sccsid[] = "@(#)cmd3.c 8.1 (Berkeley) 6/6/93"; ! static char rcsid[] = "$Id: cmd3.c,v 1.1 1995/10/18 08:45:38 deraadt Exp $"; #endif /* not lint */ #include "rcv.h" --- 35,45 ---- */ #ifndef lint + #if 0 static char sccsid[] = "@(#)cmd3.c 8.1 (Berkeley) 6/6/93"; ! #else ! static char rcsid[] = "$OpenBSD: cmd3.c,v 1.2 1996/06/11 12:53:34 deraadt Exp $"; ! #endif #endif /* not lint */ #include "rcv.h" *************** *** 44,58 **** * * Still more user commands. */ /* * Process a shell escape by saving signals, ignoring signals, * and forking a sh -c */ int ! shell(str) ! char *str; { sig_t sigint = signal(SIGINT, SIG_IGN); char *shell; char cmd[BUFSIZ]; --- 50,66 ---- * * Still more user commands. */ + static int diction __P((const void *, const void *)); /* * Process a shell escape by saving signals, ignoring signals, * and forking a sh -c */ int ! shell(v) ! void *v; { + char *str = v; sig_t sigint = signal(SIGINT, SIG_IGN); char *shell; char cmd[BUFSIZ]; *************** *** 73,80 **** */ /*ARGSUSED*/ int ! dosh(str) ! char *str; { sig_t sigint = signal(SIGINT, SIG_IGN); char *shell; --- 81,88 ---- */ /*ARGSUSED*/ int ! dosh(v) ! void *v; { sig_t sigint = signal(SIGINT, SIG_IGN); char *shell; *************** *** 147,153 **** */ int ! help() { register c; register FILE *f; --- 155,162 ---- */ int ! help(v) ! void *v; { register c; register FILE *f; *************** *** 166,174 **** * Change user's working directory. */ int ! schdir(arglist) ! char **arglist; { char *cp; if (*arglist == NOSTR) --- 175,184 ---- * Change user's working directory. */ int ! schdir(v) ! void *v; { + char **arglist = v; char *cp; if (*arglist == NOSTR) *************** *** 184,192 **** } int ! respond(msgvec) ! int *msgvec; { if (value("Replyall") == NOSTR) return (_respond(msgvec)); else --- 194,203 ---- } int ! respond(v) ! void *v; { + int *msgvec = v; if (value("Replyall") == NOSTR) return (_respond(msgvec)); else *************** *** 284,292 **** * back to the system mailbox. */ int ! preserve(msgvec) ! int *msgvec; { register struct message *mp; register int *ip, mesg; --- 295,304 ---- * back to the system mailbox. */ int ! preserve(v) ! void *v; { + int *msgvec = v; register struct message *mp; register int *ip, mesg; *************** *** 308,316 **** * Mark all given messages as unread. */ int ! unread(msgvec) ! int msgvec[]; { register int *ip; for (ip = msgvec; *ip != NULL; ip++) { --- 320,329 ---- * Mark all given messages as unread. */ int ! unread(v) ! void *v; { + int *msgvec = v; register int *ip; for (ip = msgvec; *ip != NULL; ip++) { *************** *** 325,333 **** * Print the size of each message. */ int ! messize(msgvec) ! int *msgvec; { register struct message *mp; register int *ip, mesg; --- 338,347 ---- * Print the size of each message. */ int ! messize(v) ! void *v; { + int *msgvec = v; register struct message *mp; register int *ip, mesg; *************** *** 344,355 **** * by returning an error. */ int ! rexit(e) ! int e; { if (sourcing) return(1); ! exit(e); /*NOTREACHED*/ } --- 358,369 ---- * by returning an error. */ int ! rexit(v) ! void *v; { if (sourcing) return(1); ! exit(0); /*NOTREACHED*/ } *************** *** 358,366 **** * of csh. */ int ! set(arglist) ! char **arglist; { register struct var *vp; register char *cp, *cp2; char varbuf[BUFSIZ], **ap, **p; --- 372,381 ---- * of csh. */ int ! set(v) ! void *v; { + char **arglist = v; register struct var *vp; register char *cp, *cp2; char varbuf[BUFSIZ], **ap, **p; *************** *** 405,413 **** * Unset a bunch of variable values. */ int ! unset(arglist) ! char **arglist; { register struct var *vp, *vp2; int errs, h; char **ap; --- 420,429 ---- * Unset a bunch of variable values. */ int ! unset(v) ! void *v; { + char **arglist = v; register struct var *vp, *vp2; int errs, h; char **ap; *************** *** 443,451 **** * Put add users to a group. */ int ! group(argv) ! char **argv; { register struct grouphead *gh; register struct group *gp; register int h; --- 459,468 ---- * Put add users to a group. */ int ! group(v) ! void *v; { + char **argv = v; register struct grouphead *gh; register struct group *gp; register int h; *************** *** 504,510 **** char **list; { register char **ap; - int diction(); for (ap = list; *ap != NOSTR; ap++) ; --- 521,526 ---- *************** *** 517,523 **** * Do a dictionary order comparison of the arguments from * qsort. */ ! int diction(a, b) const void *a, *b; { --- 533,539 ---- * Do a dictionary order comparison of the arguments from * qsort. */ ! static int diction(a, b) const void *a, *b; { *************** *** 530,537 **** /*ARGSUSED*/ int ! null(e) ! int e; { return 0; } --- 546,553 ---- /*ARGSUSED*/ int ! null(v) ! void *v; { return 0; } *************** *** 541,549 **** * the current file. */ int ! file(argv) ! register char **argv; { if (argv[0] == NOSTR) { newfileinfo(); --- 557,566 ---- * the current file. */ int ! file(v) ! void *v; { + char **argv = v; if (argv[0] == NOSTR) { newfileinfo(); *************** *** 559,567 **** * Expand file names like echo */ int ! echo(argv) ! char **argv; { register char **ap; register char *cp; --- 576,585 ---- * Expand file names like echo */ int ! echo(v) ! void *v; { + char **argv = v; register char **ap; register char *cp; *************** *** 578,586 **** } int ! Respond(msgvec) ! int *msgvec; { if (value("Replyall") == NOSTR) return (_Respond(msgvec)); else --- 596,605 ---- } int ! Respond(v) ! void *v; { + int *msgvec = v; if (value("Replyall") == NOSTR) return (_Respond(msgvec)); else *************** *** 628,636 **** * .mailrc and do some things if sending, others if receiving. */ int ! ifcmd(argv) ! char **argv; { register char *cp; if (cond != CANY) { --- 647,656 ---- * .mailrc and do some things if sending, others if receiving. */ int ! ifcmd(v) ! void *v; { + char **argv = v; register char *cp; if (cond != CANY) { *************** *** 660,666 **** * flip over the conditional flag. */ int ! elsecmd() { switch (cond) { --- 680,687 ---- * flip over the conditional flag. */ int ! elsecmd(v) ! void *v; { switch (cond) { *************** *** 688,694 **** * End of if statement. Just set cond back to anything. */ int ! endifcmd() { if (cond == CANY) { --- 709,716 ---- * End of if statement. Just set cond back to anything. */ int ! endifcmd(v) ! void *v; { if (cond == CANY) { *************** *** 703,711 **** * Set the list of alternate names. */ int ! alternates(namelist) ! char **namelist; { register int c; register char **ap, **ap2, *cp; --- 725,734 ---- * Set the list of alternate names. */ int ! alternates(v) ! void *v; { + char **namelist = v; register int c; register char **ap, **ap2, *cp;