+/*
+ * Process a single file in message mode
+ */
+
+static void
+process_single_file(FILE *in, struct msgs_array *comps, int *dat, int msgsize,
+ struct format *fmt, charstring_t buffer, int outwidth,
+ struct fmt_callbacks *cb)
+{
+ int i, state;
+ char name[NAMESZ], rbuf[NMH_BUFSIZ];
+ m_getfld_state_t gstate = 0;
+ struct comp *c;
+ int bufsz;
+
+ /*
+ * Get our size if we didn't include one
+ */
+
+ if (msgsize == -1) {
+ struct stat st;
+
+ if (fstat(fileno(in), &st) < 0)
+ dat[2] = 0;
+ else
+ dat[2] = st.st_size;
+ }
+
+ /*
+ * Initialize everyting else
+ */
+
+ if (dat[0] == -1)
+ dat[0] = 0;
+ if (dat[1] == -1)
+ dat[1] = 0;
+ if (dat[4] == -1)
+ dat[4] = 0;
+
+ /*
+ * Read in the message and process the components
+ */