Lines Matching refs:fp
78 FILE* fp;
99 ip = pp->fp;
169 if (ip != pp->fp) {
270 fseek(pp.fp, ap->raw.offset, SEEK_SET);
277 fseek(pp.fp, ap->offset, SEEK_SET);
314 if (filecopy("message body", lp->fp, state.tmp.mail, nfo, NiL, (off_t)0, NiL, NiL, 0)) {
318 rewind(lp->fp);
322 fileclose(lp->fp);
323 lp->fp = nfi;
334 register FILE* fp;
336 if (fp = fileopen(name, "Ea")) {
337 filecopy(NiL, lp->fp, name, fp, NiL, (off_t)0, NiL, NiL, GNL);
338 fileclose(fp);
339 rewind(lp->fp);
398 FILE* fp;
416 if (!(fp = fileopen(state.tmp.edit, "Ew+"))) {
421 filecopy(NiL, lp->fp, state.tmp.edit, fp, NiL, (off_t)0, NiL, NiL, GNL);
422 rewind(lp->fp);
423 n = start_command(state.var.shell, SIG_REG_EXEC, fileno(fp), -1, "-c", name, NiL);
424 fileclose(fp);
432 if (!(fp = fileopen(name, "Ea"))) {
436 filecopy(NiL, lp->fp, name, fp, NiL, (off_t)0, NiL, NiL, GNL);
437 rewind(lp->fp);
438 fileclose(fp);
462 * Get the result as letter.fp.
464 if (!(letter.fp = collect(hp, flags)))
473 if (!filesize(letter.fp))
490 fseek(letter.fp, letter.body, SEEK_SET);
491 savedeadletter(letter.fp);
511 filecopy(NiL, letter.fp, NiL, stdout, NiL, (off_t)0, NiL, NiL, 0);
521 fseek(letter.fp, letter.head, SEEK_SET);
522 fflush(letter.fp);
527 if (sendsmtp(letter.fp, s, args.argv + 1, (off_t)0)) {
528 fseek(letter.fp, letter.body, SEEK_SET);
529 savedeadletter(letter.fp);
532 else if ((pid = start_command(s, SIG_REG_EXEC|SIG_REG_TERM, fileno(letter.fp), -1, NiL, (char*)args.argv, NiL)) < 0) {
533 fseek(letter.fp, letter.body, SEEK_SET);
534 savedeadletter(letter.fp);
542 fileclose(letter.fp);
555 FILE* fp;
569 fputs(fs->label, fs->fp);
574 putc(',', fs->fp);
575 fputs("\n ", fs->fp);
580 putc(',', fs->fp);
583 putc(' ', fs->fp);
586 fputs(np->name, fs->fp);
596 fmt(FILE* fp, struct header* hp, const char* label, unsigned long flags, int comma)
604 fs.fp = fp;
607 putc('\n', fp);
611 * Dump the to, subject, cc header to fp.
614 headout(FILE* fp, struct header* hp, register unsigned long flags)
629 fprintf(fp, "%s\n", x->name);
634 fprintf(fp, "%s\n", state.var.fixedheaders);
635 fprintf(fp, "X-Mailer: %s\n", state.version);
636 fprintf(fp, "Mime-Version: 1.0\n");
638 fprintf(fp, "Content-Type: multipart/mixed; boundary=\"%s\"\n", state.part.out.boundary);
640 fprintf(fp, "Content-Type: text/plain; charset=us-ascii\n");
641 fprintf(fp, "Content-Transfer-Encoding: 7bit\n");
644 fprintf(fp, "References: ");
656 fprintf(fp, "%s ", s);
658 fprintf(fp, "%s\n", hp->h_messageid);
666 fprintf(fp, "%s%s\n", lp->name, hp->h_subject);
668 fmt(fp, hp, lp->name, lp->type, comma);
671 fprintf(fp, "%s\n", lp->name);
674 fprintf(fp, "%s\n\n", state.var.rule);
676 fputc('\n', fp);