version 1.8, 1997/07/31 02:48:14 |
version 1.9, 1997/11/14 00:23:53 |
|
|
char str[]; |
char str[]; |
int ntype; |
int ntype; |
{ |
{ |
register struct name *np; |
struct name *np; |
|
|
np = (struct name *)salloc(sizeof(*np)); |
np = (struct name *)salloc(sizeof(*np)); |
np->n_flink = NIL; |
np->n_flink = NIL; |
|
|
tailof(name) |
tailof(name) |
struct name *name; |
struct name *name; |
{ |
{ |
register struct name *np; |
struct name *np; |
|
|
np = name; |
np = name; |
if (np == NIL) |
if (np == NIL) |
|
|
char line[]; |
char line[]; |
int ntype; |
int ntype; |
{ |
{ |
register char *cp; |
char *cp; |
register struct name *top, *np, *t; |
struct name *top, *np, *t; |
char *nbuf; |
char *nbuf; |
|
|
if (line == NULL || *line == '\0') |
if (line == NULL || *line == '\0') |
return(NIL); |
return(NIL); |
if ((nbuf = (char *)malloc(strlen(line) + 1)) == NULL) |
if ((nbuf = (char *)malloc(strlen(line) + 1)) == NULL) |
panic("Out of memory"); |
errx(1, "Out of memory"); |
top = NIL; |
top = NIL; |
np = NIL; |
np = NIL; |
cp = line; |
cp = line; |
|
|
*/ |
*/ |
char * |
char * |
detract(np, ntype) |
detract(np, ntype) |
register struct name *np; |
struct name *np; |
int ntype; |
int ntype; |
{ |
{ |
register int s; |
int s, comma; |
register char *cp, *top; |
char *cp, *top; |
register struct name *p; |
struct name *p; |
register int comma; |
|
|
|
comma = ntype & GCOMMA; |
comma = ntype & GCOMMA; |
if (np == NIL) |
if (np == NIL) |
|
|
yankword(ap, wbuf) |
yankword(ap, wbuf) |
char *ap, wbuf[]; |
char *ap, wbuf[]; |
{ |
{ |
register char *cp, *cp2; |
char *cp, *cp2; |
|
|
cp = ap; |
cp = ap; |
for (;;) { |
for (;;) { |
if (*cp == '\0') |
if (*cp == '\0') |
return(NULL); |
return(NULL); |
if (*cp == '(') { |
if (*cp == '(') { |
register int nesting = 0; |
int nesting = 0; |
|
|
while (*cp != '\0') { |
while (*cp != '\0') { |
switch (*cp++) { |
switch (*cp++) { |
|
|
FILE *fo; |
FILE *fo; |
struct header *hp; |
struct header *hp; |
{ |
{ |
register int c; |
int c, ispipe; |
register struct name *np, *top; |
struct name *np, *top; |
time_t now; |
time_t now; |
char *date, *fname; |
char *date, *fname; |
FILE *fout, *fin; |
FILE *fout, *fin; |
int ispipe; |
|
|
|
top = names; |
top = names; |
np = names; |
np = names; |
|
|
isfileaddr(name) |
isfileaddr(name) |
char *name; |
char *name; |
{ |
{ |
register char *cp; |
char *cp; |
|
|
if (*name == '+') |
if (*name == '+') |
return(1); |
return(1); |
|
|
usermap(names) |
usermap(names) |
struct name *names; |
struct name *names; |
{ |
{ |
register struct name *new, *np, *cp; |
struct name *new, *np, *cp; |
struct grouphead *gh; |
struct grouphead *gh; |
register int metoo; |
int metoo; |
|
|
new = NIL; |
new = NIL; |
np = names; |
np = names; |
|
|
cat(n1, n2) |
cat(n1, n2) |
struct name *n1, *n2; |
struct name *n1, *n2; |
{ |
{ |
register struct name *tail; |
struct name *tail; |
|
|
if (n1 == NIL) |
if (n1 == NIL) |
return(n2); |
return(n2); |
|
|
unpack(np) |
unpack(np) |
struct name *np; |
struct name *np; |
{ |
{ |
register char **ap, **top; |
char **ap, **top; |
register struct name *n; |
struct name *n; |
int t, extra, metoo, verbose; |
int t, extra, metoo, verbose; |
|
|
n = np; |
n = np; |
if ((t = count(n)) == 0) |
if ((t = count(n)) == 0) |
panic("No names to unpack"); |
errx(1, "No names to unpack"); |
/* |
/* |
* Compute the number of extra arguments we will need. |
* Compute the number of extra arguments we will need. |
* We need at least two extra -- one for "mail" and one for |
* We need at least two extra -- one for "mail" and one for |
|
|
elide(names) |
elide(names) |
struct name *names; |
struct name *names; |
{ |
{ |
register struct name *np, *t, *new; |
struct name *np, *t, *new; |
struct name *x; |
struct name *x; |
|
|
if (names == NIL) |
if (names == NIL) |
|
|
*/ |
*/ |
int |
int |
count(np) |
count(np) |
register struct name *np; |
struct name *np; |
{ |
{ |
register int c; |
int c; |
|
|
for (c = 0; np != NIL; np = np->n_flink) |
for (c = 0; np != NIL; np = np->n_flink) |
if ((np->n_type & GDEL) == 0) |
if ((np->n_type & GDEL) == 0) |
|
|
*/ |
*/ |
struct name * |
struct name * |
delname(np, name) |
delname(np, name) |
register struct name *np; |
struct name *np; |
char name[]; |
char name[]; |
{ |
{ |
register struct name *p; |
struct name *p; |
|
|
for (p = np; p != NIL; p = p->n_flink) |
for (p = np; p != NIL; p = p->n_flink) |
if (strcasecmp(p->n_name, name) == 0) { |
if (strcasecmp(p->n_name, name) == 0) { |
|
|
prettyprint(name) |
prettyprint(name) |
struct name *name; |
struct name *name; |
{ |
{ |
register struct name *np; |
struct name *np; |
|
|
np = name; |
np = name; |
while (np != NIL) { |
while (np != NIL) { |