]> diplodocus.org Git - nmh/blobdiff - sbr/fmt_compile.c
Update instruction output to be a bit more cleaner
[nmh] / sbr / fmt_compile.c
index 437c811cff974ac173981c63b8748a39cfbc1fb3..9ef3946748cf932b977fdfff2b734deda81f67c3 100644 (file)
@@ -856,6 +856,24 @@ fmt_free(struct format *fmt, int reset_comptable)
        free_comptable();
 }
 
+/*
+ * Free just the text strings from all of the component hash table entries
+ */
+
+void
+fmt_freecomptext(void)
+{
+    unsigned int i;
+    struct comp *cm;
+
+    for (i = 0; i < sizeof(wantcomp)/sizeof(wantcomp[0]); i++)
+       for (cm = wantcomp[i]; cm; cm = cm->c_next)
+           if (cm->c_text) {
+               free(cm->c_text);
+               cm->c_text = NULL;
+           }
+}
+       
 /*
  * Find a component in our hash table.  This is just a public interface to
  * the FINDCOMP macro, so we don't have to expose our hash table.