+ if (!strcmp(bfr, folder) || !strcmp(bfr, "all")) {
+ for (++C1; *C1 && (*C1 == ' ' || *C1 == '\t'); ++C1);
+ if (!*C1) /* if empty list */
+ continue;
+ if (!pf) {
+ if (!(pf = popen(MAIL_CMD, "w")))
+ error("sendmail pipe failed.", CHN);
+ if (mailhead[SUBJ_TAG].found)
+ fprintf(pf, "%s", mailhead[SUBJ_TAG].line);
+ else
+ fputs("Subject: Untitled Bug Report\n", pf);
+ if (!mailhead[TO_TAG].line) {
+ if (mailhead[APPAR_TO_TAG].line)
+ fprintf(pf, "To%s",
+ index(mailhead[APPAR_TO_TAG].line,
+ ':'));
+ else
+ fprintf(pf, "To: %s\n", BUGS_ID);
+ }
+ fputs("Resent-To: ", pf);
+ }
+ /*
+ * write out first entry, then succeeding entries
+ * backward compatible, handles back slashes at end
+ * of line
+ */
+ if (group++)
+ fputs(", ", pf);
+ for (;;) {
+ if (C2 = index(C1, '\\'))
+ *C2 = EOS;
+ fputs(C1, pf);
+ if (!gets(bfr) || *bfr != ' ' && *bfr != '\t')
+ break;
+ for (C1 = bfr; *C1 && (*C1 == ' ' || *C1 == '\t'); ++C1);
+ }
+ }