version 1.17, 2001/11/21 15:26:39 |
version 1.18, 2001/11/21 20:41:55 |
|
|
reedit(char *subj) |
reedit(char *subj) |
{ |
{ |
char *newsubj; |
char *newsubj; |
|
size_t len; |
|
|
if (subj == NULL) |
if (subj == NULL) |
return(NULL); |
return(NULL); |
|
|
(subj[1] == 'e' || subj[1] == 'E') && |
(subj[1] == 'e' || subj[1] == 'E') && |
subj[2] == ':') |
subj[2] == ':') |
return(subj); |
return(subj); |
newsubj = salloc(strlen(subj) + 5); |
len = strlen(subj) + 5; |
strcpy(newsubj, "Re: "); |
newsubj = salloc(len); |
strcpy(newsubj + 4, subj); |
strlcpy(newsubj, "Re: ", len); |
|
strlcat(newsubj, subj, len); |
return(newsubj); |
return(newsubj); |
} |
} |
|
|
|
|
gname = *argv; |
gname = *argv; |
h = hash(gname); |
h = hash(gname); |
if ((gh = findgroup(gname)) == NULL) { |
if ((gh = findgroup(gname)) == NULL) { |
gh = (struct grouphead *)calloc(sizeof(*gh), 1); |
if ((gh = (struct grouphead *)calloc(sizeof(*gh), 1)) == NULL) |
|
errx(1, "Out of memory"); |
gh->g_name = vcopy(gname); |
gh->g_name = vcopy(gname); |
gh->g_list = NULL; |
gh->g_list = NULL; |
gh->g_link = groups[h]; |
gh->g_link = groups[h]; |
|
|
*/ |
*/ |
|
|
for (ap = argv+1; *ap != NULL; ap++) { |
for (ap = argv+1; *ap != NULL; ap++) { |
gp = (struct group *)calloc(sizeof(*gp), 1); |
if ((gp = (struct group *)calloc(sizeof(*gp), 1)) == NULL) |
|
errx(1, "Out of memory"); |
gp->ge_name = vcopy(*ap); |
gp->ge_name = vcopy(*ap); |
gp->ge_link = gh->g_list; |
gp->ge_link = gh->g_list; |
gh->g_list = gp; |
gh->g_list = gp; |
|
|
alternates(void *v) |
alternates(void *v) |
{ |
{ |
char **namelist = v; |
char **namelist = v; |
char **ap, **ap2, *cp; |
char **ap, **ap2; |
int c; |
int c; |
|
|
c = argcount(namelist) + 1; |
c = argcount(namelist) + 1; |
|
|
} |
} |
if (altnames != 0) |
if (altnames != 0) |
(void)free(altnames); |
(void)free(altnames); |
altnames = (char **)calloc(c, sizeof(char *)); |
if ((altnames = (char **)calloc(c, sizeof(char *))) == NULL) |
|
errx(1, "Out of memory"); |
for (ap = namelist, ap2 = altnames; *ap; ap++, ap2++) { |
for (ap = namelist, ap2 = altnames; *ap; ap++, ap2++) { |
cp = (char *)calloc(strlen(*ap) + 1, sizeof(char)); |
if ((*ap2 = strdup(*ap)) == NULL) |
strcpy(cp, *ap); |
errx(1, "Out of memory"); |
*ap2 = cp; |
|
} |
} |
*ap2 = 0; |
*ap2 = 0; |
return(0); |
return(0); |