From: markus schnalke Date: Tue, 1 May 2012 10:32:04 +0000 (+0200) Subject: mhbuild: Removed -rfc934mode switch, which is only useful for non-MIME systems. X-Git-Tag: mmh-thesis-end~63 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=3363e2624dce0eb8164cf8b3f1ab385c8ff72e88;p=mmh mhbuild: Removed -rfc934mode switch, which is only useful for non-MIME systems. We require MIME facilities to be available. --- diff --git a/h/mhparse.h b/h/mhparse.h index cca26e9..1954d89 100644 --- a/h/mhparse.h +++ b/h/mhparse.h @@ -110,7 +110,6 @@ struct Content { SizeCEFunc c_cesizefnx; /* size of decoded contents */ int c_umask; /* associated umask */ - int c_rfc934; /* rfc934 compatibility flag */ char *c_showproc; /* default, if not in profile */ char *c_storeproc; /* overrides profile entry, if any */ diff --git a/man/mhbuild.man1 b/man/mhbuild.man1 index b7c12e6..c2614e4 100644 --- a/man/mhbuild.man1 +++ b/man/mhbuild.man1 @@ -11,7 +11,6 @@ mhbuild \- translate MIME composition draft .I file .RB [ \-list " | " \-nolist ] .RB [ \-headers " | " \-noheaders ] -.RB [ \-rfc934mode " | " \-norfc934mode ] .RB [ \-contentid " | " \-nocontentid ] .RB [ \-verbose " | " \-noverbose ] .RB [ \-version ] @@ -197,11 +196,10 @@ is used to specify a message or group of messages to include. You may optionally specify the name of the folder and which messages are to be forwarded. If a folder is not given, it defaults to the current folder. Similarly, if a message is not -given, it defaults to the current message. Hence, the message directive -is similar to the -.B forw -command, except that the former uses -the MIME rules for encapsulation rather than those specified in RFC\-934. +given, it defaults to the current message. The message directive +is used by +.BR forw . +.PP For example, .PP .RS 5 @@ -217,20 +215,6 @@ then will add a content of type \*(lqmultipart/digest\*(rq and include each message as a subpart of this content. .PP -If you are using this directive to include more than one message, you -may use the -.B \-rfc934mode -switch. This switch will indicate that -.B mhbuild -should attempt to utilize the MIME encapsulation rules -in such a way that the \*(lqmultipart/digest\*(rq that is created -is (mostly) compatible with the encapsulation specified in RFC\-934. -If given, then RFC\-934 compliant user-agents should be able to burst the -message on reception\0--\0providing that the messages being encapsulated -do not contain encapsulated messages themselves. The drawback of this -approach is that the encapsulations are generated by placing an extra -newline at the end of the body of each message. -.PP .B "(3) The \*(lqbegin\*(rq directive is used to create a multipart content. When using the \*(lqbegin\*(rq directive, you must specify at least one @@ -517,10 +501,7 @@ line ::= "##" text EOL .fi .SH "SEE ALSO" -mhlist(1), show(1), mhstore(1), -.br -.I "Proposed Standard for Message Encapsulation" -(RFC\-934), +mhlist(1), show(1), mhstore(1), forw(1), .br .I "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies" (RFC\-2045), @@ -540,7 +521,6 @@ mhlist(1), show(1), mhstore(1), .SH DEFAULTS .nf .RB ` \-headers ' -.RB ` \-norfc934mode ' .RB ` \-contentid ' .RB ` \-noverbose ' .fi diff --git a/uip/mhbuild.c b/uip/mhbuild.c index 5cccd2a..fd6cee0 100644 --- a/uip/mhbuild.c +++ b/uip/mhbuild.c @@ -37,23 +37,19 @@ static struct swit switches[] = { { "list", 0 }, #define NLISTSW 3 { "nolist", 0 }, -#define RFC934SW 4 - { "rfc934mode", 0 }, -#define NRFC934SW 5 - { "norfc934mode", 0 }, -#define VERBSW 6 +#define VERBSW 4 { "verbose", 0 }, -#define NVERBSW 7 +#define NVERBSW 5 { "noverbose", 0 }, -#define CONTENTIDSW 8 +#define CONTENTIDSW 6 { "contentid", 0 }, -#define NCONTENTIDSW 9 +#define NCONTENTIDSW 7 { "nocontentid", 0 }, -#define VERSIONSW 10 +#define VERSIONSW 8 { "version", 0 }, -#define HELPSW 11 +#define HELPSW 9 { "help", 0 }, -#define DEBUGSW 12 +#define DEBUGSW 10 { "debug", -5 }, { NULL, 0 } }; @@ -100,7 +96,6 @@ int debugsw = 0; int verbosw = 0; int listsw = 0; -int rfc934sw = 0; int contentidsw = 1; /* @@ -192,13 +187,6 @@ main(int argc, char **argv) listsw = 0; continue; - case RFC934SW: - rfc934sw++; - continue; - case NRFC934SW: - rfc934sw = 0; - continue; - case CONTENTIDSW: contentidsw = 1; continue; @@ -1157,37 +1145,8 @@ compose_content(CT ct) return NOTOK; } - /* - ** If the -rfc934mode switch is given, then check all - ** the subparts of a multipart/digest. If they are all - ** message/rfc822, then mark this content and all - ** subparts with the rfc934 compatibility mode flag. - */ - if (rfc934sw && ct->c_subtype == MULTI_DIGEST) { - int is934 = 1; - - for (part = m->mp_parts; part; part = part->mp_next) { - CT p = part->mp_part; - - if (p->c_subtype != MESSAGE_RFC822) { - is934 = 0; - break; - } - } - ct->c_rfc934 = is934; - for (part = m->mp_parts; part; part = part->mp_next) { - CT p = part->mp_part; - - if ((p->c_rfc934 = is934)) - p->c_end++; - } - } - if (listsw) { ct->c_end = (partnum = strlen(prefix) + 2) + 2; - if (ct->c_rfc934) - ct->c_end += 1; - for (part = m->mp_parts; part; part = part->mp_next) ct->c_end += part->mp_part->c_end + partnum; } @@ -1606,16 +1565,6 @@ build_headers(CT ct) } /* - ** Skip the output of Content-Type, parameters, content - ** description and disposition, and Content-ID if the - ** content is of type "message" and the rfc934 compatibility - ** flag is set (which means we are inside multipart/digest - ** and the switch -rfc934mode was given). - */ - if (ct->c_type == CT_MESSAGE && ct->c_rfc934) - goto skip_headers; - - /* ** output the content type and subtype */ np = getcpy(TYPE_FIELD); @@ -1691,7 +1640,6 @@ build_headers(CT ct) add_header(ct, np, vp); } -skip_headers: /* ** output the Content-Transfer-Encoding */ diff --git a/uip/mhoutsbr.c b/uip/mhoutsbr.c index d517e6e..25495eb 100644 --- a/uip/mhoutsbr.c +++ b/uip/mhoutsbr.c @@ -96,9 +96,6 @@ output_content(CT ct, FILE *out) struct multipart *m; struct part *part; - if (ct->c_rfc934) - putc('\n', out); - m = (struct multipart *) ct->c_ctparams; for (part = m->mp_parts; part; part = part->mp_next) { CT p = part->mp_part;