]> diplodocus.org Git - nmh/blobdiff - sbr/fmt_compile.c
Update instruction output to be a bit more cleaner
[nmh] / sbr / fmt_compile.c
index 014733427dcd6261cded324b744e0cac125cdc7b..9ef3946748cf932b977fdfff2b734deda81f67c3 100644 (file)
@@ -212,7 +212,6 @@ static struct ftable functable[] = {
      { "friendly",   TF_COMP,  FT_LS_FRIENDLY, FT_PARSEADDR,   TFL_PUTS },
 
      { "mymbox",     TF_COMP,  FT_LV_COMPFLAG, FT_MYMBOX,      TFL_PUTN },
-     { "addtoseq",   TF_STR,   FT_ADDTOSEQ,    0,              0 },
 
      { "unquote",   TF_EXPR,   FT_LS_UNQUOTE,  0,              TFL_PUTS},
 
@@ -857,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.