=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mail/cmd2.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** src/usr.bin/mail/cmd2.c 1995/10/18 08:45:38 1.1 --- src/usr.bin/mail/cmd2.c 1996/06/11 12:53:33 1.2 *************** *** 1,3 **** --- 1,6 ---- + /* $OpenBSD: cmd2.c,v 1.2 1996/06/11 12:53:33 deraadt Exp $ */ + /* $NetBSD: cmd2.c,v 1.5 1996/06/08 19:48:13 christos Exp $ */ + /* * Copyright (c) 1980, 1993 * The Regents of the University of California. All rights reserved. *************** *** 32,39 **** */ #ifndef lint ! static char sccsid[] = "from: @(#)cmd2.c 8.1 (Berkeley) 6/6/93"; ! static char rcsid[] = "$Id: cmd2.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[] = "@(#)cmd2.c 8.1 (Berkeley) 6/6/93"; ! #else ! static char rcsid[] = "$OpenBSD: cmd2.c,v 1.2 1996/06/11 12:53:33 deraadt Exp $"; ! #endif #endif /* not lint */ #include "rcv.h" *************** *** 45,50 **** --- 51,57 ---- * * More user commands. */ + static int igcomp __P((const void *, const void *)); /* * If any arguments were given, go to the next applicable argument *************** *** 52,60 **** * If given as first command with no arguments, print first message. */ int ! next(msgvec) ! int *msgvec; { register struct message *mp; register int *ip, *ip2; int list[2], mdot; --- 59,68 ---- * If given as first command with no arguments, print first message. */ int ! next(v) ! void *v; { + int *msgvec = v; register struct message *mp; register int *ip, *ip2; int list[2], mdot; *************** *** 131,139 **** * so we can discard when the user quits. */ int ! save(str) ! char str[]; { return save1(str, 1, "save", saveignore); } --- 139,148 ---- * so we can discard when the user quits. */ int ! save(v) ! void *v; { + char *str = v; return save1(str, 1, "save", saveignore); } *************** *** 142,150 **** * Copy a message to a file without affected its saved-ness */ int ! copycmd(str) ! char str[]; { return save1(str, 0, "copy", saveignore); } --- 151,160 ---- * Copy a message to a file without affected its saved-ness */ int ! copycmd(v) ! void *v; { + char *str = v; return save1(str, 0, "copy", saveignore); } *************** *** 215,223 **** * file name, minus header and trailing blank line. */ int ! swrite(str) ! char str[]; { return save1(str, 1, "write", ignoreall); } --- 225,234 ---- * file name, minus header and trailing blank line. */ int ! swrite(v) ! void *v; { + char *str = v; return save1(str, 1, "write", ignoreall); } *************** *** 270,278 **** * Delete messages. */ int ! delete(msgvec) ! int msgvec[]; { delm(msgvec); return 0; } --- 281,290 ---- * Delete messages. */ int ! delete(v) ! void *v; { + int *msgvec = v; delm(msgvec); return 0; } *************** *** 281,289 **** * Delete messages, then type the new dot. */ int ! deltype(msgvec) ! int msgvec[]; { int list[2]; int lastdot; --- 293,302 ---- * Delete messages, then type the new dot. */ int ! deltype(v) ! void *v; { + int *msgvec = v; int list[2]; int lastdot; *************** *** 346,354 **** * Undelete the indicated messages. */ int ! undeletecmd(msgvec) ! int *msgvec; { register struct message *mp; register *ip; --- 359,368 ---- * Undelete the indicated messages. */ int ! undeletecmd(v) ! void *v; { + int *msgvec = v; register struct message *mp; register *ip; *************** *** 365,371 **** * Interactively dump core on "core" */ int ! core() { int pid; extern union wait wait_status; --- 379,386 ---- * Interactively dump core on "core" */ int ! core(v) ! void *v; { int pid; extern union wait wait_status; *************** *** 392,400 **** * Clobber as many bytes of stack as the user requests. */ int ! clobber(argv) ! char **argv; { register int times; if (argv[0] == 0) --- 407,416 ---- * Clobber as many bytes of stack as the user requests. */ int ! clobber(v) ! void *v; { + char **argv = v; register int times; if (argv[0] == 0) *************** *** 427,435 **** * If no arguments, print the current list of retained fields. */ int ! retfield(list) ! char *list[]; { return ignore1(list, ignore + 1, "retained"); } --- 443,452 ---- * If no arguments, print the current list of retained fields. */ int ! retfield(v) ! void *v; { + char **list = v; return ignore1(list, ignore + 1, "retained"); } *************** *** 439,463 **** * If no arguments, print the current list of ignored fields. */ int ! igfield(list) ! char *list[]; { return ignore1(list, ignore, "ignored"); } int ! saveretfield(list) ! char *list[]; { return ignore1(list, saveignore + 1, "retained"); } int ! saveigfield(list) ! char *list[]; { return ignore1(list, saveignore, "ignored"); } --- 456,483 ---- * If no arguments, print the current list of ignored fields. */ int ! igfield(v) ! void *v; { + char **list = v; return ignore1(list, ignore, "ignored"); } int ! saveretfield(v) ! void *v; { + char **list = v; return ignore1(list, saveignore + 1, "retained"); } int ! saveigfield(v) ! void *v; { + char **list = v; return ignore1(list, saveignore, "ignored"); } *************** *** 502,508 **** register int h; struct ignore *igp; char **ap, **ring; - int igcomp(); if (tab->i_count == 0) { printf("No fields currently being %s.\n", which); --- 522,527 ---- *************** *** 523,529 **** /* * Compare two names for sorting ignored field list. */ ! int igcomp(l, r) const void *l, *r; { --- 542,548 ---- /* * Compare two names for sorting ignored field list. */ ! static int igcomp(l, r) const void *l, *r; {