+ if (parse_display_string (ct, cp, &xstdin, &xlist, file,
+ buffer, sizeof(buffer) - 1, 1)) {
+ admonish (NULL, "Buffer overflow constructing show command!\n");
+ return NOTOK;
+ }
+
+ return show_content_aux2 (ct, alternate, NULL, buffer, NOTOK, xlist, 0, fmt);
+}
+
+
+/*
+ * show content of type "message/rfc822"
+ */
+
+static int
+show_message_rfc822 (CT ct, int alternate, struct format *fmt)
+{
+ char *cp;
+ CI ci = &ct->c_ctinfo;
+
+ /* Check for invo_name-show-type[/subtype] */
+ if ((cp = context_find_by_type ("show", ci->ci_type, ci->ci_subtype)))
+ return show_content_aux (ct, alternate, cp, NULL, fmt);
+
+ if ((cp = ct->c_showproc))
+ return show_content_aux (ct, alternate, cp, NULL, fmt);
+
+ /* default method for message/rfc822 */
+ if (ct->c_subtype == MESSAGE_RFC822) {
+ cp = (ct->c_showproc = add ("%pshow -file %F", NULL));
+ return show_content_aux (ct, alternate, cp, NULL, fmt);
+ }
+
+ /* complain if we are not a part of a multipart/alternative */
+ if (!alternate)
+ content_error (NULL, ct, "don't know how to display content");
+
+ return NOTOK;
+}
+
+
+/*
+ * Show content of type "message/partial".
+ */
+
+static int
+show_partial (CT ct, int alternate)
+{
+ NMH_UNUSED (alternate);
+
+ content_error (NULL, ct,
+ "in order to display this message, you must reassemble it");
+ return NOTOK;
+}
+
+
+/*
+ * Show content of type "message/external".
+ *
+ * THE ERROR CHECKING IN THIS ONE IS NOT DONE YET.
+ */
+
+static int
+show_external (CT ct, int alternate, int concatsw, int textonly, int inlineonly,
+ struct format *fmt)
+{
+ struct exbody *e = (struct exbody *) ct->c_ctparams;
+ CT p = e->eb_content;
+
+ if (!type_ok (p, 0))
+ return OK;
+
+ return show_switch (p, alternate, concatsw, textonly, inlineonly, fmt);
+}
+
+
+static int
+parse_display_string (CT ct, char *cp, int *xstdin, int *xlist,
+ char *file, char *buffer, size_t buflen,
+ int multipart) {
+ int len, quoted = 0;
+ char *bp = buffer, *pp;
+ CI ci = &ct->c_ctinfo;