+
+void fmt_free (struct format *fmt, int reset);
+
+/*
+ * Free all of the component text structures in the component hash table
+ */
+
+void fmt_freecomptext(void);
+
+/*
+ * Search for a component structure in the component hash table. Arguments are:
+ *
+ * component - The name of the component to search for. By convention
+ * all component names used in format strings are lower case,
+ * but for backwards compatibility this search is done in
+ * a case-SENSITIVE manner.
+ *
+ * This function returns a "struct comp" corresponding to the named component,
+ * or NULL if the component is not found in the hash table.
+ */
+
+struct comp *fmt_findcomp(char *component);
+
+/*
+ * Search for a component structure in the component hash table.
+ *
+ * Identical to fmd_findcomp(), but is case-INSENSITIVE.
+ */
+
+struct comp *fmt_findcasecomp(char *component);
+
+/*
+ * Add a component entry to the component hash table
+ *
+ * component - The name of the component to add to the hash table.
+ *
+ * If the component is already in the hash table, this function will do
+ * nothing. Returns 1 if a component was added, 0 if it already existed.
+ */
+
+int fmt_addcompentry(char *component);
+
+/*
+ * Add a string to a component hash table entry. Arguments are:
+ *
+ * component - The name of the component to add text to. The component
+ * is searched for in a case-INSENSITIVE manner (note that
+ * this is different than fmt_findcomp()). If the component
+ * is not found in the hash table, this function will silently
+ * return.
+ * text - The text to add to a component hash table entry. Note that
+ * if the last character of the existing component
+ * text is a newline AND it is marked as an address
+ * component (the the CT_ADDR flag is set) existing
+ * component buffer is a newline, it will be separated
+ * from previous text by ",\n\t"; otherwise if the last
+ * character of the previous text is a newline it will
+ * simply be separated by a "\t". This unusual processing
+ * is designed to handle the case where you have multiple
+ * headers with the same name (e.g.: multiple "cc:" headers,
+ * even though that isn't technically allowed in the RFCs).
+ *
+ * This function is designed to be called when you start processing a new
+ * component. The function returns the integer value of the hash table
+ * bucket corresponding to this component. If there was no entry found
+ * in the component hash table, this function will return -1.
+ */
+
+int fmt_addcomptext(char *component, char *text);
+
+/*
+ * Append to an existing component. Arguments are:
+ *
+ * bucket - The hash table bucket corresponding to this component,
+ * as returned by fmt_addcomp(). If -1, this function will
+ * return with no actions performed.
+ * component - The component to append text to. Like fmt_addcomp, the
+ * component is searched case-INSENSITIVELY.
+ * text - The text to append to the component. No special processing
+ * is done.
+ *
+ * This function is designed to be called when you are processing continuation
+ * lines on the same header (state == FLDPLUS).
+ */
+
+void fmt_appendcomp(int bucket, char *component, char *text);
+
+/*
+ * Iterate over the complete hash table of component structures.
+ *
+ * Arguments are:
+ *
+ * comp - Pointer to the current component structure. The next
+ * component in the hash table after this component. To
+ * start (or restart) the iteration of the hash table
+ * this argument should be NULL.
+ * bucket - Pointer to hash bucket. Will be managed by this function,
+ * the caller should not modify this value.
+ *
+ * Returns the next component in the hash table. This value should be
+ * passed into the next call to fmt_nextcomp(). Returns NULL at the end
+ * of the hash table.
+ */
+
+struct comp *fmt_nextcomp(struct comp *comp, unsigned int *bucket);
+
+/*
+ * The implementation of the %(formataddr) function. This is available for
+ * programs to provide their own local implementation if they wish to do
+ * special processing (see uip/replsbr.c for an example). Arguments are:
+ *
+ * orig - Existing list of addresses
+ * str - New address(es) to append to list.
+ *
+ * This function returns an allocated string containing the new list of
+ * addresses.
+ */
+
+char *formataddr(char *orig, char *str);
+
+/*
+ * The implementation of the %(concataddr) function. Arguments and behavior
+ * are the same as %(formataddr). Again, see uip/replsbr.c to see how you
+ * can override this behavior.
+ */
+
+char *concataddr(char *orig, char *str);