diff options
-rw-r--r-- | usr.bin/mail/extern.h | 6 | ||||
-rw-r--r-- | usr.bin/mail/names.c | 23 | ||||
-rw-r--r-- | usr.bin/mail/send.c | 6 |
3 files changed, 19 insertions, 16 deletions
diff --git a/usr.bin/mail/extern.h b/usr.bin/mail/extern.h index 84b01d5b07c..5fa9f3c03bf 100644 --- a/usr.bin/mail/extern.h +++ b/usr.bin/mail/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.14 2000/04/26 15:47:31 millert Exp $ */ +/* $OpenBSD: extern.h,v 1.15 2000/08/23 21:24:08 mickey Exp $ */ /* $NetBSD: extern.h,v 1.7 1997/07/09 05:22:00 mikel Exp $ */ /*- @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)extern.h 8.2 (Berkeley) 4/20/95 - * $OpenBSD: extern.h,v 1.14 2000/04/26 15:47:31 millert Exp $ + * $OpenBSD: extern.h,v 1.15 2000/08/23 21:24:08 mickey Exp $ */ struct name; @@ -256,7 +256,7 @@ int type __P((void *)); int type1 __P((int *, int, int)); int undeletecmd __P((void *)); void unmark __P((int)); -char **unpack __P((struct name *)); +char **unpack __P((struct name *, struct name *)); int unread __P((void *)); void unregister_file __P((FILE *)); int unset __P((void *)); diff --git a/usr.bin/mail/names.c b/usr.bin/mail/names.c index b9cce0f469f..7a0a0c4c7d1 100644 --- a/usr.bin/mail/names.c +++ b/usr.bin/mail/names.c @@ -1,4 +1,4 @@ -/* $OpenBSD: names.c,v 1.11 2000/06/30 16:00:16 millert Exp $ */ +/* $OpenBSD: names.c,v 1.12 2000/08/23 21:24:08 mickey Exp $ */ /* $NetBSD: names.c,v 1.5 1996/06/08 19:48:32 christos Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)names.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: names.c,v 1.11 2000/06/30 16:00:16 millert Exp $"; +static char rcsid[] = "$OpenBSD: names.c,v 1.12 2000/08/23 21:24:08 mickey Exp $"; #endif #endif /* not lint */ @@ -492,16 +492,16 @@ cat(n1, n2) * Return an error if the name list won't fit. */ char ** -unpack(np) - struct name *np; +unpack(sm, np) + struct name *np, *sm; { char **ap, **top; - struct name *n; int t, extra, metoo, verbose; - n = np; - if ((t = count(n)) == 0) + if ((t = count(np)) == 0) errx(1, "No names to unpack"); + t += count(sm); + /* * Compute the number of extra arguments we will need. * We need at least four extra -- one for "send-mail", one for the @@ -523,10 +523,13 @@ unpack(np) *ap++ = "-m"; if (verbose) *ap++ = "-v"; + for (; sm != NIL; sm = sm->n_flink) + if ((sm->n_type & GDEL) == 0) + *ap++ = sm->n_name; *ap++ = "--"; - for (; n != NIL; n = n->n_flink) - if ((n->n_type & GDEL) == 0) - *ap++ = n->n_name; + for (; np != NIL; np = np->n_flink) + if ((np->n_type & GDEL) == 0) + *ap++ = np->n_name; *ap = NULL; return(top); } diff --git a/usr.bin/mail/send.c b/usr.bin/mail/send.c index fde6063e667..26d048669e5 100644 --- a/usr.bin/mail/send.c +++ b/usr.bin/mail/send.c @@ -1,4 +1,4 @@ -/* $OpenBSD: send.c,v 1.11 2000/06/30 16:00:18 millert Exp $ */ +/* $OpenBSD: send.c,v 1.12 2000/08/23 21:24:08 mickey Exp $ */ /* $NetBSD: send.c,v 1.6 1996/06/08 19:48:39 christos Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)send.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: send.c,v 1.11 2000/06/30 16:00:18 millert Exp $"; +static char rcsid[] = "$OpenBSD: send.c,v 1.12 2000/08/23 21:24:08 mickey Exp $"; #endif #endif /* not lint */ @@ -346,7 +346,7 @@ mail1(hp, printheaders) fputs(". . . message lost, sorry.\n", stderr); return; } - namelist = unpack(cat(hp->h_smopts, to)); + namelist = unpack(hp->h_smopts, to); if (debug) { char **t; |