+#define NOWRAP 0x040000 /* Don't wrap lines ever */
+#define FMTFILTER 0x080000 /* Filter through format filter */
+#define INVISIBLE 0x100000 /* count byte in display columns? */
+#define FORCE7BIT 0x200000 /* don't display 8-bit bytes */
+#define LBITS "\020\01NOCOMPONENT\02UPPERCASE\03CENTER\04CLEARTEXT\05EXTRA\06HDROUTPUT\07CLEARSCR\010LEFTADJUST\011COMPRESS\012ADDRFMT\013BELL\014DATEFMT\015FORMAT\016INIT\017RTRIM\021SPLIT\022NONEWLINE\023NOWRAP\024FMTFILTER\025INVISIBLE\026FORCE7BIT"
+#define GFLAGS (NOCOMPONENT | UPPERCASE | CENTER | LEFTADJUST | COMPRESS | SPLIT | NOWRAP)
+
+/*
+ * A format string to be used as a command-line argument to the body
+ * format filter.
+ */
+
+struct arglist {
+ struct format *a_fmt;
+ char *a_nfs;
+ struct arglist *a_next;
+};
+
+/*
+ * Linked list of command line arguments for the body format filter. This
+ * USED to be in "struct mcomp", but the format API got cleaned up and even
+ * though it reduced the code we had to do, it make things more complicated
+ * for us. Specifically:
+ *
+ * - The interface to the hash table has been cleaned up, which means the
+ * rooting around in the hash table is no longer necessary (yay!). But
+ * this ALSO means that we have to make sure that we call our format
+ * compilation routines before we process the message, because the
+ * components need to be visible in the hash table so we can save them for
+ * later. So we moved them out of "mcomp" and now compile them right before
+ * header processing starts.
+ * - We also use format strings to handle other components in the mhl
+ * configuration (using "formatfield" and "decode"), but here life
+ * gets complicated: they aren't dealt with in the normal way. Instead
+ * of referring to a component like {from}, each component is processed
+ * using the special {text} component. But these format strings need to be
+ * compiled BEFORE we compile the format arguments; in the previous
+ * implementation they were compiled and scanned as the headers were
+ * read, and that would reset the hash table that we need to populate
+ * the components used by the body format filter. So we are compiling
+ * the formatfield component strings ahead of time and then scanning them
+ * later.
+ *
+ * Okay, fine ... this was broken before. But you know what? Fixing this
+ * the right way will make things easier down the road.
+ *
+ * One side-effect to this change: format strings are now compiled only once
+ * for components specified with "formatfield", but they are compiled for
+ * every message for format arguments.
+ */
+
+static struct arglist *arglist_head;
+static struct arglist *arglist_tail;
+static int filter_nargs = 0;
+
+/*
+ * Flags/options for each component
+ */