+
+ /*
+ * In other programs I got rid of this complicated buffer switching,
+ * but since scan reads lots of messages at once and this complicated
+ * memory management, I decided to keep it; otherwise there was
+ * the potential for a lot of malloc() and free()s, and I could
+ * see the malloc() pool really getting fragmented. Maybe it
+ * wouldn't be an issue in practice; perhaps this will get
+ * revisited someday.
+ *
+ * So, some notes for what's going on:
+ *
+ * nxtbuf is an array of pointers that contains malloc()'d buffers
+ * to hold our component text. used_buf is an array of struct comp
+ * pointers that holds pointers to component structures we found while
+ * processing a message.
+ *
+ * We read in the message with m_getfld(), using "tmpbuf" as our
+ * input buffer. tmpbuf is set at the start of message processing
+ * to the first buffer in our buffer pool (nxtbuf).
+ *
+ * Every time we find a component we care about, we set that component's
+ * text buffer to the current value of tmpbuf, and then switch tmpbuf
+ * to the next buffer in our pool. We also add that component to
+ * our used_buf pool.
+ *
+ * When we're done, we go back and zero out all of the component
+ * text buffer pointers that we saved in used_buf.
+ *
+ * Note that this means c_text memory is NOT owned by the fmt_module
+ * and it's our responsibility to free it.
+ */
+