=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mail/names.c,v retrieving revision 1.11 retrieving revision 1.12 diff -c -r1.11 -r1.12 *** src/usr.bin/mail/names.c 2000/06/30 16:00:16 1.11 --- src/usr.bin/mail/names.c 2000/08/23 21:24:08 1.12 *************** *** 1,4 **** ! /* $OpenBSD: names.c,v 1.11 2000/06/30 16:00:16 millert Exp $ */ /* $NetBSD: names.c,v 1.5 1996/06/08 19:48:32 christos Exp $ */ /* --- 1,4 ---- ! /* $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,44 **** #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 $"; #endif #endif /* not lint */ --- 38,44 ---- #if 0 static char sccsid[] = "@(#)names.c 8.1 (Berkeley) 6/6/93"; #else ! static char rcsid[] = "$OpenBSD: names.c,v 1.12 2000/08/23 21:24:08 mickey Exp $"; #endif #endif /* not lint */ *************** *** 492,507 **** * Return an error if the name list won't fit. */ char ** ! unpack(np) ! struct name *np; { char **ap, **top; - struct name *n; int t, extra, metoo, verbose; ! n = np; ! if ((t = count(n)) == 0) errx(1, "No names to unpack"); /* * Compute the number of extra arguments we will need. * We need at least four extra -- one for "send-mail", one for the --- 492,507 ---- * Return an error if the name list won't fit. */ char ** ! unpack(sm, np) ! struct name *np, *sm; { char **ap, **top; int t, extra, metoo, verbose; ! 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,532 **** *ap++ = "-m"; if (verbose) *ap++ = "-v"; *ap++ = "--"; ! for (; n != NIL; n = n->n_flink) ! if ((n->n_type & GDEL) == 0) ! *ap++ = n->n_name; *ap = NULL; return(top); } --- 523,535 ---- *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 (; np != NIL; np = np->n_flink) ! if ((np->n_type & GDEL) == 0) ! *ap++ = np->n_name; *ap = NULL; return(top); }