static int addfile (struct aka *, char *);
static int addgroup (struct aka *, char *);
static int addmember (struct aka *, char *);
-static int addall (struct aka *);
static char *getalias (char *);
static void add_aka (struct aka *, char *);
static struct aka *akalloc (char *);
}
break;
- case '*': /* Everyone */
- addall (ak);
- break;
-
default: /* list */
while ((cp = getalias (pp)))
add_aka (ak, cp);
}
-static int
-addall (struct aka *ak)
-{
- int noshell = NoShell == NULL || *NoShell == 0;
- register struct home *hm;
-
- init_pw ();
-
- if (Everyone < 0)
- Everyone = EVERYONE;
-
- for (hm = homehead; hm; hm = hm->h_next)
- if ((int) hm->h_uid > Everyone
- && (noshell || strcmp (hm->h_shell, NoShell)))
- add_aka (ak, hm->h_name);
-
- return homehead != NULL;
-}
-
-
static char *
getalias (char *addrs)
{
if (!strcmp (pp, ad->ad_text))
return;
- ad = (struct adr *) mh_xmalloc (sizeof(*ad));
+ NEW(ad);
ad->ad_text = getcpy (pp);
ad->ad_local = strchr(pp, '@') == NULL && strchr(pp, '!') == NULL;
ad->ad_next = NULL;
{
register struct aka *p;
- p = (struct aka *) mh_xmalloc (sizeof(*p));
-
+ NEW(p);
p->ak_name = getcpy (id);
p->ak_visible = 0;
p->ak_addr = NULL;
{
register struct home *p;
- p = (struct home *) mh_xmalloc (sizeof(*p));
-
+ NEW(p);
p->h_name = getcpy (pw->pw_name);
p->h_uid = pw->pw_uid;
p->h_gid = pw->pw_gid;