X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/29a1ada5b960fbf29d52e0f44911370a6c0c7c5f..148b4c486ec273fd1cfc70e2b099d8edc25ed8f3:/uip/mhbuildsbr.c diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index b8b28f24..e7b9c50b 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -13,16 +13,33 @@ * streamlining and removal of unneeded code. */ -#include +#include "h/mh.h" +#include "sbr/r1bindex.h" +#include "sbr/encode_rfc2047.h" +#include "sbr/copyip.h" +#include "sbr/cpydata.h" +#include "sbr/trimcpy.h" +#include "sbr/uprf.h" +#include "sbr/check_charset.h" +#include "sbr/getcpy.h" +#include "sbr/m_convert.h" +#include "sbr/getfolder.h" +#include "sbr/folder_read.h" +#include "sbr/folder_free.h" +#include "sbr/context_find.h" +#include "sbr/brkstring.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 +99,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 +115,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 +2066,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 +2097,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 +2137,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 +2214,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 +2364,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;