X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/29a1ada5b960fbf29d52e0f44911370a6c0c7c5f..0b05f0175b632c856ea4a2c4ae10c84694a1f385:/uip/mhbuildsbr.c diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index b8b28f24..adaadd10 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -13,16 +13,19 @@ * streamlining and removal of unneeded code. */ -#include +#include "h/mh.h" +#include "sbr/pidstatus.h" +#include "sbr/path.h" +#include "sbr/error.h" #include -#include -#include -#include -#include -#include -#include +#include "h/md5.h" +#include "h/mts.h" +#include "h/tws.h" +#include "h/fmt_scan.h" +#include "h/mime.h" +#include "h/mhparse.h" #include "h/done.h" -#include +#include "h/utils.h" #include "h/mhcachesbr.h" #include "mhmisc.h" #include "sbr/m_mktemp.h" @@ -82,12 +85,14 @@ static int extract_headers (CT, char *, FILE **); static unsigned char directives_stack[32]; static unsigned int directives_index; -static int do_direct(void) +static int +do_direct(void) { return directives_stack[directives_index]; } -static void directive_onoff(int onoff) +static void +directive_onoff(int onoff) { if (directives_index >= sizeof(directives_stack) - 1) { fprintf(stderr, "mhbuild: #on/off overflow, continuing\n"); @@ -96,13 +101,15 @@ static void directive_onoff(int onoff) directives_stack[++directives_index] = onoff; } -static void directive_init(int onoff) +static void +directive_init(int onoff) { directives_index = 0; directives_stack[0] = onoff; } -static void directive_pop(void) +static void +directive_pop(void) { if (directives_index > 0) directives_index--; @@ -2045,7 +2052,8 @@ setup_attach_content(CT ct, char *filename) * 'attachment'. */ void -set_disposition (CT ct) { +set_disposition (CT ct) +{ if (ct->c_dispo_type == NULL) { char *cp = context_find_by_type ("disposition", ct->c_ctinfo.ci_type, ct->c_ctinfo.ci_subtype); @@ -2075,7 +2083,8 @@ set_disposition (CT ct) { * -1: ignore content and use user's locale to determine charset */ void -set_charset (CT ct, int contains8bit) { +set_charset (CT ct, int contains8bit) +{ if (ct->c_type == CT_TEXT) { struct text *t; @@ -2114,7 +2123,8 @@ set_charset (CT ct, int contains8bit) { */ void expand_pseudoheaders (CT ct, struct multipart *m, const char *infile, - const convert_list *convert_head) { + const convert_list *convert_head) +{ /* text_plain_ct is used to concatenate all of the text/plain replies into one part, instead of having each one in a separate part. */ @@ -2190,7 +2200,8 @@ expand_pseudoheaders (CT ct, struct multipart *m, const char *infile, void expand_pseudoheader (CT ct, CT *text_plain_ct, struct multipart *m, const char *infile, const char *type, - const char *argstring) { + const char *argstring) +{ char *reply_file; FILE *reply_fp = NULL; char *convert, *type_p, *subtype_p; @@ -2339,7 +2350,8 @@ expand_pseudoheader (CT ct, CT *text_plain_ct, struct multipart *m, /* Extract any Content-Type header from beginning of convert output. */ int -extract_headers (CT ct, char *reply_file, FILE **reply_fp) { +extract_headers (CT ct, char *reply_file, FILE **reply_fp) +{ char *buffer = NULL, *cp, *end_of_header; bool found_header = false; struct stat statbuf;