=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mail/names.c,v retrieving revision 1.8 retrieving revision 1.9 diff -c -r1.8 -r1.9 *** src/usr.bin/mail/names.c 1997/07/31 02:48:14 1.8 --- src/usr.bin/mail/names.c 1997/11/14 00:23:53 1.9 *************** *** 1,4 **** ! /* $OpenBSD: names.c,v 1.8 1997/07/31 02:48:14 millert Exp $ */ /* $NetBSD: names.c,v 1.5 1996/06/08 19:48:32 christos Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: names.c,v 1.9 1997/11/14 00:23:53 millert 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.8 1997/07/31 02:48:14 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.9 1997/11/14 00:23:53 millert Exp $"; #endif #endif /* not lint */ *************** *** 62,68 **** char str[]; int ntype; { ! register struct name *np; np = (struct name *)salloc(sizeof(*np)); np->n_flink = NIL; --- 62,68 ---- char str[]; int ntype; { ! struct name *np; np = (struct name *)salloc(sizeof(*np)); np->n_flink = NIL; *************** *** 79,85 **** tailof(name) struct name *name; { ! register struct name *np; np = name; if (np == NIL) --- 79,85 ---- tailof(name) struct name *name; { ! struct name *np; np = name; if (np == NIL) *************** *** 99,112 **** char line[]; int ntype; { ! register char *cp; ! register struct name *top, *np, *t; char *nbuf; if (line == NULL || *line == '\0') return(NIL); if ((nbuf = (char *)malloc(strlen(line) + 1)) == NULL) ! panic("Out of memory"); top = NIL; np = NIL; cp = line; --- 99,112 ---- char line[]; int ntype; { ! char *cp; ! struct name *top, *np, *t; char *nbuf; if (line == NULL || *line == '\0') return(NIL); if ((nbuf = (char *)malloc(strlen(line) + 1)) == NULL) ! errx(1, "Out of memory"); top = NIL; np = NIL; cp = line; *************** *** 128,140 **** */ char * detract(np, ntype) ! register struct name *np; int ntype; { ! register int s; ! register char *cp, *top; ! register struct name *p; ! register int comma; comma = ntype & GCOMMA; if (np == NIL) --- 128,139 ---- */ char * detract(np, ntype) ! struct name *np; int ntype; { ! int s, comma; ! char *cp, *top; ! struct name *p; comma = ntype & GCOMMA; if (np == NIL) *************** *** 177,190 **** yankword(ap, wbuf) char *ap, wbuf[]; { ! register char *cp, *cp2; cp = ap; for (;;) { if (*cp == '\0') return(NULL); if (*cp == '(') { ! register int nesting = 0; while (*cp != '\0') { switch (*cp++) { --- 176,189 ---- yankword(ap, wbuf) char *ap, wbuf[]; { ! char *cp, *cp2; cp = ap; for (;;) { if (*cp == '\0') return(NULL); if (*cp == '(') { ! int nesting = 0; while (*cp != '\0') { switch (*cp++) { *************** *** 227,238 **** FILE *fo; struct header *hp; { ! register int c; ! register struct name *np, *top; time_t now; char *date, *fname; FILE *fout, *fin; - int ispipe; top = names; np = names; --- 226,236 ---- FILE *fo; struct header *hp; { ! int c, ispipe; ! struct name *np, *top; time_t now; char *date, *fname; FILE *fout, *fin; top = names; np = names; *************** *** 371,377 **** isfileaddr(name) char *name; { ! register char *cp; if (*name == '+') return(1); --- 369,375 ---- isfileaddr(name) char *name; { ! char *cp; if (*name == '+') return(1); *************** *** 395,403 **** usermap(names) struct name *names; { ! register struct name *new, *np, *cp; struct grouphead *gh; ! register int metoo; new = NIL; np = names; --- 393,401 ---- usermap(names) struct name *names; { ! struct name *new, *np, *cp; struct grouphead *gh; ! int metoo; new = NIL; np = names; *************** *** 477,483 **** cat(n1, n2) struct name *n1, *n2; { ! register struct name *tail; if (n1 == NIL) return(n2); --- 475,481 ---- cat(n1, n2) struct name *n1, *n2; { ! struct name *tail; if (n1 == NIL) return(n2); *************** *** 497,509 **** unpack(np) struct name *np; { ! register char **ap, **top; ! register struct name *n; int t, extra, metoo, verbose; n = np; if ((t = count(n)) == 0) ! panic("No names to unpack"); /* * Compute the number of extra arguments we will need. * We need at least two extra -- one for "mail" and one for --- 495,507 ---- 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 two extra -- one for "mail" and one for *************** *** 542,548 **** elide(names) struct name *names; { ! register struct name *np, *t, *new; struct name *x; if (names == NIL) --- 540,546 ---- elide(names) struct name *names; { ! struct name *np, *t, *new; struct name *x; if (names == NIL) *************** *** 654,662 **** */ int count(np) ! register struct name *np; { ! register int c; for (c = 0; np != NIL; np = np->n_flink) if ((np->n_type & GDEL) == 0) --- 652,660 ---- */ int count(np) ! struct name *np; { ! int c; for (c = 0; np != NIL; np = np->n_flink) if ((np->n_type & GDEL) == 0) *************** *** 669,678 **** */ struct name * delname(np, name) ! register struct name *np; char name[]; { ! register struct name *p; for (p = np; p != NIL; p = p->n_flink) if (strcasecmp(p->n_name, name) == 0) { --- 667,676 ---- */ struct name * delname(np, name) ! struct name *np; char name[]; { ! struct name *p; for (p = np; p != NIL; p = p->n_flink) if (strcasecmp(p->n_name, name) == 0) { *************** *** 703,709 **** prettyprint(name) struct name *name; { ! register struct name *np; np = name; while (np != NIL) { --- 701,707 ---- prettyprint(name) struct name *name; { ! struct name *np; np = name; while (np != NIL) {