static void die (char *, char *, ...);
static void post (char *, int, int, int, char *, int, char *);
static void do_text (char *file, int fd);
-static int scan_input (int, int *);
static void do_an_address (struct mailname *, int);
static void do_addresses (int, int);
static int find_prefix (void);
should never have reached this point. Warn about any
that are non-empty. */
if (strcmp (str, "\n")) {
- char *newline = strchr (str, '\n');
- if (newline) *newline = '\0';
+ TrimSuffixC(str, '\n');
if (! whomsw) {
advise (NULL, "ignoring header line -- %s: %s", name, str);
}
msgflags |= (hdr->set & ~(MVIS | MINV));
if (hdr->flags & HSUB)
- subject = subject ? add (str, add ("\t", subject)) : getcpy (str);
+ subject = subject ? add (str, add ("\t", subject)) : mh_xstrdup(str);
if (hdr->flags & HFCC) {
if ((cp = strrchr(str, '\n')))
*cp = 0;
}
if (*aka && mp->m_type != UUCPHOST && !mp->m_pers)
- mp->m_pers = getcpy (aka);
+ mp->m_pers = mh_xstrdup(aka);
if (format) {
if (mp->m_gname) {
snprintf (buffer, sizeof(buffer), "%s;", mp->m_gname);
printf ("\n\t-- Folder Copies --\nfcc:\t");
for (i = 0; i < fccind; i++)
printf ("%s%s", fccfold[i], i + 1 < fccind ? ",\n\t" : "");
- printf ("\n");
+ putchar('\n');
}
if (fccind >= FCCS)
adios (NULL, "too many %ss", hdr->value);
- fccfold[fccind++] = getcpy (cp);
+ fccfold[fccind++] = mh_xstrdup(cp);
}
/*
}
-/*
- * See if input has any 8-bit bytes.
- */
-static int
-scan_input (int fd, int *eightbit) {
- int state;
- char buf[BUFSIZ];
-
- lseek (fd, (off_t) 0, SEEK_SET);
-
- while ((state = read (fd, buf, sizeof buf)) > 0) {
- if (contains8bit (buf, buf + state)) {
- *eightbit = 1;
- return OK;
- }
- }
-
- return state == NOTOK ? NOTOK : OK;
-}
-
-
/*
* SIGNAL HANDLING
*/