X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/b0d15cadcb4d61a51073a099990e853808b39e6d..c347c3bb:/uip/mhoutsbr.c?ds=sidebyside diff --git a/uip/mhoutsbr.c b/uip/mhoutsbr.c index 6d65ab6f..bbddbc90 100644 --- a/uip/mhoutsbr.c +++ b/uip/mhoutsbr.c @@ -1,6 +1,4 @@ - -/* - * mhoutsbr.c -- routines to output MIME messages +/* mhoutsbr.c -- routines to output MIME messages * -- given a Content structure * * This code is Copyright (c) 2002, by the authors of nmh. See the @@ -21,7 +19,6 @@ /* * prototypes */ -int output_message (CT, char *); int output_message_fp (CT, FILE *, char *); /* @@ -54,23 +51,6 @@ output_message_fp (CT ct, FILE *fp, char *file) return OK; } -int -output_message (CT ct, char *file) -{ - FILE *fp; - int status; - - if (! strcmp (file, "-")) { - fp = stdout; - } else if ((fp = fopen (file, "w")) == NULL) { - advise (file, "unable to open for writing"); - return NOTOK; - } - status = output_message_fp(ct, fp, file); - if (strcmp (file, "-")) fclose(fp); - return status; -} - /* * Output a Content structure to a file. @@ -117,7 +97,7 @@ output_content (CT ct, FILE *out) m = (struct multipart *) ct->c_ctparams; if (m->mp_content_before) { - fprintf (out, "%s", m->mp_content_before); + fputs(m->mp_content_before, out); } for (part = m->mp_parts; part; part = part->mp_next) { @@ -133,7 +113,7 @@ output_content (CT ct, FILE *out) fprintf (out, "\n--%s--\n", boundary); if (m->mp_content_after) { - fprintf (out, "%s", m->mp_content_after); + fputs(m->mp_content_after, out); } } break; @@ -193,13 +173,13 @@ output_content (CT ct, FILE *out) putc ('\n', out); result = write8Bit (ct, out); } else { - advise (NULL, "can't handle binary transfer encoding in content"); + inform("can't handle binary transfer encoding in content"); result = NOTOK; } break; default: - advise (NULL, "unknown transfer encoding in content"); + inform("unknown transfer encoding in content"); result = NOTOK; break; } @@ -366,7 +346,7 @@ writeQuoted (CT ct, FILE *out) * doesn't falsely match an mbox delimiter. */ cp = bufp; - if (gotlen >= 5 && HasPrefix(cp, "From ")) { + if (gotlen >= 5 && has_prefix(cp, "From ")) { fprintf (out, "=%02X", 'F'); cp++; n += 3;