+/*
+ * Process each address with fmt_scan().
+ */
+
+struct pqpair {
+ char *pq_text;
+ char *pq_error;
+ struct pqpair *pq_next;
+};
+
+static void
+process_addresses(struct format *fmt, struct msgs_array *addrs, char *buffer,
+ int bufsize, int outwidth, int *dat, int norm)
+{
+ int i;
+ char *cp, error[BUFSIZ];
+ struct mailname *mp;
+ struct pqpair *p, *q;
+ struct pqpair pq;
+ struct comp *c;
+
+ if (dat[0] == -1)
+ dat[0] = 0;
+ if (dat[1] == -1)
+ dat[1] = 0;
+ if (dat[2] == -1)
+ dat[2] = 0;
+ if (dat[4] == -1)
+ dat[4] = 0;
+
+ for (i = 0; i < addrs->size; i++) {
+ (q = &pq)->pq_next = NULL;
+ while ((cp = getname(addrs->msgs[i]))) {
+ if ((p = (struct pqpair *) calloc ((size_t) 1, sizeof(*p))) == NULL)
+ adios (NULL, "unable to allocate pqpair memory");
+ if ((mp = getm(cp, NULL, 0, norm, error)) == NULL) {
+ p->pq_text = getcpy(cp);
+ p->pq_error = getcpy(error);
+ } else {
+ p->pq_text = getcpy(mp->m_text);
+ mnfree(mp);
+ }
+ q = (q->pq_next = p);
+ }
+
+ for (p = pq.pq_next; p; p = q) {
+ c = fmt_findcomp("text");
+ if (c) {
+ if (c->c_text)
+ free(c->c_text);
+ c->c_text = p->pq_text;
+ p->pq_text = NULL;
+ }
+ c = fmt_findcomp("error");
+ if (c) {
+ if (c->c_text)
+ free(c->c_text);
+ c->c_text = p->pq_error;
+ p->pq_error = NULL;
+ }
+
+ fmt_scan(fmt, buffer, bufsize, outwidth, dat);
+ fputs(buffer, stdout);
+
+ if (p->pq_text)
+ free(p->pq_text);
+ if (p->pq_error)
+ free(p->pq_error);
+ q = p->pq_next;
+ free(p);
+ }
+ }
+}
+
+/*
+ * Process messages and run them through the format engine
+ */
+
+static void
+process_messages(struct format *fmt, struct msgs_array *comps,
+ struct msgs_array *msgs, char *buffer, int bufsize,
+ int outwidth, int *dat)
+{
+}
+
+/*
+ * Run text through the format engine with no special processing
+ */
+
+static void
+process_raw(struct format *fmt, struct msgs_array *text, char *buffer,
+ int bufsize, int outwidth, int *dat)
+{
+}
+